Commit Graph

91 Commits

Author SHA1 Message Date
Luca Deri
26f4e58cd2
Merge pull request #258 from emanuele-f/routes_fix
Fix default gateway routes
2020-06-21 21:29:42 +02:00
Luca Deri
68428a8d2a Updated (C) 2020-06-17 06:54:02 +02:00
emanuele-f
be5b441e58 Fix default gateway routes
The 128.0.0.0/1 route was missing causing some traffic to go outside the VPN
2020-06-09 11:15:58 +02:00
Logan007
fad7c191f6 added XORSHIFT128+ random number generator 2020-06-08 16:06:24 +05:45
Luca Deri
bd49b4e3a3 Compilation fixes 2020-06-07 13:51:48 +02:00
Luca Deri
3b0903785e
Merge branch 'dev' into speck 2020-06-07 10:10:20 +02:00
Luca Deri
40da89521a
Merge branch 'dev' into zstdCompression 2020-06-07 10:03:22 +02:00
Luca Deri
0dcbec2f87
Merge pull request #235 from Logan007/cc20
added ChaCha20
2020-06-07 09:48:30 +02:00
Logan oos Even
78e72a2f9e
Merge branch 'dev' into speck 2020-06-06 18:12:11 +05:45
Logan007
0477e476e8 added Speck 2020-05-28 03:17:21 +05:45
emanuele-f
5044fcde26 Add linux capabilities dependency to cmake 2020-05-24 11:36:56 +02:00
emanuele-f
0e48e2f24c Add support for linux capabilities to proper routes cleanup 2020-05-23 17:17:32 +02:00
emanuele-f
62b9530425 Add missing ifdef 2020-05-23 16:44:47 +02:00
emanuele-f
928fc9f22e Add ability to insert linux routes in n2n
The new -n option can now be used to setup routes directly from the edge command line.
It supports both network routes and default gateway routes. Here is an example:

  - "-n 192.168.100.0/24:192.168.99.1" routes the 192.168.100.0/24 network traffic via 192.168.99.1
  - "-n 0.0.0.0/0:192.168.99.1" routes all the host traffic via 192.168.99.1
2020-05-23 16:21:45 +02:00
Logan007
f2524196b1 added optional payload compression (zstd) for all transforms 2020-05-20 01:12:22 +05:45
Logan oos Even
479f6f759e
Merge branch 'dev' into cc20 2020-05-12 17:31:47 +05:45
Logan007
7c2648c1e2 added cli option for ChaCha20 (-A4) 2020-05-12 16:49:07 +05:45
Logan007
9076ed1bab added optional payload compression (lzo) for all transforms 2020-05-03 18:48:59 +02:00
Logan007
9e5934acc8 added ChaCha20 (cc20) 2020-04-26 15:46:41 +02:00
emanuele-f
46aaa86629 Fix multicast dropped when routing is disabled 2019-12-26 22:13:49 +01:00
realjiangms
9601e82daf More reliable punching:
1. Some nat router blocks the port if incoming traffic arrives before outcoming traffic being sent. Give edge ability to set proper TTL so that the registration packet is dropped before it arrives peer.
2. Support Symmetric NAT by predicting 15 more ports when sending registration packet
3. Purge pending mac also on P2P normal packet. This is actually more usual condition.
4. Add doc for new flag.
2019-11-08 09:21:10 +08:00
emanuele-f
7e7782f965 Possibly fix mingw compilation 2019-11-03 15:54:34 +01:00
emanuele-f
1b49b37a75 Disable PMTU options on apple to fix compilation issues 2019-09-24 09:50:29 +02:00
emanuele-f
8f3009c448 Fix occasional connection issues on startup due to bad MAC address read 2019-09-22 20:16:01 +02:00
emanuele-f
0538c5261d Disable PMTU in other platforms 2019-09-21 19:25:56 +02:00
emanuele-f
6c67ed0440 MTU changes to avoid connection stall on PMTU discovery failures 2019-08-16 16:55:40 +02:00
emanuele-f
27da194872 Reduce log level due to invalid supernode register ACK cookies 2019-08-15 19:02:42 +02:00
emanuele-f
2f671cf6d9 Add support for TOS setting in edge 2019-07-16 00:37:52 +02:00
emanuele-f
eea0c9b46b Add option to disable p2p 2019-07-15 23:33:11 +02:00
emanuele-f
4e9d66a0a2 Rework log levels
Now "-v" only returns high level information, whereas "-vv" can be used to further increase the verbosity.
2019-07-15 23:21:38 +02:00
emanuele-f
6bb7e3d9c5 Fix dropped broadcast traffic
Fixes #161
2019-07-15 22:44:12 +02:00
emanuele-f
035b66b1a9 Fix mtu with AES
This avoids fragmentation when possible
2019-07-15 20:14:14 +02:00
emanuele-f
6328962752 Improve packet length log 2019-07-15 19:42:51 +02:00
emanuele-f
8880330c41 Windows compilation fix 2019-07-08 14:13:26 +02:00
emanuele-f
1c9e029b88 Retry multicast group join instead of exiting
Multicast group join failures can occur during system startup
2019-07-06 11:24:29 +02:00
Luca
1512f20eaa Compilation fix 2019-07-01 07:15:13 +02:00
emanuele-f
a70641897d Graceful termination in Windows 2019-07-01 00:26:44 +02:00
emanuele-f
41bff29df6 Disable multicast peers discovery in windows 2019-06-22 16:50:11 +02:00
Teteros
ba38ab70de
Fix typo: 'enstablished' -> 'established' 2019-06-13 14:11:57 +01:00
emanuele-f
447c3ad8c3 Replace peers linked list with hash 2019-06-10 00:33:11 +02:00
emanuele-f
4eacea7d57 Little improvement 2019-06-10 00:32:38 +02:00
emanuele-f
f36814b152 Implement query peer to try p2p during send
When a lot of monodirection traffic is sent, p2p can be hard to
enstablish because a reply is needed in order to start the registration.
Now a sending peer can query the peer information via the supernode.

This is based on the following commits:
- 1236f37a70
- ad2d416510
- 5348671299
- b2806dcde8
2019-06-08 22:04:10 +02:00
emanuele-f
b36754eae0 Set last_p2p ib peer_set_p2p_confirmed 2019-06-08 21:41:28 +02:00
emanuele-f
3db1cab276 Split broadcast stats from other supernode stats 2019-06-08 18:49:47 +02:00
emanuele-f
0e6db6361e Fix connection stall when idle p2p refresh occurs
The edge received packets from the supernode and thought that the other
peer was still active, but the other peer had dropped the p2p connection
due to refresh
2019-06-08 17:50:48 +02:00
emanuele-f
f038f22a0b Fix too many registrations going on 2019-06-08 16:10:00 +02:00
emanuele-f
623a9e480c Improve log messages 2019-06-08 15:32:47 +02:00
fengdaolong
69e3b49bec eliminate compilation warnings 2019-06-04 00:09:15 +08:00
yunbox
f48c170c26 Fix supernode handling REGISTER message from edge and let edge ask supernode to forward REGISTER message in case of non-p2p-reflection.
This is reliable way to PUNCH UDP HOLE (following STUN spec)
2019-05-23 19:24:27 +08:00
emanuele-f
3aec02d3e6 Fix unidirectional P2P connection due to pending registration
If A is directly available and B is NATted and B sends the first message to A via the supernode S,
A will try to register to B via the port used by B to talk to S. This will not work as B is NAT-ted,
so A must discard such pending registration as soon as it receives a P2P Registration from B.
2019-05-23 00:46:29 +02:00