mihomo: sync upstream

last commit: 41e9d4f611
This commit is contained in:
gitea-action 2025-01-15 18:00:37 +08:00
parent ee33c54913
commit 983fa53caf

View File

@ -673,7 +673,7 @@ mixin_nameserver_policy() {
} }
mixin_sniffer_domain_names() { mixin_sniffer_domain_names() {
domain_name="$1" type="$2" yq -M -i '.sniffer.[env(type)] += [env(domain_name)]' "$RUN_PROFILE_PATH" domain_name="$1" type="$2" yq -M -i '.sniffer.[strenv(type)] += [strenv(domain_name)]' "$RUN_PROFILE_PATH"
} }
mixin_sniffs() { mixin_sniffs() {
@ -685,12 +685,12 @@ mixin_sniffs() {
if [ "$enabled" == 0 ]; then if [ "$enabled" == 0 ]; then
return return
fi fi
protocol="$protocol" overwrite_destination="$overwrite_destination" yq -M -i '.sniffer.sniff.[env(protocol)].override-destination = env(overwrite_destination) == 1' "$RUN_PROFILE_PATH" protocol="$protocol" overwrite_destination="$overwrite_destination" yq -M -i '.sniffer.sniff.[strenv(protocol)].override-destination = env(overwrite_destination) == 1' "$RUN_PROFILE_PATH"
config_list_foreach "$section" "port" mixin_sniff "$protocol" config_list_foreach "$section" "port" mixin_sniff "$protocol"
} }
mixin_sniff() { mixin_sniff() {
port="$1" protocol="$2" yq -M -i '.sniffer.sniff.[env(protocol)].ports += [env(port)]' "$RUN_PROFILE_PATH" port="$1" protocol="$2" yq -M -i '.sniffer.sniff.[strenv(protocol)].ports += [env(port)]' "$RUN_PROFILE_PATH"
} }
add_bypass_user() { add_bypass_user() {