安裝SSR
# wget https://raw.githubusercontent.com/ToyoDAdoubi/doubi/master/ssr.sh# chmod +x ssr.sh && bash ssr.sh
(中間會有交互:設定密碼、端口、加密方式。如果忘記了可以去 /etc/shadowsocksr/user-config.json 查)
停止SSR
# /etc/init.d/ssr stop啟動SSR
# /etc/init.d/ssr startps. 因為腳本放在 /etc/init.d/ 下,所以重開機會自動執行。這就是為什麼主機重啟後ss、openserv 連不上,只有SSR連得上
重啟SSR
# /etc/init.d/ssr restart
[信息] ShadowsocksR 停止成功 !
[信息] ShadowsocksR 启动成功 !
日誌
/usr/local/shadowsocksr/shadowsocks/ssserver.log
多賬戶
https://ssr.tools/194 SSR 添加多用户多端口教程(ShadowsocksR多用户)
配置文件(/etc/shadowsocksr/user-config.json)刪除server_port和password。改成
"port_password":{
"12345":"password1",
"12346":"password2"
},
12345 端口的密碼password1。12346 端口的密碼password2
多開端口後記得防火墻要放行該端口
Windows客戶端
https://github.com/shadowsocksrr/shadowsocksr-csharp/releases搭配chrome SwitchyOmega
代理協議:SOCKS5
本地端口:1080
客戶端讓區域網路機器走代理
hyper-v centos 機器使用proxychains4 走windows代理,你需要這樣做:
1. 開啟windows防火墻1080端口
2. 在windows SSR 客戶端上【選項設置】
開啟【允許來自區域網路的連接】
Git Bash走SSR代理
https://stackoverflow.com/a/16756248 Using a socks proxy with git for the http transport
問題
如果你的IP拉不動代碼
$ git clone https://gitee.com/asurplus/google-auth.git
Cloning into 'google-auth'...
fatal: unable to access 'https://gitee.com/asurplus/google-auth.git/': OpenSSL SSL_connect: Connection was reset in connection to gitee.com:443
Windows打開Shadowsocks客戶端
設定
$ git config --global http.proxy 'socks5://127.0.0.1:1080'
檢查
$ cat ~/.gitconfig
...
[http]
proxy = socks5://127.0.0.1:1080
IP沒變(只有git走代理)
$ curl ip.sb
xxx.xxx.xxx.xxx
$ git clone https://gitee.com/asurplus/google-auth.git
Cloning into 'google-auth'...
remote: Enumerating objects: 1032, done.
Receiving objects: 96% (991/1032), 6.75 MiB | 1.02 MiB/sused 1032 eceiving objects: 95% (981/1032), 6.75 MiB | 1.02 MiB/s
Receiving objects: 100% (1032/1032), 7.52 MiB | 558.00 KiB/s, done.
Resolving deltas: 100% (240/240), done.
取消
$ git config --global --unset http.proxy
$ cat ~/.gitconfig
沒有留言:
張貼留言