Routing connection through proxy/vpn

Hey guys,

Wrote a program that sends requests to an API which is unfortunately geo-locked to certain countries only. Neither the US or India (Repl servers) are in this list.

Developing locally, I can access the API without issues (UK).

I have tried to install openvpn in my environment however, connections to a VPN are failing (I think it’s to do with UDP and TCP ports being blocked or weirdly handled). There is no documentation about this either.

Anyone encountered similar issues and has found ways to resolve this?

Many thanks!

Thanks! - I’m so far finding it an amazing tool but just trying to get used to how things work and the limitations (for example, my question!)

1 Like

Bump and update:
I have managed to get as far as getting a TCP connection attempt using openvpn, however, the connection fails as the TUN/TAP device is not available.

I am not too familiar with Nix and the containers used in replit, but wondering if this is something that can be enabled on the replit.nix file?

Further bump and update:

I have given up on the idea of tunneling the connection through openVPN and I am now trying to make requests through a proxy address.

It seems Replit doesn’t like these either; as soon as I make a request that passes through a proxy, my gets put on a timeout and a message popups about going against ToS.

From reading the ToS, it seems proxies themselves are not disallowed, it’s more the development or running of a proxy on replit that’s the problem. Am I wrong in thinking that the use of proxies for making API calls to servers that only take regional or national requests is allowed?

How can I proceed from here?

Maybe proxy traffic over SSH or use tor

Well… if I understand correctly, I think you can do this:

so that means if you change the server location then it might work.

Oh, and by the way, no. Using a proxy the way you are using it is fine, so maybe contact support or whatever it says in the error the project gives. Proxies are not allowed assuming you are bypassing restriction, but you don’t seem to be doing that, so your project is fine.