support vless url

pull/758/head
233boy 4 years ago
parent bf04951379
commit e8339d0652
  1. 6
      src/qr.sh
  2. 24
      v2ray.sh

@ -1,5 +1,9 @@
_qr_create() {
local vmess="vmess://$(cat /etc/v2ray/vmess_qr.json | base64 -w 0)"
if [[ $v2ray_transport == 33 ]]; then
local vmess="$(cat /etc/v2ray/vmess_qr.json)"
else
local vmess="vmess://$(cat /etc/v2ray/vmess_qr.json | base64 -w 0)"
fi
local link="https://233boy.github.io/tools/qr.html#${vmess}"
echo
echo "---------- V2Ray 二维码链接 适用于 V2RayNG v0.4.1+ / Kitsunebi -------------"

@ -10,7 +10,7 @@ none='\e[0m'
# Root
[[ $(id -u) != 0 ]] && echo -e " 哎呀……请使用 ${red}root ${none}用户运行 ${yellow}~(^_^) ${none}" && exit 1
_version="v3.43"
_version="v3.44"
cmd="apt-get"
@ -140,6 +140,10 @@ create_vmess_URL_config() {
"tls": "tls"
}
EOF
elif [[ $v2ray_transport == 33 ]]; then
cat >/etc/v2ray/vmess_qr.json <<-EOF
vless://${v2ray_id}@${domain}:443?encryption=none&security=tls&type=ws&host=${domain}&path=${_path}#233v2_${domain}
EOF
else
[[ -z $ip ]] && get_ip
cat >/etc/v2ray/vmess_qr.json <<-EOF
@ -2264,7 +2268,11 @@ get_v2ray_config_qr_link() {
}
get_v2ray_vmess_URL_link() {
create_vmess_URL_config
local vmess="vmess://$(cat /etc/v2ray/vmess_qr.json | base64 -w 0)"
if [[ $v2ray_transport == 33 ]]; then
local vmess="$(cat /etc/v2ray/vmess_qr.json)"
else
local vmess="vmess://$(cat /etc/v2ray/vmess_qr.json | base64 -w 0)"
fi
echo
echo "---------- V2Ray vmess URL / V2RayNG v0.4.1+ / V2RayN v2.1+ / 仅适合部分客户端 -------------"
echo
@ -2704,12 +2712,6 @@ L | infolink)
get_v2ray_config_info_link
;;
q | qr)
if [[ $v2ray_transport == 33 ]]; then
echo
echo ' V2RAY VLESS 协议相关暂不支持生成 ....'
echo
exit
fi
get_v2ray_config_qr_link
;;
s | ss)
@ -2777,12 +2779,6 @@ log)
view_v2ray_log
;;
url | URL)
if [[ $v2ray_transport == 33 ]]; then
echo
echo ' V2RAY VLESS 协议相关暂不支持生成 URL ....'
echo
exit
fi
get_v2ray_vmess_URL_link
;;
u | update)

Loading…
Cancel
Save