Crates.io | prew |
lib.rs | prew |
version | 0.3.3 |
source | src |
created_at | 2023-01-25 03:22:52.91793 |
updated_at | 2024-01-22 05:38:15.047226 |
description | Reverse rewrite proxy for PostgreSQL |
homepage | https://github.com/SubstructureOne/prew |
repository | https://github.com/SubstructureOne/prew |
max_upload_size | |
id | 767103 |
size | 102,918 |
Prew is a reverse rewrite proxy for PostgreSQL (other protocol support pending). It generalizes rewrite rules into:
A sample binary is included but it is primarily intended to be pulled in as a library and provided custom components for the rewrite rules.
Packets returned from the service being proxied are currently not subject to any rules and are always passed back to the client unmodified.
The parser is responsible for parsing a packet into a standard struct, that will be used for the following rules.
The filter can selectively filter out packets. No response is sent for filtered packets.
The transformer can optionally modify packet content (i.e., the rewrite step).
The encoder encodes the transformed packet back into its raw format (skipped if no transformation was made).
The reporter runs concurrently to provide logging or additional side-functionality based on the content of the packet.
Prew is based in large part upon sql-proxy-rs by Raymond Cheng.