vps中部署shadowsocks實現科學上網並搭建telegram代理MTProxy

考慮性能,這裏只提供Python版本安裝方法。

操作系統爲Ubuntu,centos等請使用yum安裝。

同時這裏提供了兩種優化tcp阻塞的解決辦法,爲ss加速。 鏡像不存在請自行替換鏡像。

安裝python環境

apt-get install python-pip
apt-get install python-m2crypto

然後查看python版本,確認安裝成功 python --version

安裝shadowsocks

pip install shadowsocks

配置config文件

mkdir /etc/shadowsocks
vim /etc/shadowsocks/config.json

複製下面代碼

{
"server":"你的vps的ip",
"server_port":服務端啓用的端口,
"local_port":客戶端啓用的端口,
"password":"密碼",
"timeout”:600,
"method":"aes-256-cfb"
}

# 多用戶配置
{
"server":"你的vps的ip",
"server_port":服務端啓用的端口,
"local_port":客戶端啓用的端口,
"port_password":{
    10000:"password1",
	10002:"password2"
},
"timeout”:600,
"method":"aes-256-cfb"
}

相應數據按自己實際情況修改

運行

ssserver -c /etc/shadowsocks/config.json -d start
ssserver -c /etc/shadowsocks/config.json -d stop

安裝MTProxy

僅提供docker安裝,源碼安裝請自行google。

官方bot的推薦方法

使用一鍵腳本安裝docker:

curl -sSL https://get.docker.com/ | sh

運行

service docker start
docker run -d -p443:443 --name=mtproto-proxy --restart=always -v proxy-config:/data telegrammessenger/proxy:latest

修改-p第一個參數,爲綁定代理服務器本地端口 查看密鑰

docker logs mtproto-proxy

你會看到:

[+] Using the explicitly passed secret: '00baadf00d15abad1deaa515baadcafe'.
[+] Saving it to /data/secret.
[*] Final configuration:
[*]   Secret 1: 00baadf00d15abad1deaa515baadcafe
[*]   tg:// link for secret 1 auto configuration: : tg://proxy?server=3.14.15.92&port=443&secret=00baadf00d15abad1deaa515baadcafe
[*]   t.me link for secret 1: tg://proxy?server=3.14.15.92&port=443&secret=00baadf00d15abad1deaa515baadcafe
[*]   Tag: no tag
[*]   External IP: 3.14.15.92
[*]   Make sure to fix the links in case you run the proxy on a different port.

設置mtproxy爲secret即可

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章