vi / websocat

Command-line client for WebSockets, like netcat (or curl) for ws:// with advanced socat-like functions
MIT License
6.72k stars 257 forks source link

Specify TLS hostname separately from connect hostname #232

Closed WxNzEMof closed 2 months ago

WxNzEMof commented 2 months ago

Hi,

Is it possible to specify the address to connect to separately from the address that is verified against the server's TLS certificate?

Like curl's --resolve or --connect-to?

Thanks!

vi commented 2 months ago

There is --tls-domain option for the case where you don't use convenient wss:// URL, but compose the stack manually using overlays.

websocat ... ws-c:tls:tcp:1.2.3.4:443 --tls-domain=check_tls_certificate_with_this.com --ws-c-uri=wss://whatever_goes_in_host_header.com/path
WxNzEMof commented 2 months ago

Ah, thank you! I missed the --help=long hint!