mirror of
https://github.com/XTLS/Xray-core.git
synced 2026-05-14 18:09:05 +00:00
fix: tighten browser URL collection order and error handling
Agent-Logs-Url: https://github.com/XTLS/Xray-core/sessions/84d72770-6ad0-447a-8d86-94d692972a05 Co-authored-by: RPRX <63339210+RPRX@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
be9a229d68
commit
bb79f554dd
@@ -75,16 +75,17 @@ func BeginCollectingDialerProxyURLs() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func RegisterDialerProxyURL(raw string) {
|
||||
func RegisterDialerProxyURL(raw string) error {
|
||||
if !IsBrowserDialerProxy(raw) {
|
||||
return
|
||||
return nil
|
||||
}
|
||||
initMu.Lock()
|
||||
defer initMu.Unlock()
|
||||
if pendingURLs == nil {
|
||||
pendingURLs = map[string]struct{}{}
|
||||
return errors.New("browser dialer url collection is not initialized")
|
||||
}
|
||||
pendingURLs[raw] = struct{}{}
|
||||
return nil
|
||||
}
|
||||
|
||||
func ConfigureCollectedDialerProxyURLs() error {
|
||||
|
||||
Reference in New Issue
Block a user