Skip to content

Proxy

🛈 Note: Wrappers such as torsocks and proxychains are not supported and will not proxy connections. This is because rimgo is a pure Go binary that does not make connections with libc.

Imgur may permanently block certain IP ranges and providers (see relevant issues #87 and #163 for more information).

As such, you may need to setup a VPN or proxy to change the source IP address for outgoing requests when running rimgo. This page covers multiple ways of accomplishing this.

HTTP proxy

rimgo supports the HTTP_PROXY and HTTPS_PROXY environment variables, as Go's net/http automatically detects and uses them for requests.

Defining these variables using an .env file is recommended as configuration can be centralised and managed in one place.

Example configuration within .env

This example sets the HTTP_PROXY and HTTPS_PROXY environment variables within the .env file, assuming that an HTTP proxy is exposed at http://192.0.2.4:8888. Change this URL accordingly in your actual deployment.

bash
# ... existing .env configuration ...

# HTTP proxy configuration
HTTP_PROXY=http://192.0.2.4:8888
HTTPS_PROXY=http://192.0.2.4:8888

Gluetun

If you are using Docker, you can use Gluetun to connect the rimgo container to many different VPN providers.

The README on the Gluetun wiki covers how to setup Gluetun.

For instructions on connecting the rimgo container to Gluetun, see the Connect a container to Gluetun page.

Note that Gluetun can also function as an HTTP proxy, which is compatible with the previous methods of using one with rimgo natively.

System-wide VPN

You can also run a VPN system-wide to change your IP addresss and avoid blocking. Follow instructions from your VPN provider on how to set this up (OpenVPN or WireGuard implementations are typically used).