Skip to content

Commit 3a2792d

Browse files
committed
fix(alpn): use alpn both for test and real connection
1 parent bc4aeb3 commit 3a2792d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sclient.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ func (t *Tunnel) DialAndListen() error {
2929
conn, err := tls.Dial("tcp", remote,
3030
&tls.Config{
3131
ServerName: t.ServerName,
32-
InsecureSkipVerify: t.InsecureSkipVerify,
3332
NextProtos: t.NextProtos,
33+
InsecureSkipVerify: t.InsecureSkipVerify,
3434
})
3535

3636
if err != nil {
@@ -145,6 +145,7 @@ func (t *Tunnel) handleConnection(remote string, conn netReadWriteCloser) {
145145
sclient, err := tls.Dial("tcp", remote,
146146
&tls.Config{
147147
ServerName: t.ServerName,
148+
NextProtos: t.NextProtos,
148149
InsecureSkipVerify: t.InsecureSkipVerify,
149150
})
150151

0 commit comments

Comments
 (0)