Skip to content

Commit d64843b

Browse files
committed
feat(脚本): 删除面板兼容、clashmeta增加xhttp、singbox增加sniff
1 parent 9d26d76 commit d64843b

1 file changed

Lines changed: 40 additions & 22 deletions

File tree

install.sh

Lines changed: 40 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -912,8 +912,8 @@ readConfigHostPathUUID() {
912912
if [[ -z "${currentPath}" ]]; then
913913
dest=$(jq -r -c '.inbounds[0].settings.fallbacks[]|select(.alpn)|.dest' ${configPath}${frontingType}.json | head -1)
914914
if [[ "${dest}" == "31302" || "${dest}" == "31304" ]]; then
915-
checkBTPanel
916-
check1Panel
915+
# checkBTPanel
916+
# check1Panel
917917
if grep -q "trojangrpc {" <${nginxConfigPath}alone.conf; then
918918
currentPath=$(grep "trojangrpc {" <${nginxConfigPath}alone.conf | awk -F "[/]" '{print $2}' | awk -F "[t][r][o][j][a][n]" '{print $1}')
919919
elif grep -q "grpc {" <${nginxConfigPath}alone.conf; then
@@ -1114,14 +1114,14 @@ installTools() {
11141114
${installType} wget >/dev/null 2>&1
11151115
fi
11161116

1117-
if ! command -v netfilter-persistent >/dev/null 2>&1; then
1118-
if [[ "${release}" != "centos" ]]; then
1119-
echoContent green " ---> 安装iptables"
1120-
echo "iptables-persistent iptables-persistent/autosave_v4 boolean true" | sudo debconf-set-selections
1121-
echo "iptables-persistent iptables-persistent/autosave_v6 boolean true" | sudo debconf-set-selections
1122-
${installType} iptables-persistent >/dev/null 2>&1
1123-
fi
1124-
fi
1117+
# if ! command -v netfilter-persistent >/dev/null 2>&1; then
1118+
# if [[ "${release}" != "centos" ]]; then
1119+
# echoContent green " ---> 安装iptables"
1120+
# echo "iptables-persistent iptables-persistent/autosave_v4 boolean true" | sudo debconf-set-selections
1121+
# echo "iptables-persistent iptables-persistent/autosave_v6 boolean true" | sudo debconf-set-selections
1122+
# ${installType} iptables-persistent >/dev/null 2>&1
1123+
# fi
1124+
# fi
11251125

11261126
if ! curl --help >/dev/null 2>&1; then
11271127
echoContent green " ---> 安装curl"
@@ -4743,6 +4743,8 @@ EOF
47434743
removeSingBoxConfig block_domain_outbound
47444744
removeSingBoxConfig dns
47454745
fi
4746+
4747+
setSniffRouting
47464748
}
47474749
# 初始化 sing-box订阅配置
47484750
initSubscribeLocalConfig() {
@@ -4871,6 +4873,25 @@ EOF
48714873
cat <<EOF >>"/etc/v2ray-agent/subscribe_local/default/${user}"
48724874
vless://${id}@${add}:${port}?encryption=none&security=reality&type=xhttp&sni=${xrayVLESSRealityXHTTPServerName}&fp=chrome&path=${path}&pbk=${currentRealityXHTTPPublicKey}&sid=6ba85179e30d4fc2#${email}
48734875
EOF
4876+
4877+
cat <<EOF >>"/etc/v2ray-agent/subscribe_local/clashMeta/${user}"
4878+
- name: "${email}"
4879+
type: vless
4880+
server: ${add}
4881+
port: ${port}
4882+
uuid: ${id}
4883+
udp: true
4884+
tls: true
4885+
network: xhttp
4886+
client-fingerprint: chrome
4887+
alpn:
4888+
- h2
4889+
servername: ${currentHost}
4890+
xhttp-opts:
4891+
path: ${path}
4892+
host: ${currentHost}
4893+
EOF
4894+
48744895
echoContent yellow " ---> 二维码 VLESS(VLESS+reality+XHTTP)"
48754896
echoContent green " https://api.qrserver.com/v1/create-qr-code/?size=400x400&data=vless%3A%2F%2F${id}%40${add}%3A${port}%3Fencryption%3Dnone%26security%3Dreality%26type%3Dxhttp%26sni%3D${xrayVLESSRealityXHTTPServerName}%26fp%3Dchrome%26path%3D${path}%26host%3D${xrayVLESSRealityXHTTPServerName}%26pbk%3D${currentRealityXHTTPPublicKey}%26sid%3D6ba85179e30d4fc2%23${email}\n"
48764897

@@ -5750,7 +5771,7 @@ unInstall() {
57505771
menu
57515772
exit 0
57525773
fi
5753-
checkBTPanel
5774+
# checkBTPanel
57545775
echoContent yellow " ---> 脚本不会删除acme相关配置,删除请手动执行 [rm -rf /root/.acme.sh]"
57555776
handleNginx stop
57565777
if [[ -z $(pgrep -f "nginx") ]]; then
@@ -7418,7 +7439,6 @@ setSocks5Inbound() {
74187439
}
74197440
EOF
74207441
setStrategyRouting socks5_inbound "${domainStrategy}"
7421-
setSniffRouting socks5_inbound
74227442
}
74237443

74247444
# 初始化sing-box rule配置
@@ -7501,13 +7521,11 @@ setSocks5InboundRouting() {
75017521

75027522
# 设置sniff routing规则
75037523
setSniffRouting() {
7504-
local tag=$1
7505-
cat <<EOF >"/etc/v2ray-agent/sing-box/conf/config/sniff_${tag}.json"
7524+
cat <<EOF >"/etc/v2ray-agent/sing-box/conf/config/sniff.json"
75067525
{
75077526
"route":{
75087527
"rules":[
75097528
{
7510-
"inbound": "${tag}",
75117529
"action": "sniff",
75127530
"timeout": "1s"
75137531
}
@@ -8159,8 +8177,8 @@ customXrayInstall() {
81598177
if [[ "${selectCustomInstallType//,/}" =~ ^[0-7]+$ ]]; then
81608178
readLastInstallationConfig
81618179
unInstallSubscribe
8162-
checkBTPanel
8163-
check1Panel
8180+
# checkBTPanel
8181+
# check1Panel
81648182
totalProgress=12
81658183
installTools 1
81668184
if [[ -n "${btDomain}" ]]; then
@@ -8253,8 +8271,8 @@ selectCoreInstall() {
82538271
xrayCoreInstall() {
82548272
readLastInstallationConfig
82558273
unInstallSubscribe
8256-
checkBTPanel
8257-
check1Panel
8274+
# checkBTPanel
8275+
# check1Panel
82588276
selectCustomInstallType=
82598277
totalProgress=12
82608278
installTools 2
@@ -8298,8 +8316,8 @@ xrayCoreInstall() {
82988316
singBoxInstall() {
82998317
readLastInstallationConfig
83008318
unInstallSubscribe
8301-
checkBTPanel
8302-
check1Panel
8319+
# checkBTPanel
8320+
# check1Panel
83038321
selectCustomInstallType=
83048322
totalProgress=8
83058323
installTools 2
@@ -9631,7 +9649,7 @@ menu() {
96319649
cd "$HOME" || exit
96329650
echoContent red "\n=============================================================="
96339651
echoContent green "作者:mack-a"
9634-
echoContent green "当前版本:v3.5.11"
9652+
echoContent green "当前版本:v3.5.12"
96359653
echoContent green "Github:https://github.com/mack-a/v2ray-agent"
96369654
echoContent green "描述:八合一共存脚本\c"
96379655
showInstallStatus

0 commit comments

Comments
 (0)