ginuerzh / gost

GO Simple Tunnel - a simple tunnel written in golang
MIT License
15.47k stars 2.42k forks source link

socks5 代理转发至 http 代理时,访问报错 #931

Closed MudNernst closed 1 year ago

MudNernst commented 1 year ago

使用 gost 将 socks5 代理转发至 http 代理时:

  1. 若 socks5 及 http 代理均使用 gost 生成,则可代理后的 socks5 代理可正常使用。
./gost.exe -L=http://0.0.0.0:808
./gost.exe -L=socks5://0.0.0.0:1080 -F=http://127.0.0.1:808

image

  1. 若 http 代理为三方代理,则代理后的 socks5 代理无法正常使用。
# http://10.0.2.1:8765 为三方代理
./gost.exe -L=socks5://0.0.0.0:1080 -F=http://10.0.2.1:8765

image image

请问是什么原因导致。

MudNernst commented 1 year ago

使用 gost 将 socks5 代理转发至 http 代理时:

  1. 若 socks5 及 http 代理均使用 gost 生成,则可代理后的 socks5 代理可正常使用。
./gost.exe -L=http://0.0.0.0:808
./gost.exe -L=socks5://0.0.0.0:1080 -F=http://127.0.0.1:808

image

  1. 若 http 代理为三方代理,则代理后的 socks5 代理无法正常使用。
# http://10.0.2.1:8765 为三方代理
./gost.exe -L=socks5://0.0.0.0:1080 -F=http://10.0.2.1:8765

image image

请问是什么原因导致。

又发现,若追加 curl 请求的网址的协议,则可以正常访问。如 https://www.baidu.com image

MudNernst commented 1 year ago

三方代理 tinyproxy 的问题,80 端口不支持 CONNECT method。