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

Question - Using Behind a Proxy #38

Closed
vrenjith opened this issue Apr 1, 2017 · 2 comments
Closed

Question - Using Behind a Proxy #38

vrenjith opened this issue Apr 1, 2017 · 2 comments

Comments

@vrenjith
Copy link

vrenjith commented Apr 1, 2017

Hi,

This is not really a bug report, but a question about how to use this bot behind a proxy to reach the mattermost server.

-Renjith

@loafoe
Copy link
Owner

loafoe commented Jul 14, 2017

@vrenjith there is no support for this, unless the proxy is completely transparent.

@loafoe loafoe closed this as completed Jul 14, 2017
@vicrem
Copy link

vicrem commented Jun 8, 2019

Hi,

I know that this is a +2 year thread but its always good for documentation and hopefully it helps someone else :)

This is how I managed to route traffic through socks5 and mattermost-client (which is used by matteruser).

You need to have mattermost-client installed: npm install -g mattermost-client
Same for socks-proxy-agent: npm install socks-proxy-agent

Edit: node_modules/mattermost-client/src/client.js

On top add following:
const SocksProxyAgent = require('socks-proxy-agent');
const socks_server = 'socks5://1.2.3.4:1234';
const endpoint = 'wss://url_to_mattermost/api/v4/websocket';

On line 254:
// Route through proxy / socks
var agent = new SocksProxyAgent(socks_server, options);
this.ws = new WebSocket(endpoint, {agent: agent})
//this.ws = new WebSocket(this.socketUrl, options);

//Victor

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

No branches or pull requests

3 participants