add: show qrcode

pull/883/head
233boy 3 years ago
parent 9b158e47fc
commit fcf613dbee
  1. 12
      src/qr.sh
  2. 2
      v2ray.sh

@ -6,8 +6,11 @@ _qr_create() {
fi fi
local link="https://233boy.github.io/tools/qr.html#${vmess}" local link="https://233boy.github.io/tools/qr.html#${vmess}"
echo echo
echo "---------- V2Ray 二维码链接 适用于 V2RayNG v0.4.1+ / Kitsunebi -------------" echo "---------- V2Ray 二维码 -------------"
echo echo
qrencode -s 1 -m 1 -t ansi "${vmess}"
echo
echo "如果无法正常显示二维码,请使用下面的链接来生成二维码:"
echo -e ${cyan}$link${none} echo -e ${cyan}$link${none}
echo echo
echo echo
@ -23,9 +26,12 @@ _ss_qr() {
local ss_link="ss://$(echo -n "${ssciphers}:${sspass}@${ip}:${ssport}" | base64 -w 0)#233v2.com_ss_${ip}" local ss_link="ss://$(echo -n "${ssciphers}:${sspass}@${ip}:${ssport}" | base64 -w 0)#233v2.com_ss_${ip}"
local link="https://233boy.github.io/tools/qr.html#${ss_link}" local link="https://233boy.github.io/tools/qr.html#${ss_link}"
echo echo
echo "---------- Shadowsocks 二维码链接 -------------" echo "---------- Shadowsocks 二维码 -------------"
echo
qrencode -s 1 -m 1 -t ansi "${ss_link}"
echo echo
echo -e "$yellow 链接 = $cyan$link$none" echo "如果无法正常显示二维码,请使用下面的链接来生成二维码:"
echo -e ${cyan}$link${none}
echo echo
echo -e " 温馨提示...$red Shadowsocks Win 4.0.6 $none客户端可能无法识别该二维码" echo -e " 温馨提示...$red Shadowsocks Win 4.0.6 $none客户端可能无法识别该二维码"
echo echo

@ -10,7 +10,7 @@ none='\e[0m'
# Root # Root
[[ $(id -u) != 0 ]] && echo -e " 哎呀……请使用 ${red}root ${none}用户运行 ${yellow}~(^_^) ${none}" && exit 1 [[ $(id -u) != 0 ]] && echo -e " 哎呀……请使用 ${red}root ${none}用户运行 ${yellow}~(^_^) ${none}" && exit 1
_version="v3.56" _version="v3.57"
cmd="apt-get" cmd="apt-get"

Loading…
Cancel
Save