mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-11-04 22:53:56 +08:00
update 2026-09-26 00:21:07
This commit is contained in:
1 parent
ba0a17863f
commit
8971d1aa5c
131 files changed
+408
-24394
No files matched your search
@@ -611,9 +611,7 @@ prepare_clash_runtime_config() {
|
||||
local enable_fake_ip
|
||||
local socks5_auth
|
||||
local socks5_user
|
||||
local default_dashboard
|
||||
local yacd_type
|
||||
local dashboard_type
|
||||
local socks5_pass
|
||||
|
||||
cache_file="$(get_clash_cache_file "$sid")"
|
||||
workdir="$(get_clash_workdir "$sid")"
|
||||
@@ -637,41 +635,11 @@ prepare_clash_runtime_config() {
|
||||
cp -f "$cache_file" "$raw_file"
|
||||
filter_clash_yaml_proxies "$raw_file"
|
||||
|
||||
default_dashboard=$(uci_get_by_type global default_dashboard "zashboard")
|
||||
yacd_type=$(uci_get_by_type global yacd_type "Meta")
|
||||
dashboard_type=$(uci_get_by_type global dashboard_type "Official")
|
||||
case "$default_dashboard" in
|
||||
dashboard)
|
||||
if [ "$dashboard_type" = "Official" ]; then
|
||||
EXTERNAL_UI_URL="https://codeload.github.com/ayanamist/clash-dashboard/zip/refs/heads/gh-pages"
|
||||
else
|
||||
EXTERNAL_UI_URL="https://codeload.github.com/MetaCubeX/Razord-meta/zip/refs/heads/gh-pages"
|
||||
fi
|
||||
;;
|
||||
yacd)
|
||||
if [ "$yacd_type" = "Official" ]; then
|
||||
EXTERNAL_UI_URL="https://codeload.github.com/haishanh/yacd/zip/refs/heads/gh-pages"
|
||||
else
|
||||
EXTERNAL_UI_URL="https://codeload.github.com/MetaCubeX/Yacd-meta/zip/refs/heads/gh-pages"
|
||||
fi
|
||||
;;
|
||||
metacubexd)
|
||||
EXTERNAL_UI_URL="https://codeload.github.com/MetaCubeX/metacubexd/zip/refs/heads/gh-pages"
|
||||
;;
|
||||
zashboard|*)
|
||||
EXTERNAL_UI_URL="https://codeload.github.com/Zephyruso/zashboard/zip/refs/heads/gh-pages-cdn-fonts"
|
||||
default_dashboard="zashboard"
|
||||
;;
|
||||
esac
|
||||
|
||||
cat >"$overlay_file" <<-EOF
|
||||
redir-port: $local_port
|
||||
tproxy-port: $local_port
|
||||
external-controller: 0.0.0.0:$CLASH_API_PORT
|
||||
secret: ""
|
||||
external-ui: /usr/share/shadowsocksr/ui
|
||||
external-ui-name: $default_dashboard
|
||||
external-ui-url: $EXTERNAL_UI_URL
|
||||
external-controller: 127.0.0.1:$CLASH_API_PORT
|
||||
secret: $clash_secret
|
||||
allow-lan: true
|
||||
bind-address: 0.0.0.0
|
||||
routing-mark: $CLASH_OUTBOUND_MARK
|
||||
@@ -2508,7 +2476,7 @@ Start_Run() {
|
||||
return 1
|
||||
}
|
||||
clash_workdir="$(get_clash_workdir "$GLOBAL_SERVER")"
|
||||
SAFE_PATHS="/usr/share/shadowsocksr/" ln_start_bin "$mihomo_bin" ssr-retcp -d "$clash_workdir" -f "$clash_workdir/config.yaml"
|
||||
ln_start_bin "$mihomo_bin" ssr-retcp -d "$clash_workdir" -f "$clash_workdir/config.yaml"
|
||||
echolog "Main node: $($mihomo_bin -v 2>&1 | head -1 | awk '{print $1, $3}') (Clash) Started!"
|
||||
;;
|
||||
socks5)
|
||||
@@ -2534,13 +2502,11 @@ load_config() {
|
||||
else
|
||||
GLOBAL_SERVER=$switch_server
|
||||
fi
|
||||
# 全局 socks5 注释掉后配合 advanced.lua 中取消注释 -- Server Selection 选项
|
||||
if [ "$(uci_get_by_type socks5_proxy enabled 0)" = "1" ]; then
|
||||
uci -q set "$NAME.@socks5_proxy[0].server=same"
|
||||
else
|
||||
uci -q set "$NAME.@socks5_proxy[0].server=nil"
|
||||
fi
|
||||
# 全局 3proxy 注释掉后配合 advanced.lua 中取消注释 -- Server Selection 选项
|
||||
if [ "$(uci_get_by_type http_proxy enabled 0)" = "1" ]; then
|
||||
uci -q set "$NAME.@http_proxy[0].server=same"
|
||||
else
|
||||
|
||||
@@ -84,18 +84,6 @@ if [ -s "/etc/config/shadowsocksr" ]; then
|
||||
uci -q set shadowsocksr.@global[0].component_mirror='direct'
|
||||
fi
|
||||
|
||||
if ! uci -q get shadowsocksr.@global[0].yacd_type > /dev/null; then
|
||||
uci -q set shadowsocksr.@global[0].yacd_type='Meta'
|
||||
fi
|
||||
|
||||
if ! uci -q get shadowsocksr.@global[0].dashboard_type > /dev/null; then
|
||||
uci -q set shadowsocksr.@global[0].dashboard_type='Official'
|
||||
fi
|
||||
|
||||
if ! uci -q get shadowsocksr.@global[0].default_dashboard > /dev/null; then
|
||||
uci -q set shadowsocksr.@global[0].default_dashboard='zashboard'
|
||||
fi
|
||||
|
||||
if ! uci -q get shadowsocksr.@global[0].filter_aaaa > /dev/null; then
|
||||
legacy_filter_aaaa="$(uci -q get shadowsocksr.@global[0].mosdns_ipv6)"
|
||||
uci -q set shadowsocksr.@global[0].filter_aaaa="${legacy_filter_aaaa:-1}"
|
||||
|
||||
Reference in new issue
Block a user