fix qrcode fix

pull/156/head
233boy 6 years ago committed by cutelua
parent 8f7f09875b
commit 9e2ebcb909
  1. 17
      src/qr.sh
  2. 38
      v2ray.sh

@ -0,0 +1,17 @@
_qr_create() {
local vmess="vmess://$(cat /etc/v2ray/vmess_qr.json | base64 -w 0)"
local link="https://233boy.github.io/tools/qr.html#${vmess}"
echo
echo "---------- V2Ray 二维码链接 适用于 V2RayNG v0.4.1+ / Kitsunebi -------------"
echo
echo -e ${cyan}$link${none}
echo
echo
echo -e "$red 友情提醒: 请务必核对扫码结果 (V2RayNG 除外) $none"
echo
echo
echo " V2Ray 客户端使用教程: https://v2ray6.com/post/4/"
echo
echo
rm -rf /etc/v2ray/vmess_qr.json
}

@ -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.07" _version="v3.08"
cmd="apt-get" cmd="apt-get"
@ -2597,40 +2597,8 @@ get_v2ray_config_qr_link() {
create_vmess_URL_config create_vmess_URL_config
echo _load qr.sh
echo -e "$green 正在生成链接.... 稍等片刻即可....$none" _qr_create
echo
local vmess="vmess://$(cat /etc/v2ray/vmess_qr.json | tr -d '\n' | base64 -w 0)"
echo $vmess | tr -d '\n' >/etc/v2ray/vmess.txt
cat /etc/v2ray/vmess.txt | qrencode -s 50 -o /tmp/233blog_v2ray.png
local random=$(echo $RANDOM-$RANDOM-$RANDOM | base64 -w 0)
local link=$(curl -s --upload-file /tmp/233blog_v2ray.png "https://transfer.sh/${random}_v2ray6_v2ray.png")
if [[ $link ]]; then
echo
echo "---------- V2Ray 二维码链接 -------------"
echo
echo -e "$yellow 适用于 V2RayNG v0.4.1+ / Kitsunebi = $cyan$link$none"
echo
echo
echo -e "$red 友情提醒: 请务必核对扫码结果 (V2RayNG 除外) $none"
echo
echo
echo " V2Ray 客户端使用教程: https://${_site}/post/4/"
echo
echo "备注...链接将在 14 天后失效"
echo
echo "提醒...请不要把链接分享出去...除非你有特别的理由...."
echo
else
echo
echo -e "$red 哎呀呀呀...出错咯...$none"
echo
echo -e "请尝试使用${cyan} v2ray qr ${none}重新生成"
echo
fi
rm -rf /tmp/233blog_v2ray.png
rm -rf /etc/v2ray/vmess_qr.json
rm -rf /etc/v2ray/vmess.txt
} }
get_v2ray_multi_vmess_URL_QR() { get_v2ray_multi_vmess_URL_QR() {

Loading…
Cancel
Save