https://github.com/j-jagger/tinyrp
Pythonic Async-focused Reverse Proxy
https://github.com/j-jagger/tinyrp
flask nginx prototype python quart reverseproxy
Last synced: 3 months ago
JSON representation
Pythonic Async-focused Reverse Proxy
- Host: GitHub
- URL: https://github.com/j-jagger/tinyrp
- Owner: j-jagger
- Created: 2025-09-12T21:21:03.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-09-12T22:04:50.000Z (4 months ago)
- Last Synced: 2025-09-12T23:46:55.163Z (4 months ago)
- Topics: flask, nginx, prototype, python, quart, reverseproxy
- Language: Python
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# TinyRP
Tiny Reverse Proxy, built in Asynchronous Python.
### Project State: INDEV
[](https://www.gnu.org/licenses/gpl-3.0.en.html/)
## Features
- Simple Configuration
- Low Runtime Footprint (Highly debatable, however)
- Fully asynchronous operations
- Insanely easy route setup
## Disclaimers
This has not been tested as thoroughly as it should've been. It is also very much not finished! While in theory, it may seem fairly safe to be thrown into the harsh winds of the internet, in practice, I would imagine any experienced bad actor could find some sort of crack in the url system.
Spotted something I could improve? Leave an issue!
## How does it work?
Firstly, on boot, a file named 'settings.tiny' is read from. It's called .tiny, because it's fairly small.
Example settings.tiny:
```
# Routes + Options File for TinyRP v1.0.0
# Routes begin with >, Settings begin with -.
- port -> 8000
- host -> 0.0.0.0
> http://localhost:8000 -> 127.0.0.1:5500
```
Comments can be created using # or /.
As the file says, routes begin with > and settings begin with -. It follows a fairly simple 'structure' wherein, quite simply, 'key -> value'.
After the settings and routes are registered, the Quart-Uvicorn ASGI server starts. It runs a route on ``/`` and ``/``.
When a user sends a request, the server checks if their host is inside the routes dictionary, and resolves it to a url. From there, it uses aiohttp to get the url using the exact(ish) same details as the client gave to the server. It then responds to the client's request with whatever the url responds with.