Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
bb74e90
Implement dns routes for Android
lixmal Jun 16, 2025
49bbd90
Fix test
lixmal Jun 17, 2025
50ac3d4
Fix lint issues
lixmal Jun 17, 2025
631b77d
Remove some allocations
lixmal Jun 17, 2025
8e94d85
Rename test files
lixmal Jun 17, 2025
8684981
Add tests
lixmal Jun 17, 2025
7cd44a9
Improve nat perf
lixmal Jun 17, 2025
2952669
Fix lint
lixmal Jun 17, 2025
51b9e93
Merge branch 'main' into android-dns-routes
lixmal Jun 17, 2025
1a3b04d
Swap tracking and nat order
lixmal Jun 17, 2025
471f90e
Rename methods
lixmal Jun 17, 2025
d47c6b6
Fix spelling
lixmal Jun 17, 2025
f51ce7c
Remove nil checks
lixmal Jun 17, 2025
9468e69
Extract static error
lixmal Jun 17, 2025
306d75f
Set up fake ip route only if the dns feature flag is enabled
lixmal Jun 17, 2025
a79cb1c
Merge branch 'main' into android-dns-routes
lixmal Jun 18, 2025
26fc32f
Fix errorf
lixmal Jun 25, 2025
c788403
Revert "Fix errorf"
lixmal Jun 25, 2025
5fc95d4
Display domains properly
lixmal Jun 26, 2025
11bdf5b
Use r
lixmal Jun 26, 2025
5299e9f
Merge branch 'main' into android-dns-routes
lixmal Jul 2, 2025
0f79a89
Fix route notificaiton
lixmal Jul 2, 2025
520f2cf
Remove implicit inbound ssh firewall rules and change default port
lixmal Jun 18, 2025
6ed846a
Refactor ssh server and client
lixmal Jun 18, 2025
f56075c
Tidy mod
lixmal Jun 19, 2025
9d1554f
Complete overhaul
lixmal Jun 24, 2025
279b77d
Bump sftp
lixmal Jul 2, 2025
4bbca28
Fix lint
lixmal Jul 2, 2025
96084e3
Reduce complexity
lixmal Jul 2, 2025
0d5408b
Fix lint
lixmal Jul 2, 2025
5970591
Fix lint
lixmal Jul 2, 2025
1fdde66
More lint
lixmal Jul 2, 2025
612de2c
Remove socketfilter temporarily
lixmal Jul 2, 2025
76f9e11
Fix tests
lixmal Jul 2, 2025
6e15882
Fix tests and windows username validation
lixmal Jul 2, 2025
04bb314
Allow sftp same user switching on windows
lixmal Jul 3, 2025
3e490d9
Remove duplicated code
lixmal Jul 3, 2025
9e51d2e
Fix lint and sonar
lixmal Jul 3, 2025
a21f924
Fix some windows tests
lixmal Jul 3, 2025
a476b8d
Fix more windows tests
lixmal Jul 3, 2025
982841e
Test up tests users if none are available on CI
lixmal Jul 3, 2025
f1bb4d2
Fix more Windows tests
lixmal Jul 3, 2025
aa30b7a
More windows tests
lixmal Jul 3, 2025
0889566
Fix username validation and skip ci tests properly
lixmal Jul 3, 2025
a4b0675
Merge branch 'main' into ssh-rewrite
lixmal Jul 4, 2025
e4e0b8f
Remove empty file
lixmal Jul 4, 2025
cdded8c
Merge branch 'main' into ssh-rewrite
lixmal Jul 11, 2025
9a7daa1
Fix client ssh file
lixmal Jul 11, 2025
ac71208
Fix proto
lixmal Jul 11, 2025
fa893aa
Fix build
lixmal Jul 11, 2025
d93b7c2
Fix known hosts entries
lixmal Jul 14, 2025
758a97c
Generate ssh_config independently of ssh server
lixmal Jul 14, 2025
b43ef4f
Merge branch 'main' into ssh-rewrite
lixmal Aug 26, 2025
b1a9242
Fix merge commit changes
lixmal Aug 26, 2025
cdd5c6c
Address review
lixmal Aug 26, 2025
77a3527
Fix button style
lixmal Aug 26, 2025
79d28b7
Improve forwarding cancellation
lixmal Aug 26, 2025
4c53372
Add missing flags
lixmal Aug 27, 2025
5272fc2
Merge branch 'main' into ssh-rewrite
lixmal Sep 25, 2025
66483ab
Merge branch 'main' into ssh-rewrite
lixmal Oct 2, 2025
b3c7b3c
Fix js build
lixmal Oct 2, 2025
7e0bbaa
Merge branch 'main' into ssh-rewrite
lixmal Oct 7, 2025
d9efe4e
Add ssh authenatication with jwt (#4550)
lixmal Oct 7, 2025
f3d3169
Skip some auth tests on windows that are already covered
lixmal Oct 7, 2025
19adcb5
Merge branch 'main' into ssh-rewrite
lixmal Oct 8, 2025
610c880
Fix missing jwt config passed to peers
lixmal Oct 8, 2025
4d89d0f
Remove unused code
lixmal Oct 8, 2025
7216c20
Log priv check errors
lixmal Oct 8, 2025
559f6ae
Improve logging
lixmal Oct 8, 2025
4d29720
Fix test build
lixmal Oct 9, 2025
cf97799
Fix test
lixmal Oct 10, 2025
316c0af
Remove unused arg
lixmal Oct 10, 2025
34b55c6
Log errors on debug
lixmal Oct 10, 2025
4dadcfd
Remove client.log check
lixmal Oct 10, 2025
11d71e6
Ignore default log file
lixmal Oct 10, 2025
5882daf
Force relay connection, do not waste signaling resources on ICE conne…
pappz Oct 13, 2025
4386a21
Merge branch 'main' into ssh-rewrite
lixmal Oct 17, 2025
c20202a
Add new flags to test
lixmal Oct 17, 2025
6f14134
Merge branch 'main' into ssh-rewrite
lixmal Oct 28, 2025
e6854df
Improve session logging
lixmal Oct 28, 2025
576b4a7
Log shell
lixmal Oct 28, 2025
a7a85d4
Fix tests
lixmal Oct 28, 2025
107066f
Merge branch 'main' into ssh-rewrite
lixmal Oct 28, 2025
e3bb8c1
Merge branch 'main' into ssh-rewrite
lixmal Nov 3, 2025
6f817ca
Remove duplicate code
lixmal Nov 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion client/android/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ import (
"github.com/netbirdio/netbird/client/internal/peer"
"github.com/netbirdio/netbird/client/internal/profilemanager"
"github.com/netbirdio/netbird/client/internal/stdnet"
"github.com/netbirdio/netbird/client/net"
"github.com/netbirdio/netbird/client/system"
"github.com/netbirdio/netbird/formatter"
"github.com/netbirdio/netbird/client/net"
)

// ConnectionListener export internal Listener for mobile
Expand Down
88 changes: 88 additions & 0 deletions client/android/preferences.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,94 @@ func (p *Preferences) SetServerSSHAllowed(allowed bool) {
p.configInput.ServerSSHAllowed = &allowed
}

// GetEnableSSHRoot reads SSH root login setting from config file
func (p *Preferences) GetEnableSSHRoot() (bool, error) {
if p.configInput.EnableSSHRoot != nil {
return *p.configInput.EnableSSHRoot, nil
}

cfg, err := profilemanager.ReadConfig(p.configInput.ConfigPath)
if err != nil {
return false, err
}
if cfg.EnableSSHRoot == nil {
// Default to false for security on Android
return false, nil
}
return *cfg.EnableSSHRoot, err
}

// SetEnableSSHRoot stores the given value and waits for commit
func (p *Preferences) SetEnableSSHRoot(enabled bool) {
p.configInput.EnableSSHRoot = &enabled
}

// GetEnableSSHSFTP reads SSH SFTP setting from config file
func (p *Preferences) GetEnableSSHSFTP() (bool, error) {
if p.configInput.EnableSSHSFTP != nil {
return *p.configInput.EnableSSHSFTP, nil
}

cfg, err := profilemanager.ReadConfig(p.configInput.ConfigPath)
if err != nil {
return false, err
}
if cfg.EnableSSHSFTP == nil {
// Default to false for security on Android
return false, nil
}
return *cfg.EnableSSHSFTP, err
}

// SetEnableSSHSFTP stores the given value and waits for commit
func (p *Preferences) SetEnableSSHSFTP(enabled bool) {
p.configInput.EnableSSHSFTP = &enabled
}

// GetEnableSSHLocalPortForwarding reads SSH local port forwarding setting from config file
func (p *Preferences) GetEnableSSHLocalPortForwarding() (bool, error) {
if p.configInput.EnableSSHLocalPortForwarding != nil {
return *p.configInput.EnableSSHLocalPortForwarding, nil
}

cfg, err := profilemanager.ReadConfig(p.configInput.ConfigPath)
if err != nil {
return false, err
}
if cfg.EnableSSHLocalPortForwarding == nil {
// Default to false for security on Android
return false, nil
}
return *cfg.EnableSSHLocalPortForwarding, err
}

// SetEnableSSHLocalPortForwarding stores the given value and waits for commit
func (p *Preferences) SetEnableSSHLocalPortForwarding(enabled bool) {
p.configInput.EnableSSHLocalPortForwarding = &enabled
}

// GetEnableSSHRemotePortForwarding reads SSH remote port forwarding setting from config file
func (p *Preferences) GetEnableSSHRemotePortForwarding() (bool, error) {
if p.configInput.EnableSSHRemotePortForwarding != nil {
return *p.configInput.EnableSSHRemotePortForwarding, nil
}

cfg, err := profilemanager.ReadConfig(p.configInput.ConfigPath)
if err != nil {
return false, err
}
if cfg.EnableSSHRemotePortForwarding == nil {
// Default to false for security on Android
return false, nil
}
return *cfg.EnableSSHRemotePortForwarding, err
}

// SetEnableSSHRemotePortForwarding stores the given value and waits for commit
func (p *Preferences) SetEnableSSHRemotePortForwarding(enabled bool) {
p.configInput.EnableSSHRemotePortForwarding = &enabled
}

// GetBlockInbound reads block inbound setting from config file
func (p *Preferences) GetBlockInbound() (bool, error) {
if p.configInput.BlockInbound != nil {
Expand Down
3 changes: 0 additions & 3 deletions client/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ const (
wireguardPortFlag = "wireguard-port"
networkMonitorFlag = "network-monitor"
disableAutoConnectFlag = "disable-auto-connect"
serverSSHAllowedFlag = "allow-server-ssh"
extraIFaceBlackListFlag = "extra-iface-blacklist"
dnsRouteIntervalFlag = "dns-router-interval"
enableLazyConnectionFlag = "enable-lazy-connection"
Expand Down Expand Up @@ -64,7 +63,6 @@ var (
customDNSAddress string
rosenpassEnabled bool
rosenpassPermissive bool
serverSSHAllowed bool
interfaceName string
wireguardPort uint16
networkMonitor bool
Expand Down Expand Up @@ -176,7 +174,6 @@ func init() {
)
upCmd.PersistentFlags().BoolVar(&rosenpassEnabled, enableRosenpassFlag, false, "[Experimental] Enable Rosenpass feature. If enabled, the connection will be post-quantum secured via Rosenpass.")
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.")
upCmd.PersistentFlags().BoolVar(&serverSSHAllowed, serverSSHAllowedFlag, false, "Allow SSH server on peer. If enabled, the SSH server will be permitted")
upCmd.PersistentFlags().BoolVar(&autoConnectDisabled, disableAutoConnectFlag, false, "Disables auto-connect feature. If enabled, then the client won't connect automatically when the service starts.")
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.")

Expand Down
Loading
Loading