Comments (7)
@imatasic if I understand correctly, gwsocket could help you achieve that. goaccess uses gwsocket on the back-end. There are some guides on how to get this done with apache, take a look at this guide.
from gwsocket.
It shouldn't be too bad, I'm guessing the work involved would be to get rid of the gwserver.c file. I can look into it, not sure I can do it soon but I can certainly check it out.
Also, I'm thinking you could include those files in your project and work directly with the header files. Probably not as convenient but perhaps a quick solution.
from gwsocket.
That would be excellent. I took a look at how the current Makefile is generated and decided it would take me too long to get up to speed on what was going on. Yes this would remove the need for gwserver.c however most of the code would be move across in particular the callbacks to support strict mode, parsing of parameters would not be needed. My current plan is to write a simple makefile which will create a libgwsocket.so.
If its ok with you I would like to update the code to remove many of the issues that Coverity (https://www.synopsys.com/software-integrity/security-testing.html) is finding, mainly NULL pointer checking etc. This is a server so security is important. Happy to push changes and once I have completed along with my code that demonstrates how to use if you wish.
from gwsocket.
That would be awesome. Thanks!
from gwsocket.
would this be something that could be used with apache web server?
from gwsocket.
@imatasic what are you trying to achieve?
from gwsocket.
@allinurl Well, I am struggling to get the boilerplate configuration for apache to proxy the websocket properly. Sometimes I have to use both proxypass and rewrite directive, sometimes only proxypass works and i think this might impact the performance.
not to mention it takes up an available connection from apache, so I have to increase that number as well.
example:
...
ServerName site.example.com
ProxyPreserveHost On
AllowEncodedSlashes NoDecode
SSLProxyEngine On
ProxyPass /wss wss://192.168.14.20:8080/
ProxyPassReverse /wss wss://192.168.14.20:8080/
...
RewriteEngine on
RewriteCond %{HTTP:UPGRADE} ^WebSocket$ [NC]
RewriteCond %{HTTP:CONNECTION} ^Upgrade$ [NC]
RewriteRule .* wss://192.168.14.20:8080%{REQUEST_URI} [P]
...
This is the only way i found that I can access the websocket from both inside the network, and from the internet when I access https://site.example.com.
Maybe I am doing this completely wrong.
Is there a better way to do this with nginx?
from gwsocket.
Related Issues (20)
- Using in multible domains on one port HOT 3
- Fails to compile with OpenSSL 1.1.0 or newer HOT 3
- gwsocket+apache: status 200 instead of 101 HOT 2
- Strict protocol parsing HOT 7
- Support for multiple instances? HOT 8
- Is webshell considered to be integrated into the project? HOT 2
- Feature request - client version of gwsocket (same style as gwsocket, but client, not server)
- " unrecognized option `--ssl-cert' " HOT 13
- make fails on Ubuntu 20. HOT 3
- TAR Download broken HOT 2
- -Wno-missing-field-initializers on SPARC machine HOT 5
- Help with FIFO Error. Bad address HOT 11
- How can I get the same text formatting effect as on the website? HOT 2
- gwsocket.io: :( Nope, the connection is out. Try again later! HOT 2
- Typo on the webpage HOT 1
- windows bianries?
- API to disconnect client in strict mode HOT 3
- feedback
- No data when starting to write before first client is connected HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gwsocket.