- clone https://github.com/dlundquist/sniproxy
- compile and install
- run with the provided config file (sniproxy.conf)
- /etc/hosts (replace x.x.x.x with server ip)
- or whatever dns solution you like
| # /etc/hosts | |
| x.x.x.x docker.com | |
| x.x.x.x www.docker.com | |
| x.x.x.x registry-1.docker.io | |
| x.x.x.x auth.docker.io | |
| x.x.x.x production.cloudflare.docker.com |
| user nobody | |
| group nogroup | |
| pidfile /var/run/sniproxy.pid | |
| resolver { | |
| # nameserver 127.0.0.1 | |
| nameserver 8.8.8.8 | |
| mode ipv4_only | |
| } | |
| error_log { | |
| filename /var/log/sniproxy.log | |
| priority notice | |
| } | |
| access_log { | |
| filename /tmp/sniproxy-access.log | |
| } | |
| listen 443 { | |
| proto tls | |
| fallback 127.0.0.1:1443 | |
| } | |
| table { | |
| docker\.com$ *:443 | |
| .*\.docker\.com$ *:443 | |
| .*\.docker\.io$ *:443 | |
| } |