Skip to content

Commit 04db22b

Browse files
madeyeclaude
andcommitted
Add TCP Fast Open, systemd service install, rustdoc, and publish metadata
- TCP Fast Open support for listener and outgoing connections (net.rs) - systemd service install/uninstall commands (service.rs) - Rustdoc comments on all modules and public items - Cargo.toml metadata for crates.io publishing - Upgrade tokio-rustls-acme to v0.9 - Move CryptoProvider init to start of main() Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 8e5ac84 commit 04db22b

File tree

14 files changed

+584
-85
lines changed

14 files changed

+584
-85
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
/target
2+
*.zip

Cargo.lock

Lines changed: 44 additions & 58 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
name = "https_proxy"
33
version = "0.1.0"
44
edition = "2021"
5+
description = "Stealth HTTPS forward proxy with automatic Let's Encrypt TLS and nginx camouflage"
6+
license = "MIT"
7+
repository = "https://github.com/madeye/https_proxy"
8+
keywords = ["proxy", "https", "tls", "acme", "stealth"]
9+
categories = ["network-programming", "command-line-utilities"]
510

611
[dependencies]
712
anyhow = "1"
@@ -11,11 +16,13 @@ clap = { version = "4", features = ["derive"] }
1116
http-body-util = "0.1"
1217
hyper = { version = "1", features = ["http1", "server", "client"] }
1318
hyper-util = { version = "0.1", features = ["tokio", "http1", "server-auto", "client-legacy"] }
19+
libc = "0.2"
1420
serde = { version = "1", features = ["derive"] }
21+
socket2 = { version = "0.5", features = ["all"] }
1522
serde_yaml = "0.9"
1623
tokio = { version = "1", features = ["full"] }
1724
tokio-rustls = "0.26"
18-
tokio-rustls-acme = { version = "0.6", features = ["axum"] }
25+
tokio-rustls-acme = { version = "0.9", features = ["axum"] }
1926
crossterm = "0.28"
2027
ratatui = "0.29"
2128
tracing = "0.1"

README.md

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,33 @@ A stealth HTTPS forward proxy in Rust. It auto-obtains TLS certificates via Let'
1313

1414
## Build
1515

16+
Requires Rust 1.70+ and a C compiler (for `aws-lc-sys`/`ring` crypto backends).
17+
1618
```bash
19+
# Native release build (stripped, LTO enabled)
1720
cargo build --release
21+
22+
# Cross-compile for Linux x86_64 from macOS (requires cargo-zigbuild + zig)
23+
rustup target add x86_64-unknown-linux-gnu
24+
cargo zigbuild --release --target x86_64-unknown-linux-gnu
25+
```
26+
27+
### Prerequisites
28+
29+
**macOS:**
30+
```bash
31+
# Install Rust
32+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
33+
34+
# For cross-compilation to Linux
35+
brew install zig
36+
cargo install cargo-zigbuild
37+
```
38+
39+
**Linux (Debian/Ubuntu):**
40+
```bash
41+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
42+
apt install build-essential cmake
1843
```
1944

2045
The release binary is stripped with LTO enabled (~3 MB).
@@ -35,6 +60,7 @@ users:
3560
password: "hunter2"
3661
stealth:
3762
server_name: "nginx/1.24.0"
63+
fast_open: true
3864
```
3965
4066
| Field | Description |
@@ -46,6 +72,7 @@ stealth:
4672
| `acme.cache_dir` | Directory to persist certificates |
4773
| `users` | List of authorized proxy credentials |
4874
| `stealth.server_name` | `Server` header in fake 404 responses |
75+
| `fast_open` | Enable TCP Fast Open on listener and outgoing connections |
4976

5077
## Quick Start
5178

@@ -84,8 +111,10 @@ curl --proxy https://wrong:creds@proxy.example.com:443 https://example.com
84111
https-proxy [COMMAND]
85112

86113
Commands:
87-
setup Interactive TUI to create config.yaml
88-
run Start the proxy server (default if no command given)
114+
setup Interactive TUI to create config.yaml
115+
run Start the proxy server (default if no command given)
116+
install Install as a systemd background service (Linux, requires root)
117+
uninstall Remove the systemd service
89118
```
90119
91120
## How It Works

config.example.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ users:
99
password: "hunter2"
1010
stealth:
1111
server_name: "nginx/1.24.0"
12+
fast_open: true

0 commit comments

Comments
 (0)