@@ -238,7 +238,7 @@ function preinstall()
238
238
apt update && apt upgrade -y
239
239
240
240
echo " 安装必要软件"
241
- apt install -y telnet curl wget vim net-tools libsodium18 openssl unzip
241
+ apt install -y telnet curl wget vim net-tools libsodium18 openssl unzip qrencode
242
242
res=` which wget`
243
243
[ " $? " != " 0" ] && apt install -y wget
244
244
res=` which netstat`
@@ -349,6 +349,7 @@ function installBBR()
349
349
350
350
function info()
351
351
{
352
+ apt install -y qrencode
352
353
ip=` curl -s -4 icanhazip.com`
353
354
port=` cat /etc/shadowsocksR.json | grep server_port | cut -d: -f2 | tr -d \" ,' ' `
354
355
res=` netstat -nltp | grep ${port} | grep python`
@@ -358,6 +359,12 @@ function info()
358
359
protocol=` cat /etc/shadowsocksR.json | grep protocol | cut -d: -f2 | tr -d \" ,' ' `
359
360
obfs=` cat /etc/shadowsocksR.json | grep obfs | cut -d: -f2 | tr -d \" ,' ' `
360
361
362
+ p1=` echo -n ${password} | base64 -w 0`
363
+ p1=` echo -n ${p1} | tr -d =`
364
+ res=` echo -n " ${ip} :${port} :${protocol} :${method} :${obfs} :${p1} /?remarks=&protoparam=&obfsparam=" | base64 -w 0`
365
+ res=` echo -n ${res} | tr -d =`
366
+ link=" ssr://${res} "
367
+
361
368
echo ============================================
362
369
echo -e " ssr运行状态:${status} "
363
370
echo -e " ssr配置文件:${red} /etc/shadowsocksR.json${plain} "
@@ -369,8 +376,9 @@ function info()
369
376
echo -e " 加密方式(method): ${red}${method}${plain} "
370
377
echo -e " 协议(protocol):" ${red}${protocol}${plain}
371
378
echo -e " 混淆(obfuscation):" ${red}${obfs}${plain}
372
- echo
373
- echo ============================================
379
+ echo
380
+ echo " ssr链接: $link "
381
+ qrencode -o - -t utf8 $link
374
382
}
375
383
376
384
function bbrReboot()
0 commit comments