plugin/forward: fix parsing error when handling TLS+IPv6 address (#7848)

This commit is contained in:
yangsenzk
2026-02-25 18:21:39 +08:00
committed by GitHub
parent 7ae1c40db2
commit 5b7da1fbf7
3 changed files with 23 additions and 1 deletions

View File

@@ -46,6 +46,7 @@ func HostPortOrFile(s ...string) ([]string, error) {
if err != nil {
// Parse didn't work, it is not a addr:port combo
host = strings.Trim(host, "[]")
hostNoZone := stripZone(host)
if net.ParseIP(hostNoZone) == nil {
ss, err := tryFile(host)