zhboner / realm

A network relay tool
MIT License
1.51k stars 282 forks source link

feature request: inbound interface binding #138

Open Zerorigin opened 3 weeks ago

Zerorigin commented 3 weeks ago

打算将 realm 部署在网关路由器上,网关上的虚拟接口 lan(br-lan)绑定了多个网口设备 ethX,并通过 vlan 划分了多个虚拟子接口,我想在其中一个虚拟子接口监听特定端口进行转发,但 realm 似乎还是会监听所有的 IPv4、IPv6 地址,而不是仅监听虚拟子接口 interface 上的 IPv4、IPv6 地址。

我的配置如下:

[log]
level = "warn"

[network]
no_tcp = false
use_udp = false

# DeepLX - API
[[endpoints]]
listen = "[::]:1188"
remote = "1.2.3.4:1188"
interface = "vlan_Services"
zephyrchien commented 3 weeks ago

@Zerorigin Thanks for the detailed description which is really helpful to understand your use case and locate the problem.

Currently the interface argument is just for outbound connections/traffics. Inbound ones has not been implemented but I will add this missing feature soon when I have time.