Commit Graph

261 Commits

Author SHA1 Message Date
Kusakabe Si
18d019725c Fase generate and 2 new API 2021-12-05 22:02:49 +00:00
Kusakabe Si
e3113149aa Set IP to interface via ioctl 2021-12-05 00:09:49 +00:00
Kusakabe Si
61e6489a70 Use atomic.Value to store hashes 2021-12-04 04:44:17 +00:00
Kusakabe Si
c239162159 SuperParams 2021-12-04 03:38:18 +00:00
Kusakabe Si
e949229827 clear duplicated variables 2021-12-03 23:02:05 +00:00
Kusakabe Si
c1133c9a69 http based pong_msg 2021-12-03 20:16:18 +00:00
KusakabeSi
a8d5a2a602 Prevent negtive AddCost, fix addpeer api bug 2021-11-06 09:14:13 +00:00
KusakabeSi
91d8e92b39 FastTry 2021-10-27 01:41:13 +00:00
KusakabeSi
056f7173a0 Add new AdditionalCost, fix some bugs 2021-10-27 01:02:44 +00:00
KusakabeSi
b95646576f fix bug: repush edgeingo routinue part 2 2021-10-16 07:16:52 +00:00
KusakabeSi
4a15fa95c1 fix bug: nodeID incorrect detecion 2021-10-14 16:20:41 +00:00
KusakabeSi
fd80661060 CheckAnyShouldUpdate 2021-10-14 10:42:40 +00:00
KusakabeSi
9054ee126a Negative cycle detection and removal 2021-10-12 08:09:38 +00:00
KusakabeSi
f689aadccf new log type: internal 2021-10-09 11:08:28 +00:00
KusakabeSi
776df87879 bugfix: addpeer API. new: tcpsock,udpsock,fd 2021-10-06 08:47:57 +00:00
KusakabeSi
b99b0254ea L2FIB Timeout 2021-10-01 09:01:41 +00:00
KusakabeSi
06b7ea1edb Static mode for supernode,dump packet, update readme, add code of concept 2021-09-30 21:44:07 +00:00
KusakabeSi
96682579f8 Add timeout and lastseen at supernode, add lock to map access 2021-09-28 23:36:55 +00:00
KusakabeSi
a60a9e8388 Don't lock peer while it's alive 2021-09-26 12:59:57 +00:00
KusakabeSi
4d0b5d1a3f bugfix: loop breaks on error, should continue to next 2021-09-24 11:33:17 +00:00
KusakabeSi
34443127b9 parse error for metamessage and allow single network stack 2021-09-23 19:16:45 +00:00
KusakabeSi
2ac7c0547d std bind, http api, hole punching, domain endpoint, faster reaction, psk 2021-09-23 11:31:01 +00:00
KusakabeSi
a26376cec5 add/del peer dynamically 2021-09-21 20:03:11 +00:00
KusakabeSi
29b53884ba shrink header to inc MTU to 1416 2021-09-21 01:31:11 +00:00
KusakabeSi
72e4ebc91d version check in supernode 2021-09-20 21:00:34 +00:00
KusakabeSi
7951ba2f6a fix supernode ipv6 problem, add error message 2021-09-20 16:27:53 +00:00
KusakabeSi
5fbb065897 no-vpp version 2021-08-26 11:20:54 +00:00
KusakabeSi
4443b8bddf Path solver and beta release 2021-08-25 18:20:35 +00:00
KusakabeSi
f8fe962f6a NTP support 2021-08-25 18:20:33 +00:00
KusakabeSi
eae0dc1aa5 Fix bug: remove unnecessary nhTable update 2021-08-25 18:20:30 +00:00
KusakabeSi
89f3069e7f New log option: LogNormal 2021-08-25 18:20:29 +00:00
KusakabeSi
ad196d3f95 http guest api 2021-08-25 18:20:25 +00:00
KusakabeSi
d717d35f64 LinuxTap, not test yet 2021-08-24 12:37:37 +00:00
KusakabeSi
26ba4dbe94 VPPTap, not test yet 2021-08-23 20:15:31 +00:00
KusakabeSi
2beb19c224 Bugfix, save peer to file ok 2021-08-23 17:45:09 +00:00
KusakabeSi
8a1126dcbf Bugfix, p2p mode ok 2021-08-23 16:39:04 +00:00
KusakabeSi
88ef721c1d Bugfix, static mode ok 2021-08-23 08:35:17 +00:00
KusakabeSi
19fe84cf0c bunch of bugfix, supermode OK 2021-08-22 14:19:35 +00:00
KusakabeSi
4939f9f0c4 Not test yet 2021-08-21 14:23:27 +00:00
KusakabeSi
87a62f873b TAP and routeing 2021-08-16 19:37:15 +00:00
KusakabeSi
1fa36f77ac delete unused part(tun/allow_ip) 2021-08-16 19:37:08 +00:00
KusakabeSi
7801b56b41 rename module 2021-08-16 19:36:46 +00:00
Jason A. Donenfeld
f9b48a961c device: zero out allowedip node pointers when removing
This should make it a bit easier for the garbage collector.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-06-04 16:33:28 +02:00
Jason A. Donenfeld
d0cf96114f device: limit allowedip fuzzer a to 4 times through
Trying this for every peer winds up being very slow and precludes it
from acceptable runtime in the CI, so reduce this to 4.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-06-03 18:22:50 +02:00
Jason A. Donenfeld
841756e328 device: simplify allowedips lookup signature
The inliner should handle this for us.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-06-03 16:29:43 +02:00
Jason A. Donenfeld
c382222eab device: remove nodes by peer in O(1) instead of O(n)
Now that we have parent pointers hooked up, we can simply go right to
the node and remove it in place, rather than having to recursively walk
the entire trie.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-06-03 16:29:43 +02:00
Jason A. Donenfeld
b41f4cc768 device: remove recursion from insertion and connect parent pointers
This makes the insertion algorithm a bit more efficient, while also now
taking on the additional task of connecting up parent pointers. This
will be handy in the following commit.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-06-03 15:08:42 +02:00
Jason A. Donenfeld
4a57024b94 device: reduce size of trie struct
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-06-03 13:51:03 +02:00
Jason A. Donenfeld
c27ff9b9f6 device: allow reducing queue constants on iOS
Heavier network extensions might require the wireguard-go component to
use less ram, so let users of this reduce these as needed.

At some point we'll put this behind a configuration method of sorts, but
for now, just expose the consts as vars.

Requested-by: Josh Bleecher Snyder <josh@tailscale.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-05-22 01:00:51 +02:00
Jason A. Donenfeld
99e8b4ba60 tun: linux: account for interface removal from outside
On Linux we can run `ip link del wg0`, in which case the fd becomes
stale, and we should exit. Since this is an intentional action, don't
treat it as an error.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-05-20 18:26:01 +02:00