From 82619194211dc422bf5c1bc859ba84ebd799000b Mon Sep 17 00:00:00 2001 From: libm Date: Mon, 27 Jan 2025 18:49:23 +0800 Subject: [PATCH] fix: optimize --- resource/mixin.yaml | 7 +++++-- script/clashctl.sh | 2 +- script/common.sh | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/resource/mixin.yaml b/resource/mixin.yaml index 8c2794a..b211330 100644 --- a/resource/mixin.yaml +++ b/resource/mixin.yaml @@ -1,4 +1,7 @@ -# tun-config-start +# default-config-start +# 开箱即用 clashui +external-controller: '0.0.0.0:9090' +# clashtun 相关配置 tun: enable: false stack: system # or gvisor @@ -10,4 +13,4 @@ tun: auto-route: true # manage $(ip route) and $(ip rules) auto-redir: true # manage nftable REDIRECT auto-detect-interface: true -# tun-config-end +# default-config-end diff --git a/script/clashctl.sh b/script/clashctl.sh index 8754993..bd28344 100644 --- a/script/clashctl.sh +++ b/script/clashctl.sh @@ -173,7 +173,7 @@ function clashupdate() { function clashmixin() { case "$1" in -e) - sudo vi "$CLASH_CONFIG_MIXIN" && { + sudo vim "$CLASH_CONFIG_MIXIN" && { _concat_config_restart && _okcat "配置更新成功,已重启生效" } ;; diff --git a/script/common.sh b/script/common.sh index 0afe3f2..031a208 100644 --- a/script/common.sh +++ b/script/common.sh @@ -7,7 +7,7 @@ YQ_URL="${GH_PROXY}github.com/mikefarah/yq/releases/latest/download/yq_linux_amd TEMP_CONFIG='./resource/config.yaml' TEMP_CLASH_RAR='./resource/clash-*.gz' TEMP_UI_RAR='./resource/yacd.tar.xz' -TEMP_YQ_RAR='./resource/yq_linux_amd64.tar.gz' +TEMP_YQ_RAR='./resource/yq*.gz' CLASH_BASE_DIR='/opt/clash' CLASH_CONFIG_URL="${CLASH_BASE_DIR}/url"