Shadowsocks是一款輕量級socks代理軟體,在vps上搭建了一下,速度確實不錯。
一、使用一鍵指令碼安裝
1、安裝方法:
使用root使用者登入,運行以下命令:
wget http://soft.clang.cn/ftp/shadowsocks/shadowsocks.sh
chmod +x shadowsocks.sh
./shadowsocks.sh
安裝完成後,指令碼提示如下:
Congratulations, shadowsocks install completed!
Your Server IP: 209.**.**.**
Your Server Port: 8388
Your Password: 123456
Your Local IP: 127.0.0.1
Your Local Port: 1080
Your Encryption Method: aes-256-cfb
Welcome to visit:http://clang.cn/blog/
Enjoy it!
2、手動編輯設定檔
設定檔路徑:/etc/shadowsocks.json
nano /etc/shadowsocks.json
3、卸載方法:
使用root使用者登入,運行以下命令:
./shadowsocks.sh uninstall
4、使用命令:
/etc/init.d/shadowsocks start #啟動
/etc/init.d/shadowsocks stop #停止
/etc/init.d/shadowsocks restart #重啟
/etc/init.d/shadowsocks status #狀態
-------------------------我是分割線-------------------------
二、Debian/Ubuntu編譯安裝
1、編譯安裝shadowsocks
首先安裝編譯所需包:
apt-get update
apt-get -y install build-essential autoconf libtool libssl-dev git
然後通過git下載源碼,然後進入目錄編譯安裝:
git clone https://github.com/madeye/shadowsocks-libev.git
cd shadowsocks-libev
./configure --prefix=/usr
make && make install
安裝完成後,佈建服務及設定檔:
mkdir -p /etc/shadowsocks-libev
cp ./debian/shadowsocks-libev.init /etc/init.d/shadowsocks-libev
cp ./debian/shadowsocks-libev.default /etc/default/shadowsocks-libev
cp ./debian/config.json /etc/shadowsocks-libev/config.json
chmod +x /etc/init.d/shadowsocks-libev
設定開機自啟動:
update-rc.d shadowsocks-libev defaults
2、配置shadowsocks設定檔
單使用者設定檔sample
修改設定檔命令:
nano /etc/shadowsocks-libev/config.json
修改Server地址和server_port以及加密方式:
Default
{
"server":"your_server_ip",
"server_port":8388,
"local_address":"127.0.0.1",
"local_port":1080,
"password":"ilovechina",
"timeout":300,
"method":"aes-256-cfb",
"fast_open": false
}
每一個欄位的含義:
Default
server 伺服器 IP (IPv4/IPv6),注意這也將是服務端監聽的 IP 位址或輸入0.0.0.0
server_port 伺服器連接埠
local_port 本地端連接埠
password 用來加密的密碼
timeout 逾時時間(秒)
method 加密方法,可選擇 "bf-cfb", "aes-256-cfb", "des-cfb", "rc4", 等等。預設是一種不安全的加密,推薦用 "aes-256-cfb"
多使用者多連接埠設定檔 sample
Default
{
"server":"你伺服器IP地址或者0.0.0.0",
"local_address": "127.0.0.1",
"local_port":1080,
"port_password":{
"9000":"password0",
"9001":"password1",
"9002":"password2",
"9003":"password3",
"9004":"password4"
},
"timeout":300,
"method":"aes-256-cfb",
"fast_open": false
}
3、使用命令。
/etc/init.d/shadowsocks-libev stop #停止
/etc/init.d/shadowsocks-libev start #啟動
/etc/init.d/shadowsocks-libev restart #重啟
三、用戶端下載地址:
Windows & OSX用戶端
http://sourceforge.net/projects/shadowsocksgui/files/dist/
iOS用戶端
https://itunes.apple.com/us/app/shadowsocks/id665729974?ls=1&mt=8
Android用戶端
http://apps.evozi.com/apk-downloader/?id=com.github.shadowsocks