eBot-CSGO icon indicating copy to clipboard operation
eBot-CSGO copied to clipboard

Allow to set up eBot behind NAT. #103

Open Janhouse opened this issue 9 years ago • 1 comments

Fixes #103 by introducing new configuration variables. I'm now using eBot behind NAT in lxc container.

Janhouse avatar Jul 05 '16 16:07 Janhouse

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.

Janhouse avatar Jul 05 '16 16:07 Janhouse