Commit Graph

224 Commits

Author SHA1 Message Date
Luna Yao 0f4003245b Merge branch 'main' into feat/dns-policy
# Conflicts:
#	easytier/src/common/config.rs
#	easytier/src/common/dns.rs
#	easytier/src/common/mod.rs
#	easytier/src/core.rs
#	easytier/src/instance/instance.rs
#	easytier/src/launcher.rs
#	easytier/src/peers/peer_ospf_route.rs
#	easytier/src/proto/peer_rpc.proto
#	easytier/src/utils/task.rs
2026-04-27 17:16:43 +02:00
Luna Yao d5c4700d32 utils: replace defer, ContextGuard, DetachableTask with guarden crate (#2163) 2026-04-27 18:29:46 +08:00
KKRainbow 8f862997eb feat: support allocating public IPv6 addresses from a provider (#2162)
* feat: support allocating public IPv6 addresses from a provider

Add a provider/leaser architecture for public IPv6 address allocation
between nodes in the same network:

- A node with `--ipv6-public-addr-provider` advertises a delegable
  public IPv6 prefix (auto-detected from kernel routes or manually
  configured via `--ipv6-public-addr-prefix`).
- Other nodes with `--ipv6-public-addr-auto` request a /128 lease from
  the selected provider via a new RPC service (PublicIpv6AddrRpc).
- Leases have a 30s TTL, renewed every 10s by the client routine.
- The provider allocates addresses deterministically from its prefix
  using instance-UUID-based hashing to prefer stable assignments.
- Routes to peer leases are installed on the TUN device, and each
  client's own /128 is assigned as its IPv6 address.

Also includes netlink IPv6 route table inspection, integration tests,
and event-driven route/address reconciliation.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-26 21:37:34 +08:00
Luna Yao eb3b5aae51 utils: add DetachableTask & ContextGuard (#2138) 2026-04-25 18:24:36 +08:00
datayurei af6b6ab6f1 fix: avoid panic when validating mapped listeners (#2153) 2026-04-25 17:45:57 +08:00
Luna Yao 5a1668c753 refactor: remove ScopedTask (#2125)
* replace ScopedTask with AbortOnDropHandle
2026-04-25 15:20:25 +08:00
KKRainbow 2fb41ccbba bump version 262 (#2158) 2026-04-25 10:22:24 +08:00
Luna Yao b4666be696 fix: disable SO_REUSEADDR & enable SO_EXCLUSIVEADDRUSE on Windows (#2128) 2026-04-25 00:37:34 +08:00
KKRainbow 958b246f05 improve webclient (#2151) 2026-04-23 13:44:18 +08:00
Debugger Chen 5cd0a3e846 feat: add upnp support (#1449) 2026-04-21 17:19:04 +08:00
Luna Yao 524c8d9987 move hostname function to utils 2026-04-20 00:51:59 +02:00
Luna Yao 11626d8082 remove id from zone 2026-04-19 02:17:50 +02:00
Luna Yao 362547eaab use localhost as default hostname 2026-04-19 01:48:08 +02:00
Luna Yao 9feb548bc2 remove fqdn from DnsConfig
l

l

plan: update

plan: update
2026-04-19 01:38:29 +02:00
Luna Yao cbb966d57c remove fqdn from DnsExportConfig 2026-04-19 00:34:57 +02:00
Luna Yao 6db0be00ad use sanitize in get_hostname
fmt

config
2026-04-19 00:34:57 +02:00
Luna Yao 7ae7725fbf rewrite txt_lookup and srv_lookup
rewrite

rewrite

lookup

l
2026-04-19 00:34:41 +02:00
Luna Yao 5a516a195c move common::dns to utils::dns
move dns

move
2026-04-18 23:14:25 +02:00
Luna Yao c71ab7543f remove accept_dns 2026-04-18 21:26:30 +02:00
Luna Yao 84984e1641 move dirty to crate::utils 2026-04-18 03:46:43 +02:00
Luna Yao 7345acfe7c upgrade hickory-dns to 0.26.0
fix zone test
2026-04-18 03:46:43 +02:00
Luna Yao b070cff8e2 fmt 2026-04-17 18:59:11 +02:00
Luna Yao b94ab414a0 replace parking_lot with std 2026-04-17 18:50:12 +02:00
Luna Yao 3795800975 replace gethostname with hostname 2026-04-17 18:43:16 +02:00
Luna Yao ba7fc1098b merge 2026-04-17 18:26:21 +02:00
Luna Yao 38cb4a22fd Merge branch 'main' into feat/dns-policy 2026-04-17 17:46:20 +02:00
Luna Yao fae32361f2 chore: update Rust to 1.95; replace cfg_if with cfg_select (#2121) 2026-04-17 23:41:31 +08:00
Luna Yao 6b01554c17 Merge branch 'main' into feat/dns-policy
# Conflicts:
#	easytier/src/common/log.rs
#	easytier/src/connector/dns_connector.rs
#	easytier/src/dns/system/windows.rs
#	easytier/src/gateway/socks5.rs
#	easytier/src/instance/dns_server/server.rs
#	easytier/src/instance/dns_server/server_instance.rs
#	easytier/src/instance/instance.rs
#	easytier/src/peers/peer_manager.rs
#	easytier/src/peers/peer_ospf_route.rs
#	easytier/src/proto/utils.rs
#	easytier/src/tunnel/common.rs
#	easytier/src/utils/panic.rs
2026-04-17 17:16:55 +02:00
Luna Yao bcb2e512d4 utils: move code to a dedicated mod; add AsyncRuntime (#2072) 2026-04-16 23:32:07 +08:00
Luna Yao 3687519ef3 turn off ansi for file log (#2110)
Co-authored-by: KKRainbow <443152178@qq.com>
2026-04-15 19:38:27 +08:00
Luna Yao 3a4ac59467 log: change default log level of tests to WARNING (#2113) 2026-04-14 18:10:38 +08:00
KKRainbow 5b35c51da9 fix packet split on udp tunnel and avoid tcp proxy access rpc portal (#2107)
* distinct control / data when forward packets
* fix rpc split for udp tunnel
* feat(easytier-web): pass public ip in validate token webhook
* protect rpc port from subnet proxy
2026-04-13 11:03:09 +08:00
Luna Yao 869e1b89f5 fix: remove log (file) when level is explicitly set to OFF (#2083)
* fix level filter for OFF
* remove unwrap of file appender creation
2026-04-12 22:16:30 +08:00
Luna Yao c6cb1a77d0 chore: clippy fix some code on Windows (#2106) 2026-04-12 22:13:58 +08:00
deddey 83010861ba Optimize network interface configuration for macOS and FreeBSD to avoid hard-coded IP addresses (#1853)
Co-authored-by: KKRainbow <443152178@qq.com>
2026-04-12 21:00:59 +08:00
Luna Yao daa53e5168 log: auto-init log for tests (#2073) 2026-04-12 13:04:21 +08:00
Luna Yao a879dd1b14 chore: update Rust to 2024 edition (#2066) 2026-04-10 00:22:12 +08:00
Luna Yao 5a8a1d3e6b disallow some methods from itertools 2026-04-06 18:28:30 +02:00
Luna Yao ddbfe76932 log: test log 2026-04-06 17:04:30 +02:00
Luna Yao 847e82ff8c config: filter out disabled export 2026-04-06 17:04:29 +02:00
Luna Yao 0d91aaf974 clippy 2026-04-06 11:54:51 +02:00
Luna Yao 5f8548d272 make dns Option 2026-04-06 11:54:50 +02:00
Luna Yao 7cb4345e4d fmt 2026-04-06 11:54:50 +02:00
Luna Yao ea5e34b6af Revert "remove hostname from config" 2026-04-06 11:54:50 +02:00
Luna Yao 385ff54b3e fix magic-dns feature gate 2026-04-06 11:54:50 +02:00
Luna Yao d5d600a524 remove hostname from config 2026-04-06 11:54:50 +02:00
Luna Yao 0ca5e38dba log: span
log: format
2026-04-06 11:54:50 +02:00
Luna Yao b0e4808d00 log: add test log init
log
2026-04-06 11:54:50 +02:00
Luna Yao 2a34032221 log: refactor 2026-04-06 11:54:50 +02:00
Luna Yao 15cc86c8bc log: use test writer 2026-04-06 11:54:50 +02:00