@@ -240,7 +240,7 @@ function preinstall()
240
240
yum update -y
241
241
fi
242
242
echo " 安装必要软件"
243
- yum install -y epel-release telnet curl wget vim net-tools libsodium openssl unzip tar
243
+ yum install -y epel-release telnet curl wget vim net-tools libsodium openssl unzip tar qrencode
244
244
res=` which wget`
245
245
[ " $? " != " 0" ] && yum install -y wget
246
246
res=` which netstat`
@@ -370,6 +370,7 @@ function installBBR()
370
370
371
371
function info()
372
372
{
373
+ yum install -y qrencode
373
374
ip=` curl -s -4 icanhazip.com`
374
375
port=` cat /etc/shadowsocksR.json | grep server_port | cut -d: -f2 | tr -d \" ,' ' `
375
376
res=` netstat -nltp | grep ${port} | grep python`
@@ -379,6 +380,12 @@ function info()
379
380
protocol=` cat /etc/shadowsocksR.json | grep protocol | cut -d: -f2 | tr -d \" ,' ' `
380
381
obfs=` cat /etc/shadowsocksR.json | grep obfs | cut -d: -f2 | tr -d \" ,' ' `
381
382
383
+ p1=` echo -n ${password} | base64 -w 0`
384
+ p1=` echo -n ${p1} | tr -d =`
385
+ res=` echo -n " ${ip} :${port} :${protocol} :${method} :${obfs} :${p1} /?remarks=&protoparam=&obfsparam=" | base64 -w 0`
386
+ res=` echo -n ${res} | tr -d =`
387
+ link=" ssr://${res} "
388
+
382
389
echo ============================================
383
390
echo -e " ssr运行状态:${status} "
384
391
echo -e " ssr配置文件:${red} /etc/shadowsocksR.json${plain} "
@@ -390,8 +397,9 @@ function info()
390
397
echo -e " 加密方式(method): ${red}${method}${plain} "
391
398
echo -e " 协议(protocol):" ${red}${protocol}${plain}
392
399
echo -e " 混淆(obfuscation):" ${red}${obfs}${plain}
393
- echo
394
- echo ============================================
400
+ echo
401
+ echo " ssr链接: $link "
402
+ qrencode -o - -t utf8 $link
395
403
}
396
404
397
405
function bbrReboot()
0 commit comments