mirror of
https://github.com/cmz0228/hysteria-dev.git
synced 2025-06-08 05:19:53 +00:00
fix: 233 is reserved for Hysteria authentication
This commit is contained in:
parent
197e913dce
commit
61a68a18b9
@ -625,8 +625,11 @@ func (c *serverConfig) fillMasqHandler(hyConfig *server.Config) error {
|
||||
return configError{Field: "masquerade.string.content", Err: errors.New("empty string content")}
|
||||
}
|
||||
if c.Masquerade.String.StatusCode != 0 &&
|
||||
(c.Masquerade.String.StatusCode < 200 || c.Masquerade.String.StatusCode > 599) {
|
||||
return configError{Field: "masquerade.string.statusCode", Err: errors.New("invalid status code (must be 200-599)")}
|
||||
(c.Masquerade.String.StatusCode < 200 ||
|
||||
c.Masquerade.String.StatusCode > 599 ||
|
||||
c.Masquerade.String.StatusCode == 233) {
|
||||
// 233 is reserved for Hysteria authentication
|
||||
return configError{Field: "masquerade.string.statusCode", Err: errors.New("invalid status code (must be 200-599, except 233)")}
|
||||
}
|
||||
handler = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
for k, v := range c.Masquerade.String.Headers {
|
||||
|
Loading…
x
Reference in New Issue
Block a user