Commit Graph

50 Commits

Author SHA1 Message Date
Sijie.Sun
4bb72b5606 fix rpc packet route before first route info exchange (#516)
* fix rpc packet route before first route info exchange
* fix install script
* update config server help
2024-12-19 09:25:25 +08:00
Sijie.Sun
15ad92aef2 fix no relay not work in local network (#476) 2024-11-16 14:36:17 +08:00
Sijie.Sun
6cdea38284 support compress for rpc and tun data (#473)
* support compress for rpc and tun data
* add compression layer to easytier-web
2024-11-16 11:23:18 +08:00
咸鱼而已
9d455e22fa 支持服务管理 (#456)
* Support running as a Windows service.

* Optimize startup logic contro

* When running in a Windows service environment, delegate the termination of the program to the win_service_event_loop function.

* Remove the use of std::ffi::OsString at the top.

* Support  service manager

* Move the service-related features to be implemented in easytier-cli.

* Add a command line option work-dir to specify the working directory
Adjust the error handling logic
2024-11-16 09:01:58 +08:00
Sijie.Sun
e948dbfcc1 Feat/web (Patchset 4) (#460)
support basic functions in frontend
1. create/del network
2. inspect network running status
2024-11-08 23:33:17 +08:00
咸鱼而已
1ac2e1c8e3 Support running as a Windows service. (#445)
When the program is started by the Service Control Manager (SCM), it needs to call StartServiceCtrlDispatcher (which corresponds to service_dispatcher::start in the windows-service crate) to inform the SCM of the service's entry function. The SCM then calls the service entry function passed to StartServiceCtrlDispatcher. The process calling StartServiceCtrlDispatcher will block until the service's status is set to Stopped. If the current program is not run through the SCM, StartServiceCtrlDispatcher will return the error ERROR_FAILED_SERVICE_CONTROLLER_CONNECT, and the program will run according to its original mechanism. For more details about SCM, please refer to Microsoft's documentation.
2024-10-26 01:32:25 +08:00
Sijie.Sun
a78b759741 feat/web (Patchset 2) (#444)
This patch implement a restful server without any auth.

usage:

```bash
# run easytier-web, which acts as an gateway and registry for all easytier-core
$> easytier-web

# run easytier-core and connect to easytier-web with a token
$> easytier-core --config-server udp://127.0.0.1:22020/fdsafdsa

# use restful api to list session
$> curl -H "Content-Type: application/json" -X GET 127.0.0.1:11211/api/v1/sessions
[{"token":"fdsafdsa","client_url":"udp://127.0.0.1:48915","machine_id":"de3f5b8f-0f2f-d9d0-fb30-a2ac8951d92f"}]%

# use restful api to run a network instance
$> curl -H "Content-Type: application/json" -X POST 127.0.0.1:11211/api/v1/network/de3f5b8f-0f2f-d9d0-fb30-a2ac8951d92f -d '{"config": "listeners = [\"udp://0.0.0.0:12344\"]"}'

# use restful api to get network instance info
$> curl -H "Content-Type: application/json" -X GET 127.0.0.1:11211/api/v1/network/de3f5b8f-0f2f-d9d0-fb30-a2ac8951d92f/65437e50-b286-4098-a624-74429f2cb839 
```
2024-10-26 00:04:22 +08:00
fanyang
b5c3726e67 Optimize building speed (#442)
Make easytier-cli and easytier-core link to the easytier library to
avoid duplicate linking of mods.
2024-10-24 16:21:35 +08:00
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
4dca25db86 bump version to 2.0.3 2024-10-13 12:49:01 +08:00
sijie.sun
ba3da97ad4 fix ipv6 direct connector not work 2024-10-03 11:56:10 +08:00
sijie.sun
7b4a01e7fb fix ring buffer stuck when using multi thread runtime 2024-09-26 14:34:33 +08:00
Jiangqiu Shen
ac9cfa5040 making cli parse code more ergonomic by remove some copy and unwrap (#347)
1. remove some unessesary copy in cli parse code of string
2. make some member function into non-member function to avoid taking the self reference.
3. use if let Some(..) instead of if xxx.is_some() to avoid copy and unwrap
2024-09-18 21:57:12 +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
Sijie.Sun
f07b3ee9c6 fix punching task leak (#298)
the punching task creator doesn't check if the task is already
running, and may create many punching task to same peer node.

this patch also improve hole punching by checking hole punch packet
even if punch rpc is failed.
2024-08-31 14:37:34 +08:00
3RDNature
6964fb71fc Add a setting "disable_udp_hole_punch" to disable UDP hole punch function (#291)
It can solve #289 tentative.

Co-authored-by: 3rdnature <root@natureblog.net>
2024-08-29 11:34:30 +08:00
Sijie.Sun
8793560e12 fix i18n, revert rust-i18n to v3.0.1 (#267) 2024-08-20 00:38:59 +08:00
sijie.sun
ae54a872ce support socks5 proxy
usage: --socks5 12345

create an socks5 server on port 12345, can be used by socks5 client to access
virtual network.
2024-08-17 13:17:38 +08:00
sijie.sun
ff6da9bbec also setup panic handler on gui
this helps collect gui crash info.
2024-08-15 23:00:04 +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
232165eff3 fix bugs (#236) 2024-08-08 22:03:22 +08:00
sijie.sun
cca105e91d add chinese help message 2024-08-08 08:05:42 +08:00
sijie.sun
0da09ec605 add network whitelist for public relay node 2024-08-03 15:39:04 +08:00
sijie.sun
4a0adaa3f8 fix listener stop accept after failure 2024-08-03 13:11:44 +08:00
Sijie.Sun
7a2bc52ae0 fix network to network without masquerade (#207) 2024-08-01 01:27:23 +08:00
Sijie.Sun
5451b52daa allow set routes manually and disable propagated routes (#191) 2024-07-24 22:45:55 +08:00
Sijie.Sun
858ade2eee Android Support (#166)
1. Add vpnservice tauri plugin for android.
2. add workflow for android.
3. Easytier Core support android, allow set tun fd.
2024-07-15 00:03:55 +08:00
Sijie.Sun
537f6ecf78 fix smoltcp tcp proxy (#157)
1. allow smoltcp proxy with dhcp ip
2. fix smoltcp not work without no tun.
2024-07-07 22:08:50 +08:00
yylt
0f39bfcefa support change tun interface name (#151) 2024-07-03 15:41:12 +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
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
m1m1sha
0ead308392 Feat/pseudo dhcp (#109)
*  feat: pseudo dhcp
2024-05-17 23:16:56 +08:00
Sijie.Sun
7532a7c1b2 command line improvement (#115)
make -l easy to use:
-l wg wss
-l wg:12345
-l 12345

make -r use random port
2024-05-16 20:16:09 +08:00
sijie.sun
fc4e3782bd tune command line args 2024-05-13 22:13:31 +08:00
sijie.sun
29d8d4ba87 correctly handle listener add fail 2024-05-11 23:29:55 +08:00
Yumin Wu
4da7f4ec20 fix AllowIps and Address fields for WireGuard client (#99)
- add Wireguard client cidr into AllowIps
- change subnet number to 32 in Address field
2024-05-09 22:01:55 +08:00
Yumin Wu
770ab4a01b command friendly tips 2024-05-09 15:06:32 +08:00
m1m1sha
bde5b7f6ea 🎈 perf: get hostname 2024-05-08 16:06:11 +08:00
m1m1sha
0498b55d39 feat: custom hostname 2024-05-08 14:47:22 +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
Sijie.Sun
e5b537267e bug fix and improve (#81)
1. fix manual connector do not retry if dns resolve failed.
2. allow not creating tun device if no virtual ipv4 is assigned.
2024-05-05 16:18:05 +08:00
sijie.sun
873851e6d0 mips 2024-05-03 17:09:46 +08:00
sijie.sun
d8033a77b9 support use ipv6 2024-04-28 22:24:24 +08:00
Sijie.Sun
66b3241be7 fix handshake dead lock, clean old code (#61)
* fix handshake dead lock
* remove old code
2024-04-27 16:27:42 +08:00
Sijie.Sun
fcc73159b3 support encryption (#60) 2024-04-27 13:44:59 +08:00
Sijie.Sun
69651ae3fd Perf improve (#59)
* improve perf

* fix forward
2024-04-26 23:02:07 +08:00
Sijie.Sun
57c9f11371 adapt tun device to zerocopy (#57) 2024-04-25 23:25:37 +08:00
Sijie.Sun
3467890270 zero copy tunnel (#55)
make tunnel zero copy, for better performance. remove most of the locks in io path.
introduce quic tunnel
prepare for encryption
2024-04-24 23:12:46 +08:00
Sijie.Sun
4eb7efe5fc use workspace, prepare for config server and gui (#48) 2024-04-04 10:33:53 +08:00