moby / vpnkit

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

HTTP: add --http-proxy-api <path> #598

Closed djs55 closed 2 years ago

djs55 commented 2 years ago

This adds a third HTTP proxy configuration option. We already have:

  1. command-line
  2. configuration file

This adds an HTTP server. The caller can run:

vpnkit --http-api-path /tmp/foo.sock --ethernet /tmp/ethernet.sock

and then

curl --unix-socket /tmp/foo.sock http://localhost/http_proxy.json

and

curl -X POST -d json --unix-socket /tmp/foo.sock http://localhost/http_proxy.json