From 2b76bb7fb1b61c91945d421ee573acd40a16c029 Mon Sep 17 00:00:00 2001 From: mack-a <57424792+mack-a@users.noreply.github.com> Date: Mon, 27 May 2024 17:39:39 +0800 Subject: [PATCH 1/5] =?UTF-8?q?fix(=E8=84=9A=E6=9C=AC):=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8Dxray-core=E8=87=AA=E5=AE=9A=E4=B9=89=E5=AE=89=E8=A3=85?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E9=BB=98=E8=AE=A4=E5=AE=89=E8=A3=850?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/install.sh b/install.sh index 1e75e64..99fd051 100644 --- a/install.sh +++ b/install.sh @@ -7696,16 +7696,17 @@ customXrayInstall() { echoContent red " ---> 多选请使用英文逗号分隔" exit 0 fi - if [[ "${selectCustomInstallType//,/}" =~ ^[0-5]+$ ]]; then + + + if [[ "${selectCustomInstallType}" == "7" ]]; then + selectCustomInstallType=",${selectCustomInstallType}," + else if ! echo "${selectCustomInstallType}" | grep -q "0,"; then selectCustomInstallType=",0,${selectCustomInstallType}," else selectCustomInstallType=",${selectCustomInstallType}," fi fi - if [[ "${selectCustomInstallType}" == "7" ]]; then - selectCustomInstallType=",${selectCustomInstallType}," - fi # if [[ "${selectCustomInstallType: -1}" != "," ]]; then # selectCustomInstallType="${selectCustomInstallType}," @@ -9170,7 +9171,7 @@ menu() { cd "$HOME" || exit echoContent red "\n==============================================================" echoContent green "作者:mack-a" - echoContent green "当前版本:v3.2.54" + echoContent green "当前版本:v3.2.55" echoContent green "Github:https://github.com/mack-a/v2ray-agent" echoContent green "描述:八合一共存脚本\c" showInstallStatus From 815c53b33c5906b2560600ea7aa106e383c9d90d Mon Sep 17 00:00:00 2001 From: mack-a <57424792+mack-a@users.noreply.github.com> Date: Fri, 31 May 2024 14:18:41 +0800 Subject: [PATCH 2/5] Update bug_report.md --- .github/ISSUE_TEMPLATE/bug_report.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 240b504..e53de11 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -12,39 +12,39 @@ assignees: '' ## 1.问题描述 - 尽可能的将复现步骤描述清楚 ``` -请填写 +参考示例:vasma->2->2->0,7,9,10,选择后一路回车,安装完毕后选择7->1 查看账号 **VLESS gRPC TLS [仅CDN推荐]**不展示等。 ``` ## 2.安装失败的log或者截图 ``` -请填写 +请在这里填写 ``` ## 3.系统版本 ``` -请填写 +请在这里填写 ``` ## 4.脚本版本 ``` -请填写 +请在这里填写 ``` ## 5.服务端安装的内核、协议、安装方式 -- 核心(xray-core、sing-box) +- 核心(1.xray-core、2.sing-box) ``` -请填写 +请在这里填写 ``` - 安装方式(1.全部安装、2.任意组合安装) ``` 请填写 ``` -- 协议(VLESS+TLS_Vision+TCP) +- 协议(0.VLESS+TLS_Vision+TCP) ``` -请填写 +可以用数字代替,比如0.VLESS+TLS_Vision+TCP-->0 ``` ## 6.客户端版本 ``` # 比如v2rayNG 1.18 -请填写 +请在这里填写 ``` From 5960e10a6a4124ce12644e3db87b00b9d2dd7e82 Mon Sep 17 00:00:00 2001 From: mack-a <57424792+mack-a@users.noreply.github.com> Date: Fri, 31 May 2024 14:20:19 +0800 Subject: [PATCH 3/5] =?UTF-8?q?fix(=E8=84=9A=E6=9C=AC):=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E6=B7=BB=E5=8A=A0=E8=B4=A6=E5=8F=B7=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E5=AF=B9vision=E6=B7=BB=E5=8A=A0=E7=9A=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E3=80=81=E4=BF=AE=E5=A4=8D=E5=8D=B8=E8=BD=BDsocks5=E5=88=86?= =?UTF-8?q?=E6=B5=81=E5=90=8E=E6=97=A0=E6=B3=95=E6=AD=A3=E5=B8=B8=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E9=97=AE=E9=A2=98=E3=80=81=E6=B7=BB=E5=8A=A0=E6=9F=A5?= =?UTF-8?q?=E7=9C=8Bsocks5=E5=88=86=E6=B5=81=E8=A7=84=E5=88=99=E6=97=B6?= =?UTF-8?q?=E5=B1=95=E7=A4=BA=E8=B4=A6=E5=8F=B7=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 53 ++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 40 insertions(+), 13 deletions(-) diff --git a/install.sh b/install.sh index 99fd051..2875729 100644 --- a/install.sh +++ b/install.sh @@ -4262,6 +4262,7 @@ EOF installSniffing removeXrayOutbound IPv4_out removeXrayOutbound IPv6_out + removeXrayOutbound socks5_outbound removeXrayOutbound blackhole_out removeXrayOutbound wireguard_out_IPv6 removeXrayOutbound wireguard_out_IPv4 @@ -5723,8 +5724,8 @@ addUser() { elif [[ "${coreInstallType}" == "2" ]]; then clients=$(initSingBoxClients 0 "${uuid}" "${email}") fi - clients=$(jq -r "${userConfig} = ${clients}" ${configPath}${frontingType}.json) - echo "${clients}" | jq . >${configPath}${frontingType}.json + clients=$(jq -r "${userConfig} = ${clients}" ${configPath}02_VLESS_TCP_inbounds.json) + echo "${clients}" | jq . >${configPath}02_VLESS_TCP_inbounds.json fi # VLESS WS @@ -6998,8 +6999,12 @@ showSingBoxRoutingRules() { jq .route.rules "${singBoxConfigPath}$1.json" elif [[ "$1" == "socks5_outbound_route" && -f "${singBoxConfigPath}socks5_outbound.json" ]]; then echoContent yellow "已安装 sing-box socks5全局出站分流" + echoContent yellow "\n出站分流配置:" + echoContent skyBlue "$(jq .outbounds[0] ${singBoxConfigPath}socks5_outbound.json)" elif [[ "$1" == "socks5_inbound_route" && -f "${singBoxConfigPath}20_socks5_inbounds.json" ]]; then echoContent yellow "已安装 sing-box socks5全局入站分流" + echoContent yellow "\n出站分流配置:" + echoContent skyBlue "$(jq .outbounds[0] ${singBoxConfigPath}socks5_outbound.json)" fi fi } @@ -7009,8 +7014,15 @@ showXrayRoutingRules() { if [[ "${coreInstallType}" == "1" ]]; then if [[ -f "${configPath}09_routing.json" ]]; then jq ".routing.rules[]|select(.outboundTag==\"$1\")" "${configPath}09_routing.json" + + echoContent yellow "\n已安装 xray-core socks5全局出站分流" + echoContent yellow "\n出站分流配置:" + echoContent skyBlue "$(jq .outbounds[0].settings.servers[0] ${configPath}socks5_outbound.json)" + elif [[ "$1" == "socks5_outbound" && -f "${configPath}socks5_outbound.json" ]]; then - echoContent yellow "\n已安装 sing-box socks5全局出站分流" + echoContent yellow "\n已安装 xray-core socks5全局出站分流" + echoContent yellow "\n出站分流配置:" + echoContent skyBlue "$(jq .outbounds[0].settings.servers[0] ${configPath}socks5_outbound.json)" fi fi } @@ -7025,11 +7037,18 @@ removeSocks5Routing() { echoContent yellow "3.卸载全部" read -r -p "请选择:" unInstallSocks5RoutingStatus if [[ "${unInstallSocks5RoutingStatus}" == "1" ]]; then - removeXrayOutbound socks5_outbound - unInstallRouting socks5_outbound outboundTag + if [[ "${coreInstallType}" == "1" ]]; then + removeXrayOutbound socks5_outbound + unInstallRouting socks5_outbound outboundTag + addXrayOutbound z_direct_outbound + fi + + if [[ -n "${singBoxConfigPath}" ]]; then + removeSingBoxConfig socks5_outbound + removeSingBoxConfig socks5_outbound_route + addSingBoxOutbound 01_direct_outbound + fi - removeSingBoxConfig socks5_outbound_route - removeSingBoxConfig socks5_inbound_route elif [[ "${unInstallSocks5RoutingStatus}" == "2" ]]; then removeSingBoxConfig 20_socks5_inbounds @@ -7037,11 +7056,20 @@ removeSocks5Routing() { handleSingBox stop elif [[ "${unInstallSocks5RoutingStatus}" == "3" ]]; then - removeSingBoxConfig 20_socks5_inbounds - removeSingBoxConfig socks5_inbound_route + if [[ "${coreInstallType}" == "1" ]]; then + removeXrayOutbound socks5_outbound + unInstallRouting socks5_outbound outboundTag + addXrayOutbound z_direct_outbound + fi + + if [[ -n "${singBoxConfigPath}" ]]; then + removeSingBoxConfig socks5_outbound + removeSingBoxConfig socks5_outbound_route + removeSingBoxConfig 20_socks5_inbounds + removeSingBoxConfig socks5_inbound_route + addSingBoxOutbound 01_direct_outbound + fi - removeXrayOutbound socks5_outbound - unInstallRouting socks5_outbound outboundTag handleSingBox stop else echoContent red " ---> 选择错误" @@ -7697,7 +7725,6 @@ customXrayInstall() { exit 0 fi - if [[ "${selectCustomInstallType}" == "7" ]]; then selectCustomInstallType=",${selectCustomInstallType}," else @@ -9171,7 +9198,7 @@ menu() { cd "$HOME" || exit echoContent red "\n==============================================================" echoContent green "作者:mack-a" - echoContent green "当前版本:v3.2.55" + echoContent green "当前版本:v3.3.1" echoContent green "Github:https://github.com/mack-a/v2ray-agent" echoContent green "描述:八合一共存脚本\c" showInstallStatus From 30c6729656b5fc4b3c770dc30f0a0e4b92f7d5ac Mon Sep 17 00:00:00 2001 From: mack-a <57424792+mack-a@users.noreply.github.com> Date: Wed, 5 Jun 2024 22:19:05 +0800 Subject: [PATCH 4/5] =?UTF-8?q?fix(=E8=84=9A=E6=9C=AC):=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8Dhttp=E8=AE=A2=E9=98=85=E4=BA=8C=E7=BB=B4=E7=A0=81?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E9=97=AE=E9=A2=98=E3=80=81=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?IPv4=E6=9C=BA=E5=99=A8=E7=94=B3=E8=AF=B7IPv6=E8=AF=81=E4=B9=A6?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/install.sh b/install.sh index 2875729..bd01056 100644 --- a/install.sh +++ b/install.sh @@ -275,6 +275,7 @@ initVar() { # dns tls domain dnsTLSDomain= + ipType= # 该域名是否通过dns安装通配符证书 # installDNSACMEStatus= @@ -317,6 +318,7 @@ initVar() { publicKeyWarpReg= addressWarpReg= secretKeyWarpReg= + } # 读取tls证书详情 @@ -1241,7 +1243,7 @@ installWarp() { checkDNSIP() { local domain=$1 local dnsIP= - local type=4 + ipType=4 dnsIP=$(dig @1.1.1.1 +time=2 +short "${domain}" | grep -E "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$") if [[ -z "${dnsIP}" ]]; then dnsIP=$(dig @8.8.8.8 +time=2 +short "${domain}" | grep -E "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$") @@ -1251,7 +1253,7 @@ checkDNSIP() { echoContent red " ---> 无法通过DNS获取域名 IPv4 地址" echoContent green " ---> 尝试检查域名 IPv6 地址" dnsIP=$(dig @2606:4700:4700::1111 +time=2 aaaa +short "${domain}") - type=6 + ipType=6 if echo "${dnsIP}" | grep -q "network unreachable" || [[ -z "${dnsIP}" ]]; then echoContent red " ---> 无法通过DNS获取域名IPv6地址,退出安装" exit 0 @@ -1259,7 +1261,7 @@ checkDNSIP() { fi local publicIP= - publicIP=$(getPublicIP "${type}") + publicIP=$(getPublicIP "${ipType}") if [[ "${publicIP}" != "${dnsIP}" ]]; then echoContent red " ---> 域名解析IP与当前服务器IP不一致\n" echoContent yellow " ---> 请检查域名解析是否生效以及正确" @@ -1666,16 +1668,19 @@ switchSSLType() { # 选择acme安装证书方式 selectAcmeInstallSSL() { - local sslIPv6= - local currentIPType= - currentIPType=$(curl -s -4 http://www.cloudflare.com/cdn-cgi/trace | grep "ip" | cut -d "=" -f 2) - - if [[ -z "${currentIPType}" ]]; then - currentIPType=$(curl -s -6 http://www.cloudflare.com/cdn-cgi/trace | grep "ip" | cut -d "=" -f 2) - if [[ -n "${currentIPType}" ]]; then - sslIPv6="--listen-v6" - fi + # local sslIPv6= + # local currentIPType= + if [[ "${ipType}" == "6" ]]; then + sslIPv6="--listen-v6" fi + # currentIPType=$(curl -s "-${ipType}" http://www.cloudflare.com/cdn-cgi/trace | grep "ip" | cut -d "=" -f 2) + + # if [[ -z "${currentIPType}" ]]; then + # currentIPType=$(curl -s -6 http://www.cloudflare.com/cdn-cgi/trace | grep "ip" | cut -d "=" -f 2) + # if [[ -n "${currentIPType}" ]]; then + # sslIPv6="--listen-v6" + # fi + # fi acmeInstallSSL @@ -8634,7 +8639,7 @@ subscribe() { echoContent skyBlue "\n----------默认订阅----------\n" echoContent green "email:${email}\n" echoContent yellow "url:${subscribeType}://${currentDomain}/s/default/${emailMd5}\n" - echoContent yellow "在线二维码:https://api.qrserver.com/v1/create-qr-code/?size=400x400&data=https://${currentDomain}/s/default/${emailMd5}\n" + echoContent yellow "在线二维码:https://api.qrserver.com/v1/create-qr-code/?size=400x400&data=${subscribeType}://${currentDomain}/s/default/${emailMd5}\n" if [[ "${release}" != "alpine" ]]; then echo "${subscribeType}://${currentDomain}/s/default/${emailMd5}" | qrencode -s 10 -m 1 -t UTF8 fi @@ -8650,7 +8655,7 @@ subscribe() { clashMetaConfig "${clashProxyUrl}" "${emailMd5}" echoContent skyBlue "\n----------clashMeta订阅----------\n" echoContent yellow "url:${subscribeType}://${currentDomain}/s/clashMetaProfiles/${emailMd5}\n" - echoContent yellow "在线二维码:https://api.qrserver.com/v1/create-qr-code/?size=400x400&data=https://${currentDomain}/s/clashMetaProfiles/${emailMd5}\n" + echoContent yellow "在线二维码:https://api.qrserver.com/v1/create-qr-code/?size=400x400&data=${subscribeType}://${currentDomain}/s/clashMetaProfiles/${emailMd5}\n" if [[ "${release}" != "alpine" ]]; then echo "${subscribeType}://${currentDomain}/s/clashMetaProfiles/${emailMd5}" | qrencode -s 10 -m 1 -t UTF8 fi @@ -8672,7 +8677,7 @@ subscribe() { echoContent skyBlue "\n----------sing-box订阅----------\n" echoContent yellow "url:${subscribeType}://${currentDomain}/s/sing-box/${emailMd5}\n" - echoContent yellow "在线二维码:https://api.qrserver.com/v1/create-qr-code/?size=400x400&data=https://${currentDomain}/s/sing-box/${emailMd5}\n" + echoContent yellow "在线二维码:https://api.qrserver.com/v1/create-qr-code/?size=400x400&data=${subscribeType}://${currentDomain}/s/sing-box/${emailMd5}\n" if [[ "${release}" != "alpine" ]]; then echo "${subscribeType}://${currentDomain}/s/sing-box/${emailMd5}" | qrencode -s 10 -m 1 -t UTF8 fi @@ -9198,7 +9203,7 @@ menu() { cd "$HOME" || exit echoContent red "\n==============================================================" echoContent green "作者:mack-a" - echoContent green "当前版本:v3.3.1" + echoContent green "当前版本:v3.3.2" echoContent green "Github:https://github.com/mack-a/v2ray-agent" echoContent green "描述:八合一共存脚本\c" showInstallStatus From 9fa4b1ec95473368dac2b789e4325233684e828c Mon Sep 17 00:00:00 2001 From: mack-a <57424792+mack-a@users.noreply.github.com> Date: Fri, 7 Jun 2024 15:29:29 +0800 Subject: [PATCH 5/5] =?UTF-8?q?fix(=E8=84=9A=E6=9C=AC):=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8DIPv6=E5=88=86=E6=B5=81=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/install.sh b/install.sh index bd01056..fa2a53d 100644 --- a/install.sh +++ b/install.sh @@ -6207,6 +6207,8 @@ ipv6Routing() { removeSingBoxConfig socks5_inbound_route + removeSingBoxConfig IPv6_route + addSingBoxOutbound IPv6_out fi @@ -6255,10 +6257,10 @@ showIPv6Routing() { fi if [[ -n "${singBoxConfigPath}" ]]; then - if [[ -f "${singBoxConfigPath}IPv6_out_route.json" ]]; then + if [[ -f "${singBoxConfigPath}IPv6_route.json" ]]; then echoContent yellow "sing-box" - jq -r -c '.route.rules[]|select (.outbound=="IPv6_out")' "${singBoxConfigPath}IPv6_out_route.json" | jq -r - elif [[ ! -f "${singBoxConfigPath}IPv6_out_route.json" && -f "${singBoxConfigPath}IPv6_out.json" ]]; then + jq -r -c '.route.rules[]|select (.outbound=="IPv6_out")' "${singBoxConfigPath}IPv6_route.json" | jq -r + elif [[ ! -f "${singBoxConfigPath}IPv6_route.json" && -f "${singBoxConfigPath}IPv6_out.json" ]]; then echoContent yellow "sing-box" echoContent green " ---> 已设置IPv6全局分流" else @@ -6734,7 +6736,7 @@ warpRoutingReg() { removeSingBoxConfig wireguard_out_IPv4_route removeSingBoxConfig wireguard_out_IPv6_route - removeSingBoxConfig IPv6_out_route + removeSingBoxConfig IPv6_route removeSingBoxConfig socks5_inbound_route if [[ "${type}" == "IPv4" ]]; then @@ -9203,7 +9205,7 @@ menu() { cd "$HOME" || exit echoContent red "\n==============================================================" echoContent green "作者:mack-a" - echoContent green "当前版本:v3.3.2" + echoContent green "当前版本:v3.3.3" echoContent green "Github:https://github.com/mack-a/v2ray-agent" echoContent green "描述:八合一共存脚本\c" showInstallStatus