IrineSistiana/simple-tls

-no-tls not working

liujunhui2 opened this issue · 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

./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

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,
		}