[GH-ISSUE #221] ssh中转模式,socks代理不能正常工作 #142

Closed
opened 2026-02-27 23:15:38 +03:00 by kerem · 1 comment
Owner

Originally created by @RandomOS on GitHub (Feb 22, 2019).
Original GitHub issue: https://github.com/snail007/goproxy/issues/221

环境 Win7
版本 proxy 6.9

操作方法
在本机win7上执行

proxy socks --always -t tcp -p ":7070" -T ssh -P "154.209.235.45:22" -u root -D password
curl -x socks5://127.0.0.1:7070 https://httpbin.org/ip

proxy 日志

Proxy Enterprise Version v6.9_20190122142715 by snail , blog : http://www.host90
0.com/

2019/02/22 14:16:45 warn: socks udp not suppored for ssh
2019/02/22 14:16:45 use ssh parent [154.209.235.45:22] [ ROUNDROBIN ]
2019/02/22 14:16:45 tcp socks proxy on [::]:7070
2019/02/22 14:22:23 handshake fail, proxy: failed to read greeting from SOCKS5 proxy at 180.97.33.107:443: EOF

ssh 服务器日志

Feb 22 14:06:36 hostker sshd[1426]: Did not receive identification string from x.x.x.x port 50945
Feb 22 14:06:39 hostker sshd[1428]: Did not receive identification string from x.x.x.x port 50949
Feb 22 14:06:42 hostker sshd[1429]: Did not receive identification string from x.x.x.x port 50955
Feb 22 14:06:45 hostker sshd[1430]: Did not receive identification string from x.x.x.x port 50958
Feb 22 14:06:48 hostker sshd[1431]: Did not receive identification string from x.x.x.x port 50962
Feb 22 14:06:51 hostker sshd[1432]: Did not receive identification string from x.x.x.x port 50965
Feb 22 14:06:54 hostker sshd[1433]: Did not receive identification string from x.x.x.x port 50969
Feb 22 14:06:57 hostker sshd[1434]: Did not receive identification string from x.x.x.x port 50972
Feb 22 14:07:00 hostker sshd[1435]: Did not receive identification string from x.x.x.x port 50975
Feb 22 14:07:03 hostker sshd[1438]: Did not receive identification string from x.x.x.x port 50979
Feb 22 14:07:06 hostker sshd[1443]: Did not receive identification string from x.x.x.x port 50982

预期的结果
本机开启 socks5 代理,端口为7070,流量通过ssh通道,通过 154.209.235.45 出口转发出去。

实际的结果
本机的 7070 socks代理无法正常工作, curl 命令并没有返回结果,从ssh服务器的日志来看,proxy没有与ssh server 正确连接上。

Originally created by @RandomOS on GitHub (Feb 22, 2019). Original GitHub issue: https://github.com/snail007/goproxy/issues/221 环境 Win7 版本 proxy 6.9 操作方法 在本机win7上执行 ```bash proxy socks --always -t tcp -p ":7070" -T ssh -P "154.209.235.45:22" -u root -D password ``` ```bash curl -x socks5://127.0.0.1:7070 https://httpbin.org/ip ``` proxy 日志 ```text Proxy Enterprise Version v6.9_20190122142715 by snail , blog : http://www.host90 0.com/ 2019/02/22 14:16:45 warn: socks udp not suppored for ssh 2019/02/22 14:16:45 use ssh parent [154.209.235.45:22] [ ROUNDROBIN ] 2019/02/22 14:16:45 tcp socks proxy on [::]:7070 2019/02/22 14:22:23 handshake fail, proxy: failed to read greeting from SOCKS5 proxy at 180.97.33.107:443: EOF ``` ssh 服务器日志 ```text Feb 22 14:06:36 hostker sshd[1426]: Did not receive identification string from x.x.x.x port 50945 Feb 22 14:06:39 hostker sshd[1428]: Did not receive identification string from x.x.x.x port 50949 Feb 22 14:06:42 hostker sshd[1429]: Did not receive identification string from x.x.x.x port 50955 Feb 22 14:06:45 hostker sshd[1430]: Did not receive identification string from x.x.x.x port 50958 Feb 22 14:06:48 hostker sshd[1431]: Did not receive identification string from x.x.x.x port 50962 Feb 22 14:06:51 hostker sshd[1432]: Did not receive identification string from x.x.x.x port 50965 Feb 22 14:06:54 hostker sshd[1433]: Did not receive identification string from x.x.x.x port 50969 Feb 22 14:06:57 hostker sshd[1434]: Did not receive identification string from x.x.x.x port 50972 Feb 22 14:07:00 hostker sshd[1435]: Did not receive identification string from x.x.x.x port 50975 Feb 22 14:07:03 hostker sshd[1438]: Did not receive identification string from x.x.x.x port 50979 Feb 22 14:07:06 hostker sshd[1443]: Did not receive identification string from x.x.x.x port 50982 ``` 预期的结果 本机开启 socks5 代理,端口为7070,流量通过ssh通道,通过 154.209.235.45 出口转发出去。 实际的结果 本机的 7070 socks代理无法正常工作, curl 命令并没有返回结果,从ssh服务器的日志来看,proxy没有与ssh server 正确连接上。
kerem closed this issue 2026-02-27 23:15:38 +03:00
Author
Owner

@snail007 commented on GitHub (Feb 22, 2019):

fixed in v7.0

<!-- gh-comment-id:466293429 --> @snail007 commented on GitHub (Feb 22, 2019): fixed in v7.0
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/goproxy#142
No description provided.