From 4bf48e15490bdc9db8d5f9f8238e5a5cf617a94d Mon Sep 17 00:00:00 2001 From: Ace Taffy <144473506+AceTaffy812@users.noreply.github.com> Date: Fri, 23 Jan 2026 12:53:24 +0900 Subject: [PATCH] feat: add ECH support for subscribe --- core/src/main/golang/native/config/fetch.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/core/src/main/golang/native/config/fetch.go b/core/src/main/golang/native/config/fetch.go index ba08ebccbd..aa1fc140ea 100644 --- a/core/src/main/golang/native/config/fetch.go +++ b/core/src/main/golang/native/config/fetch.go @@ -15,6 +15,7 @@ import ( "cfa/native/app" clashHttp "github.com/metacubex/mihomo/component/http" + "github.com/metacubex/mihomo/component/resolver" ) type Status struct { @@ -25,7 +26,14 @@ type Status struct { } func openUrl(ctx context.Context, url string) (io.ReadCloser, error) { - response, err := clashHttp.HttpRequest(ctx, url, http.MethodGet, http.Header{"User-Agent": {"ClashMetaForAndroid/" + app.VersionName()}}, nil) + rs := resolver.DefaultResolver + if rs == nil { + rs = resolver.ProxyServerHostResolver + } + if rs == nil { + rs = resolver.SystemResolver + } + response, err := clashHttp.HttpRequest(ctx, url, http.MethodGet, http.Header{"User-Agent": {"ClashMetaForAndroid/" + app.VersionName()}}, nil, clashHttp.WithEch(rs)) if err != nil { return nil, err