mirror of
https://github.com/XTLS/Xray-core.git
synced 2026-05-08 14:13:22 +00:00
chore: polish xhttp browser dialer mode validation messages
Agent-Logs-Url: https://github.com/XTLS/Xray-core/sessions/071df77b-69fb-4b1f-a14d-9dab447e1efa Co-authored-by: RPRX <63339210+RPRX@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
181193581b
commit
97ad6cef43
@@ -1989,10 +1989,10 @@ func (c *StreamConfig) Build() (*internet.StreamConfig, error) {
|
||||
splitHTTPSettingsCopy := *splitHTTPSettings
|
||||
hs, err := splitHTTPSettingsCopy.Build()
|
||||
if err != nil {
|
||||
return nil, errors.New("Failed to build XHTTP config for browserDialer validation.").Base(err)
|
||||
return nil, errors.New("failed to build XHTTP config for browserDialer validation.").Base(err)
|
||||
}
|
||||
if splitHTTPConfig, ok := hs.(*splithttp.Config); ok && splitHTTPConfig.Mode != "auto" && splitHTTPConfig.Mode != "packet-up" {
|
||||
return nil, errors.New("sockopt.browserDialer only supports XHTTP mode auto or packet-up, got: ", splitHTTPConfig.Mode)
|
||||
return nil, errors.New("sockopt.browserDialer only supports XHTTP modes \"auto\" or \"packet-up\", got: \"", splitHTTPConfig.Mode, "\"")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user