netbird/client/net
Viktor Liu 55126f990c
[client] Use native windows sock opts to avoid routing loops (#4314)
- Move `util/grpc` and `util/net` to `client` so `internal` packages can be accessed
 - Add methods to return the next best interface after the NetBird interface.
- Use `IP_UNICAST_IF` sock opt to force the outgoing interface for the NetBird `net.Dialer` and `net.ListenerConfig` to avoid routing loops. The interface is picked by the new route lookup method.
- Some refactoring to avoid import cycles
- Old behavior is available through `NB_USE_LEGACY_ROUTING=true` env var
2025-09-20 09:31:04 +02:00
..
hooks [client] Use native windows sock opts to avoid routing loops (#4314) 2025-09-20 09:31:04 +02:00
conn.go [client] Use native windows sock opts to avoid routing loops (#4314) 2025-09-20 09:31:04 +02:00
dial_ios.go [client] Use native windows sock opts to avoid routing loops (#4314) 2025-09-20 09:31:04 +02:00
dial.go [client] Use native windows sock opts to avoid routing loops (#4314) 2025-09-20 09:31:04 +02:00
dialer_dial.go [client] Use native windows sock opts to avoid routing loops (#4314) 2025-09-20 09:31:04 +02:00
dialer_init_android.go [client] Use native windows sock opts to avoid routing loops (#4314) 2025-09-20 09:31:04 +02:00
dialer_init_generic.go [client] Use native windows sock opts to avoid routing loops (#4314) 2025-09-20 09:31:04 +02:00
dialer_init_linux.go [client] Use native windows sock opts to avoid routing loops (#4314) 2025-09-20 09:31:04 +02:00
dialer_init_windows.go [client] Use native windows sock opts to avoid routing loops (#4314) 2025-09-20 09:31:04 +02:00
dialer.go [client] Use native windows sock opts to avoid routing loops (#4314) 2025-09-20 09:31:04 +02:00
env_android.go [client] Use native windows sock opts to avoid routing loops (#4314) 2025-09-20 09:31:04 +02:00
env_generic.go [client] Use native windows sock opts to avoid routing loops (#4314) 2025-09-20 09:31:04 +02:00
env_linux.go [client] Use native windows sock opts to avoid routing loops (#4314) 2025-09-20 09:31:04 +02:00
env_windows.go [client] Use native windows sock opts to avoid routing loops (#4314) 2025-09-20 09:31:04 +02:00
env.go [client] Use native windows sock opts to avoid routing loops (#4314) 2025-09-20 09:31:04 +02:00
listen_ios.go [client] Use native windows sock opts to avoid routing loops (#4314) 2025-09-20 09:31:04 +02:00
listen.go [client] Use native windows sock opts to avoid routing loops (#4314) 2025-09-20 09:31:04 +02:00
listener_init_android.go [client] Use native windows sock opts to avoid routing loops (#4314) 2025-09-20 09:31:04 +02:00
listener_init_generic.go [client] Use native windows sock opts to avoid routing loops (#4314) 2025-09-20 09:31:04 +02:00
listener_init_linux.go [client] Use native windows sock opts to avoid routing loops (#4314) 2025-09-20 09:31:04 +02:00
listener_init_windows.go [client] Use native windows sock opts to avoid routing loops (#4314) 2025-09-20 09:31:04 +02:00
listener_listen_ios.go [client] Use native windows sock opts to avoid routing loops (#4314) 2025-09-20 09:31:04 +02:00
listener_listen.go [client] Use native windows sock opts to avoid routing loops (#4314) 2025-09-20 09:31:04 +02:00
listener.go [client] Use native windows sock opts to avoid routing loops (#4314) 2025-09-20 09:31:04 +02:00
net_linux.go [client] Use native windows sock opts to avoid routing loops (#4314) 2025-09-20 09:31:04 +02:00
net_test.go [client] Use native windows sock opts to avoid routing loops (#4314) 2025-09-20 09:31:04 +02:00
net_windows.go [client] Use native windows sock opts to avoid routing loops (#4314) 2025-09-20 09:31:04 +02:00
net.go [client] Use native windows sock opts to avoid routing loops (#4314) 2025-09-20 09:31:04 +02:00
protectsocket_android.go [client] Use native windows sock opts to avoid routing loops (#4314) 2025-09-20 09:31:04 +02:00