Skip to content

Commit cb2d1bd

Browse files
committed
Merge tag 'v0.60.2'
2 parents 55e75ff + 1311364 commit cb2d1bd

179 files changed

Lines changed: 19615 additions & 3014 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/check-license-dependencies.yml

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -19,35 +19,37 @@ jobs:
1919
runs-on: ubuntu-latest
2020

2121
steps:
22-
- uses: actions/checkout@v4
22+
- uses: actions/checkout@v4
2323

24-
- name: Check for problematic license dependencies
25-
run: |
26-
echo "Checking for dependencies on management/, signal/, and relay/ packages..."
27-
28-
# Find all directories except the problematic ones and system dirs
29-
FOUND_ISSUES=0
30-
find . -maxdepth 1 -type d -not -name "." -not -name "management" -not -name "signal" -not -name "relay" -not -name ".git*" | sort | while read dir; do
31-
echo "=== Checking $dir ==="
32-
# Search for problematic imports, excluding test files
33-
RESULTS=$(grep -r "github.com/netbirdio/netbird/\(management\|signal\|relay\)" "$dir" --include="*.go" | grep -v "_test.go" | grep -v "test_" | grep -v "/test/" || true)
34-
if [ ! -z "$RESULTS" ]; then
35-
echo "❌ Found problematic dependencies:"
36-
echo "$RESULTS"
37-
FOUND_ISSUES=1
38-
else
39-
echo "✓ No problematic dependencies found"
40-
fi
41-
done
42-
if [ $FOUND_ISSUES -eq 1 ]; then
24+
- name: Check for problematic license dependencies
25+
run: |
26+
echo "Checking for dependencies on management/, signal/, and relay/ packages..."
4327
echo ""
44-
echo "❌ Found dependencies on management/, signal/, or relay/ packages"
45-
echo "These packages are licensed under AGPLv3 and must not be imported by BSD-licensed code"
46-
exit 1
47-
else
28+
29+
# Find all directories except the problematic ones and system dirs
30+
FOUND_ISSUES=0
31+
while IFS= read -r dir; do
32+
echo "=== Checking $dir ==="
33+
# Search for problematic imports, excluding test files
34+
RESULTS=$(grep -r "github.com/netbirdio/netbird/\(management\|signal\|relay\)" "$dir" --include="*.go" 2>/dev/null | grep -v "_test.go" | grep -v "test_" | grep -v "/test/" || true)
35+
if [ -n "$RESULTS" ]; then
36+
echo "❌ Found problematic dependencies:"
37+
echo "$RESULTS"
38+
FOUND_ISSUES=1
39+
else
40+
echo "✓ No problematic dependencies found"
41+
fi
42+
done < <(find . -maxdepth 1 -type d -not -name "." -not -name "management" -not -name "signal" -not -name "relay" -not -name ".git*" | sort)
43+
4844
echo ""
49-
echo "✅ All internal license dependencies are clean"
50-
fi
45+
if [ $FOUND_ISSUES -eq 1 ]; then
46+
echo "❌ Found dependencies on management/, signal/, or relay/ packages"
47+
echo "These packages are licensed under AGPLv3 and must not be imported by BSD-licensed code"
48+
exit 1
49+
else
50+
echo ""
51+
echo "✅ All internal license dependencies are clean"
52+
fi
5153
5254
check-external-licenses:
5355
name: Check External GPL/AGPL Licenses

client/android/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ import (
1717
"github.com/netbirdio/netbird/client/internal/peer"
1818
"github.com/netbirdio/netbird/client/internal/profilemanager"
1919
"github.com/netbirdio/netbird/client/internal/stdnet"
20+
"github.com/netbirdio/netbird/client/net"
2021
"github.com/netbirdio/netbird/client/system"
2122
"github.com/netbirdio/netbird/formatter"
22-
"github.com/netbirdio/netbird/client/net"
2323
)
2424

2525
// ConnectionListener export internal Listener for mobile

client/android/preferences.go

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,94 @@ func (p *Preferences) SetServerSSHAllowed(allowed bool) {
201201
p.configInput.ServerSSHAllowed = &allowed
202202
}
203203

204+
// GetEnableSSHRoot reads SSH root login setting from config file
205+
func (p *Preferences) GetEnableSSHRoot() (bool, error) {
206+
if p.configInput.EnableSSHRoot != nil {
207+
return *p.configInput.EnableSSHRoot, nil
208+
}
209+
210+
cfg, err := profilemanager.ReadConfig(p.configInput.ConfigPath)
211+
if err != nil {
212+
return false, err
213+
}
214+
if cfg.EnableSSHRoot == nil {
215+
// Default to false for security on Android
216+
return false, nil
217+
}
218+
return *cfg.EnableSSHRoot, err
219+
}
220+
221+
// SetEnableSSHRoot stores the given value and waits for commit
222+
func (p *Preferences) SetEnableSSHRoot(enabled bool) {
223+
p.configInput.EnableSSHRoot = &enabled
224+
}
225+
226+
// GetEnableSSHSFTP reads SSH SFTP setting from config file
227+
func (p *Preferences) GetEnableSSHSFTP() (bool, error) {
228+
if p.configInput.EnableSSHSFTP != nil {
229+
return *p.configInput.EnableSSHSFTP, nil
230+
}
231+
232+
cfg, err := profilemanager.ReadConfig(p.configInput.ConfigPath)
233+
if err != nil {
234+
return false, err
235+
}
236+
if cfg.EnableSSHSFTP == nil {
237+
// Default to false for security on Android
238+
return false, nil
239+
}
240+
return *cfg.EnableSSHSFTP, err
241+
}
242+
243+
// SetEnableSSHSFTP stores the given value and waits for commit
244+
func (p *Preferences) SetEnableSSHSFTP(enabled bool) {
245+
p.configInput.EnableSSHSFTP = &enabled
246+
}
247+
248+
// GetEnableSSHLocalPortForwarding reads SSH local port forwarding setting from config file
249+
func (p *Preferences) GetEnableSSHLocalPortForwarding() (bool, error) {
250+
if p.configInput.EnableSSHLocalPortForwarding != nil {
251+
return *p.configInput.EnableSSHLocalPortForwarding, nil
252+
}
253+
254+
cfg, err := profilemanager.ReadConfig(p.configInput.ConfigPath)
255+
if err != nil {
256+
return false, err
257+
}
258+
if cfg.EnableSSHLocalPortForwarding == nil {
259+
// Default to false for security on Android
260+
return false, nil
261+
}
262+
return *cfg.EnableSSHLocalPortForwarding, err
263+
}
264+
265+
// SetEnableSSHLocalPortForwarding stores the given value and waits for commit
266+
func (p *Preferences) SetEnableSSHLocalPortForwarding(enabled bool) {
267+
p.configInput.EnableSSHLocalPortForwarding = &enabled
268+
}
269+
270+
// GetEnableSSHRemotePortForwarding reads SSH remote port forwarding setting from config file
271+
func (p *Preferences) GetEnableSSHRemotePortForwarding() (bool, error) {
272+
if p.configInput.EnableSSHRemotePortForwarding != nil {
273+
return *p.configInput.EnableSSHRemotePortForwarding, nil
274+
}
275+
276+
cfg, err := profilemanager.ReadConfig(p.configInput.ConfigPath)
277+
if err != nil {
278+
return false, err
279+
}
280+
if cfg.EnableSSHRemotePortForwarding == nil {
281+
// Default to false for security on Android
282+
return false, nil
283+
}
284+
return *cfg.EnableSSHRemotePortForwarding, err
285+
}
286+
287+
// SetEnableSSHRemotePortForwarding stores the given value and waits for commit
288+
func (p *Preferences) SetEnableSSHRemotePortForwarding(enabled bool) {
289+
p.configInput.EnableSSHRemotePortForwarding = &enabled
290+
}
291+
204292
// GetBlockInbound reads block inbound setting from config file
205293
func (p *Preferences) GetBlockInbound() (bool, error) {
206294
if p.configInput.BlockInbound != nil {

client/cmd/root.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ const (
3535
wireguardPortFlag = "wireguard-port"
3636
networkMonitorFlag = "network-monitor"
3737
disableAutoConnectFlag = "disable-auto-connect"
38-
serverSSHAllowedFlag = "allow-server-ssh"
3938
extraIFaceBlackListFlag = "extra-iface-blacklist"
4039
dnsRouteIntervalFlag = "dns-router-interval"
4140
enableLazyConnectionFlag = "enable-lazy-connection"
@@ -64,7 +63,6 @@ var (
6463
customDNSAddress string
6564
rosenpassEnabled bool
6665
rosenpassPermissive bool
67-
serverSSHAllowed bool
6866
interfaceName string
6967
wireguardPort uint16
7068
networkMonitor bool
@@ -176,7 +174,6 @@ func init() {
176174
)
177175
upCmd.PersistentFlags().BoolVar(&rosenpassEnabled, enableRosenpassFlag, false, "[Experimental] Enable Rosenpass feature. If enabled, the connection will be post-quantum secured via Rosenpass.")
178176
upCmd.PersistentFlags().BoolVar(&rosenpassPermissive, rosenpassPermissiveFlag, false, "[Experimental] Enable Rosenpass in permissive mode to allow this peer to accept WireGuard connections without requiring Rosenpass functionality from peers that do not have Rosenpass enabled.")
179-
upCmd.PersistentFlags().BoolVar(&serverSSHAllowed, serverSSHAllowedFlag, false, "Allow SSH server on peer. If enabled, the SSH server will be permitted")
180177
upCmd.PersistentFlags().BoolVar(&autoConnectDisabled, disableAutoConnectFlag, false, "Disables auto-connect feature. If enabled, then the client won't connect automatically when the service starts.")
181178
upCmd.PersistentFlags().BoolVar(&lazyConnEnabled, enableLazyConnectionFlag, false, "[Experimental] Enable the lazy connection feature. If enabled, the client will establish connections on-demand. Note: this setting may be overridden by management configuration.")
182179

0 commit comments

Comments
 (0)