Skip to content

Commit

Permalink
Revert "fix: the path of ws when using 0-rtt feature in V2board"
Browse files Browse the repository at this point in the history
This reverts commit 9546fa3
  • Loading branch information
crossfw committed Jan 16, 2022
1 parent b21100f commit 138eb64
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions pkg/V2boardAPI/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"github.com/crossfw/Air-Universe/pkg/structures"
"io/ioutil"
"net/http"
"strings"
"time"
)

Expand Down Expand Up @@ -82,14 +81,7 @@ func parseVmessRawInfo(rtnJson *simplejson.Json, node *structures.NodeInfo, clos

switch node.TransportMode {
case "ws":
wsPath := inboundInfo.Get("streamSettings").Get("wsSettings").Get("path").MustString()
realPathIndex := strings.Index(wsPath, "?")

if realPathIndex != 0 {
node.Path = string([]byte(wsPath)[0:realPathIndex])
} else {
node.Path = wsPath
}
node.Path = inboundInfo.Get("streamSettings").Get("wsSettings").Get("path").MustString()
node.Host = inboundInfo.Get("streamSettings").Get("wsSettings").Get("headers").Get("Host").MustString()
}

Expand Down

0 comments on commit 138eb64

Please sign in to comment.