歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux技術 >> Ubuntu下使用Shadowsocks

Ubuntu下使用Shadowsocks

日期:2017/3/3 13:01:10   编辑:Linux技術

使用Shadowsocks代理

安裝Shadowsocks

[code]sudo apt-get shadowsocks

配置Shadowsocks

保存如下配置為 config.json

[code]{
    "server":"server_ip",
    "server_port":server_port,
    "local_address": "127.0.0.1",
    "local_port":1080,
    "password":"password",
    "timeout":300,
    "method":"aes-256-cfb"
}

啟動Shadowsocks

在配置文件目錄打開 Terminal,或者將其保存為shell腳本

[code]nohup sslocal -c ./config.json

使用Polipo轉換為Http代理

安裝Polipo:

[code]sudo apt-get install polipo
編輯Polipo配置文件:

[code]sudo gedit /etc/polipo/config
修改其內容為:

[code]# 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 = false  
logFile = "/var/log/polipo/polipo.log"  

socksParentProxy = "127.0.0.1:1080"
socksProxyType = socks5

chunkHighMark = 50331648
objectHighMark = 16384

serverMaxSlots = 64
serverSlots = 16
serverSlots1 = 32

proxyAddress = "0.0.0.0"
proxyPort = 8123
重啟Polipo:

[code]/etc/init.d/polipo restart
export http_proxy="http://127.0.0.1:8123"
若使用Firefox浏覽器,需安裝一個代理插件,比如 Autoproxy

設置代理服務器地址,即為 127.0.0.1,端口 8123,方式為 Http

Copyright © Linux教程網 All Rights Reserved