avatar

目录
kali設置ss+proxychains透明代理

1、下载ssr
pypi搜索下载

bash
1
# wget https://files.pythonhosted.org/packages/02/1e/e3a5135255d06813aca6631da31768d44f63692480af3a1621818008eb4a/shadowsocks-2.8.2.tar.gz

2、安装ss

bash
1
2
tar xf shadowsocks-2.8.2.tar.gz
sudo python setup.py install

3、生成配置文件

bash
1
2
3
4
5
6
7
8
9
10
11
12
sudo vim /etc/shadowsocks.json
{
"server":"38.100.229.84",
"server_port":10981,
"local_address": "127.0.0.1",
"local_port":1080,
"password":"bannedbook.org",
"timeout":300,
"method":"aes-256-cfb",
"fast_open": true,
"workers": 1
}

4、修改sslocal报错

bash
1
2
3
4
5
6
sudo vim /usr/local/lib/python2.7/dist-packages/shadowsocks-2.8.2-py2.7.egg/shadowsocks/crypto/openssl.py
#libcrypto.EVP_CIPHER_CTX_cleanup(self._ctx)
libcrypto.EVP_CIPHER_CTX_reset(self._ctx)

#libcrypto.EVP_CIPHER_CTX_cleanup(self._ctx)
libcrypto.EVP_CIPHER_CTX_reset(self._ctx)

5、启动ss

bash
1
sudo sslocal -c /etc/shadowsocks.json

6、查找可用地址

Code
1
https://github.com/Alvin9999/new-pac/wiki/ss%E5%85%8D%E8%B4%B9%E8%B4%A6%E5%8F%B7

7、配置proxychains

bash
1
2
3
4
5
6
sudo vim /etc/proxychains
#dynamic_chain
dynamic_chain

末尾加
socks5 127.0.0.1 1080

8、复制或软连接proxyresolv

bash
1
cp /usr/lib/proxychains3/proxyresolv /usr/bin/

9、验证本地双层代理地址解析

bash
1
2
3
4
5
6
proxyresolv www.google.com
成功:
|S-chain|-<>-127.0.0.1:1080-<><>-4.2.2.2:53-<><>-OK
172.217.5.100
失败:
|S-chain|-<>-127.0.0.1:1080-<--timeout

10、安装w3m、elinks、lynx等CLI浏览器

bash
1
sudo apt install w3m

11、测试

bash
1
sudo proxychains w3m www.google.com

12、查找/usr/lib/x86_64-linux-gnu/libproxychains.so.3

bash
1
sudo find / -name libproxychains.so.3 -print

13、修改proxychains脚本

bash
1
2
3
vim /usr/bin/proxychains
#export LD_PRELOAD=libproxychains.so.3
export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libproxychains.so.3

14、测试普通用户的proxychains

bash
1
proxychains w3m www.google.com
文章作者: l10ng's
文章链接: https://l10ng.github.io/posts/ss-proxychains/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 l10ng's

评论