1、安裝shadowsocks
sudo apt-get install python-pip
sudo pip install shadowsocks
2、創(chuàng)建配置文件shadowsocks.json,其中服務(wù)器地址、端口號(hào)、密碼為為購(gòu)買或免費(fèi)使用的服務(wù)器(比如www.ishadowsocks.org)
{ "server": "xxxx.com", "server_port": 52239, "local_address": "127.0.0.1", "local_port": 1080, "password": "SOME_PASSWORD", "timeout": 600, "method": "aes-256-cfb", "fast_open": false }
3、啟動(dòng)shadowsocks
sslocal -c shadowsocks.json
4、安裝polipo,進(jìn)行二次轉(zhuǎn)發(fā)(shadowsocks使用socks5協(xié)議通信,需搭配瀏覽器插件使用,若想要在系統(tǒng)全局使用,可使用polipo進(jìn)行二次轉(zhuǎn)發(fā))
sudo apt-get install polipo
5、編輯配置文件,保存到/etc/polipo/config
# This file only needs to list configuration variables that deviate # from the default values. See /usr/share/doc/polipo/examples/config.sample # and "polipo -v" for variables you can tweak and further information. logSyslog = true logFile = /var/log/polipo/polipo.log proxyAddress = "0.0.0.0" socksParentProxy = "127.0.0.1:1080" socksProxyType = socks5 chunkHighMark = 50331648 objectHighMark = 16384 serverMaxSlots = 64 serverSlots = 16 serverSlots1 = 32
6、重啟polipo服務(wù)
sudo service polipo restart
7、設(shè)置環(huán)境變量(可添加至~/.bashrc文件中使所有shell均可實(shí)現(xiàn)全局SOCKS5訪問(wèn))
export http_proxy="http://127.0.0.1:8123"
export https_proxy="https://127.0.0.1:8123"
8、檢測(cè)一下是否可以通過(guò)socks5協(xié)議獲取google主頁(yè)面
curl www.google.com
如果成功則說(shuō)明可以訪問(wèn)。
總結(jié)
以上就是這篇文章的全部?jī)?nèi)容了,希望本文的內(nèi)容對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,謝謝大家對(duì)腳本之家的支持。如果你想了解更多相關(guān)內(nèi)容請(qǐng)查看下面相關(guān)鏈接
標(biāo)簽:烏海 臨沂 紅河 ???/a> 鎮(zhèn)江 岳陽(yáng) 股票 四川
巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《linux環(huán)境下設(shè)置shadowsocks+polipo全局代理》,本文關(guān)鍵詞 linux,環(huán)境,下,設(shè)置,shadowsocks+polipo,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問(wèn)題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無(wú)關(guān)。