EasyTier / EasyTier/EasyTier

[bug] EasyTier似乎未使用物理网卡

Open
#1,629 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
13.6k
Forks
1.4k
Avg merge
1d 9h
Merged PRs (30d)
34

Description

### 问题简要描述 / Brief Description

出口主机用于DNAT端口转发,需要在本地主机添加永久路由,bind_device 为 true ,且存在指向tun网卡的高优先级默认路由的情况下,EasyTier无法连接远端主机。

### 环境信息 / Environment Information

EasyTier 2.4.5
出口服务器 Archlinux
本地主机 Windows11

### 节点配置 / Node Configurations

出口服务器
```
ipv4 = "10.8.15.254"
listeners = [
"tcp://0.0.0.0:11010",
"udp://0.0.0.0:11010",
"wg://0.0.0.0:11011",
"ws://0.0.0.0:11011/",
"wss://0.0.0.0:11012/",
]
rpc_portal = "0.0.0.0:0"
tcp_whitelist = []
udp_whitelist = []

[flags]
enable_exit_node = true
enable_kcp_proxy = true
```
本地主机
```
ipv4 = "10.8.15.10/24"
listeners = [
"tcp://0.0.0.0:11010",
"udp://0.0.0.0:11010",
"wg://0.0.0.0:11011",
]
exit_nodes = ["10.8.15.254"]
rpc_portal = "0.0.0.0:0"
```

### 日志信息 / Log Information

客户端主要日志信息
```
[
"udp://出口主机公网地址:11010",
"Both",
"AnyhowError(hickory dns lookup_ip failed, host: 出口主机公网地址, port: 11010\n\nCaused by:\n proto error: no records found for Query { name: Name(\"出口主机公网地址.\"), query_type: A, query_class: IN })"
]
[
"tcp://出口主机公网地址:11010",
"V4",
"Err(Timeout(Elapsed(())))"
]
```

### 重现步骤 / Reproduction Steps

1.按上述配置并启动出口与本地EasyTier。
2.在本地主机添加路由。
```
route -p add 0.0.0.0 mask 0.0.0.0 10.8.15.254
```
这样操作是为了使Windows能正确指定出口,if参数只能用于指定网卡编号,命令无法指定Tun名称。
3.重新启动本地EasyTier。
4.本地EasyTier无法成功连接公网出口主机。

### 预期结果 / Expected Behavior

本地节点启动,且 bind_device 为 true 的情况下,优先使用物理网卡,而非疑似使用了Tun网卡。

### 额外信息 / Additional Context

如果存在可能性,在配置出口节点列表时添加路由是解决此问题的最简方式;或提供在EasyTier初始化完成后,运行指定脚本,或提供类似WireGuard中PostUp与PostDown的配置命令(在Tun网卡创建完成后)。
我能理解EasyTier给出口节点列表添加路由对项目可能存在的风险。

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.