penguin/tinyproxy

An L4 proxy designed to act as a tiny transparent shim

summary

default branchmaster
default commitaeb270241b7bca9a4940b5c4d50087711ae25f2a

recent commits

commitdateauthorsubject
aeb27022026-06-21T13:36:05Z斟酌 鵬兄LOG_DEBUG for udp create/expire
06a80d52026-06-21T03:22:31Z斟酌 鵬兄Default branch should be master branch
01644822026-06-18T12:55:35Z斟酌 鵬兄Moved timeout logs into conn_idle_timeout_cb

files

pathsize
.github/workflows/cmake-multi-platform.yml17164
.gitignore614
Benchmark.md2262
LICENSE1070
Makefile894
README.md2062
devtools/TSAN.sh174
devtools/ab_test.sh1693
devtools/cflow.sh769
devtools/close-wait/large_upstream.py644
devtools/close-wait/slow_client.py851
devtools/hold_clients.py2088
devtools/race_test.py1278
dockerfiles/alpine.Dockerfile584
dockerfiles/github-minimal.Dockerfile128
dockerfiles/github-perf.Dockerfile964
docs/tinyproxy.1.scd1858
docs/tinyproxy.7.scd2587
docs/tinyproxy.conf.5.scd4760
examples/bind-wait.conf889
examples/http-response.txt98
examples/ipv6.conf168
examples/minecraft-bedrock-lan.conf1182
examples/tinyproxy.conf1601
fuzz/Makefile1234
fuzz/README.md190
fuzz/devtools/gen_seeds_stream_sniff.py4375
fuzz/fuzz_file_conf.c529
fuzz/fuzz_proxy_v2_build.c2905
fuzz/fuzz_stream_conn.c2264
fuzz/fuzz_stream_sniff.c1249
fuzz/seeds/file_conf/tinyproxy.conf117
fuzz/seeds/stream_conn/basic5
fuzz/seeds/stream_conn/chunked_weird77
fuzz/seeds/stream_conn/ff8
fuzz/seeds/stream_conn/hex_junk20
fuzz/seeds/stream_conn/http27
fuzz/seeds/stream_conn/http2_preface24
fuzz/seeds/stream_conn/http_connect59
fuzz/seeds/stream_conn/http_get33
fuzz/seeds/stream_conn/http_post57
fuzz/seeds/stream_conn/huge_request_line8219
fuzz/seeds/stream_conn/long_header4133
fuzz/seeds/stream_conn/many_headers4123
fuzz/seeds/stream_conn/nuls8
fuzz/seeds/stream_conn/percent_encoded_junk39
fuzz/seeds/stream_conn/proxyish13
fuzz/seeds/stream_conn/smuggling_shape_199
fuzz/seeds/stream_conn/ssh_banner21
fuzz/seeds/stream_conn/tls_clienthello_like43

tinyproxy

An L4 proxy designed to act as a tiny transparent shim.

Philosophy

  1. Should feel like an inet utility.
  2. Be simple and effective.
  3. Be performant and explicit.
  4. Run in the foreground.

Configuration

Configuration is line-based:

listen <listen-proto> <listen-endpoint> <backend-proto> <backend-endpoint> [options...]

Example routes:

tinyproxy \
    -L "tcp :31232 tcp 127.0.0.1:41232" \
    -L "udp :31232 udp 127.0.0.1:41232"

Docker example:

docker run --rm ghcr.io/tgckpg/tinyproxy:v0.2.8-debian-slim \
  -L "tcp :443 tcp 10.0.1.1:443 proxy_v2,keep_alive"

Minecraft Bedrock public-to-LAN proxy

Makes a remote Minecraft Bedrock server appear as a LAN server.

tinyproxy \
    -L "udp :19132 udp 123.123.123.123:19132 broadcast_reply=listen"

Run with config file:

tinyproxy -c tinyproxy.conf

check example/tinyproxy.conf or use man 5 tinyproxy after make install-man for details

Non-goals

Use HAProxy, Envoy, nginx, Cilium, or a real load balancer if you need those.

Development status

Before releasing v1.0.0

I'm testing this in prod right now. This might take a long time since I'm one person.

If you found this useful and want to help please do. I really need some help on writing the man pages.

TODO

These are features that would be nice to have, but I don't need them in my Kubernetes environment.