simple-tls icon indicating copy to clipboard operation
simple-tls copied to clipboard

-no-tls not working

Open liujunhui2 opened this issue 2 years ago • 2 comments

./simple-tls -s -no-tls -ws -b :80 -d 127.0.0.1:22 -n example.com

client: simple-tls -ws -b 127.0.0.1:2222 -d example.com:80 -n example.com

client output on connection: failed to dial server connection: failed to WebSocket dial: failed to send handshake request: Get "https://example.com": x509: certificate signed by unknown authority

Conclusion: with -no-tls, server is still sending certificate

simple-tls v0.7.0-0-gdf0b4cc (go version: go1.17.6, os: linux, arch: amd64) Linux Centos 7

liujunhui2 avatar Sep 22 '22 02:09 liujunhui2

./simple-tls -s -no-tls -ws -b :80 -d 127.0.0.1:22 -n example.com

client: simple-tls -ws -b 127.0.0.1:2222 -d example.com:80 -n example.com

client output on connection: failed to dial server connection: failed to WebSocket dial: failed to send handshake request: Get "https://example.com": x509: certificate signed by unknown authority

Conclusion: with -no-tls, server is still sending certificate

simple-tls v0.7.0-0-gdf0b4cc (go version: go1.17.6, os: linux, arch: amd64) Linux Centos 7

update: Connection successful if client specify -no-verify

Conclusion: with -no-tls, server is still sending certificate

liujunhui2 avatar Sep 22 '22 03:09 liujunhui2

Update: main.go:277, noTLS is not assigned

		server := core.Server{
			BindAddr:      bindAddr,
			DstAddr:       dstAddr,
			Websocket:     ws,
			WebsocketPath: wsPath,
			Cert:          cert,
			Key:           key,
			ServerName:    serverName,
			Auth:          auth,
			TFO:           tfo,
			IdleTimeout:   timeout,
		}

liujunhui2 avatar Sep 22 '22 03:09 liujunhui2