3 Commits

Author SHA1 Message Date
fanyang 4c7c3d7672 fix: add loopback to connector bind addresses for localhost connections
set_bind_addr_for_peer_connector collected all local interface IPs
as bind addresses but omitted 127.0.0.1. When connecting to localhost,
the connector would bind to a non-loopback IP (e.g. 172.17.0.2 in
Docker) and fail with connect timeout because routing from non-loopback
to loopback doesn't work.

Fix: prepend 127.0.0.1:0 to the bind address list. The connector tries
all bind addresses, so loopback will be attempted first and succeed for
localhost connections.

Benchmark results in Docker (4 threads, 1400B, 10s):
  Ring: 508K pps, MpscTunnelSender::send 138ns
  UDP:  440K pps, MpscTunnelSender::send 294ns
  TCP:  440K pps, MpscTunnelSender::send 376ns

All three tunnel types now converge and benefit from noop_waker sync send.
2026-06-28 22:40:52 +08:00
Sijie.Sun 4eb7efe5fc use workspace, prepare for config server and gui (#48) 2024-04-04 10:33:53 +08:00
sijie.sun 9779923b87 Initial Version 2024-01-27 15:12:30 +08:00