ThwipHome

Documentation

Configuration reference and practical recipes for running Thwip as an HTTP server and reverse proxy.

What is Thwip?

Thwip is a Transport-Handling Web Ingress Proxy: an experimental Unix HTTP server and reverse proxy written in Rust. It is the entry point for web traffic, selecting a virtual host and route before serving a response, static file, or upstream service.

Thwip is designed to offer the same clear configuration and behavior across the systems it supports, without pretending every system works in exactly the same way. It uses the capabilities that fit each operating system best, so a portable deployment does not have to settle for a one-size-fits-all performance model.

Its design favors small, independent workers and predictable limits over hidden magic. That keeps the server understandable under normal traffic and gives it room to make the most of the machine it is running on when demand increases.

Why Thwip?

Thwip aims to be portable without reducing every operating system to the same lowest-common-denominator runtime. It keeps HTTP behavior consistent while using the native I/O model that fits each supported system: epoll on Linux, kqueue on macOS and BSD, and io_uring where Linux provides the required capabilities.

The goal is to pursue the best practical performance each platform can offer while preserving one configuration model, one routing layer, and explicit worker ownership. Automatic runtime selection makes that portability usable, while explicit runtime modes leave room for measurement and platform-specific tuning.

How it is pronounced

There is only one correct way to pronounce Thwip:

/ˈθwɪp/ — “thwip,” (onomatopoeia) beginning with the th sound in “thin.”:

thwip.m4a — official unofficial pronunciation

Getting started

worker_count = 1

[runtime]
type = "auto"

[[http.servers]]
listen = "127.0.0.1:8080"

[[http.servers.locations]]
matcher = { type = "exact", path = "/health" }
action = { type = "response", status = 200, body = "OK" }

Omitting [runtime] defaults to epoll. Write type = "auto" for platform-aware selection.

Clone the source from GitHub, then start with Using another proxy? when you are moving an existing proxy configuration.

Build, run, and verify

git clone https://github.com/furknozg/thwip.git
cd thwip
cargo build --release
cargo run --release -p master --bin thwip-main

curl -i http://127.0.0.1:8080/health

Run Thwip from the repository root: the executable reads rginx.toml from the current working directory. Change the listener address if port 8080 is already in use; the configured health route should return 200 OK.

License

Thwip is available under the Apache License, Version 2.0. It permits commercial and private use, modification, and redistribution, while providing an explicit patent grant from contributors and the usual no-warranty terms.

Read the complete Apache-2.0 license in the repository.