x

Programs, configuration and documentation that don't fit anywhere else
Log | Files | Refs | README | LICENSE

authproxy.1 (1663B)


      1 .Dd
      2 .Dt AUTHPROXY 1
      3 .Sh NAME
      4 .Nm authproxy
      5 .Nd authenticating HTTP reverse proxy
      6 .Sh SYNOPSIS
      7 .Nm
      8 .Op Fl l Ar address
      9 .Ar file
     10 .Sh DESCRIPTION
     11 .Nm
     12 authenticates requests from trusted clients over plain HTTP
     13 to a target HTTPS host.
     14 Responses are returned unmodified from the target host.
     15 The proxy listens on
     16 .Ar address ,
     17 or a random address if not specified,
     18 then reads the value to be set in the
     19 Authorization field of client requests from
     20 .Ar file .
     21 The base name of
     22 .Ar file
     23 becomes the target host of the upstream HTTPS service.
     24 .Pp
     25 The intended use case is granting ephemeral clients from a trusted network
     26 access to some API served over HTTPS mandating authentication
     27 without needing to configure each client with credentials.
     28 Clients which would normally make a request directly to some protected resource
     29 such as https://ai.example.com/v1/openai/completions
     30 can instead make the same request to the proxy,
     31 over plain HTTP and a substituted hostname,
     32 such as http://proxy.example.net/v1/openai/completions.
     33 
     34 The following flags are understood:
     35 .Bl -tag -width Ds
     36 .It Fl l Ar address
     37 An address in host:port format to listen for incoming requests.
     38 The default is
     39 to listen on all addresses on a random port.
     40 .El
     41 
     42 .Sh EXAMPLES
     43 Relay requests received on the loopback address port 6969
     44 to ai.example.net:
     45 .Pp
     46 .Dl authproxy -l localhost:6969 $HOME/.config/authproxy/ai.example.net
     47 .Pp
     48 In this case the entire contents of the file
     49 .Pa $HOME/.config/authproxy/ai.example.net
     50 could contain a Bearer token:
     51 .Pp
     52 .Dl Bearer api_key_12345
     53 .Sh EXIT STATUS
     54 .Ex
     55 .Sh SEE ALSO
     56 .Lk https://blog.exe.dev/http-proxy-secrets Some Secret Management Belongs in Your HTTP Proxy