From 8f7f09875b98df99faffdc7475c07125708044f8 Mon Sep 17 00:00:00 2001 From: cutelua <33216131+cutelua@users.noreply.github.com> Date: Tue, 12 Mar 2019 08:53:20 +0800 Subject: [PATCH] murl --- src/jqcmd.sh | 5 ++++- v2ray.sh | 21 ++++++++++++++++++--- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/src/jqcmd.sh b/src/jqcmd.sh index c59ea0e..8239f90 100644 --- a/src/jqcmd.sh +++ b/src/jqcmd.sh @@ -120,7 +120,10 @@ jq_printvmess() { local EMAIL=$(echo $IN | jq 'if .settings.clients['${CLINTIDX}'].email then .settings.clients['${CLINTIDX}'].email else "DEFAULT" end') local _ps="${_MAKPREFIX}${ADDRESS}/${_NETTRIM}" _green "${EMAIL//\"/} -- ${_ps}" - echo "vmess://"$(echo $IN | jq -c '{"v":"2","ps":"'${_ps}'","add":"'${ADDRESS}'","port":.port,"id":.settings.clients['${CLINTIDX}'].id,"aid":.settings.clients['${CLINTIDX}'].alterId,"net":.streamSettings.network,"type":'${_TYPE}',"host":'${_HOST}',"path":'${_PATH}',"tls":'${_TLS}'}' | base64 -w0) + local _VMESS=$(echo "vmess://"$(echo $IN | jq -c '{"v":"2","ps":"'${_ps}'","add":"'${ADDRESS}'","port":.port,"id":.settings.clients['${CLINTIDX}'].id,"aid":.settings.clients['${CLINTIDX}'].alterId,"net":.streamSettings.network,"type":'${_TYPE}',"host":'${_HOST}',"path":'${_PATH}',"tls":'${_TLS}'}' | base64 -w0)) + echo ${_VMESS} + _green "二维码链接:(v2rayN/v2rayNG)" + echo "https://233boy.github.io/tools/qr.html#${_VMESS}" echo done done diff --git a/v2ray.sh b/v2ray.sh index 2354431..68a42db 100644 --- a/v2ray.sh +++ b/v2ray.sh @@ -1034,7 +1034,7 @@ change_vmess_user () { echo _yellow " ---- 搞定了。" restart_v2ray - _yellow " ---- 翻查多用户的vmess link请用v2ray url查看。" + _yellow " ---- 翻查多用户的vmess link请用v2ray murl查看。" _yellow " ---- 翻查各个用户的流量,可用v2ray traffic查看(重启v2ray后会清空)。" echo @@ -2632,6 +2632,18 @@ get_v2ray_config_qr_link() { rm -rf /etc/v2ray/vmess_qr.json rm -rf /etc/v2ray/vmess.txt } + +get_v2ray_multi_vmess_URL_QR() { + echo "---------- V2Ray vmess URL / V2RayNG v0.4.1+ / V2RayN v2.1+ / 仅适合部分客户端 -------------" + get_ip + _load jqcmd.sh + jq_gen_json + jq_printvmess $ip "[233]" + [[ $v6ip ]] && jq_printvmess $v6ip "[233]" + + return +} + get_v2ray_vmess_URL_link() { echo "---------- V2Ray vmess URL / V2RayNG v0.4.1+ / V2RayN v2.1+ / 仅适合部分客户端 -------------" @@ -2935,7 +2947,7 @@ menu() { case $choose in 1) view_v2ray_config_info - _yellow " ---- 翻查多用户的vmess link请用v2ray url查看。" + _yellow " ---- 翻查多用户的vmess link请用v2ray murl查看。" break ;; 2) @@ -2999,7 +3011,7 @@ menu) ;; i | info) view_v2ray_config_info - _yellow " ---- 翻查多用户的vmess link请用v2ray url查看。" + _yellow " ---- 翻查多用户的vmess link请用v2ray murl查看。" echo ;; c | config) @@ -3077,6 +3089,9 @@ log) url | URL) get_v2ray_vmess_URL_link ;; +murl | MURL | mqr | MQR) + get_v2ray_multi_vmess_URL_QR + ;; u | update) update_v2ray ;;