| .cargo | ||
| .vscode | ||
| src | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| LICENSE | ||
| README.md | ||
| rustfmt.toml | ||
netreplay
This program has two modes:
- recording proxy: relays trafic with or without TLS and record requests and responses in clear. It is a TLS termination thus a certificate is needed.
- trafic replay: run a client that sends the recorded requests, and a server that responds with the corresponding recorded responses. A proxy can be placed in between. The proxy can even alter the plain data, because the server uses hash distance to identify the requests.
It has been tested with HTTP trafic only. Other protocols which are not request/response (or even websocket) may not be recorded properly.
It relies on the server name extension in TLS (SNI). Requests without server name may not be recorded.
For experimental purpose. Do not use on an open network where security matters.
Build
RUSTFLAGS="--cfg tokio_unstable" cargo build --release
Record file format
The record file is a list of records. Each record follows this format:
- [1 byte] direction: ASCII 'C' for client-to-server, 'S' for server-to-client
- [8 bytes] connection id, big endian
- [1 byte] server name length
- server name (TLS's SNI or HTTP's Host)
- [8 bytes] data length, big endian
- data
License
GNU AGPL v3, CopyLeft 2025 Pascal Engélibert (why copyleft?)
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, version 3 of the License.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see https://www.gnu.org/licenses/.