Skip to content

Instantly share code, notes, and snippets.

@esmaeelE
Last active April 18, 2025 17:00
Show Gist options
  • Select an option

  • Save esmaeelE/c5117fa88420900157f8101ac0bf6318 to your computer and use it in GitHub Desktop.

Select an option

Save esmaeelE/c5117fa88420900157f8101ac0bf6318 to your computer and use it in GitHub Desktop.
Use Proxy for some programs to bybass intenet restriction on IRAN.

Install

sudo apt install proxychains

Config

[ProxyList]
# add proxy here ...
# meanwile
# defaults set to "tor"
# socks4 	127.0.0.1 9050
socks5 	127.0.0.1 9999

We run ssh tunnel to obraint socks5 proxy

ssh -D 0.0.0.0:9999 bsd -N

So we have a socks proxy. We can pass Internet traffics through this tunnel.

Run

proxychains lynx https://jadi.net

Proxychaint not recognize bash aliases a way to use alias behind proxy is to run all bash shell with proxychains

proxychains bash

Use proxy in podman

export http_proxy=socks5://127.0.0.1:9999 https_proxy=socks5://127.0.0.1:9999
podman pull hello-world

Above command will proxy podman connection and bypass docker.io restrictions. Or set it on config file

$ cat ~/.config/containers/containers.conf 
[engine]
env = [ "http_proxy=socks5://127.0.0.1:9999", "https_proxy=socks5://127.0.0.1:9999"]

Use our proxy to download from restricted or filtered websites place or download links inside a text file i.e list then run aria2c behind proxychains like this

$ proxychains4 aria2c -s16 -x16 -i list

Simple proxys

sudo simpleproxy -L 0.0.0.0:9999 -R 127.0.0.1:5173

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment