Commit Graph
648 Commits
Author SHA1 Message Date
Zoltán Papp ae78baade6 Merge branch 'main' into refactor/reducate-signaling 2025-10-01 14:55:57 +02:00
Zoltan Papp 5e1a40c33f [client] Order the list of candidates for proper comparison (#4561)
Order the list of candidates for proper comparison
2025-09-30 23:40:46 +02:00
Zoltan Papp e8d301fdc9 [client] Fix/pkg loss (#3338)
The Relayed connection setup is optimistic. It does not have any confirmation of an established end-to-end connection. Peers start sending WireGuard handshake packets immediately after the successful offer-answer handshake.
Meanwhile, for successful P2P connection negotiation, we change the WireGuard endpoint address, but this change does not trigger new handshake initiation. Because the peer switched from Relayed connection to P2P, the packets from the Relay server are dropped and must wait for the next WireGuard handshake via P2P.

To avoid this scenario, the relayed WireGuard proxy no longer drops the packets. Instead, it rewrites the source address to the new P2P endpoint and continues forwarding the packets.

We still have one corner case: if the Relayed server negotiation chooses a server that has not been used before. In this case, one side of the peer connection will be slower to reach the Relay server, and the Relay server will drop the handshake packet.

If everything goes well we should see exactly 5 seconds improvements between the WireGuard configuration time and the handshake time.
2025-09-30 15:31:18 +02:00
Zoltán Papp acfcef3d54 Merge branch 'main' into refactor/reducate-signaling 2025-09-29 22:03:00 +02:00
Zoltán Papp f9992c3ac8 Fix sonar issue 2025-09-29 21:36:04 +02:00
Zoltán Papp 52f4290be6 Fix error handling 2025-09-29 21:30:35 +02:00
Zoltán Papp a2f8667f9d Fix backward compatibility with old clients 2025-09-29 21:24:02 +02:00
Zoltán Papp 1d940b7ec0 Add log message 2025-09-29 16:58:06 +02:00
Zoltán Papp 47036cc625 Rename RetryGuard to GuardRetry 2025-09-26 17:34:39 +02:00
hakansa 17bab881f7 [client] Add Windows DNS Policies To GPO Path Always (#4460)
[client] Add Windows DNS Policies To GPO Path Always (#4460)
2025-09-26 16:42:18 +07:00
Zoltán Papp f17ea2aa57 Add guard switch 2025-09-25 20:31:26 +02:00
Zoltán Papp 316fc15701 add comment 2025-09-25 17:49:44 +02:00
Zoltán Papp 9aab153090 Fix resend 2025-09-25 16:31:45 +02:00
Zoltán Papp c38e0d9678 Fix test 2025-09-25 16:13:01 +02:00
Zoltán Papp 48e45b64bb Resend msg 2025-09-25 15:41:03 +02:00
Zoltán Papp 2e20c978b3 Handle unimplemented method 2025-09-25 15:32:59 +02:00
Zoltán Papp 9184a0c6ac Update logs and doc 2025-09-25 13:01:11 +02:00
Zoltán Papp 7ba8b926f0 Fix offer error sending channel 2025-09-25 12:52:12 +02:00
Zoltán Papp 71733dff3e Add error code handling 2025-09-25 12:46:05 +02:00
hakansa 644ed4b934 [client] Add WireGuard interface lifecycle monitoring (#4370)
* [client] Add WireGuard interface lifecycle monitoring
2025-09-25 15:36:26 +07:00
Zoltán Papp 4d46adbb68 Add wantDeliveryError option for signal proto 2025-09-24 14:53:09 +02:00
Zoltán Papp 0753766336 Add signal error handling 2025-09-23 18:54:40 +02:00
Zoltán Papp 52d8bdfc78 Merge branch 'main' into refactor/reducate-signaling 2025-09-23 11:22:12 +02:00
Viktor Liu 5853b5553c [client] Skip interface for route lookup if it doesn't exist (#4524) 2025-09-22 14:32:00 +02:00
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
Zoltán Papp 56c67fdf08 Remove retry logic for P2P connection
- send initial offer when open Peer connection
- remove retry ticker
- only controller send answer
2025-09-16 11:33:53 +02:00
Zoltan Papp bd23ab925e [client] Fix ICE latency handling (#4501)
The GetSelectedCandidatePair() does not carry the latency information.
2025-09-15 15:08:53 +02:00
Zoltan Papp 47e64d72db [client] Fix client status check (#4474)
The client status is not enough to protect the RPC calls from concurrency issues, because it is handled internally in the client in an asynchronous way.
2025-09-11 16:21:09 +02:00
Zoltan Papp 9e81e782e5 [client] Fix/v4 stun routing (#4430)
Deduplicate STUN package sending.
Originally, because every peer shared the same UDP address, the library could not distinguish which STUN message was associated with which candidate. As a result, the Pion library responded from all candidates for every STUN message.
2025-09-11 10:08:54 +02:00
Zoltan Papp 7aef0f67df [client] Implement environment variable handling for Android (#4440)
Some features can only be manipulated via environment variables. With this PR, environment variables can be managed from Android.
2025-09-08 18:42:42 +02:00
Zoltan Papp 69d87343d2 [client] Debug information for connection (#4439)
Improve logging

Print the exact time when the first WireGuard handshake occurs
Print the steps for gathering system information
2025-09-08 14:51:34 +02:00
Bethuel Mmbaga 5113c70943 [management] Extends integration and peers manager (#4450) 2025-09-06 13:13:49 +03:00
Zoltan Papp 786ca6fc79 Do not block Offer processing from relay worker (#4435)
- do not miss ICE offers when relay worker busy
- close p2p connection before recreate agent
2025-09-05 11:02:29 +02:00
Diego Romar dfebdf1444 [internal] Add missing assignment of iFaceDiscover when netstack is disabled (#4444)
The internal updateInterfaces() function expects iFaceDiscover to not
be nil
2025-09-04 23:00:10 +02:00
Bethuel Mmbaga a8dcff69c2 [management] Add peers manager to integrations (#4405) 2025-09-04 23:07:03 +03:00
Zoltan Papp 21368b38d9 [client] Update Pion ICE to the latest version (#4388)
- Update Pion version
- Update protobuf version
2025-09-01 10:42:01 +02:00
Viktor Liu d4c067f0af [client] Don't deactivate upstream resolvers on failure (#4128) 2025-08-29 17:40:05 +02:00
Krzysztof Nazarewski (kdn) 7ce5507c05 [client] fix darwin dns always throwing err (#4403)
* fix: dns/host_darwin.go was missing if err != nil before throwing error
2025-08-27 09:59:39 +02:00
Viktor Liu f063866ce8 [client] Add flag to configure MTU (#4213) 2025-08-26 16:00:14 +02:00
plusls 9f84165763 [client] Add netstack support for Android cli (#4319) 2025-08-26 15:40:01 +02:00
Bethuel Mmbaga 968d95698e [management] Bump github.com/golang-jwt/jwt from 3.2.2+incompatible to 5.3.0 (#4375) 2025-08-21 15:02:51 +03:00
Zoltan Papp f425870c8e [client] Avoid duplicated agent close (#4383) 2025-08-20 18:50:51 +02:00
hakansa 533d93eb17 [management,client] Feat/exit node auto apply (#4272)
[management,client] Feat/exit node auto apply (#4272)
2025-08-19 18:19:24 +03:00
Zoltan Papp 12cad854b2 [client] Fix/ice handshake (#4281)
In this PR, speed up the GRPC message processing, force the recreation of the ICE agent when getting a new, remote offer (do not wait for local STUN timeout).
2025-08-18 20:09:50 +02:00
Pascal Fischer b3056d0937 [management] Use DI containers for server bootstrapping (#4343) 2025-08-15 17:14:48 +02:00
Bethuel Mmbaga a4e8647aef [management] Enable flow groups (#4230)
Adds the ability to limit traffic events logging to specific peer groups
2025-08-13 00:00:40 +03:00
Viktor Liu 160b811e21 [client] Distinguish between NXDOMAIN and NODATA in the dns forwarder (#4321) 2025-08-12 15:59:42 +02:00
Viktor Liu 5e607cf4e9 [client] Skip dns upstream servers pointing to our dns server IP to prevent loops (#4330) 2025-08-12 15:41:23 +02:00
Viktor Liu 0fdb944058 [client] Create NRPT rules separately per domain (#4329) 2025-08-12 15:40:37 +02:00
Viktor Liu 1022a5015c [client] Eliminate upstream server strings in dns code (#4267) 2025-08-11 11:57:21 +02:00