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" .}}