How can I use a proxy in my code?

I need to use a proxy in my code.

Importance Preface if you are using this at school

Replit is currently experiencing a lot of backlash for allowing students to use proxies to bypass school restrictions. This puts replit in a bad light and causes replit to be banned from schools through no fault of its own. Please respect this

Other than school

Sorry to disappoint you, but the usage of proxies is unadvisable on Replit.
Item 24 of Section 4 of the Replit Terms of Service prohibits:

Use the Service to create a proxy with the purpose of circumventing any firewall or other access control measure

Therefore, Replit is likely to automatically block any Repl containing a proxy, and those that are not blocked automatically may be reported. This does not specifically forbid all proxies, but due to this most proxies are generally taken down.

Additionally, Replit tends to automatically kill any repls that attempt to access HTTP proxies.


don’t go to school, I need to set the ip of another country, I don’t live in the USA! Set me the default ip of my country

Read the whole thing, it does not really matter if it is for school. Replit blocks almost all proxies. (Kinda hard to tell, but afaik the school thing only applies to that front section)

1 Like

Set me the default ip of my country

I don’t really understand what you mean? Set your code’s IP? That would still be a proxy?

1 Like

I run the code and replit assigns its ip to me, but I don’t need it


Your code is running on Replit’s machines, not your own, so it will always have Replit’s IPs.


I’m sorry, what do these ‘proxies’ mean?

If you don’t know what a proxy is, you shouldn’t need to worry about it. If you do, the limits are defined in the reply.