eBot-CSGO
eBot-CSGO copied to clipboard
Allow to set up eBot behind NAT. #103
Fixes #103 by introducing new configuration variables. I'm now using eBot behind NAT in lxc container.
I also managed to set up HTTP proxy with web socket proxying using Apache, so access to port 12360 can be limited only to CS:GO servers.
Here is the Apache config I use:
<VirtualHost *:80>
ServerName ebot.example.com
ServerAdmin [email protected]
DocumentRoot /var/www
RewriteEngine On
RewriteCond %{HTTP:Upgrade} =websocket
RewriteRule /socket.io/(.*) ws://ebot.lxc:12360/socket.io/$1 [P,L]
RewriteCond %{HTTP:Upgrade} !=websocket
RewriteRule /socket.io/(.*) http://ebot.lxc:12360/socket.io/$1 [P,L]
ProxyPass /socket.io http://ebot.lxc:12360/socket.io
ProxyPassReverse /socket.io http://ebot.lxc:12360/socket.io
ProxyPass / http://ebot.lxc/
ProxyPassReverse / http://ebot.lxc/
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Similar setup should also allow using eBot in Docker.