wstunnel | sockets tunnel for HTTP requests | HTTP library
kandi X-RAY | wstunnel Summary
kandi X-RAY | wstunnel Summary
WStunnel creates an HTTPS tunnel that can connect servers sitting behind an HTTP proxy and firewall to clients on the internet. It differs from many other projects by handling many concurrent tunnels allowing a central client (or set of clients) to make requests to many servers sitting behind firewalls. Each client/server pair are joined through a rendez-vous token.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of wstunnel
wstunnel Key Features
wstunnel Examples and Code Snippets
Community Discussions
Trending Discussions on wstunnel
QUESTION
ANSWER
Answered 2021-May-30 at 02:24The key was to have proxy_wstunnel
mod active >_<
In case it helps anyone...
QUESTION
I want to implement Laravel-WebSocket + pusher substitute (https://github.com/beyondcode/laravel-websockets) with Laravel-echo on an Azure VM with apache2 reverse proxy. However, no matter what I tried, they just can't connect. It's always between error 404, 502 and 500 when a client-side listener tries to connect.
This VM only allows entry through 80 and 443. Therefore, I did reverse proxy which redirects '/WebSocket' to http://127.0.0.1:6001 (where the WebSocket runs. TCP) The server is under https. I've tried to modify server .conf file to no avail. I've tried to enable/disable SSL and encrypted as well. I tried to directly access 127.0.0.1:6001 within the VM using elinks, but with http I got 'error connecting to socket' with https I got 'SSL error'. I'm fairly sure that the request at least reached the machine, as if I shut down the WebSocket server the error changes into 503 Service not available. Also, I can see apache2 error logs as requests being made. Most of the time it is 502 proxy error. (AH01102: error reading status line from remote server 127.0.0.1:6001) If I tweak SSL settings it generally changes to 404, which I take as a sign of incorrect certificate/key in this case. The firewall is open.
I've tried every guide I can find. Most of them are about nginx, which I can't change to. If possible I would rather not set up another virtual host.
This is in websocket.php:
...ANSWER
Answered 2019-Jun-26 at 01:36OK, this issue has finally been resolved! The way to do it is to set up a separate server (https) as a dedicated WebSocket server. Please follow this guide: https://42coders.com/setup-beyondcode-laravel-websockets-with-laravel-forge/
It looks like the setting has to be on https or the WebSocket server can't receive a response from the backend. Also, I encountered a strange problem where Pusher.php in vendor/pusher/pusher-php-server misses about 400 lines of code, several other files are also missing despite it has the same version of this package (~3.0) as my local implementation. If you get call to undefined method
when the WebSocket server receives broadcast event, this is likely the reason. If you can't connect to the websocket on Chrome, but you can on firefox, you need to disable verify-peers, please check the section on Laravel Velvet in the Laravel-Websockets document for more details (even if you don't use Laravel Velvet)
QUESTION
When I tried to connect to Spring Boot web socket from Android stomp client, it is not connecting and the Catalina log shows
...ANSWER
Answered 2019-Feb-20 at 21:42I got the answer from this server fault lin. I have to add
QUESTION
I am trying to redirect traffic from Apache to Tomcat on CentOs server by using mod_proxy and mod_proxy_wstunnel modules. HTTP traffic is redirected without problems but I am not able to successfully redirect websocket traffic with any configuration I tried so far. It gives me 200 response code instead of 101.
I have read a lot of similar questions, but haven't find any solution yet. These one have similar problems. Question 1, Question 2
I'm using Apache Server 2.4.6 - > Apache Tomcat 7.0.92 - > Java Application with Spring and javax socket implementation.
Here is my modules:
Here is my httpd config:
...ANSWER
Answered 2019-Feb-06 at 13:10Finnally, i have done it.
In my case, there is no need to put RewriteConds and RewriteRules. All was need is to proxy request to actual backend (Apache Tomcat) by adding into httpd.conf
QUESTION
Having Apache (2.4.29) configured as reverse proxy for WebSocket requests with mod-proxy-wstunnel
:
ANSWER
Answered 2018-Aug-15 at 12:33No, it's not currently possible to multiplex websockets connections this way.
In httpd trunk (2.5.x) there are experimental options to allow these connections to go asynchronous after idle for some time. But it is unlikely to be something that would be backported to 2.4.x and there is not really a stable 2.6.x on the horizon at the moment.
QUESTION
I am new to WebSocket
world and even after a week, I still could not find how to use it with PHP
without using any 3rd Party Library. Or not sure if it is even possible.
I have 3 questions,
1) Do we must need to use some 3rd Party APIs or Libraries like Ratchet, PHP-Push-WebSocket or PHP WebSocket to enable PHP to communicate over WebSocket protocol?
2) If your answer to above question is yes then what is the advantage/purpose of using Apache's mod_proxy_wstunnel
?
3) If I use any PHP WebSocket 3rd Party Library, then do I still need to enable and use Apache's mod_proxy_wstunnel
? If No, then again what is the purpose of Apache's mod_proxy_wstunnel?
I went through this Using go-websocket behind Apache mod_proxy_wstunnel. In this question, the OP has indicated some go-websocket but unfortunately the link is giving 404 Error and hence I cannot understand if the user has used any 3rd Party API.
Any help would be highly appreciated. Thanks in advance.
...ANSWER
Answered 2017-Oct-14 at 12:29PHP is not created for WS. Of course you can do this, but it is full of while (true)
and fsock_open
[*]. And you have to have access to the shell to run the WS-server with php-cgi. (usually)
Choose a language that supports threads / asynchronous communication. Now on the top is Node.js. In addition, better use dedicated libraries to support older browsers, etc. If you are thinking about alternatives to ajax then you can use socket.io. If you want to create one-to-all communication (eg chat, broadcast messaging), go one step further and use one of the Bayeux
implementations, for example: Faye.
The mod_proxy_wstunnel
extension adds an extra layer to the WS server. Depending on the configuration, it can support DDoS, queue, load-balancing, local port swapping, and https support. But better use this for nginx.
So, for test you don't need mod_proxy_wstunnel
, and on production, you should add an extra layer of security, eg NGINX ws tunelling.
[*] Sorry, I made some mistakes. PHP has native support for WebSockets. That content is going to set you negatively to WS in PHP.
Websockets are events, and PHP is poorly managed with it.
QUESTION
I have already looked at this question and various others on both SO and related sites, but none of the solutions suggested so far have worked.
I am running tty.js
on localhost:8080
and verified that websockets work correctly when hitting that port directly. Now, I am attempting to connect to tty.js
through an Apache reverse proxy. The application can work without using Websockets, but I am trying to understand why Websockets do not work.
Here is my Apache configuration for testing on localhost
with a fresh Apache build from source.
ANSWER
Answered 2017-Jan-03 at 05:30After several hours of running Apache in a debugger, I discovered that Apache was faithfully passing all the requests that matched the given path through mod_proxy, including the following one.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install wstunnel
www.example.com will be behind a firewall running a simple web site on port 80
wstun.example.com will be outside the firewall running the tunnel server
client.example.com will be outside the firewall wanting to make HTTP requests to www.example.com through the tunnel
Release branches are named '1.N.M' and a '1.N' package is created with each revision as a form of 'latest'. Download the latest Linux binary and extract the binary. To compile for OS-X or Linux ARM clone the github repo and run make depend; make (this is not tested).
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page