mirror of
https://github.com/XTLS/Xray-core.git
synced 2026-07-03 18:28:52 +00:00
refactor: tighten browser dialer UUID and config error handling
Agent-Logs-Url: https://github.com/XTLS/Xray-core/sessions/d0035ff5-3633-402f-890e-e68c267a65c1 Co-authored-by: RPRX <63339210+RPRX@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
aeb689284c
commit
e06c536ce6
@@ -106,9 +106,11 @@ func parseBrowserDialerAddress(addr string) (*browserDialerAddress, bool) {
|
||||
return nil, false
|
||||
}
|
||||
parsedUUID, err := uuid.ParseString(id)
|
||||
if err != nil || !strings.EqualFold(parsedUUID.String(), id) {
|
||||
id = strings.ToLower(id)
|
||||
if err != nil || parsedUUID.String() != id {
|
||||
return nil, false
|
||||
}
|
||||
cleanPath = "/" + id
|
||||
|
||||
return &browserDialerAddress{
|
||||
listenAddr: listenAddr,
|
||||
@@ -256,7 +258,6 @@ func getDialerByAddress(addr string) (*dialerInstance, error) {
|
||||
delete(server.pageRoutes, dialer.pagePath)
|
||||
if len(server.pageRoutes) == 0 {
|
||||
delete(dialerServers, parsed.listenAddr)
|
||||
server.started = false
|
||||
}
|
||||
mu.Unlock()
|
||||
closeDialerInstance(dialer)
|
||||
|
||||
Reference in New Issue
Block a user