Skip to content
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

Allow to set up eBot behind NAT. #103 #104

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Janhouse
Copy link

@Janhouse Janhouse commented Jul 5, 2016

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

@Janhouse
Copy link
Author

Janhouse commented Jul 5, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant