Documentation
¶
Overview ¶
Command labproxy is the middlebox of the NAT lab (test/natlab/natlab.sh): the things an enterprise network puts between a machine and the Internet, small enough to read and strict enough to fail a client that gets them wrong.
labproxy gen DIR NAME...
writes a CA (ca.pem, ca-key.pem) and one certificate per NAME
(NAME.pem, NAME-key.pem; a NAME that parses as an IP address gets
an IP subject alternative name).
labproxy connect -listen ADDR [-auth none|basic|ntlm|negotiate|kerberos]
[-user U -pass P -domain D] [-ports 443,...]
[-bump DIR [-roots FILE] [-no-websocket]]
an HTTP CONNECT proxy. -auth asks for Basic, NTLM (NTLMv2 only,
verified), Negotiate (accepts an NTLM token, as a proxy does for a
machine without a Kerberos ticket) or Kerberos (Negotiate, and
refuses NTLM). -ports lists the only ports it tunnels to. -bump
makes it a TLS-inspecting proxy: it answers the client's TLS itself
with a certificate for the target signed by the CA in DIR, and
speaks TLS to the target (checked against -roots); -no-websocket
makes the inspection refuse WebSocket upgrades.
labproxy captive -listen ADDR [-tls DIR]
a captive portal: every HTTP request is redirected to its login
page; with -tls it answers TLS with a certificate of its own CA.
Every tunnel, refusal and interception is logged on stdout, one line each, for the lab to grep.