🐶 Sync 2026-09-26 16:35:25

This commit is contained in:
github-actions[bot] committed 2026-09-26 16:35:25 +08:00
1 parent 1eb453ca2e
commit 3f39d2b62b
44 files changed
+2741 -2902

No files matched your search

+36 -78
View File
@@ -608,10 +608,6 @@ prepare_clash_runtime_config() {
local dns_mode
local client_policy_stats
local client_rules
local enable_fake_ip
local socks5_auth
local socks5_user
local socks5_pass
cache_file="$(get_clash_cache_file "$sid")"
workdir="$(get_clash_workdir "$sid")"
@@ -627,7 +623,6 @@ prepare_clash_runtime_config() {
dns_mode="$(uci_get_by_type global pdnsd_enable 0)"
client_policy_stats=""
client_rules=0
enable_fake_ip="$(uci_get_by_type server_subscribe enable_fake_ip "")"
[ -s "$cache_file" ] || return 1
@@ -645,35 +640,15 @@ prepare_clash_runtime_config() {
routing-mark: $CLASH_OUTBOUND_MARK
profile:
store-selected: true
store-fake-ip: true
tun:
enable: false
dns:
enable: $( [ "$dns_mode" = "7" ] && echo "true" || echo "false" )
enhanced-mode: redir-host
listen: 127.0.0.1:$dns_port
ipv6: $( [ "$dns_ipv4_only" = "1" ] && echo "false" || echo "true" )
EOF
# 根据 enable_fake_ip 决定 enhanced-mode
if [ "$enable_fake_ip" = "1" ]; then
ENHANCED_MODE="fake-ip"
else
ENHANCED_MODE="redir-host"
fi
# 根据 dns_mode 添加不同的 dns 配置
if [ "$dns_mode" = "7" ]; then
cat >> "$overlay_file" <<-EOF
dns:
enable: true
enhanced-mode: $ENHANCED_MODE
listen: 127.0.0.1:$dns_port
ipv6: $( [ "$dns_ipv4_only" = "1" ] && echo "false" || echo "true" )
EOF
else
cat >> "$overlay_file" <<-EOF
dns:
enable: true
enhanced-mode: $ENHANCED_MODE
ipv6: $( [ "$dns_ipv4_only" = "1" ] && echo "false" || echo "true" )
EOF
fi
if [ -n "$socks_port" ] && [ "$socks_port" != "0" ]; then
echo "socks-port: $socks_port" >>"$overlay_file"
@@ -1273,24 +1248,14 @@ start_dns() {
ssrplus_dns="$(uci_get_by_type global pdnsd_enable 0)"
global_server_type="$(uci_get_by_name "$GLOBAL_SERVER" type)"
builtin_dns_enabled=0
dnsserver="$(uci_get_by_type global tunnel_forward 8.8.4.4:53)"
if [ "$ssrplus_dns" = "5" ]; then
ssrplus_dns="$(force_dns2tcp_fallback "旧版 DNSPROXY 模式已移除")" || return 1
uci_set_by_type global pdnsd_enable "$ssrplus_dns"
elif [ "$ssrplus_dns" = "6" ]; then
dnsserver="$(uci_get_by_type global chinadns_ng_tunnel_forward 8.8.4.4:53)"
fi
case "$ssrplus_dns" in
1)
dnsserver="$(uci_get_by_type global dns2tcp_tunnel_forward 8.8.4.4:53)"
;;
6)
dnsserver="$(uci_get_by_type global chinadns_ng_tunnel_forward 8.8.4.4:53)"
;;
7)
dnsserver="$(uci_get_by_type global tunnel_forward 8.8.4.4:53)"
;;
*)
;;
esac
run_mode="$(normalize_run_mode)"
if [ "$ssrplus_dns" = "4" ] && ! is_finded "mosdns"; then
@@ -1556,15 +1521,15 @@ generate_xray_config() {
{
"log": {
"loglevel": "warning"
},
"inbounds": [$inbound_json],
"outbounds": [
{
"protocol": "freedom",
"settings": {}
}
]
}
},
"inbounds": [$inbound_json],
"outbounds": [
{
"protocol": "freedom",
"settings": {}
}
]
}
EOF
return 0
}
@@ -2940,18 +2905,12 @@ start_rules() {
local ac_ips
local custom_ports
local proxyport
local enable_fake_ip
server=$(get_host_ip "$GLOBAL_SERVER")
local_port=$(get_default_node_local_port)
lan_ac_ips=$(uci_get_by_type access_control lan_ac_ips)
lan_ac_mode=$(uci_get_by_type access_control lan_ac_mode)
enable_fake_ip=$(uci_get_by_type server_subscribe enable_fake_ip "")
if [ -z "$enable_fake_ip" ]; then
enable_fake_ip="0"
fi
if [ "$kcp_enable_flag" = "0" ] && [ "$redir_udp" = "1" ]; then
udp_server=$(get_host_ip "$UDP_RELAY_SERVER")
udp_local_port=$tmp_udp_port
@@ -2996,27 +2955,26 @@ start_rules() {
fi
elif [ "$USE_TABLES" = "iptables" ]; then
ARG_A=""
fi
/usr/share/shadowsocksr/gfw2ipset.sh
/usr/bin/ssr-rules \
-s "$server" \
-l "$local_port" \
-S "$udp_server" \
-L "$udp_local_port" \
-a "$ac_ips" \
-i "/etc/ssrplus/china_ssr.txt" \
-b "$(uci_get_by_type access_control wan_bp_ips)" \
-w "$(uci_get_by_type access_control wan_fw_ips)" \
-B "$(uci_get_by_type access_control lan_bp_ips)" \
-p "$(uci_get_by_type access_control lan_fp_ips)" \
-G "$(uci_get_by_type access_control lan_gm_ips)" \
-m "$(uci_get_by_type access_control Interface)" \
-D "$proxyport" \
-E "$enable_fake_ip" \
"$(get_arg_out)" "$(gfwmode)" "$ARG_UDP" "$ARG_UDP_RULES" "$ARG_A"
fi
/usr/share/shadowsocksr/gfw2ipset.sh
/usr/bin/ssr-rules \
-s "$server" \
-l "$local_port" \
-S "$udp_server" \
-L "$udp_local_port" \
-a "$ac_ips" \
-i "/etc/ssrplus/china_ssr.txt" \
-b "$(uci_get_by_type access_control wan_bp_ips)" \
-w "$(uci_get_by_type access_control wan_fw_ips)" \
-B "$(uci_get_by_type access_control lan_bp_ips)" \
-p "$(uci_get_by_type access_control lan_fp_ips)" \
-G "$(uci_get_by_type access_control lan_gm_ips)" \
-m "$(uci_get_by_type access_control Interface)" \
-D "$proxyport" \
"$(get_arg_out)" "$(gfwmode)" "$ARG_UDP" "$ARG_UDP_RULES" "$ARG_A"
return $?
}
return $?
}
start() {
local run_mode
@@ -1,78 +0,0 @@
*.lan
*.localdomain
*.example
*.invalid
*.localhost
*.test
*.local
*.home.arpa
time.*.com
time.*.gov
time.*.edu.cn
time.*.apple.com
time1.*.com
time2.*.com
time3.*.com
time4.*.com
time5.*.com
time6.*.com
time7.*.com
ntp.*.com
ntp1.*.com
ntp2.*.com
ntp3.*.com
ntp4.*.com
ntp5.*.com
ntp6.*.com
ntp7.*.com
*.time.edu.cn
*.ntp.org.cn
+.pool.ntp.org
time1.cloud.tencent.com
stun.*.*
stun.*.*.*
swscan.apple.com
mesu.apple.com
music.163.com
*.music.163.com
*.126.net
musicapi.taihe.com
music.taihe.com
songsearch.kugou.com
trackercdn.kugou.com
*.kuwo.cn
api-jooxtt.sanook.com
api.joox.com
y.qq.com
*.y.qq.com
streamoc.music.tc.qq.com
mobileoc.music.tc.qq.com
isure.stream.qqmusic.qq.com
dl.stream.qqmusic.qq.com
aqqmusic.tc.qq.com
amobile.music.tc.qq.com
localhost.ptlogin2.qq.com
*.msftconnecttest.com
*.msftncsi.com
*.xiami.com
*.music.migu.cn
music.migu.cn
+.wotgame.cn
+.wggames.cn
+.wowsgame.cn
+.wargaming.net
*.*.*.srv.nintendo.net
*.*.stun.playstation.net
xbox.*.*.microsoft.com
*.*.xboxlive.com
*.ipv6.microsoft.com
teredo.*.*.*
teredo.*.*
speedtest.cros.wr.pvp.net
+.jjvip8.com
www.douyu.com
activityapi.huya.com
activityapi.huya.com.w.cdngslb.com
www.bilibili.com
api.bilibili.com
a.w.bilicdn1.com
@@ -1,9 +0,0 @@
+.google.com
+.facebook.com
+.youtube.com
+.twitter.com
+.telegram.org
+.githubusercontent.com
+.googlevideo.com
+.msftconnecttest.com
+.msftncsi.com
@@ -1,15 +0,0 @@
0.0.0.0/8
10.0.0.0/8
100.64.0.0/10
127.0.0.0/8
169.254.0.0/16
172.16.0.0/12
192.0.0.0/24
192.0.2.0/24
192.88.99.0/24
192.168.0.0/16
198.51.100.0/24
203.0.113.0/24
224.0.0.0/4
240.0.0.0/4
255.255.255.255/32
@@ -47,18 +47,6 @@ if [ -s "/etc/config/shadowsocksr" ]; then
uci -q set shadowsocksr.@server_subscribe[0].auto_update_min_time='0'
fi
if ! uci -q get shadowsocksr.@server_subscribe[0].enable_mihomo > /dev/null; then
uci -q set shadowsocksr.@server_subscribe[0].enable_mihomo='1'
fi
if ! uci -q get shadowsocksr.@server_subscribe[0].enable_fake_ip > /dev/null; then
uci -q set shadowsocksr.@server_subscribe[0].enable_fake_ip='1'
fi
if ! uci -q get shadowsocksr.@server_subscribe[0].sub_convert > /dev/null; then
uci -q set shadowsocksr.@server_subscribe[0].sub_convert='1'
fi
if ! uci -q get shadowsocksr.@server_subscribe[0].config_auto_update_mode > /dev/null; then
uci -q set shadowsocksr.@server_subscribe[0].config_auto_update_mode='0'
fi