mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-01-05 00:47:51 -05:00
fix typo
This commit is contained in:
parent
8c499d8fd2
commit
7b28be596d
@ -7,7 +7,7 @@ import (
|
|||||||
"v2ray.com/core/transport/internet"
|
"v2ray.com/core/transport/internet"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (c *Config) GetNormailzedPath() string {
|
func (c *Config) GetNormalizedPath() string {
|
||||||
path := c.Path
|
path := c.Path
|
||||||
if len(path) == 0 {
|
if len(path) == 0 {
|
||||||
return "/"
|
return "/"
|
||||||
|
@ -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) {
|
if (protocol == "ws" && dest.Port == 80) || (protocol == "wss" && dest.Port == 443) {
|
||||||
host = dest.Address.String()
|
host = dest.Address.String()
|
||||||
}
|
}
|
||||||
uri := protocol + "://" + host + wsSettings.GetNormailzedPath()
|
uri := protocol + "://" + host + wsSettings.GetNormalizedPath()
|
||||||
|
|
||||||
conn, resp, err := dialer.Dial(uri, wsSettings.GetRequestHeader())
|
conn, resp, err := dialer.Dial(uri, wsSettings.GetRequestHeader())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -92,7 +92,7 @@ func (ln *Listener) listenws(address net.Address, port net.Port) error {
|
|||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
err := http.Serve(listener, &requestHandler{
|
err := http.Serve(listener, &requestHandler{
|
||||||
path: ln.config.GetNormailzedPath(),
|
path: ln.config.GetNormalizedPath(),
|
||||||
ln: ln,
|
ln: ln,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user