Commit Graph

59 Commits

Author SHA1 Message Date
Sijie.Sun
0bf42c53cc Feat/web (PatchSet 1) (#436)
* move rpc-build out of easytier dir and make it a independant project
* easytier core use launcher
* fix flags not print on launch
* allow launcher not fetch node info
* abstract out peer rpc impl
* fix arm gui ci. see https://github.com/actions/runner-images/pull/10807
* add easytier-web crate
* fix manual_connector test case
2024-10-19 18:10:02 +08:00
Sijie.Sun
2134bc9139 fix icmp/udp subnet proxy not work with public server relay (#431) 2024-10-17 00:22:42 +08:00
Sijie.Sun
d87a440c04 fix 202 bugs (#418)
* fix peer rpc stop working because of mpsc tunnel close unexpectedly

* fix gui:

1. allow set network prefix for virtual ipv4
2. fix android crash
3. fix subnet proxy cannot be set on android
2024-10-13 11:59:16 +08:00
Sijie.Sun
d2291628e0 mpsc tunnel may be stuck by slow tcp stream, should not panic for this (#406)
* mpsc tunnel may be stuck by slow tcp stream, should not panic for this
* disallow node connect to self
2024-10-11 00:12:14 +08:00
Sijie.Sun
7ab8cad1af allow use ipv4 address in any cidr (#404) 2024-10-10 10:28:48 +08:00
Sijie.Sun
2c017e0fc5 improve hole punch (#403)
* fix duplicated peer id (again)

* improve udp hole punch

1. always try cone punch for any nat type, tolerate fault stun type.
2. serializing all sym punch request, including server side.
2024-10-10 00:07:42 +08:00
Sijie.Sun
1be64223c8 ensure dst have session when we are initiator (#398)
* ensure dst have session when we are initiator

* bump version to 2.0.1
2024-10-08 21:05:46 +08:00
Sijie.Sun
d4e59ffc40 fix listener may have no mapped addr (#389) 2024-10-07 12:15:20 +08:00
Sijie.Sun
37ceb77bf6 nat4-nat4 punch (#388)
this patch optimize the udp hole punch logic:

1. allow start punch hole before stun test complete.
2. add lock to symmetric punch, avoid conflict between concurrent hole punching task.
3. support punching hole for predictable nat4-nat4.
4. make backoff of retry reasonable
2024-10-06 22:49:18 +08:00
sijie.sun
984ed8f6cf fix #367
introduce my peer route id and peer id is duplicated only when peer
route id is not same.

this problem occurs because update_self may increase my peer info
version and propagate to ther nodes.
2024-09-29 23:58:33 +08:00
sijie.sun
d0a3a40a0f fix bugs
add timeout for wss try_accept

public server should show stats

use default values for flags

bump version to 2.0.0
2024-09-29 17:49:14 +08:00
sijie.sun
ff5ee8a05e support forward foreign network packet between peers 2024-09-29 10:31:29 +08:00
sijie.sun
2496cf51c3 fix connection loss when traffic is huge 2024-09-26 23:49:01 +08:00
sijie.sun
7b4a01e7fb fix ring buffer stuck when using multi thread runtime 2024-09-26 14:34:33 +08:00
sijie.sun
d1e2e1db2b fix ospf foreign network info version 2024-09-23 13:42:25 +08:00
sijie.sun
783ba50c9e add cli command for global foreign network info 2024-09-23 00:03:57 +08:00
sijie.sun
aca9a0e35b use ospf route to propogate foreign network info 2024-09-22 22:12:18 +08:00
sijie.sun
bd60cfc2a0 add feature flag to ospf route 2024-09-21 20:54:19 +08:00
sijie.sun
06afd221d5 make ping more smart 2024-09-21 18:00:52 +08:00
sijie.sun
82f5dfd569 show nodes version correctly 2024-09-18 23:15:08 +08:00
Sijie.Sun
1b03223537 use customized rpc implementation, remove Tarpc & Tonic (#348)
This patch removes Tarpc & Tonic GRPC and implements a customized rpc framework, which can be used by peer rpc and cli interface.

web config server can also use this rpc framework.

moreover, rewrite the public server logic, use ospf route to implement public server based networking. this make public server mesh possible.
2024-09-18 21:55:28 +08:00
m1m1sha
6ea3adcef8 feat: show version & local node (#318)
*  feat: version

Add display version information, incompatible with lower versions

* 🎈 perf: unknown

Unknown when there is no version number displayed

*  feat: Display local nodes

Display local nodes, incompatible with lower versions
2024-09-11 15:58:13 +08:00
Sijie.Sun
54c6418f97 only add necessary conn to alive urls (#277)
too many alive conns may cause high cpu usage and lagged broadcast
recv.
2024-08-25 11:12:01 +08:00
Sijie.Sun
833e7eca22 add command to show local node info (#271) 2024-08-23 11:50:11 +08:00
sijie.sun
0fbbea963f forward foreign peer event to unbounded channel
if some events loss, may cause inconsistent foreign peer info.
2024-08-15 08:03:50 +08:00
Sijie.Sun
b6fb7ac962 add two cmd line option (#241)
1. disable_p2p: only using specified peers to relay packets.
2. relay_all_peer_rpc: allow relay route info for networks not in whitelist
2024-08-10 00:26:54 +08:00
sijie.sun
0da09ec605 add network whitelist for public relay node 2024-08-03 15:39:04 +08:00
sijie.sun
d5bc15cf7a fix session_task and session mismatch 2024-08-03 13:11:44 +08:00
Sijie.Sun
4fea3a60d6 update last_updated of peer info to local now (#211)
time between peers may not be synced, using peer last_updated time may cause peer info being cleared incorrectly
2024-08-02 00:48:31 +08:00
Sijie.Sun
4938e3ed2b migrate to tauri2 (#159)
migrate gui to tauri2
2024-07-08 23:18:10 +08:00
Sijie.Sun
24143cbf1c add verbose cli mode; add list foreign network (#156) 2024-07-07 16:51:20 +08:00
Sijie.Sun
513e4cacc9 add more debug info for route (#155)
1. use info log for sync_route_info
2. allow dump route info with cli tool.
3. dump route info every 60s
2024-07-07 15:40:46 +08:00
Sijie.Sun
34f832bbad make tun dependency optional (#142)
* remove log crates
* remove udp/raw of smoltcp
* make tun as optional dependancy, compile for freebsd works
2024-06-11 09:09:32 +08:00
Sijie.Sun
8aa57ebc22 support no tun mode (#141) 2024-06-10 10:27:24 +08:00
Sijie.Sun
f9e6264f31 fix upx and udp conn counter (#131)
* fix upx in workflow
* fix udp conn counter
2024-06-04 18:50:30 +08:00
Sijie.Sun
df17a7bb68 bugfix before release 11x (#130)
* use correct i18n hook

* fix peer rpc panic

make sure server use correct transact id

* fix dhcp

recreate tun device after ip changed

* use upx correctly

* compile arm & armv7

* prepare to release v1.1.0
2024-06-03 23:07:44 +08:00
Sijie.Sun
abf9d23d52 improve hole punching and stun test (#124)
* implement new stun test algorithm, do test faster and provide more info
* support punching for symmetric
2024-06-02 07:20:57 +08:00
Sijie.Sun
f64f58e2ae support exit node (#121)
support exit node, proxy all traffic via one of node
NOTE: this patch has not implemented automatically route management.
2024-05-18 20:32:42 +08:00
Sijie.Sun
f665de9b18 allow peer rpc split packet, so tunnel mtu can be small (#116) 2024-05-16 08:18:35 +08:00
Sijie.Sun
d5bf041834 some minor fix (#113)
1. fix ospf route panic if no ipv4 assigned.
2. should refetch global peer latency map every 60s
3. remove regex dep because it's too large and unnecessary.
2024-05-15 09:21:20 +08:00
sijie.sun
fc4e3782bd tune command line args 2024-05-13 22:13:31 +08:00
sijie.sun
3e6b1ac384 use path with least cost if hop count is same 2024-05-13 21:18:52 +08:00
sijie.sun
29365c39ed use latency from peer center for route 2024-05-13 21:18:34 +08:00
sijie.sun
09ebed157e fix peer center for latency report 2024-05-13 20:30:25 +08:00
sijie.sun
72f86025bd support custom cost calculate func when generating route table 2024-05-13 20:30:25 +08:00
sijie.sun
51aa23b635 add ttl for packet 2024-05-13 20:30:25 +08:00
Sijie.Sun
b1153378c9 fix icmp proxy on MacOS (#101)
1. MacOS doesn't fill length field in ip header when recving from raw
socket
2. Fix udp & icmp subnet proxy not work when no p2p connection.
2024-05-10 21:40:29 +08:00
m1m1sha
e6ad308cd5 ↩ revert: 兼容性 2024-05-08 20:49:33 +08:00
m1m1sha
bde5b7f6ea 🎈 perf: get hostname 2024-05-08 16:06:11 +08:00
Sijie.Sun
8440eb842b fix bugs and improve user experiance (#86)
* correctly set mtu, and allow set mtu manually

* communicate between enc and non-enc should not panic

* allow loading cfg from file

* allow change file log level dynamically
2024-05-07 00:38:05 +08:00