Commit Graph

1735 Commits

Author SHA1 Message Date
Zoltán Papp
e147c1b1a1 Update tls doc 2024-12-07 10:15:05 +01:00
Zoltán Papp
57f54fb18c Change keep alive period and max idle timeout 2024-12-07 10:12:17 +01:00
Zoltan Papp
ceaf62aad1 Update quic-go lib to v0.48.2 2024-12-06 22:59:41 +01:00
Zoltán Papp
ef3fd5c991 Fix server close operation
First close the connection with the peers
and after close the listeners
2024-12-06 15:30:29 +01:00
Zoltán Papp
5b163e8aa2 Replace io.EOF to net.ErrClosed 2024-12-06 12:22:37 +01:00
Zoltán Papp
3be68ae552 Remove unused variable 2024-12-06 12:22:06 +01:00
Zoltán Papp
e69b8f5788 Fix error type in QUIC listener 2024-12-03 13:33:14 +01:00
Zoltan Papp
81425872e1 Lint fixes
- remove unused variable
- rename Struct
2024-12-02 11:49:49 +01:00
Zoltan Papp
620c6789ea Fix Sonar issue
Reduce code of complexity
2024-12-02 11:35:37 +01:00
Zoltan Papp
e9d8f7f1ce Fix Sonar issues
Reduce cognitive complexity
2024-12-02 11:33:32 +01:00
Zoltan Papp
f85c52ec70 Use dev-cert build tag in CI 2024-12-02 11:14:19 +01:00
Zoltan Papp
4dd581a2d3 Rename build tag from dev to devcert 2024-12-02 10:33:00 +01:00
Zoltán Papp
10ead6dc4d Add tests 2024-11-28 18:11:30 +01:00
Zoltán Papp
a05117b737 Fix abort 2024-11-28 18:11:15 +01:00
Zoltán Papp
5d4899cb78 Fix logging and error handling 2024-11-28 17:34:09 +01:00
Zoltán Papp
b9e3c71f40 Fix missing imports 2024-11-28 17:11:28 +01:00
Zoltán Papp
9196104859 Add race dialer 2024-11-28 11:53:35 +01:00
Zoltán Papp
ceb8a01573 Fix next protos in dev env 2024-11-27 18:22:44 +01:00
Zoltán Papp
bca8944e7a TLS configuration
- handle the same AlPN list
- use dev build tag for debugging purposes
2024-11-27 18:14:17 +01:00
Zoltán Papp
3a447c066b Use custom dialer in QUIC 2024-11-25 22:06:52 +01:00
Zoltán Papp
b23169de63 Add quick listener 2024-11-15 19:36:09 +01:00
Zoltán Papp
b82b4a07fc Quic support 2024-11-15 17:06:11 +01:00
Zoltán Papp
812b08c473 Lint ignore 2024-11-15 17:06:11 +01:00
Zoltan Papp
8f5cefaf3a Update client/iface/bind/ice_bind.go
Co-authored-by: Viktor Liu <17948409+lixmal@users.noreply.github.com>
2024-11-15 17:06:11 +01:00
Pascal Fischer
44e799c687
[management] Fix limited peer view groups (#2894) 2024-11-15 11:16:16 +01:00
Viktor Liu
be78efbd42
[client] Handle panic on nil wg interface (#2891) 2024-11-14 20:15:16 +01:00
Maycon Santos
6886691213
Update route calculation tests (#2884)
- Add two new test cases for p2p and relay routes with same latency
- Add extra statuses generation
2024-11-13 15:21:33 +01:00
Zoltan Papp
b48afd92fd
[relay-server] Always close ws conn when work thread exit (#2879)
Close ws conn when work thread exit
2024-11-13 15:02:51 +01:00
Viktor Liu
39329e12a1
[client] Improve state write timeout and abort work early on timeout (#2882)
* Improve state write timeout and abort work early on timeout

* Don't block on initial persist state
2024-11-13 13:46:00 +01:00
Pascal Fischer
20a5afc359
[management] Add more logs to the peer update processes (#2881) 2024-11-12 14:19:22 +01:00
Bethuel Mmbaga
6cb697eed6
[management] Refactor setup key to use store methods (#2861)
* Refactor setup key handling to use store methods

Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com>

* add lock to get account groups

Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com>

* add check for regular user

Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com>

* get only required groups for auto-group validation

Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com>

* add account lock and return auto groups map on validation

Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com>

* fix missing group removed from setup key activity

Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com>

* Remove context from DB queries

Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com>

* Add user permission check and add setup events into events to store slice

Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com>

* Retrieve all groups once during setup key auto-group validation

Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com>

* Fix lint

Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com>

* Fix sonar

Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com>

---------

Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com>
2024-11-11 19:46:10 +03:00
Viktor Liu
e0bed2b0fb
[client] Fix race conditions (#2869)
* Fix concurrent map access in status

* Fix race when retrieving ctx state error

* Fix race when accessing service controller server instance
2024-11-11 14:55:10 +01:00
Zoltan Papp
30f025e7dd
[client] fix/proxy close (#2873)
When the remote peer switches the Relay instance then must to close the proxy connection to the old instance.

It can cause issues when the remote peer switch connects to the Relay instance multiple times and then reconnects to an instance it had previously connected to.
2024-11-11 14:18:38 +01:00
Zoltan Papp
b4d7605147
[client] Remove loop after route calculation (#2856)
- ICE do not trigger disconnect callbacks if the stated did not change
- Fix route calculation callback loop
- Move route state updates into protected scope by mutex
- Do not calculate routes in case of peer.Open() and peer.Close()
2024-11-11 10:53:57 +01:00
Viktor Liu
08b6e9d647
[management] Fix api error message typo peers_group (#2862) 2024-11-08 23:28:02 +01:00
Pascal Fischer
67ce14eaea
[management] Add peer lock to grpc server (#2859)
* add peer lock to grpc server

* remove sleep and put db update first

* don't export lock method
2024-11-08 18:47:22 +01:00
Pascal Fischer
669904cd06
[management] Remove context from database calls (#2863) 2024-11-08 15:49:00 +01:00
Zoltan Papp
4be826450b
[client] Use offload in WireGuard bind receiver (#2815)
Improve the performance on Linux and Android in case of P2P connections
2024-11-07 17:28:38 +01:00
Maycon Santos
738387f2de
Add benchmark tests to get account with claims (#2761)
* Add benchmark tests to get account with claims

* add users to account objects

* remove hardcoded env
2024-11-07 17:23:35 +01:00
Pascal Fischer
baf0678ceb
[management] Fix potential panic on inactivity expiration log message (#2854) 2024-11-07 16:33:57 +01:00
Pascal Fischer
7fef8f6758
[management] Enforce max conn of 1 for sqlite setups (#2855) 2024-11-07 16:32:35 +01:00
Viktor Liu
6829a64a2d
[client] Exclude split default route ip addresses from anonymization (#2853) 2024-11-07 16:29:32 +01:00
Zoltan Papp
cbf500024f
[relay-server] Use X-Real-IP in case of reverse proxy (#2848)
* Use X-Real-IP in case of reverse proxy

* Use sprintf
2024-11-07 16:14:53 +01:00
Viktor Liu
509e184e10
[client] Use the prerouting chain to mark for masquerading to support older systems (#2808) 2024-11-07 12:37:04 +01:00
Pascal Fischer
3e88b7c56e
[management] Fix network map update on peer validation (#2849) 2024-11-07 09:50:13 +01:00
Maycon Santos
b952d8693d
Fix cached device flow oauth (#2833)
This change removes the cached device flow oauth info when a down command is called

Removing the need for the agent to be restarted
2024-11-05 14:51:17 +01:00
Maycon Santos
5b46cc8e9c
Avoid failing all other matrix tests if one fails (#2839) 2024-11-05 13:28:42 +01:00
Pascal Fischer
a9d06b883f
add all group to add peer affected peers network map check (#2830) 2024-11-01 22:09:08 +01:00
Viktor Liu
5f06b202c3
[client] Log windows panics (#2829) 2024-11-01 15:08:22 +01:00
Zoltan Papp
0eb99c266a
Fix unused servers cleanup (#2826)
The cleanup loop did not manage those situations well when a connection failed or 
the connection success but the code did not add a peer connection to it yet.

- in the cleanup loop check if a connection failed to a server
- after adding a foreign server connection force to keep it a minimum 5 sec
2024-11-01 12:33:29 +01:00