Commit Graph

397 Commits

Author SHA1 Message Date
Sijie.Sun
ef3309814d fix cli add port forward failed if initial forward list is empty (#1324) 2025-09-02 22:03:57 +08:00
fanyang
b87a05b457 refactor: update custom STUN server settings (#1310)
* refactor: update global context STUN server initialization

Modified global context initialization to use a single StunInfoCollector
instance with properly configured IPv4 and IPv6 servers instead of
creating separate instances.

feat: add IPv6 STUN server configuration support

Added interface methods and config struct fields to support both IPv4
and IPv6 STUN server configuration. Modified getter and setter methods
to handle Option<Vec<String>> type for both server types.

feat: enhance StunInfoCollector with IPv6 support

Updated StunInfoCollector to support both IPv4 and IPv6 STUN servers.
Added new constructor that accepts both server types and methods to set
them independently.

feat: add CLI argument for IPv6 STUN servers

Added command line argument support for configuring IPv6 STUN servers.
Updated configuration setup to handle both IPv4 and IPv6 STUN server
settings.

docs: add localization for STUN server configuration

Added English and Chinese localization strings for the new STUN server
configuration options, including both IPv4 and IPv6 variants.
2025-09-02 21:46:37 +08:00
Sijie.Sun
2145ef40b9 fix ospf route panic (#1304) 2025-08-27 13:22:29 +08:00
Sijie.Sun
a3806e0190 fix set ipv6 mtu may cause tun init error (#1300) 2025-08-27 09:57:32 +08:00
Sijie.Sun
0ceb58586b fix keepalive on accepted tcp proxy connection (#1302) 2025-08-26 23:30:30 +08:00
Sijie.Sun
719a1fe7cf bump version to 2.4.3 (#1296) 2025-08-26 12:22:08 +08:00
Sijie.Sun
671b8d5a0c fix quic transport (#1293) 2025-08-26 08:37:31 +08:00
Sijie.Sun
3299a77da3 make magic dns domain check robust (#1288) 2025-08-24 18:24:42 +08:00
Sijie.Sun
0804fd6632 retry create tun device if it closed (#1279) 2025-08-24 15:25:09 +08:00
Sijie.Sun
ea76114d50 fix kcp not work as expect (#1285) 2025-08-24 14:33:11 +08:00
fanyang
78004de5e5 gui: sort peer list (#1278) 2025-08-24 00:53:32 +08:00
Sijie.Sun
5b7384fddd disable nat4 hole punch (#1277) 2025-08-22 23:33:21 +08:00
Mg Pig
08a92a53c3 feat(acl): add group-based ACL rules and related structures (#1265)
* feat(acl): add group-based ACL rules and related structures

* refactor(acl): optimize group handling with Arc and improve cache management

* refactor(acl): clippy

* feat(tests): add performance tests for generate_with_proof and verify methods

* feat: update group_trust_map to use HashMap for more secure group proofs

* refactor: refactor the logic of the trusted group getting and setting

* feat(acl): support kcp/quic use group acl

* feat(proxy): optimize group retrieval by IP in Kcp and Quic proxy handlers

* feat(tests): add group-based ACL tree node test

* always allow quic proxy traffic

---------

Co-authored-by: Sijie.Sun <sunsijie@buaa.edu.cn>
Co-authored-by: sijie.sun <sijie.sun@smartx.com>
2025-08-22 22:25:00 +08:00
fanyang
34560af141 cli: put the local IP at the front (#1256) 2025-08-22 20:40:28 +08:00
fanyang
df7eb47593 Support tokio-console (#1259) 2025-08-21 11:41:42 +08:00
Sijie.Sun
839a28a3d5 avoid panic on smoltcp socket accept (#1272) 2025-08-21 09:30:51 +08:00
Sijie.Sun
9c6d1dabdf fix dead lock in tokio smoltcp (#1270) 2025-08-21 00:16:11 +08:00
Sijie.Sun
e6ec7f405c introduce uptime monitor for easytier public nodes (#1250) 2025-08-20 22:59:44 +08:00
Sijie.Sun
fa3e208668 fix panic of std::Instant overflow (#1243) 2025-08-15 22:54:58 +08:00
Sijie.Sun
d9bcbd9b31 fix proxy traffic not count into traffic (#1229)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-14 00:05:12 +08:00
fanyang
35ff9b82fc Support custom STUN servers configuration (#1212)
* Support custom STUN servers

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-13 10:35:59 +08:00
Sijie.Sun
1eec27b5ff bump version to 2.4.2 (#1218) 2025-08-11 09:03:13 +08:00
Sijie.Sun
1de7777a71 fix quic transport panic (#1216) 2025-08-11 08:30:59 +08:00
Sijie.Sun
e43537939a clippy all codes (#1214)
1. clippy code
2. add fmt and clippy check in ci
2025-08-10 22:56:41 +08:00
CyiceK
0087ac3ffc feat(encrypt): Add XOR and ChaCha20 encryption with low-end device optimization and openssl support. (#1186)
Add ChaCha20 XOR algorithm, extend AES-GCM-256 capabilities, and integrate OpenSSL support.

---------

Co-authored-by: Sijie.Sun <sunsijie@buaa.edu.cn>
2025-08-09 18:53:55 +08:00
Sijie.Sun
8ffc2f12e4 optimize the condition of enabling kcp (#1210) 2025-08-09 16:16:09 +08:00
37b24164b6 add portforward config to gui (#1198)
* Added port forwarding to the GUI interface
* Separated port forwarding into a separate drop-down menu
2025-08-09 09:50:09 +08:00
Sijie.Sun
8cdb27d43d add stats metrics (#1207)
support new cli command `easytier-cli stats`

It's useful to find out which components are consuming bandwidth.
2025-08-09 00:06:35 +08:00
Sijie.Sun
efa17a7c10 fix dead loop in direct connecto if disable-p2p is enabled in dst (#1206) 2025-08-08 22:30:39 +08:00
Sijie.Sun
6d14e9e441 fix jemalloc prof feature (#1201) 2025-08-08 17:54:39 +08:00
fanyang
e3e406dcde cli: sort peers by IPv4 and hostname (#1191)
* cli: sort entries by IPv4 and hostname

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-04 21:18:49 +08:00
sijie.sun
d0a6c93c2c fix ipv6 packet routing and avoid route looping
properly handle ipv6 link local address and exit node.
2025-08-03 18:10:27 +08:00
sijie.sun
84bfac144c bump version to 2.4.1 2025-08-02 10:48:17 +08:00
Sijie.Sun
583c768f40 fix exit code when error occcurs (#1173) 2025-07-30 23:05:22 +08:00
Tunglies
b1b2421561 fix: compiling with socket2::Type::RAW not found on macOS #1168 (#1169) 2025-07-30 00:33:38 +08:00
Sijie.Sun
3d610c0f0f Some Improvements (#1172)
1. do not exit when dns query failed on et startup.
2. do not send secret digest to client when secret mismatch.
2025-07-29 23:05:38 +08:00
Sijie.Sun
2ec88da823 cli for port forward and tcp whitelist (#1165) 2025-07-29 09:30:47 +08:00
Sijie.Sun
7dc5988620 avoid udp hole punch go through tun (#1155) 2025-07-26 14:39:03 +08:00
Sijie.Sun
354a4e1d7b fix acl not work with kcp&quic (#1152) 2025-07-26 14:38:10 +08:00
Sijie.Sun
5409c5bbe7 port range should not be converted to single port (#1154) 2025-07-26 14:13:13 +08:00
Sijie.Sun
33ff9554cd need encrypt rpc if dst is in peer map (#1151) 2025-07-25 22:28:47 +08:00
Sijie.Sun
1f6a715939 releases/v2.4.0 (#1145)
* bump version to v2.4.0
* update tauri.
* allow try direct connect to public server
2025-07-25 00:16:15 +08:00
Sijie.Sun
8e7a8de5e5 Implement ACL (#1140)
1. get acl stats
```
./easytier-cli acl stats
AclStats:
  Global:
    CacheHits: 4
    CacheMaxSize: 10000
    CacheSize: 5
    DefaultAllows: 3
    InboundPacketsAllowed: 2
    InboundPacketsTotal: 2
    OutboundPacketsAllowed: 7
    OutboundPacketsTotal: 7
    PacketsAllowed: 9
    PacketsTotal: 9
    RuleMatches: 2
  ConnTrack:
    [src: 10.14.11.1:57444, dst: 10.14.11.2:1000, proto: Tcp, state: New, pkts: 1, bytes: 60, created: 2025-07-24 10:13:39 +08:00, last_seen: 2025-07-24 10:13:39 +08:00]
  Rules:
    [name: 'tcp_whitelist', prio: 1000, action: Allow, enabled: true, proto: Tcp, ports: ["1000"], src_ports: [], src_ips: [], dst_ips: [], stateful: true, rate: 0, burst: 0] [pkts: 2, bytes: 120]

  ```
2. use tcp/udp whitelist to block unexpected traffic.
   `sudo ./easytier-core -d --tcp-whitelist 1000`

3. use complete acl ability with config file:

```
[[acl.acl_v1.chains]]
name = "inbound_whitelist"
chain_type = 1
description = "Auto-generated inbound whitelist from CLI"
enabled = true
default_action = 2

[[acl.acl_v1.chains.rules]]
name = "tcp_whitelist"
description = "Auto-generated TCP whitelist rule"
priority = 1000
enabled = true
protocol = 1
ports = ["1000"]
source_ips = []
destination_ips = []
source_ports = []
action = 1
rate_limit = 0
burst_limit = 0
stateful = true

```
2025-07-24 22:13:45 +08:00
Sijie.Sun
4f53fccd25 fix bugs (#1138)
1. avoid dns query hangs the thread
2. avoid deadloop when stun query failed because of no ipv4 addr.
3. make quic input error non-fatal.
4. remove ring tunnel from connection map to avoid mem leak.
5. limit listener retry count.
2025-07-21 23:18:38 +08:00
Sijie.Sun
876d550f68 reduce memory usage (#1133)
Large memory usage comes from:

Mimalloc hold large thread cache, causing abort 13M+ usage.
QUIC endpoint occupy 3M when GRO is enabled.
Smoltcp 64 tcp listener use 2MB.
2025-07-20 19:15:28 +08:00
Sijie.Sun
2660ed5fda try create tun device if not exist (#1131) 2025-07-19 22:56:19 +08:00
Sijie.Sun
50c6f5ae6c add windows firewall for tun interface (#1130)
allow all icmp/tcp/udp on tun interface.
2025-07-19 20:38:44 +08:00
Sijie.Sun
85f0091056 fix latency first route of public server (#1129) 2025-07-19 18:16:53 +08:00
Sijie.Sun
e25cd9be37 add disable ipv6 option to gui/web (#1127) 2025-07-19 11:07:57 +08:00
Sijie.Sun
7f3a9c021c close peer conn if remote addr is from virtual network (#1123) 2025-07-18 03:29:48 +08:00