fix(脚本): 修改ipv6,配置文件outbounds错误问题

pull/534/merge
mack-a 2020-12-31 12:21:46 +08:00
parent 31ef9bb9b8
commit 84b407f217
1 changed files with 35 additions and 3 deletions

View File

@ -1565,7 +1565,7 @@ initV2RayConfig(){
cat << EOF > /etc/v2ray-agent/v2ray/conf/00_log.json cat << EOF > /etc/v2ray-agent/v2ray/conf/00_log.json
{ {
"log": { "log": {
"error": "/etc/v2ray-agent/xray/xray_error.log", "error": "/etc/v2ray-agent/v2ray/v2ray_error.log",
"loglevel": "warning" "loglevel": "warning"
} }
} }
@ -1587,8 +1587,22 @@ EOF
} }
} }
EOF EOF
# outbounds # outbounds
if [[ ! -z "${pingIPv6}" ]]
then
cat << EOF > /etc/v2ray-agent/v2ray/conf/10_ipv6_outbounds.json
{
"outbounds": [
{
"protocol": "freedom",
"settings": {},
"tag": "direct"
}
]
}
EOF
else
cat << EOF > /etc/v2ray-agent/v2ray/conf/10_ipv4_outbounds.json cat << EOF > /etc/v2ray-agent/v2ray/conf/10_ipv4_outbounds.json
{ {
"outbounds": [ "outbounds": [
@ -1602,6 +1616,8 @@ EOF
] ]
} }
EOF EOF
fi
cat << EOF > /etc/v2ray-agent/v2ray/conf/10_bt_outbounds.json cat << EOF > /etc/v2ray-agent/v2ray/conf/10_bt_outbounds.json
{ {
@ -1893,6 +1909,21 @@ EOF
EOF EOF
# outbounds # outbounds
if [[ ! -z "${pingIPv6}" ]]
then
cat << EOF > /etc/v2ray-agent/xray/conf/10_ipv6_outbounds.json
{
"outbounds": [
{
"protocol": "freedom",
"settings": {},
"tag": "direct"
}
]
}
EOF
else
cat << EOF > /etc/v2ray-agent/xray/conf/10_ipv4_outbounds.json cat << EOF > /etc/v2ray-agent/xray/conf/10_ipv4_outbounds.json
{ {
"outbounds": [ "outbounds": [
@ -1906,6 +1937,7 @@ EOF
] ]
} }
EOF EOF
fi
cat << EOF > /etc/v2ray-agent/xray/conf/10_bt_outbounds.json cat << EOF > /etc/v2ray-agent/xray/conf/10_bt_outbounds.json
{ {
@ -3233,7 +3265,7 @@ menu(){
cd cd
echoContent red "\n==============================================================" echoContent red "\n=============================================================="
echoContent green "作者mack-a" echoContent green "作者mack-a"
echoContent green "当前版本v2.2.12" echoContent green "当前版本v2.2.13"
echoContent green "Githubhttps://github.com/mack-a/v2ray-agent" echoContent green "Githubhttps://github.com/mack-a/v2ray-agent"
echoContent green "描述:七合一共存脚本" echoContent green "描述:七合一共存脚本"
echoContent red "==============================================================" echoContent red "=============================================================="