From 95e530d9237921f1a1aa1127d1f9d9dd73ed72c0 Mon Sep 17 00:00:00 2001 From: MHSanaei Date: Mon, 20 Apr 2026 01:08:41 +0200 Subject: [PATCH] fix --- sub/subClashService.go | 6 +++++- web/html/inbounds.html | 1 - web/service/setting.go | 16 +--------------- 3 files changed, 6 insertions(+), 17 deletions(-) diff --git a/sub/subClashService.go b/sub/subClashService.go index f0a8ca8a..24271a13 100644 --- a/sub/subClashService.go +++ b/sub/subClashService.go @@ -34,6 +34,9 @@ func (s *SubClashService) GetClash(subId string, host string) (string, string, e return "", "", err } + requestHost := strings.TrimSpace(host) + defaultClientHost := s.SubService.getDefaultClientHost() + var traffic xray.ClientTraffic var clientTraffics []xray.ClientTraffic var proxies []map[string]any @@ -57,7 +60,8 @@ func (s *SubClashService) GetClash(subId string, host string) (string, string, e for _, client := range clients { if client.Enable && client.SubID == subId { clientTraffics = append(clientTraffics, s.SubService.getClientTraffics(inbound.ClientStats, client.Email)) - proxies = append(proxies, s.getProxies(inbound, client, host)...) + resolvedHost := s.SubService.ResolveClientHostWithDefault(inbound, client, requestHost, defaultClientHost) + proxies = append(proxies, s.getProxies(inbound, client, resolvedHost)...) } } } diff --git a/web/html/inbounds.html b/web/html/inbounds.html index c7fa641e..f224ed25 100644 --- a/web/html/inbounds.html +++ b/web/html/inbounds.html @@ -1763,7 +1763,6 @@ }, }); -{{ template "page/body_end" .}}