moby / vpnkit

A toolkit for embedding VPN capabilities in your application
Apache License 2.0
1.1k stars 187 forks source link

Outdated documentation for Experimental Transparent Proxy Feature #448

Open leotronolone opened 5 years ago

leotronolone commented 5 years ago

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:

  1. Follow "Enabling the proxy in recent Docker for Mac builds" instructions: https://github.com/moby/vpnkit/blob/master/docs/transparent-http-proxy.md
  2. 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)
  3. Startup centos container docker run -it --rm centos
  4. 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

DiegoGallegos4 commented 5 years ago

@leotronolone have you found any alternatives to this solution? Having the same problem.

abashev commented 5 years ago

@DiegoGallegos4 I found this one https://github.com/docker/for-mac/issues/2610

Scherlac commented 1 year ago

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.