259 Commits

Author SHA1 Message Date
Sijie.Sun a6773aa549 zstd should reuse ctx to avoid huge mmap cost (#941) 2025-06-06 08:59:06 +08:00
Sijie.Sun 0314c66635 some improvements (#939)
1. ospf route conn map should also use version
2. treat nopat as cone
2025-06-05 22:49:57 +08:00
chenxudong2020 3fb172b4d2 Modify SNI logic: always use "localhost" as SNI to avoid IP blocking (#934) 2025-06-05 11:56:07 +08:00
Sijie.Sun 96fc19b803 fix minor bugs (#936)
1. update upx to v5.0.1 to avoid mips bug.
2. use latest mimalloc.
3. fix panic in ospf route
4. potential residual conn.
2025-06-05 11:55:44 +08:00
Sijie.Sun 4608bca998 improve performance of route generation (#914)
this may fix following problem:

1. cpu 100% when large number of nodes in network.
2. high cpu usage when large number of foreign networks.
3. packet loss when new node enters/exits.
4. old routes not cleand and show as an obloleted entry.
2025-06-02 20:12:27 +08:00
FuturePrayer b5dfc7374c add private mode (#897)
---------

Co-authored-by: Sijie.Sun <sunsijie@buaa.edu.cn>
2025-06-02 06:47:17 +08:00
Sijie.Sun f9c24bc205 fix bugs (#892)
1. traffic stats not work.
2. magisk zip malformat
2025-05-27 09:28:28 +08:00
Mg Pig d7c3179c6e easytier-cli部分命令支持json输出 (#882)
* add cli options to json output
* add cli verbose output in json format for some sub command

- easytier-cli -v peer list
- easytier-cli -v peer list-foreign
- easytier-cli -o json peer list-foreign
- easytier-cli -v peer list-global-foreign
- easytier-cli -o json peer list-global-foreign
- easytier-cli -v route list
- easytier-cli -v connector
- easytier-cli -o json connector
- easytier-cli -o json stun
- easytier-cli -v proxy
- easytier-cli -v node info

---------

Co-authored-by: xzzpig <w2xzzig@hotmail.com>
2025-05-25 23:28:12 +08:00
Sijie.Sun b0fd37949a fix direct connector only select one listener (#875) 2025-05-25 13:56:08 +08:00
Sijie.Sun 29994b663a v6 hole punch (#873)
Some devices have ipv6 but don't allow input connection, this patch add hole punching for these devices.

- **add v6 hole punch msg to udp tunnel**
- **send hole punch packet when do ipv6 direct connect**
2025-05-24 22:57:33 +08:00
Sijie.Sun 5a2fd4465c fix dns query (#864)
1. dns resolver should be global unique so dns cache can work. avoid dns query influence hole punching.
2. when system dns failed, fallback to hickory dns.
2025-05-23 10:34:28 +08:00
Sijie.Sun 83d1ecc4da bump version to v2.3.0 (#859)
also some improvements:

1. add magic dns option in gui.
2. allow icmp proxy fail on android
3. when no_tun is enabled, android do not start vpn service

Co-authored-by: Your Name <you@example.com>
2025-05-18 16:45:39 +08:00
Sijie.Sun 7c6daf7c56 Magic DNS and easytier-web improvements (#856)
1. dns add macos system config
2. allow easytier-web serve dashboard and api in same port
2025-05-18 16:34:35 +08:00
Sijie.Sun 28fe6257be magic dns (#813)
This patch implements:

1. A dns server that handles .et.net. zone in local and forward all other queries to system dns server.

2. A dns server instance which is a singleton in one machine, using one specific tcp port to be exclusive with each other. this instance is responsible for config system dns and run the dns server to handle dns queries.

3. A dns client instance that all easytier instance will run one, this instance will try to connect to dns server instance, and update the dns record in the dns server instance.

this pr only implements the system config for windows. linux & mac will do later.
2025-05-16 09:24:24 +08:00
Sijie.Sun d758a4958f fix panic cause segment fault (#843)
1. backtrace may fail on some platform such as armv7, should do it last in panic hook.
2. stun should not panic when bind v6 failed.
2025-05-11 21:34:24 +08:00
Sijie.Sun 2675cf2d00 bump hickory-dns version to v0.25.2 (#839) 2025-05-11 08:46:31 +08:00
Sijie.Sun 72be46e8fa allow tcp port forward use kcp (#838) 2025-05-11 00:48:34 +08:00
loecom c5580feb64 add thunk-rs to support win7 (#812)
* add thunk-rs to support win7
---------

Co-authored-by: loecomm <loecom@qq.com>
2025-04-25 22:27:36 +08:00
Sijie.Sun ef1d81a2a1 introduce ffi for easytier (#791) 2025-04-19 21:01:51 +08:00
L-Trump 739b4ee106 fix: avoid add ipv6 listener automatically for specified ipv4 listener (#782) 2025-04-16 21:58:39 +08:00
L-Trump 6a038e8a88 fix default listeners for config file (#777) 2025-04-13 09:38:45 +08:00
L-Trump 44d93648ee config from environment variables; CLI args override config file (#755)
* feat: configure through os environment variables
* feat: support CLI args overriding config file options
2025-04-10 18:14:10 +08:00
Sijie.Sun 75f7865769 fix gui memory leak (#768)
* upgrade primevue
* use card instead of panel
2025-04-10 10:02:04 +08:00
Sijie.Sun 01e3ad99ca optimize memory issues (#767)
* optimize memory issues

1. introduce jemalloc support, which can dump current memory usage
2. reduce the GlobalEvent broadcaster memory usage.
3. reduce tcp & udp tunnel memory usage

TODO: if peer conn tunnel hangs, the unbounded channel of peer rpc
may consume lots of memory, which should be improved.

* select a port from 15888+ when port is 0
2025-04-09 23:05:49 +08:00
m1m1sha f103fc13d9 perf: update default rpc_port value to 15888 in network configuration 2025-04-05 10:17:16 +08:00
Sijie.Sun c142db301a port forward (#736)
* support tcp port forward
* support udp port forward
* command line option for port forward
2025-04-01 09:59:53 +08:00
kevin 8dc8c7d9e2 set hostname when connecting to config-server (#712) 2025-03-23 19:53:49 +08:00
Sijie.Sun e130c3f2e4 when gather v6 bind addrs should only rely on v6 range (#707) 2025-03-21 22:40:26 +08:00
kevin fd2b3768e1 add mtu and mapped_listeners for web (#704) 2025-03-20 23:40:56 +08:00
kevin c5ea7848b3 add disable_udp_hole_punching and hide passwd for web (#700)
* add disable_udp_hole_punching for web
* hide network_secret by default

---------

Co-authored-by: Sijie.Sun <sunsijie@buaa.edu.cn>
2025-03-19 23:57:09 +08:00
严浩 34365a096e fix(web_client): 将报告时间格式从字符串更改为RFC 3339格式 (#698) 2025-03-19 23:00:52 +08:00
Sijie.Sun d880dfbbca bump version to v2.2.4 (#697) 2025-03-19 17:23:15 +08:00
Sijie.Sun b46a200f8d connector should set bind addrs correctly (#696) 2025-03-19 10:47:43 +08:00
kevin 81490d0662 enable sni for tls client (#691)
* enable sni for tls client
* update test case
* fix public_ip parse bug
2025-03-19 01:15:34 +08:00
sijie.sun f52936a103 bump version to v2.2.3 2025-03-17 22:24:19 +08:00
Sijie.Sun 23f69ce6a4 improve direct connector (#685)
* support ipv6 stun
* show interface and public ip in cli node info
* direct conn should keep trying unless already direct connected
* peer should use conn with smallest latency
* deprecate ipv6_listener, use -l instead
2025-03-17 10:46:14 +08:00
sijie.sun bb17ffa9fc fix wireguard not respond after idle for 120s 2025-03-15 00:16:12 +08:00
sijie.sun 389ea709ce fix smoltcp not wakeup closed socket 2025-03-15 00:16:12 +08:00
kevin c2f535ead4 import/export network config for web (#676)
* import/export network config for web
* add socks5 config for web
2025-03-12 23:19:56 +08:00
Sijie.Sun 0318f55322 add serde default to NetworkConfig (#675)
* add serde default to NetworkConfig

* set base z-index of event-dialog
2025-03-12 10:36:54 +08:00
kevin 1f4340e82f add configurable items for web/gui
enable_exit_node
relay_all_peer_rpc
multi_thread
proxy_forward_by_system
relay_network_whitelist
manual_routes
exit_nodes
2025-03-11 22:30:39 +08:00
sijie.sun 7397abcb94 txt connector should not rely on A record 2025-03-09 21:31:43 +08:00
sijie.sun 98d321f8ac fix kcp traffic not encrypted 2025-03-08 22:09:43 +08:00
sijie.sun e78b0ef869 test serializedly 2025-03-08 15:59:54 +08:00
sijie.sun 8d654330ac fix http_connector
1. use ipv4 first when connect to http server.
2. allow redirect to url like: http://tcp://p.com:11010
3. dns should also use long timeout
2025-03-08 15:59:54 +08:00
L-Trump 00d61333d3 allow proxy packets to be forwarded by system kernel 2025-03-08 12:56:49 +08:00
sijie.sun 03b55b61e7 support txt/srv record 2025-03-08 12:56:23 +08:00
sijie.sun 745e44cc87 allow using http connector for config server 2025-03-07 22:17:23 +08:00
sijie.sun 24213a874a make http connector timeout longer
http response may be slow, make its timeout longer.
2025-03-07 22:17:23 +08:00
sijie.sun 155f8a2ba2 make prost build smaller 2025-03-06 11:07:05 +08:00