diff --git a/resources/mixin.yaml b/resources/mixin.yaml index 5d86dbb..9cd063c 100644 --- a/resources/mixin.yaml +++ b/resources/mixin.yaml @@ -2,6 +2,8 @@ system-proxy: enable: true +mixed-port: 7890 + # Web 控制台配置 external-controller: "0.0.0.0:9090" external-ui: public diff --git a/script/common.sh b/script/common.sh index a3705d4..2cce2a3 100644 --- a/script/common.sh +++ b/script/common.sh @@ -134,8 +134,7 @@ _get_random_port() { } function _get_proxy_port() { - local mixed_port=$(sudo "$BIN_YQ" '.mixed-port // ""' $CLASH_CONFIG_RUNTIME) - MIXED_PORT=${mixed_port:-7890} + MIXED_PORT=$(sudo "$BIN_YQ" '.mixed-port' $CLASH_CONFIG_RUNTIME) _is_already_in_use "$MIXED_PORT" "$BIN_KERNEL_NAME" && { local newPort=$(_get_random_port)