Skip to content

fix: ECH for mihomo and sing-box - #806

Closed
mdjvd wants to merge 2 commits into
PasarGuard:devfrom
mdjvd:dev
Closed

fix: ECH for mihomo and sing-box#806
mdjvd wants to merge 2 commits into
PasarGuard:devfrom
mdjvd:dev

Conversation

@mdjvd

@mdjvd mdjvd commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Summary

FYI: This is AI-written code
We've had ECH for Xray, but not for mihomo, and the implementation for Sing-Box was imperfect and unusable.
This PR fixes the ECH issue for both subscription formats.

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Refactor / cleanup
  • Documentation
  • Tests / CI

Checklist

  • I tested the change locally or explained why it cannot be tested.
  • I added or updated tests for behavior changes.
  • I updated documentation, translations, or examples if needed.
  • I checked database migrations when models or schema changed.
  • I did not include secrets, tokens, private keys, or unrelated changes.

Testing

I have tested it on both formats, and they work with no issues as far as I can see.

Screenshots

Notes for reviewers

@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 7697b01e-eb8d-4f80-8e62-c39429908691

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@mdjvd

mdjvd commented Aug 21, 2026

Copy link
Copy Markdown
Contributor Author

If the ech is a base-64 encoded config, there is no problem. But if we choose to use the other supported format by Xray (eg, "example.com+https://1.1.1.1/dns-query"), then Sing-box and Mihomo will not be able to start the profile and proxies at all.
So I think we have to have different fields for each format in hosts.

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.

1 participant