Commit Graph

1158 Commits

Author SHA1 Message Date
Luna Yao 96e2a6c775 config: use getset 2026-04-30 18:56:00 +02:00
Luna Yao 480677f085 node: increase heartbeat test wait time
heartbeat test
2026-04-30 18:56:00 +02:00
Luna Yao b7677031cb zone: fallthrough policy
heartbeat test

try_from
2026-04-30 18:56:00 +02:00
Luna Yao ee1f656d6b config: set name to optional 2026-04-29 12:25:18 +02:00
Luna Yao c866ed4da3 merge 2026-04-29 11:55:45 +02:00
Luna Yao 2fd8333ebb Merge branch 'main' into feat/dns-policy 2026-04-29 11:53:32 +02:00
Luna Yao 29ff4283d7 Cargo.lock 2026-04-29 11:44:43 +02:00
Luna Yao 8c0652a2e2 config: add disabled flag 2026-04-29 11:44:43 +02:00
Luna Yao 92af568d8b config: rewrite
test

test

origin

test

test
2026-04-29 11:44:22 +02:00
KKRainbow ed8df2d58f prevent EasyTier-managed IPv6 from being used as underlay connections (#2181)
When a node has public IPv6 addresses allocated by EasyTier, those addresses
are installed on the host's network interfaces. The system would then pick
them up as candidate source/destination addresses for underlay connections
(direct peer, UDP hole punch, bind addresses), causing overlay traffic to
loop back into the overlay itself.

Add a central predicate is_ip_easytier_managed_ipv6() and apply it at every
point where IPv6 addresses are selected for underlay use:
- Filter managed IPv6 from DNS-resolved connector addresses, including a
  UDP socket getsockname check to detect whether the OS would route through
  the overlay to reach a destination
- Skip managed IPv6 in bind address selection and STUN candidate filtering
- Strip managed IPv6 from GetIpListResponse RPC so peers never learn them
- Pass pre-resolved addresses to tunnel connectors to avoid re-resolution

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-29 12:17:22 +08:00
Luna Yao 0a23546e3f three_node 2026-04-28 21:54:05 +02:00
Luna Yao b85d5bc515 tests: ignore refresh error in wait_peer_zone_visibility
fmt
2026-04-28 21:23:17 +02:00
Luna Yao 30b88bf626 peer_mgr: invalidate unreachable peer
fmt
2026-04-28 21:23:16 +02:00
Luna Yao 486cc43059 node: remove serial_test
fmt
2026-04-28 21:23:16 +02:00
Luna Yao 46d1c2aef3 node & peer_mgr: fix rpc register/unregister
mut node
2026-04-28 21:23:16 +02:00
Luna Yao 8cf9d493b8 node: replace rr interval with heartbeat interval
interval
2026-04-28 21:23:16 +02:00
Luna Yao e527717eef node: add reconcile
logs

reconcile

reconcile
2026-04-28 21:23:16 +02:00
lurenjia f66010e6f9 fix: preserve URL type in matches_scheme (#2179)
Avoid resolving Url::as_ref() to the full URL string before TunnelScheme
conversion. Add regression coverage for owned/borrowed URLs and the UDP
IPv6 hole-punch branch condition.

Co-authored-by: KKRainbow <443152178@qq.com>
2026-04-28 23:23:41 +08:00
Luna Yao 80041086de peer_mgr(refresh): add backoff retry
fmt

refresh
2026-04-28 15:03:53 +02:00
Luna Yao 40d3e48cc4 remove redundant heartbeat log 2026-04-28 14:52:02 +02:00
Luna Yao 88297868c3 node_mgr: append system zone handler to all origin
system
2026-04-28 05:12:27 +02:00
Luna Yao d59257c8b7 zone_handler: skip negative response to forward to upstream
catalog_lookup_returns_nodata_on_nameexists

fmt
2026-04-28 05:12:27 +02:00
Luna Yao fb4479a99f unit tests 2026-04-28 05:12:27 +02:00
Luna Yao 185777b741 server: add addresses to nic and bind to them
fmt

add address

save bindings
2026-04-28 05:12:27 +02:00
Luna Yao 7d536d3353 remove address hijack 2026-04-28 05:12:27 +02:00
Luna Yao 87f2905360 server: use guarden to protect system dns config
server: guarden

server guarden
2026-04-28 05:12:27 +02:00
Luna Yao 1338ab343c node(election): use guard to protect nic_packet_process_pipeline
node: guarden
2026-04-28 04:52:51 +02:00
Luna Yao 38e7366c15 merge 2026-04-27 20:45:20 +02:00
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 969ecfc4ca fix(gui): refresh service after core version upgrade (#2172) 2026-04-27 15:54:52 +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>
v2.6.2
2026-04-26 21:37:34 +08:00
KKRainbow b20075e3dc fix: allow self virtual IP loopback (#2161) 2026-04-25 21:26:16 +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
Luna Yao 820d9095d3 replace AsyncRuntime with simpler CancellableTask (#2136) 2026-04-25 10:29:53 +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 4688ad74ad Honor credential reusable flag (#2157)
- propagate reusable through credential storage, CLI, RPC, routing, and tests
- enforce reusable=false owner election with current topology
- preserve proof-backed groups when refreshing credential ACL groups
2026-04-25 00:22:40 +08:00
Luna Yao f7ea78d4f0 lower max_udp_payload_size to 1200 (#2156) 2026-04-24 21:20:37 +08:00
james.zhang ac112440c3 fix(UrlInput): update parseUrl and buildUrlValue to handle null ports correctly (#2146) 2026-04-23 13:45:09 +08:00
KKRainbow 958b246f05 improve webclient (#2151) 2026-04-23 13:44:18 +08:00
james.zhang 263f4c3bc9 fix(peer_route): exclude current peer ID from proxy CIDR lists (#2149) 2026-04-22 20:30:38 +08:00
Luna Yao ffddc517e1 fix: listener parsing (#2143)
Fixes a CLI listener parsing regression where url crate special-casing for ws/wss could misinterpret inputs like ws:11011, and adds coverage to prevent future regressions.

Changes:

Refactors listener parsing to avoid url::Url parsing for proto:port forms and to support additional shorthand inputs (port-only / IP-only / SocketAddr).
Centralizes “expand to all IpScheme variants” logic in a helper (gen_listeners) while preserving the “port=0 is dynamic” behavior.
Adds unit tests covering valid/invalid listener inputs and expansion behavior.
2026-04-21 23:45:22 +08:00
Debugger Chen 5cd0a3e846 feat: add upnp support (#1449) 2026-04-21 17:19:04 +08:00
Luna Yao f4319c4d4f ci(test): always check everything (#2142)
* ci(test): always check everything
* move Cargo.lock check to the last step
2026-04-21 10:08:27 +08:00
Luna Yao 0091a535d5 use mimalloc for FreeBSD (#2144) 2026-04-21 08:40:21 +08:00
Luna Yao 524c8d9987 move hostname function to utils 2026-04-20 00:51:59 +02:00
Luna Yao d7a5fb8d66 remove --no-deps from lock check (#2134) 2026-04-20 00:46:26 +08:00