From 47e3328e2c987ca9858dba4c9805a744ae074ba2 Mon Sep 17 00:00:00 2001 From: mack-a <57424792+mack-a@users.noreply.github.com> Date: Tue, 7 Mar 2023 12:41:58 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E8=84=9A=E6=9C=AC):=20=E5=AE=89=E8=A3=85x?= =?UTF-8?q?ray-core=E4=BC=9A=E8=87=AA=E5=8A=A8=E6=9B=BF=E6=8D=A2=E6=9C=80?= =?UTF-8?q?=E6=96=B0geo=E7=9B=B8=E5=85=B3=E6=96=87=E4=BB=B6=E3=80=81xray-c?= =?UTF-8?q?ore=E6=B7=BB=E5=8A=A0=E9=BB=98=E8=AE=A4=E7=9A=84routing?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E3=80=81=E8=A7=A3=E5=86=B3gstatic=20?= =?UTF-8?q?=E5=8F=AF=E8=83=BD=E5=87=BA=E7=8E=B0=E7=9A=84=E5=B1=8F=E8=94=BD?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index 7bd8b07..6129a37 100644 --- a/install.sh +++ b/install.sh @@ -1413,9 +1413,8 @@ randomPathFunction() { else echoContent yellow "请输入自定义路径[例: alone],不需要斜杠,[回车]随机路径" read -r -p '路径:' customPath - if [[ -z "${customPath}" ]]; then - customPath=$(initRandomPath) + initRandomPath currentPath=${customPath} else if [[ "${customPath: -2}" == "ws" ]]; then @@ -1686,6 +1685,14 @@ installXray() { unzip -o "/etc/v2ray-agent/xray/${xrayCoreCPUVendor}.zip" -d /etc/v2ray-agent/xray >/dev/null rm -rf "/etc/v2ray-agent/xray/${xrayCoreCPUVendor}.zip" + + version=$(curl -s https://api.github.com/repos/Loyalsoldier/v2ray-rules-dat/releases | jq -r '.[]|.tag_name' | head -1) + echoContent skyBlue "------------------------Version-------------------------------" + echo "version:${version}" + rm /etc/v2ray-agent/xray/geo* >/dev/null 2>&1 + wget -c -q --show-progress -P /etc/v2ray-agent/xray/ "https://github.com/Loyalsoldier/v2ray-rules-dat/releases/download/${version}/geosite.dat" + wget -c -q --show-progress -P /etc/v2ray-agent/xray/ "https://github.com/Loyalsoldier/v2ray-rules-dat/releases/download/${version}/geoip.dat" + chmod 655 /etc/v2ray-agent/xray/xray else echoContent green " ---> Xray-core版本:$(/etc/v2ray-agent/xray/xray --version | awk '{print $2}' | head -1)" @@ -2845,6 +2852,11 @@ EOF }, "tag":"IPv6-out" }, + { + "protocol":"freedom", + "settings": {}, + "tag":"direct" + }, { "protocol":"blackhole", "tag":"blackhole-out" @@ -2864,7 +2876,22 @@ EOF } } EOF - + # routing + cat </etc/v2ray-agent/xray/conf/09_routing.json +{ + "routing": { + "rules": [ + { + "type": "field", + "domain": [ + "domain:gstatic.com" + ], + "outboundTag": "direct" + } + ] + } +} +EOF # VLESS_TCP_TLS/XTLS # 回落nginx local fallbacksList='{"dest":31300,"xver":0},{"alpn":"h2","dest":31302,"xver":0}' @@ -5553,7 +5580,7 @@ menu() { cd "$HOME" || exit echoContent red "\n==============================================================" echoContent green "作者:mack-a" - echoContent green "当前版本:v2.7.7" + echoContent green "当前版本:v2.7.8" echoContent green "Github:https://github.com/mack-a/v2ray-agent" echoContent green "描述:八合一共存脚本\c" showInstallStatus