Skip to content

Commit

Permalink
websocket: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
fatedier committed Aug 10, 2018
1 parent 941ac25 commit 0762302
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions server/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ func NewService() (svr *Service, err error) {
}

// Listen for accepting connections from client using websocket protocol.
websocketPrefix := []byte("GET /%23frp")
websocketPrefix := []byte("GET " + frpNet.FrpWebsocketPath)
websocketLn := svr.muxer.Listen(0, uint32(len(websocketPrefix)), func(data []byte) bool {
return bytes.Equal(data, websocketPrefix)
})
Expand All @@ -165,8 +165,8 @@ func NewService() (svr *Service, err error) {
err = fmt.Errorf("Create vhost http listener error, %v", err)
return
}
go server.Serve(l)
}
go server.Serve(l)
log.Info("http service listen on %s:%d", cfg.ProxyBindAddr, cfg.VhostHttpPort)
}

Expand Down
2 changes: 1 addition & 1 deletion utils/net/websocket.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var (
)

const (
FrpWebsocketPath = "/#frp"
FrpWebsocketPath = "/~!frp"
)

type WebsocketListener struct {
Expand Down

0 comments on commit 0762302

Please sign in to comment.