Skip to content

修复三种配置路径丢失订阅 DNS 策略的问题 - #1320

Open
yorkyang2333 wants to merge 3 commits into
juewuy:devfrom
yorkyang2333:yy/fix-preserve-subscription-dns
Open

修复三种配置路径丢失订阅 DNS 策略的问题#1320
yorkyang2333 wants to merge 3 commits into
juewuy:devfrom
yorkyang2333:yy/fix-preserve-subscription-dns

Conversation

@yorkyang2333

@yorkyang2333 yorkyang2333 commented Aug 7, 2026

Copy link
Copy Markdown

ShellCrash 在处理订阅配置时会重新构造顶层 dns,导致订阅中的 dns.nameserver-policy 等字段被丢弃。本 PR 修复 b) 本地生成、c) 在线生成和 e) 在线获取三种路径:c) 和 e) 下载配置后,在 modify_yaml 中合并原始 DNS、ShellCrash 管理字段和 yamls/user.yaml 覆写;b) 本地生成时保留 provider 模板中的 DNS 配置。合并优先级为用户覆写高于 ShellCrash 管理字段,高于订阅原始配置中未管理的字段,因此 provider-specific nameserver-policy 可以继续保留。同时修复一键配置加密 DNS 时将 DoH URL 写入 dns_resolver 的问题。

ShellCrash previously rebuilt the DNS section from its own defaults and dropped subscription-specific nameserver-policy entries. Merge subscription DNS with managed fields and user overrides into one YAML section so provider-specific node resolution survives config generation.

Also preserve DNS sections in provider templates, fix the encrypted DNS resolver preset, and add regression coverage for block and flow YAML plus override precedence.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 05306ffdc7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/menus/providers_clash.sh
Comment thread scripts/libs/yaml_dns.sh
@juewuy

juewuy commented Aug 7, 2026

Copy link
Copy Markdown
Owner

#1309
这个进行中的pr似乎是实现的相似功能

@yorkyang2333

Copy link
Copy Markdown
Author

#1309 这个进行中的pr似乎是实现的相似功能

Screenshot 2026-08-08 at 07 55 45

但是 #1309 仍然是个 draft 看情况吧

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.

2 participants