Inverse HTTP(S) proxy with SOCKS5 support — direct by default, route only what you choose.
dockprox is a local HTTP(S) proxy that dials destinations directly by default. Only hosts matched by a rule in your config are forwarded through a named upstream — SOCKS5, HTTP CONNECT, or explicit direct. It bridges HTTPS_PROXY-style clients (which speak HTTP CONNECT) to SOCKS5 upstreams, so tools like docker pull and az acr login transparently get a SOCKS5 path without needing native support.
The standard HTTPS_PROXY + NO_PROXY contract is "proxy everything; exclude via NO_PROXY" — opt-out, brittle for long allow-lists. dockprox inverts it: opt-in routing per host pattern. Public internet stays direct; only the registries you list (e.g. *.azurecr.io, internal Harbor, ghcr.io) go through your SOCKS5 jumphost.
See docs/guide/why.md for the full rationale.
Create dockprox.yaml:
listen: 127.0.0.1:3128
logLevel: info
upstreams:
jumphost:
type: socks5
addr: 127.0.0.1:1080
rules:
- match: "*.azurecr.io"
upstream: jumphostRun:
dockprox serve --config dockprox.yamlPoint your client at it:
export HTTPS_PROXY=http://127.0.0.1:3128
docker pull myregistry.azurecr.io/image:tagFlags can also override or supply config inline:
dockprox serve \
--listen 127.0.0.1:3128 \
--upstream jumphost=socks5://127.0.0.1:1080 \
--rule '*.azurecr.io=jumphost'Top-level keys (dockprox.schema.json):
| Key | Description |
|---|---|
listen |
Local proxy bind address (host:port). |
logLevel |
debug | info | warn | error. |
upstreams |
Map of named upstream proxies. |
rules |
Ordered list of match → upstream mappings. |
Upstream type values:
socks5—addr: host:port, optionalauth,tls,dns: local|remote.http— HTTP CONNECT proxy,url: http(s)://....direct— explicit passthrough.
Rule match: exact host (ghcr.io) or *.suffix wildcard (*.azurecr.io).
Full reference: docs/guide/configuration.md · JSON Schema: dockprox.schema.json.
- Azure Container Registry — route
*.azurecr.iothrough a corporate SOCKS5 jumphost; everything else direct. - GitHub Container Registry — send
ghcr.iothrough SOCKS5 only when on a restricted network. - Private Harbor / internal registries — proxy internal hosts while keeping Docker Hub and public mirrors direct.
Docker
docker run --rm foomo/dockprox:latest scanMulti-arch images (amd64, arm64) are published to Docker Hub.
mise
mise use github:foomo/dockproxor run directly:
mise x github:foomo/dockprox -- scanSee mise.jdx.dev.
Binary release
Download the archive for your OS/arch from the releases page and extract dockprox into your $PATH.
go install
go install github.com/foomo/dockprox/cmd/dockprox@latestRequires Go 1.26+.
Contributions are welcome! Please read the contributing guide.
Distributed under MIT License, please see license file within the code for more details.
