好吧,这似乎是一件容易的事情,但经过大量搜索后,我无法使其正常工作。我有 Ubuntu 14.04。
这个config.json
文件包括我朋友的服务器运行 shadowsocks 的配置:
{
"server":"ip address",
"server_port":23,
"local_port":1234,
"password":"password",
"timeout":600,
"method":"aes-256-cfb"
}
Run Code Online (Sandbox Code Playgroud)
我这样做sslocal -c config.json
并成功连接到服务器。
例如,现在我可以google-chrome
使用以下命令使其工作:google-chrome --proxy-server="socks5://127.0.0.1:1234" --host-resolver-rules="MAP * 0.0.0.0 , EXCLUDE localhost"
问题是我怎样才能使整个互联网连接首先通过该服务器。这样每个应用程序都可以默认使用它。您可以简单地激活和停用的东西。
我尝试过但失败的事情:
使用tsocks
-> https://askubuntu.com/questions/532375/launch-program-through-shadowsocks
使用iptables
as sudo iptables -t nat -A OUTPUT -p tcp --dport 80 -j DNAT --to-destination 127.0.0.1:1234
-> http://adminsgoodies.com/configuring-ubuntu-for-global-socks5-proxy/
使用系统设置 -> 网络 -> 网络代理以及dconf-tools
排除主机 -> https://askubuntu.com/questions/70245/how-do-i-make-the-system-wide-proxy-settings-bypass-the -proxy-for-local-addresse
如何通过 shadowsocks 路由我的 SSH 流量?
我正在使用 shadowsocks 从防火墙后面连接到服务器。我想建立传出 SSH 连接,但我担心 SSH 流量可能会被识别,从而导致我的连接关闭。因此,我希望能够通过我已经使用的 SOCKS5 代理路由 SSH 流量。
我从哪里开始实现这一目标?我假设我需要创建一个虚拟网络适配器,该适配器可以提供一系列端口,从这些端口以某种方式通过 SOCKS5 代理路由输出?