Files
MeshPort/vendor/easytier/MESHPORT.md
T
shenandshen b656c1896a fix: improve SDK UDP throughput and transport selection
Yield during UDP receive bursts to let session consumers drain bounded queues. Prioritize measured RTT over protocol preference and enlarge user-space subnet TCP buffers with validated limits.

Add packet-level throughput diagnostics, transport selection coverage, and investigation records. SDK regression suite: 21 tests passed; local delay and throughput experiments documented.
2026-10-15 23:53:10 -07:00

3.6 KiB

MeshPort vendored EasyTier

Source: https://github.com/EasyTier/EasyTier Upstream revision: 7af7bdc16a41d64d58743d15023a63b3eed2102c Imported using git archive. Retained LGPL-3.0 LICENSE and upstream crate sources.

This is a local source customization, not a published GitHub fork. Root workspace members were limited to easytier, easytier-core and easytier-proto for the SDK build. MeshPort root uses path dependencies and its own Cargo.lock.

Local modifications:

  • easytier-core/src/socket/udp/layer.rs: yield after batches of 32 received datagrams so session-ring consumers can run before the fixed 128-slot queues overflow during bursts. Keeps queue capacities and enqueue/drop policies unchanged. Local encrypted SDK diagnostics count queue-full events and TCP sequence repeats; live WAN validation remains pending.
  • easytier/src/common/dns.rs: resolve numeric bootstrap addresses without DNS, including when a platform socket protector is installed.
  • easytier/src/common/network.rs: macOS hardware enumeration uses blocking subprocess waits; physical connection candidates exclude route-probe addresses and nonphysical IPv6 interfaces so another VPN's TUN is not reintroduced. Hardware device names match exactly.
  • easytier-core/src/peers/meshport_optimization.rs: direct preference, improvement thresholds, hold/cooldown and candidate first-hop filter.
  • easytier-core/src/peers/mod.rs: exposes policy module.
  • easytier-core/src/peers/conn/peer_map.rs: local policy and bounded decision caches.
  • easytier-core/src/peers/conn/peer.rs and selection.rs: measured RTT precedes protocol preference; optional UDP preference breaks equal-RTT ties, unverified punched connections cannot displace verified links. Skip closed connections, resolve default selection for status/fallback.
  • easytier-core/src/peers/peer_manager.rs: policy configuration and effective next-hop inspection.
  • easytier/src/common/ifcfg/mod.rs: macOS interface commands use blocking-pool subprocess waits rather than Tokio SIGCHLD-driven waits, for embedded runtime compatibility.
  • easytier-core/src/instance/packet_plane.rs: optional host subnet filter for route projection.
  • easytier-core/src/peers/peer_manager.rs: apply the same host filter to application TCP/UDP packet destinations.
  • easytier/src/instance/virtual_nic.rs: recompute filtered route deltas on events and periodic refresh, retry failed route additions.
  • easytier/Cargo.toml and easytier/src/instance/config.rs: expose the existing core packet proxy as an independent native host capability for subnet-gateway tests, without requiring KCP/QUIC. SDK production builds do not enable it.
  • easytier-core/src/gateway/dataplane/stack.rs: data-plane TCP socket buffers raised from 128 KiB to 1 MiB receive / 512 KiB transmit, lifting the single-stream window ceiling (window / RTT). Wire format unchanged; window scaling is negotiated from buffer size.
  • easytier-core/src/gateway/smoltcp/stack.rs: user-space subnet TCP buffers raised from 16 KiB each to 1 MiB receive / 128 KiB transmit. Keeps transmit buffering below the SDK's 512 KiB after local short-download regressions with that value. Allocates about 1.125 MiB per socket, including pending handshakes. Applies on the subnet gateway running this code, not on unmodified remote EasyTier gateways.
  • Cargo.toml: reduced workspace member list.

No packet/protobuf wire-format modification. Do not assume mixed-version interoperability from local tests alone. Before upstream updates, compare these files against the pinned revision and rerun MeshPort real overlay and transport fallback tests. See ../../docs/optimization.md for policy limits.