Describe the bug
As per documentation when specifying SNI you also need to include the HOST header.
--tls-sni-override <DOMAIN_NAME>
Domain name that will be use as SNI during TLS handshake
Warning: If you are behind a CDN (i.e: Cloudflare) you must set this domain also in the http HOST header.
or it will be flagged as fishy and your request rejected
Describe the bug As per documentation when specifying SNI you also need to include the HOST header.
However the host header is already added here: https://github.com/erebe/wstunnel/blob/7cafa674ba8ad6d7e2cf8357af73074d0ee53e17/src/tunnel/client.rs#L61
Resulting in two HOST headers int he request, thus failing to connect.
To Reproduce Run wstunnel
wstunnel client wss://cloudflareIP -L tcp://8085:127.0.0.1:8085 -p http://127.0.0.1:8888 -c 3 --http-upgrade-path-prefix mysecretpath --tls-sni-override myhost --http-headers "Host: myhost"
Expected behavior Only one host header, default but when specified by the headers parameter it should override existing headers.