haproxytech / haproxy-lua-http

Simple Lua HTTP helper && client for use with HAProxy.
Apache License 2.0
56 stars 23 forks source link

Feature Request: Support UNIX sockets #14

Open markslater opened 3 years ago

markslater commented 3 years ago

The Socket class used for making connections supports connecting to UNIX sockets, by passing an address of e.g. unix@/run/foo. Right now, it's not possible to use this feature through the HTTP library because the library mandates a prefix of http[s], and also always passes a port.

It would be really useful for tighter control of calls to sensitive endpoints to be able to use UNIX sockets. For example in the Let's Encrypt example, it would be preferable for the proxied ACME endpoints to be exposed on UNIX sockets (where they could be restricted by file system permissions), rather than 127.0.0.1 (where any user with access to the host could hit them).

Nothing4You commented 2 years ago

did you consider a PR of https://github.com/markslater/haproxy-lua-http/commit/12423fbafeb1afc26c8767f24276a9c0af6aa9bf to get that upstreamed (if accepted)?