@@ -8,7 +8,6 @@ package derphttp
8
8
import (
9
9
"context"
10
10
"crypto/tls"
11
- "log"
12
11
"net"
13
12
"net/http"
14
13
@@ -21,7 +20,7 @@ func init() {
21
20
}
22
21
23
22
func dialWebsocket (ctx context.Context , urlStr string , tlsConfig * tls.Config , httpHeader http.Header ) (net.Conn , error ) {
24
- c , res , err := websocket .Dial (ctx , urlStr , & websocket.DialOptions {
23
+ c , _ , err := websocket .Dial (ctx , urlStr , & websocket.DialOptions {
25
24
Subprotocols : []string {"derp" },
26
25
HTTPHeader : httpHeader ,
27
26
HTTPClient : & http.Client {
@@ -30,11 +29,11 @@ func dialWebsocket(ctx context.Context, urlStr string, tlsConfig *tls.Config, ht
30
29
},
31
30
},
32
31
})
32
+ // We can't log anything here, otherwise it'll appear in SSH output!
33
33
if err != nil {
34
- log .Printf ("websocket Dial: %v, %+v" , err , res )
34
+ // log.Printf("websocket Dial: %v, %+v", err, res)
35
35
return nil , err
36
36
}
37
- // We can't log anything here, otherwise it'll appear in SSH output!
38
37
// log.Printf("websocket: connected to %v", urlStr)
39
38
netConn := wsconn .NetConn (context .Background (), c , websocket .MessageBinary )
40
39
return netConn , nil
0 commit comments