mirror of https://github.com/mack-a/v2ray-agent
feat(脚本): 修改VLESS配置、修复分流查看域名
parent
0bf52a28b9
commit
46b929a77b
24
install.sh
24
install.sh
|
@ -4172,17 +4172,13 @@ EOF
|
||||||
"network": "tcp",
|
"network": "tcp",
|
||||||
"security": "tls",
|
"security": "tls",
|
||||||
"tlsSettings": {
|
"tlsSettings": {
|
||||||
|
"rejectUnknownSni": true,
|
||||||
"minVersion": "1.2",
|
"minVersion": "1.2",
|
||||||
"alpn": [
|
|
||||||
"http/1.1",
|
|
||||||
"h2"
|
|
||||||
],
|
|
||||||
"certificates": [
|
"certificates": [
|
||||||
{
|
{
|
||||||
"certificateFile": "/etc/v2ray-agent/tls/${domain}.crt",
|
"certificateFile": "/etc/v2ray-agent/tls/${domain}.crt",
|
||||||
"keyFile": "/etc/v2ray-agent/tls/${domain}.key",
|
"keyFile": "/etc/v2ray-agent/tls/${domain}.key",
|
||||||
"ocspStapling": 3600,
|
"ocspStapling": 3600
|
||||||
"usage":"encipherment"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -6115,7 +6111,7 @@ installSniffing() {
|
||||||
readInstallType
|
readInstallType
|
||||||
find ${configPath} -name "*inbounds.json*" | awk -F "[c][o][n][f][/]" '{print $2}' | while read -r inbound; do
|
find ${configPath} -name "*inbounds.json*" | awk -F "[c][o][n][f][/]" '{print $2}' | while read -r inbound; do
|
||||||
if ! grep -q "destOverride" <"${configPath}${inbound}"; then
|
if ! grep -q "destOverride" <"${configPath}${inbound}"; then
|
||||||
sniffing=$(jq -r '.inbounds[0].sniffing = {"enabled":true,"destOverride":["http","tls"]}' "${configPath}${inbound}")
|
sniffing=$(jq -r '.inbounds[0].sniffing = {"enabled":true,"destOverride":["http","tls","quic"]}' "${configPath}${inbound}")
|
||||||
echo "${sniffing}" | jq . >"${configPath}${inbound}"
|
echo "${sniffing}" | jq . >"${configPath}${inbound}"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
@ -6258,10 +6254,17 @@ installWarpReg() {
|
||||||
|
|
||||||
# 展示warp分流域名
|
# 展示warp分流域名
|
||||||
showWireGuardDomain() {
|
showWireGuardDomain() {
|
||||||
# todo
|
|
||||||
# xray
|
# xray
|
||||||
jq -r -c '.routing.rules[]|select (.outboundTag=="wireguard_out_'"${type}"'")|.domain' ${configPath}09_routing.json | jq -r
|
if [[ -f "${configPath}09_routing.json" ]]; then
|
||||||
|
echoContent yellow "Xray-core"
|
||||||
|
jq -r -c '.routing.rules[]|select (.outboundTag=="wireguard_out_'"${type}"'")|.domain' ${configPath}09_routing.json | jq -r
|
||||||
|
fi
|
||||||
|
|
||||||
# sing-box
|
# sing-box
|
||||||
|
if [[ -f "${singBoxConfigPath}config/wireguard_out_${type}_route.json" ]]; then
|
||||||
|
echoContent yellow "sing-box"
|
||||||
|
jq -r -c '.route.rules[]|select (.outbound=="wireguard_out_'"${type}"'")|.geosite' "${singBoxConfigPath}config/wireguard_out_${type}_route.json" | jq -r
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# 添加WireGuard分流
|
# 添加WireGuard分流
|
||||||
|
@ -6354,6 +6357,7 @@ EOF
|
||||||
|
|
||||||
echoContent green " ---> WARP分流卸载成功"
|
echoContent green " ---> WARP分流卸载成功"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# sing-box
|
# sing-box
|
||||||
if [[ -n "${singBoxConfigPath}" ]]; then
|
if [[ -n "${singBoxConfigPath}" ]]; then
|
||||||
removeSingBoxRouteRule "wireguard_out_${type}"
|
removeSingBoxRouteRule "wireguard_out_${type}"
|
||||||
|
@ -8483,7 +8487,7 @@ menu() {
|
||||||
cd "$HOME" || exit
|
cd "$HOME" || exit
|
||||||
echoContent red "\n=============================================================="
|
echoContent red "\n=============================================================="
|
||||||
echoContent green "作者:mack-a"
|
echoContent green "作者:mack-a"
|
||||||
echoContent green "当前版本:v2.11.18"
|
echoContent green "当前版本:v2.11.19"
|
||||||
echoContent green "Github:https://github.com/mack-a/v2ray-agent"
|
echoContent green "Github:https://github.com/mack-a/v2ray-agent"
|
||||||
echoContent green "描述:八合一共存脚本\c"
|
echoContent green "描述:八合一共存脚本\c"
|
||||||
showInstallStatus
|
showInstallStatus
|
||||||
|
|
Loading…
Reference in New Issue