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

pgcli --proxy-listen 如何使用的。 #27

Open
clywm520 opened this issue Jan 14, 2025 · 6 comments
Open

pgcli --proxy-listen 如何使用的。 #27

clywm520 opened this issue Jan 14, 2025 · 6 comments

Comments

@clywm520
Copy link

这个功能如何使用,要配合forward来使用么。没试出功能。

服务器A 使用tun ,另一台服务器B 连A服务器,使用--proxy-listen . A除了能ping通B服务器,A不能访问B服务器 任意端口

@clywm520
Copy link
Author

节点可以通过虚拟 IP 被访问(TCP、UDP 和 ICMP 都支持),也可以做子网代理(使用 -n 参数)。但是无法主动发起对其他节点的访问. 这个功能貌似没有实现哈

@clywm520
Copy link
Author

使用forward,需要指定端口,觉得这个不太方便。

@rkonfj
Copy link
Member

rkonfj commented Jan 14, 2025

指定proxy-listen参数后,节点也运行在 rootless 模式,并运行一个代理服务器(socks5 和 http)。网络内的其他节点可以通过这个代理服务器被访问。

@clywm520
Copy link
Author

forward 功能,可以实现不用指定端口么?可以访问该节点的任意tcp、udp端口。

@clywm520
Copy link
Author

B服务器配置了代理 pgcli vpn -s ws://xx.xx.xx.xx:9988/pg --forward tcp://127.0.0.1:4900 --proxy-listen 0.0.0.0:4900 --udp-port 31334 --ipv4 192.168.18.2/24 -f psns.json
当A服务器使用代理访问时。出现这个错误
2025/01/15 08:51:38 INFO [gVisor] Accept pg_addr=192.168.18.2:4900 from=192.168.18.1:57356 forward_to=tcp://127.0.0.1:4900
2025/01/15 08:51:38 ERROR [Proxy] Serve socks5 err="socks5 proxy tcp: connect tcp 8.153.103.12:80: no route to host"

@rkonfj
Copy link
Member

rkonfj commented Jan 15, 2025

8.153.103.12

这个不是 PG 网络内的节点

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

2 participants