fix: clean browser dialer path parsing guard

Agent-Logs-Url: https://github.com/XTLS/Xray-core/sessions/3aee4c73-7847-433c-905a-2eafe5b1bfe8

Co-authored-by: RPRX <63339210+RPRX@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-04-26 16:27:13 +00:00
committed by GitHub
parent 4636ca2675
commit 12ecf47fcc
+1 -4
View File
@@ -71,14 +71,11 @@ func parseBrowserDialerAddress(addr string) (string, string, bool) {
}
listenAddr, pathRaw, ok := strings.Cut(addr, "/")
if !ok || listenAddr == "" {
if !ok || listenAddr == "" || pathRaw == "" {
return "", "", false
}
path := "/" + strings.TrimSuffix(pathRaw, "/")
if path == "" {
return "", "", false
}
if _, _, err := net.SplitHostPort(listenAddr); err != nil {
return "", "", false
}