feat: add EasyTier outbound - #3194
Conversation
Integrate official easytier-go (wasm32-wasi + wazero) as type: easytier. No CGO, no custom shared libraries, and no implicit public.easytier.top peer. Overlay dial is IPv4-only; MagicDNS uses ListRoute/ShowNodeInfo.
Point github.com/EasyTier/EasyTier/easytier-go at EasyTier/EasyTier#2557 and drop the fork replace. Document that peers accepts multiple URIs.
|
🔴 CHANGES REQUESTED — 1 个会终止进程的问题 + 4 个需修正/确认 + 6 个次要 先说方向:这个 PR 走的正是 #2875 里 wwq 给出的路线(wasm32-wasi + 🔴 1. 🟡 2. 🟡 3. 🟡 4. socket 接管不完整——正是 #2875 最担心的回环面
🟡 5. 🔵 6. 次要(不阻塞)
已实测的事实(Alpha |
|
@olicesx fix |
This comment was marked as resolved.
This comment was marked as resolved.
1cf2200 to
ec87743
Compare
|
感谢您的贡献 代码整体上还是不错的,目前的有些小问题: 第一,adapter/outbound目录中请移除不必要的test |
Internal TCP reservations now bind on the host when dialer-proxy is set, structured configs enable DHCP if ipv4 is omitted, and MagicDNS reads flags.tld_dns_zone from raw TOML.
Structured YAML is the public contract. et:// stays in nameserver with an overlay A/PTR note, matching ts://.
|
|
鉴于 easytier-go 实际上是由 @KKRainbow 开发完成的,所以在合并前,我们希望征求其意见 |
Render [secure_mode] and per-peer peer_public_key from structured YAML so public shared nodes can be pinned without changing easytier-go.
EasyTier/EasyTier#2560 renamed the Go module to github.com/easytier/easytier/easytier-go. Bump to that merge commit so imports match the published module path.
wwqgtxx
left a comment
There was a problem hiding this comment.
我还是觉得既然 peers 内部本来就是个uri,那么peer-public-key直接作为uri参数放在string内部就够了,不需要搞结构化配置这么麻烦
把这个再改一下差不多就可以合了
Drop the structured peer object. peers stay URI strings; peer-public-key is parsed from the query and rendered as TOML peer_public_key.
| # peer-public-key: "base64-x25519-public-key" # 锁定共享节点公钥,防止中间人 | ||
| # secure-mode: true # Noise E2EE;配置 local-*-key 或 peer-public-key 时会自动开启 | ||
| # - "tcp://relay.example.com:11010?peer-public-key=base64-x25519-public-key" # 锁定共享节点公钥,防止中间人 | ||
| # secure-mode: true # Noise E2EE;配置 local-*-key 或 peer URI 中的 peer-public-key 时会自动开启 |
说明
实现 #2875:新增
type: easytier出站,接入官方 EasyTier/easytier-go(wasm32-wasi+github.com/MetaCubeX/wazero)。不引入 CGO / 自定义
.so,不隐式连接public.easytier.top。底层 socket / DNS 走 mihomoC.Dialer与ProxyServerHostResolver,由 mihomo 处理interface-name/routing-mark/dialer-proxy。依赖的上游 API 已合入:EasyTier/EasyTier#2557(
CreateInstanceTOML、ShowNodeInfo)。go.mod现指向官方 commitb1f87f02。公开配置只保留结构化 YAML 字段。
config/config-file已移除。这些字段对应 EasyTier 现有 TOML 项,合并后非必要不做 breaking change。et://放在nameserver中,写法对齐ts://tailscale。该 DNS 仅解析 overlay A/PTR;文档注释建议放到nameserver-policy。行为
no_tun = true;结构化配置额外bind_device = falseno-listener: true(listeners = []);无 listener 时必须显式配置peerspeers支持多个入口 URIipv4: 10.144.0.10或10.144.0.10/24);ipv4为空时默认dhcp: trueet.net)走ListRoute/ShowNodeInfo,其它名字走ProxyServerHostResolveret://<name>DNS,仅 overlay A/PTRstate-dir持久化instance_id(默认easytier/<name>)no_easytierbuild tag 可从二进制中排除 WASMTest plan
CGO_ENABLED=0 go test ./component/easytier ./adapter/outbound ./configCGO_ENABLED=0 go build -tags with_gvisorCGO_ENABLED=0 go build -tags 'with_gvisor,no_easytier'正式网络测试
网络 本机 DHCP 得到 overlay
10.33.44.1。单 peer ``:实例启动后约 4s 看到 8 个 overlay 节点。
多 peer `:同样约 4s 看到同一批 8 个节点。
可见节点