Skip to content

fix: make enable_meta_sniffer behavior consistent with CUSTOM_FALLBAC…#5006

Open
rz467fzs7d wants to merge 3493 commits into
vernesong:devfrom
rz467fzs7d:fix/preserve-sniffer-config-dev
Open

fix: make enable_meta_sniffer behavior consistent with CUSTOM_FALLBAC…#5006
rz467fzs7d wants to merge 3493 commits into
vernesong:devfrom
rz467fzs7d:fix/preserve-sniffer-config-dev

Conversation

@rz467fzs7d
Copy link
Copy Markdown
Contributor

fix: unify behavior when custom config options are unchecked

CUSTOM_FALLBACK_FILTER and ENABLE_META_SNIFFER have the same frontend interaction:
both use a checkbox to control whether to use YAML custom config.

However, their default behaviors are inconsistent when unchecked:

  • CUSTOM_FALLBACK_FILTER=0: respects YAML config
  • ENABLE_META_SNIFFER=0: forces sniffer to be disabled

This fix makes them consistent: when unchecked, always respect the YAML config file settings.

vernesong and others added 20 commits February 11, 2026 01:22
…esong#4992)

OpenClash uses Ruby YAML.load_file + YAML.dump in multiple rewrite stages.\nUnquoted short-id values like 00000000 were parsed as numeric and dumped as '0',\ncausing Mihomo error: invalid REALITY short ID.\n\nThis patch normalizes short-id to quoted string before parsing by overriding\nYAML.load_file (in addition to existing dump normalization), and extends matching\nto inline map style (reality-opts: { ..., short-id: 00000000 }).

Verified on OpenWrt runtime: short-id 00000000 remains '00000000' after load+dump.
…K_FILTER

CUSTOM_FALLBACK_FILTER and ENABLE_META_SNIFFER have the same frontend interaction:
both use a checkbox to control whether to use YAML custom config.

However, their default behaviors are inconsistent when unchecked:
- CUSTOM_FALLBACK_FILTER=0: respects YAML config
- ENABLE_META_SNIFFER=0: forces sniffer to be disabled

This fix makes them consistent: when unchecked, always respect the YAML config file settings.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@rz467fzs7d
Copy link
Copy Markdown
Contributor Author

也可以遵循 SNIFFER 的控制逻辑,独立一个 ENABLE_FALLBACK_FILTER 来控制,逻辑上更清晰 ; 你们的想法呢?

@vernesong vernesong force-pushed the dev branch 7 times, most recently from 460a6cf to 2c44bf2 Compare April 8, 2026 23:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants