-
Notifications
You must be signed in to change notification settings - Fork 17
Conversation
forward/fwd.go
Outdated
f.log.Debugf("vulcand/oxy/forward/websocket: Dialing insecure (non-tls) tcp connection to host %s", host) | ||
targetConn, err = net.Dial("tcp", host) | ||
dialer.TLSClientConfig = f.tlsClientConfig.Clone() | ||
//WebSocket is only in http/1.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please add a space after //
forward/fwd.go
Outdated
return | ||
} | ||
underlyingConn, _, err := hijacker.Hijack() | ||
|
||
//Only the targetConn choose to CheckOrigin or not |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please add a space after //
forward/fwd.go
Outdated
go replicate(targetConn.UnderlyingConn(), underlyingConn.UnderlyingConn(), "backend", "client") | ||
|
||
// Try to read the first message | ||
t, msg, err := targetConn.ReadMessage() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please rename t
to msgType
forward/fwd.go
Outdated
} | ||
|
||
go replicate(underlyingConn.UnderlyingConn(), targetConn.UnderlyingConn(), "client", "backend") | ||
<-errc | ||
} | ||
|
||
// copyRequest makes a copy of the specified request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please fix your comment // copyWebSocketRequest makes a copy of the specified web socket request
forward/fwd.go
Outdated
|
||
outReq.Header = make(http.Header) | ||
//gorilla websocket use this header to set the request.Host tested in checkSameOrigin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please add space after //
forward/fwd_websocket_test.go
Outdated
|
||
req.Write(conn) | ||
|
||
//First request works with 400 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please add a space after //
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
related to:
#17
#20
#21
#22
#26
#27
#28
#31