feat(脚本): 添加vless+ws+tls

pull/534/merge
mack-a 2020-09-11 10:56:10 +08:00
parent 421a5ae4d5
commit 7b40e9f10a
1 changed files with 58 additions and 28 deletions

View File

@ -13,6 +13,7 @@ totalProgress=1
iplc=$1 iplc=$1
uuidws= uuidws=
uuidtcp= uuidtcp=
uuidVlessWS=
trap 'onCtrlC' INT trap 'onCtrlC' INT
function onCtrlC () { function onCtrlC () {
@ -775,6 +776,7 @@ initV2RayConfig(){
uuidtcp=`/etc/v2ray-agent/v2ray/v2ctl uuid` uuidtcp=`/etc/v2ray-agent/v2ray/v2ctl uuid`
uuidws=`/etc/v2ray-agent/v2ray/v2ctl uuid` uuidws=`/etc/v2ray-agent/v2ray/v2ctl uuid`
uuidVmessTcp=`/etc/v2ray-agent/v2ray/v2ctl uuid` uuidVmessTcp=`/etc/v2ray-agent/v2ray/v2ctl uuid`
uuidVlessWS=`/etc/v2ray-agent/v2ray/v2ctl uuid`
echoContent skyBlue "\n进度 $2/${totalProgress} : 初始化V2Ray配置" echoContent skyBlue "\n进度 $2/${totalProgress} : 初始化V2Ray配置"
# 自定义IPLC端口 # 自定义IPLC端口
if [[ ! -z ${iplc} ]] if [[ ! -z ${iplc} ]]
@ -1077,6 +1079,11 @@ EOF
"path": "/${customPath}tcp", "path": "/${customPath}tcp",
"dest": 31298, "dest": 31298,
"xver": 1 "xver": 1
},
{
"path": "/${customPath}ws",
"dest": 31297,
"xver": 1
} }
] ]
}, },
@ -1147,6 +1154,29 @@ EOF
} }
} }
} }
},
{
"port": 31297,
"listen": "127.0.0.1",
"protocol": "vless",
"settings": {
"clients": [
{
"id": "${uuidVlessWS}",
"level": 0,
"email": "${domain}_vless_ws"
}
],
"decryption": "none"
},
"streamSettings": {
"network": "ws",
"security": "none",
"wsSettings": {
"acceptProxyProtocol": true,
"path": "/${customPath}ws"
}
}
} }
], ],
"outbounds": [ "outbounds": [