From ebca4443744afe3ccee6ec0161ac5a9f95e35b63 Mon Sep 17 00:00:00 2001 From: KKRainbow <5665404+KKRainbow@users.noreply.github.com> Date: Sun, 8 Nov 2026 00:59:48 +0800 Subject: [PATCH] fix(mini): enable IPv4 subnet proxying (#2806) Compact host policy disabled the packet proxy even though mini already selects the smoltcp proxy stack. Configuration normalization consequently removed local proxy networks and skipped proxy startup, so peers never learned configured subnets. Declare compact proxy support from the smoltcp feature and enable mini's existing native ICMP adapter. Reuse the current prefix announcements, TCP/UDP services and lifecycle without adding dependencies or changing routing protocols. Document IPv4 subnet proxy support. Validate prefix installation and TCP/UDP/ICMP round trips in isolated network namespaces with both smoltcp and the default TUN proxy path. Check remote subnet access and withdraw the local subnet on restart to verify the unconfigured behavior. Formatting and full-feature Clippy for the affected packages pass; mini-only strict Clippy remains blocked by an existing unused variable outside this change. --- easytier-contrib/easytier-mini/Cargo.toml | 1 + easytier-contrib/easytier-mini/README.md | 2 ++ easytier/src/instance/config.rs | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/easytier-contrib/easytier-mini/Cargo.toml b/easytier-contrib/easytier-mini/Cargo.toml index 240405e4..922acf00 100644 --- a/easytier-contrib/easytier-mini/Cargo.toml +++ b/easytier-contrib/easytier-mini/Cargo.toml @@ -12,6 +12,7 @@ anyhow.workspace = true easytier = { workspace = true, features = [ "aes-gcm", "dhcp-ipv4", + "icmp-proxy", "logging", "proxy-cidr-monitor", "smoltcp", diff --git a/easytier-contrib/easytier-mini/README.md b/easytier-contrib/easytier-mini/README.md index 0ec7015c..3b20f5c8 100644 --- a/easytier-contrib/easytier-mini/README.md +++ b/easytier-contrib/easytier-mini/README.md @@ -98,6 +98,8 @@ back to AES-GCM rather than plaintext. The compact runtime supports `tcp://` and `udp://` listener, mapped-listener and peer URLs. `no_tun = true` runs through smoltcp without an OS TUN device, and `dhcp = true` allocates the virtual IPv4 address dynamically. +Configured `proxy_network` IPv4 subnets are advertised and proxied for TCP, UDP +and ICMP. The mini feature set keeps STUN collection, UDP hole punching, Web heartbeats, Web instance lifecycle management and the config hot-patch RPC. It omits TCP diff --git a/easytier/src/instance/config.rs b/easytier/src/instance/config.rs index d4451275..653ae704 100644 --- a/easytier/src/instance/config.rs +++ b/easytier/src/instance/config.rs @@ -71,7 +71,7 @@ pub(crate) fn compact_runtime_core_host_config() -> CoreInstanceHostConfig { config.host_routing.local_exit_node_fallback = false; config.public_ipv6_provider_supported = false; config.gateway_enabled = false; - config.proxy_enabled = false; + config.proxy_enabled = cfg!(feature = "smoltcp"); config.vpn_portal_enabled = false; config.magic_dns_enabled = false; config.kcp_enabled = false;