ssh + tinyproxy:性能不佳

ssh + tinyproxy:性能不佳

我目前在中国,但我仍然想访问一些被屏蔽的网站(facebook、youtube)。我在美国有 VPS,并在上面安装了 tinyproxy。我使用 SSH 端口转发登录我的 VPS,并已正确配置了浏览器。一切或多或少都正常:我可以浏览那些网站,但一切都很慢,有时数据传输会突然停止。这可能与我在 VPS 的 shell 中看到一些错误有关,例如:

通道 6:打开失败:连接失败:

另外,在 tinyproxy 的日志文件中,我看到一些不好的事情:

ERROR     Sep 06 14:52:14 [28150]: getpeer_information: getpeername() error: Transport endpoint is not connected
ERROR     Sep 06 14:52:15 [28153]: writebuff: write() error "Connection reset by peer" on file descriptor 7
ERROR     Sep 06 14:52:15 [28168]: readbuff: recv() error "Connection reset by peer" on file descriptor 7
ERROR     Sep 06 14:52:15 [28151]: readbuff: recv() error "Connection reset by peer" on file descriptor 7
ERROR     Sep 06 14:52:15 [28143]: readbuff: recv() error "Connection reset by peer" on file descriptor 7
ERROR     Sep 06 14:52:17 [28147]: writebuff: write() error "Connection reset by peer" on file descriptor 7
ERROR     Sep 06 14:52:23 [28137]: writebuff: write() error "Connection reset by peer" on file descriptor 7
ERROR     Sep 06 14:52:26 [28168]: getpeer_information: getpeername() error: Transport endpoint is not connected
ERROR     Sep 06 14:52:27 [28186]: read_request_line: Client (file descriptor: 7) closed socket before read.
ERROR     Sep 06 14:52:31 [28160]: getpeer_information: getpeername() error: Transport endpoint is not connected

答案1

您是否尝试过使用 SSH 的内置 SOCKS 代理?

ssh -D 1080 yourvps 服务器

然后将浏览器配置localhost:1080为 SOCKS 代理(而非 HTTP 代理)。SOCKS 功能更强大,因为它还允许转发非 HTTP 连接,只要您的程序支持 SOCKS。

顺便说一句,请确保 DNS 解析也通过代理,以防防火墙也会审查 DNS。对于 Firefox,您需要network.proxy.socks_remote_dns = true关于:配置

相关内容