因此,我打开了到远程服务器的 SSH 隧道,以将其用作代理:
ssh -D 10000 -N remote
我使用 FireFox 和 FoxyProxy,效果很好。但有时隧道会冻结。一个很好的例子是这位澳大利亚词曲作者。该网站向域 johnbutler-trio.com 发出请求,该域可能配置不正确。结果是隧道冻结一分钟,直到触发超时,才能进一步建立连接。之后一切都恢复正常,直到我再次访问此网站。启用调试开关后,输出如下:
debug1: channel 5: new [dynamic-tcpip]
debug1: Connection to port 10000 forwarding to socks port 0 requested.
...
debug1: Connection to port 10000 forwarding to socks port 0 requested.
debug1: channel 45: new [dynamic-tcpip]
channel 38: open failed: administratively prohibited: open failed
debug1: channel 38: free: direct-tcpip: listening port 10000 for johnbutler-trio.com port 80, connect from 127.0.0.1 port 45057 to 127.0.0.1 port 10000, nchannels 46
channel 39: open failed: administratively prohibited: open failed
channel 40: open failed: administratively prohibited: open failed
channel 41: open failed: administratively prohibited: open failed
channel 42: open failed: administratively prohibited: open failed
channel 43: open failed: administratively prohibited: open failed
debug1: channel 39: free: direct-tcpip: listening port 10000 for johnbutler-trio.com port 80, connect from 127.0.0.1 port 45058 to 127.0.0.1 port 10000, nchannels 45
debug1: channel 40: free: direct-tcpip: listening port 10000 for johnbutler-trio.com port 80, connect from 127.0.0.1 port 45059 to 127.0.0.1 port 10000, nchannels 44
debug1: channel 41: free: direct-tcpip: listening port 10000 for johnbutler-trio.com port 80, connect from 127.0.0.1 port 45060 to 127.0.0.1 port 10000, nchannels 43
debug1: channel 42: free: direct-tcpip: listening port 10000 for johnbutler-trio.com port 80, connect from 127.0.0.1 port 45061 to 127.0.0.1 port 10000, nchannels 42
debug1: channel 43: free: direct-tcpip: listening port 10000 for johnbutler-trio.com port 80, connect from 127.0.0.1 port 45062 to 127.0.0.1 port 10000, nchannels 41
发生了什么事?当某人的域名出现错误时,如何防止隧道冻结?顺便说一句,打开随机未注册的域名不会导致隧道冻结。