-
Notifications
You must be signed in to change notification settings - Fork 373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question] How to setup wss with domain name #150
Comments
indeed, |
By the way, when your setup is done if you happen to write an article/blog post/page about it. |
I did used the instructions you mentioned and I was able to bypass firewall with the most strict rules. Server Side Client Side It is working with SSL/TLS FULL mode "Encrypts end-to-end, using a self signed certificate on the server" on cloudflare settings. It means data encryption is applied only with my key/cert file located in my remote host. As you mentioned above if I was to use FLEXIBLE mode "Encrypts traffic between the browser and Cloudflare" I should use: Server Side: Client Side which is not recommended because we want end to end encryption even when data is being transfered from reverse proxy/CDN (Cloudflare) to remote host. I can not thank you enough for help and time you spent on this issue at hand. :-D There is one more thing to make it a 24/7 and make WSTunnel be persistence and there is no need for me to ssh into remote host and run WSTunnel again in case whenever the process is killed or host gets rebooted.
|
When the setup is done completely I will make a post and refer wstunnel project with complete instruction on this "VPN over WSTunnel" concept. |
If the traffic you are tunneling is the one from openvpn just doing the flex mode is enough. The reasoning is that OpenVPN traffic is already secure by itself, you just need wstunnel to create a hole in your firewall, to allow this secure traffic. So no need to add yet another layer and adding TLS on top of it. Openvpn by itself is secure, the target is just the minimum overhead to punch a hole in the firewall. You can add tls later if you don't manage anymore to bypass your firewall, but if it is ok without it, no need to worry Just to note also that client >>> data with cloudflare tls >>>>> [ cloudflare unwraping its tls] >>>>>> data with your server tls >>>>> your server unwraping your tls |
Hello, My work about this concept is almost done, just one more step is left which is how to have WSTunnel run 24/7, everytime I logout of remote host, WSTunnel process gets killed after few minutes. I will create a post about this whole work after I regain my health again in few days. |
I was tinkering with some stuff and trying it on some super restricted network, I did come across this issue, trying to connect directly to remote host (without cloudflare/CDN/...) I was unable to connect
|
like that i can't tell, the connection is just cut in the middle. Try to do a tcpdump/network capture on client and server to see. |
Finally I discovered the solution that is simply just don't use that ISP as your internet provider, because they are actively dropping all kind of WS/WSS connections that they assume it is not really web intended connection, They are dropping the connection after 5seconds of initial handshake/connection with destination. |
You should try to setup Cloudflare in strict mode, with wstunnel server configured with a valid tls certificate (you can use let's encrypt for that or https://www.sslforfree.com/ or https://zerossl.com/) when under true tls, it is not possible to distinguish http from websocket. After maybe, they just hard cut connection that push data to the server after the initial payload. If it is that, there is no real solution. Thank you for the blog post :) |
It should be the same indeed. Wstunnel when used in secure mode server side |
Hello again, hope you had a good day.
Trying to use my WSTunnel (TLS enabled) which is encapsuling my openconnect/openvpn connection by using domain name.
I did register my domain in Cloudflare CDN and right now I am trying to connect over reverse proxy/CDN.
The point is to be completely anonymous for ISP and network watcher/censorship.
VPN server agent is listening on :
./wstunnel --tlsCertificate=certificate.crt --tlsKey=private.key --server wss://0.0.0.0:443
p.s: Port 443 https and http and websocket traffic is allowed on CDN and firewall rules are allowed on remote host.
wstunnel --localToRemote=127.0.0.1:2020:mydomain.name:333 wss://mydomain.name:443 --verbose
and I get this debug info:
with this code :
wstunnel --localToRemote=127.0.0.1:2020:0.0.0.0:333 wss://mydomain.name:443 --verbose
or this one
wstunnel --localToRemote=127.0.0.1:2020:127.0.0.1:333 wss://mydomain.name:443 --verbose
I get this debug info:
Thank you in advance for your help.
The text was updated successfully, but these errors were encountered: