Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

多ip 多端口 转发配置失败 #10

Closed
sitsh opened this issue Jun 8, 2020 · 8 comments
Closed

多ip 多端口 转发配置失败 #10

sitsh opened this issue Jun 8, 2020 · 8 comments

Comments

@sitsh
Copy link

sitsh commented Jun 8, 2020

想实现 本地443 转发远程 1.1.1.1:443
本地 1443 转发 远程2.2.2.2:1443

按博客上给的 示例改动了下 这2个转发 只有运行一个有效。
{
"listening_addresses": ["0.0.0.0"],
"listening_ports": ["443","1443"],
"remote_addresses": ["1.1.1.1","2.2.2.2"],
"remote_ports": ["443","1443"]
}

能给个实现上面目的的有效配置吗?

@zhboner
Copy link
Owner

zhboner commented Jun 9, 2020

配置文件写法没有问题,请问转发的是UDP还是TCP呢

@sitsh
Copy link
Author

sitsh commented Jun 9, 2020

配置文件写法没有问题,请问转发的是UDP还是TCP呢

一个转发 ws+Tls 组合 一个 tcp+TLS 组合 都是 tcp,
现在已经把配置 单独写 开了2个进程 用了

@sitsh
Copy link
Author

sitsh commented Jun 9, 2020

又 测试了下。写在 配置第二个 就是上面 2.2.2.2 远程地址的配置可以运作。
第一个位置1.1.1.1的配置无法 转发成功。
把配置拆分后 独立写 都能转发。

@zhboner
Copy link
Owner

zhboner commented Jun 9, 2020

感谢反馈。

这个问题很奇怪,我这边是可以的。

之后的更新会加入一些监听信息,帮助定位问题。

@sitsh sitsh closed this as completed Jun 10, 2020
@zhboner zhboner reopened this Jun 11, 2020
@zhboner
Copy link
Owner

zhboner commented Jun 11, 2020

This issue has been fixed in beta.3

@zhboner zhboner closed this as completed Jun 11, 2020
@sitsh
Copy link
Author

sitsh commented Jun 12, 2020

This issue has been fixed in beta.3

太好了。我现在 多端口的多ip的配置文件在 beta3版本中 中已经工作正常啦。

@laoyur
Copy link

laoyur commented Aug 26, 2020

配置文件支持端口段,当转发端口的数量大于本地地址时,都会默认使用第一个传入的地址。这样实现了一个地址上的多端口转发多ip或单ip上的多端口。

只有我一个人看不懂这段介绍吗?

像楼主那种配置,算是一一对应,没有异议。那么,如果是如下配置:

{
"listening_addresses": ["0.0.0.0"],
"listening_ports": ["443","1443"],
"remote_addresses": ["1.1.1.1","2.2.2.2"],
"remote_ports": ["443","1443", "2443"]
}

根据作者的介绍,该作何解呢?2.2.2.2是会被忽略吗?然后本地的443、1443被随机转发到1.1.1.1的443/1443/2443 ?

@nzcool
Copy link

nzcool commented Nov 5, 2021

配置文件支持端口段,当转发端口的数量大于本地地址时,都会默认使用第一个传入的地址。这样实现了一个地址上的多端口转发多ip或单ip上的多端口。

只有我一个人看不懂这段介绍吗?

像楼主那种配置,算是一一对应,没有异议。那么,如果是如下配置:

{
"listening_addresses": ["0.0.0.0"],
"listening_ports": ["443","1443"],
"remote_addresses": ["1.1.1.1","2.2.2.2"],
"remote_ports": ["443","1443", "2443"]
}

根据作者的介绍,该作何解呢?2.2.2.2是会被忽略吗?然后本地的443、1443被随机转发到1.1.1.1的443/1443/2443 ?

其实我也想搞明白

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants