diff --git a/transport/internet/websocket/config.go b/transport/internet/websocket/config.go index 4469a83a..ef55adda 100644 --- a/transport/internet/websocket/config.go +++ b/transport/internet/websocket/config.go @@ -7,7 +7,7 @@ import ( "v2ray.com/core/transport/internet" ) -func (c *Config) GetNormailzedPath() string { +func (c *Config) GetNormalizedPath() string { path := c.Path if len(path) == 0 { return "/" diff --git a/transport/internet/websocket/dialer.go b/transport/internet/websocket/dialer.go index 8a1b0c71..040c9879 100644 --- a/transport/internet/websocket/dialer.go +++ b/transport/internet/websocket/dialer.go @@ -50,7 +50,7 @@ func dialWebsocket(ctx context.Context, dest net.Destination) (net.Conn, error) if (protocol == "ws" && dest.Port == 80) || (protocol == "wss" && dest.Port == 443) { host = dest.Address.String() } - uri := protocol + "://" + host + wsSettings.GetNormailzedPath() + uri := protocol + "://" + host + wsSettings.GetNormalizedPath() conn, resp, err := dialer.Dial(uri, wsSettings.GetRequestHeader()) if err != nil { diff --git a/transport/internet/websocket/hub.go b/transport/internet/websocket/hub.go index 36275fe2..f0a39fc2 100644 --- a/transport/internet/websocket/hub.go +++ b/transport/internet/websocket/hub.go @@ -92,7 +92,7 @@ func (ln *Listener) listenws(address net.Address, port net.Port) error { go func() { err := http.Serve(listener, &requestHandler{ - path: ln.config.GetNormailzedPath(), + path: ln.config.GetNormalizedPath(), ln: ln, }) if err != nil {