penguin/tinyproxy

An L4 proxy designed to act as a tiny transparent shim

tinyproxy.conf

raw ยท 1531 bytes

# builtin://client_addr
#   Returns the observed client address as plain text, then closes.
#   Example response: 127.0.0.1:54321
#
# builtin://discard
#   TCP: reads and discards client data until the client closes or timeout expires.
#   UDP: silently drops each datagram.
#
# builtin://hang
#   Accepts the connection/datagram and intentionally produces no response.
#   TCP: the connection remains open until the client closes or the route idle timeout expires.
#   UDP: this is effectively a silent drop.
#
# builtin://close
#   Accepts the connection and immediately closes it without reading or writing.
#   For UDP, this is equivalent to discard/drop because UDP has no connection to close.

# listen  upstream                   proto  option
:80       10.0.1.1:80                tcp
:443      10.0.1.1:443               tcp    proxy_v2,keep_alive
:12990    unix:/tmp/test.sock        tcp
:12345    10.0.1.1:12345             udp    idle_timeout=10,connect_timeout=17
:19132    10.0.1.1:19132             udp    proxy_v2
:13000    unix-dgram:/tmp/testd.sock udp
:12995    builtin://client_addr      tcp
:12996    builtin://hang             tcp    idle_timeout=3,connect_timeout=1
:12997    builtin://discard          tcp
:12998    builtin://close            tcp
:12995    builtin://client_addr      udp
:12996    builtin://hang             udp
:12997    builtin://discard          udp
:12998    builtin://close            udp

:14000    file://examples/http-response.txt tcp
:14001    file:///does/not/exist            tcp