vpnkit
vpnkit copied to clipboard
Outdated documentation for Experimental Transparent Proxy Feature
I am having issues enabling the experimental Transparent proxy feature. The documentation states these instructions to this feature:
cd ~/Library/Containers/com.docker.docker/Data/database/
git reset --hard
mkdir -p com.docker.driver.amd64-linux/slirp
echo -n true > com.docker.driver.amd64-linux/slirp/enable-http-intercept
git add com.docker.driver.amd64-linux/slirp/enable-http-intercept
git commit -s -m 'Enable HTTP interception'
However it appears the "database" folder has been deprecated since version 7.12. I have tried adding the folders/configurations listed in the above instructions myself but have had no luck with getting containers to take my host machine's system configurations.
Does this mean this feature has also been deprecated? This is a really amazing feature that would save my team a great deal of proxy configurations since we work behind a corporate proxy.
Steps to Reproduce:
- Follow "Enabling the proxy in recent Docker for Mac builds" instructions: https://github.com/moby/vpnkit/blob/master/docs/transparent-http-proxy.md
- Set system proxy on host machine to corporate or local proxy for testing(set system proxy setting to point to mitmproxy so you can monitor outgoing traffic)
- Startup centos container
docker run -it --rm centos
- Run
curl www.google.com
from within container, which returns result "curl: (6) Could not resolve host: www.google.com." Notice mitmproxy did not pickup the call to http://www.google.com
System: macOS High Sierra Version 10.13.6 Docker for Mac CE Edge: Engine 18.09.0
@leotronolone have you found any alternatives to this solution? Having the same problem.
@DiegoGallegos4 I found this one https://github.com/docker/for-mac/issues/2610
I would like to know how to enable/disable the transparent proxy feature of VPNKit. In some cases, it causes us issues Link. It also seems that this feature is enabled by default for Docker Desktop.