liudf0716 / xfrpc

The xfrpc project is a lightweight implementation of the FRP client written in C language for OpenWRT and IoT systems. It is designed to provide an efficient solution for resource-constrained devices such as OpenWRT routers and IoT devices, which often have limited ROM and RAM space.
GNU General Public License v3.0
719 stars 90 forks source link

请问是否支持 remote_port = 0 配置,我期望自动远程端口,但是报错:Proxy [ssh01] error: remote_port or local_port or local_ip not found #63

Open ztj1993 opened 4 days ago

ztj1993 commented 4 days ago

版本:3.05.661 配置:

[common]
server_addr = xxx
server_port = 7000
token = xxx
[ssh01]
type = tcp
local_ip = 127.0.0.1
local_port = 22
remote_port = 0

启动报错:

[3][Mon Oct 14 17:20:31 2024][24317](config.c:245) Proxy [ssh01] error: remote_port or local_port or local_ip not found
[3][Mon Oct 14 17:20:31 2024][24317](config.c:130) Error: validate_proxy failed

如果指定 remote_port 为具体的端口,则不报错。 请问是否 remote_port = 0 配置,我以前的 frpc 是可以这样配置的。

我是在 OpenWrt 23.05.3 测试的,通过 opkg install xfrpc 安装。

还有 name 参数,经过测试也不支持。

[ssh01]
name = aaa
type = tcp
local_ip = 127.0.0.1
local_port = 22
remote_port = 0