feat: add page about setting up with a proxy #1623
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Please describe the changes this PR makes and why it should be merged:
I encountered this requirement when trying to deploy a Discord bot on my workplace's Kubernetes cluster. After I found a solution in #djs-questions (https://discord.com/channels/222078108977594368/1358110617831211189) I decided to adopt it a bit differently and make a guide page about it so the info can be read by others as well.
Note that the reason I did not opt for using
node-global-proxy
as the linked post from #djs-questions uses is because that library is compiled from TypeScript to Node <10 and is poorly optimised for ESM as a result of that in that it requires eitherrequire
syntax, orimport { default as proxy } from 'node-global-proxy';
, which are both ESLint rule violations when using Discordjs' owneslint-config-neon
. Specifically, the former because it's require-syntax, and the latter because ofunicorn/no-named-defaults
. Since the library itself is just a tiny wrapper aroundglobal-agent
(andglobal-tunnel-ng
for Node versions < 10) and Discord.js does not target such old Node versions, we can instead recommend to useglobal-agent
directly.