moby / vpnkit

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

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

Closed djs55 closed 1 year ago

djs55 commented 1 year 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