Using proxies
Hi there! Im trying to make a Minecraft bot and i cant figure out how can i route its trafic through a proxy. This is my code:
2 Replies
Since you're using Node packages, you'll have to try using an environment variable, although I'm not sure if it covers Node packages
There's
HTTP_PROXY
and HTTPS_PROXY
. Take a look here: https://docs.deno.com/runtime/reference/env_variables/#special-environment-variables
If you were using only Deno packages, you could alternatively set the proxy in Deno.createHttpClient
Deno
Environment variables
A guide to working with environment variables in Deno. Learn about Deno.env API, .env file support, CLI configuration, and special environment variables that control Deno's behavior.
If that doesn't work, I think you'll have to configure the proxy at OS level