WireGuard outbound: Fix endpoint IP address (#6804)

Fixes https://github.com/XTLS/Xray-core/issues/6803
This commit is contained in:
LjhAUMEM
2026-09-24 01:59:28 +00:00
committed by GitHub
parent 7741e9e77e
commit a308ded2e6
+3
View File
@@ -336,6 +336,9 @@ func (h *Handler) init(ctx context.Context) error {
}
func (h *Handler) resolveLocal(host string) (net.IP, error) {
if ip := net.ParseIP(host); ip != nil {
return ip, nil
}
ips, _, err := h.dns.LookupIP(host, dns.IPOption{IPv4Enable: true, IPv6Enable: true})
if err != nil {
return nil, err