I'm currently trying to setup a tunnel mainly to use custom SNI for my connections, I have tried multiple methods but was not able to make it work, I've used Stunnel to listen on port 443 localhost and connect port 22 localhost but issue is the custom SNI doesn't seem to work. I've also tried using socks using Stunnel again but still the same issue,I think I'm missing something. So, if anyone has a solution or another method to reach this goal, please let me know.
Here is my Stunnel config for socks:
sslVersion = all
options = NO_SSLv3
options = NO_SSLv2
socket = l:TCP_NODELAY=1
socket = r:TCP_NODELAY=1
[sshd]
protocol = socks
cert = C:\Users\SLM INFORMATIQUE\AppData\Local\Programs\stunnel\config\localhost.cert
key = C:\Users\SLM INFORMATIQUE\AppData\Local\Programs\stunnel\config\localhost.key
accept = 1081
TIMEOUTclose = 0
[sshcli]
client = yes
sni = www.speedtest.net
cert = C:\Users\SLM INFORMATIQUE\AppData\Local\Programs\stunnel\config\localhost.cert
key = C:\Users\SLM INFORMATIQUE\AppData\Local\Programs\stunnel\config\localhost.key
accept = 1080
connect = 1081
TIMEOUTclose = 0
and here is the one for ssh:
sslVersion = all
options = NO_SSLv3
options = NO_SSLv2
socket = l:TCP_NODELAY=1
socket = r:TCP_NODELAY=1
[sshd]
;sslVersion = all
cert = C:\Users\SLM INFORMATIQUE\AppData\Local\Programs\stunnel\config\localhost.cert
key = C:\Users\SLM INFORMATIQUE\AppData\Local\Programs\stunnel\config\localhost.key
;CAfile = C:\Users\SLM INFORMATIQUE\AppData\Local\Programs\stunnel\config\mysite.cert
accept = 443
connect = 22
TIMEOUTclose = 0
;verify = 3
;debug = 7
[sshcli]
sslVersion = all
cert = C:\Users\SLM INFORMATIQUE\AppData\Local\Programs\stunnel\config\stunnel.pem
client = yes
sni = www.speedtest.net
accept = 2443
connect = 4443
TIMEOUTclose = 0
;debug = 7
If the issue is not clear enough or more info is needed, please let me know.
Tried tunneling internet traffic through ssh with SSL to use a custom SNI, and everything seems to be working except for the SNI
ps: I didn't use both config in the same time, I have tried each one independently