client: support websocket over TLS (wss://).
This commit is contained in:
parent
db52f07d34
commit
4e6e692b30
@ -455,7 +455,12 @@ func (cm *ConnectionManager) realConnect() (net.Conn, error) {
|
|||||||
protocol := cm.cfg.Protocol
|
protocol := cm.cfg.Protocol
|
||||||
if protocol == "websocket" {
|
if protocol == "websocket" {
|
||||||
protocol = "tcp"
|
protocol = "tcp"
|
||||||
dialOptions = append(dialOptions, libdial.WithAfterHook(libdial.AfterHook{Hook: frpNet.DialHookWebsocket()}))
|
dialOptions = append(dialOptions, libdial.WithAfterHook(libdial.AfterHook{
|
||||||
|
// make sure to do the websocket handshake after the TLS handshake,
|
||||||
|
// to support websocket over TLS.
|
||||||
|
Priority: libdial.WithTLSConfigPriority + 1,
|
||||||
|
Hook: frpNet.DialHookWebsocket(),
|
||||||
|
}))
|
||||||
}
|
}
|
||||||
if cm.cfg.ConnectServerLocalIP != "" {
|
if cm.cfg.ConnectServerLocalIP != "" {
|
||||||
dialOptions = append(dialOptions, libdial.WithLocalAddr(cm.cfg.ConnectServerLocalIP))
|
dialOptions = append(dialOptions, libdial.WithLocalAddr(cm.cfg.ConnectServerLocalIP))
|
||||||
|
Loading…
Reference in New Issue
Block a user