matrix-appservice-discord
matrix-appservice-discord copied to clipboard
Add support for http(s) proxy
Hi,
I am trying to deploy the bridge on a restrained environment, where I don't have direct access to Internet. I need the bridge to be able to use an http(s) proxy to talk to discord.
I you have some clues for me I can try to do a PR.
Thanks.
I'm not sure discord.js supports traditional HTTP proxying. You could however reverse proxy Discord, and have the bridge pass the relevant HTTP options when creating a Discord.Client. Your proxy would have to rewrite the /api/vX/gateway response to contain a websocket URI that points to your proxy, I think.
I actually managed to make it works by running it with proxychains. The websocket works perfectly with an HTTPS proxy.