2026-02-22 15:12:56 +08:00
|
|
|
<p align="center">
|
|
|
|
|
<img src="https://github.com/eycorsican/leaf/workflows/releases/badge.svg">
|
|
|
|
|
<img src="https://github.com/eycorsican/leaf/workflows/ci/badge.svg">
|
|
|
|
|
</p>
|
2020-10-07 22:27:55 +08:00
|
|
|
|
2026-02-22 15:12:56 +08:00
|
|
|
<h1 align="center">Leaf</h1>
|
2020-12-20 13:52:17 +08:00
|
|
|
|
2026-02-22 15:12:56 +08:00
|
|
|
<p align="center">
|
|
|
|
|
A versatile and efficient proxy framework.
|
|
|
|
|
</p>
|
2020-12-20 13:52:17 +08:00
|
|
|
|
2026-02-22 15:12:56 +08:00
|
|
|
## Supported Protocols
|
2020-12-20 13:52:17 +08:00
|
|
|
|
2026-02-22 15:12:56 +08:00
|
|
|
### Proxy Protocols
|
2020-12-20 13:52:17 +08:00
|
|
|
|
2026-02-22 15:12:56 +08:00
|
|
|
| Protocol | Inbound | Outbound |
|
|
|
|
|
|---|---|---|
|
|
|
|
|
| HTTP | ✅ | ❌ |
|
|
|
|
|
| SOCKS5 | ✅ | ✅ |
|
|
|
|
|
| Shadowsocks | ✅ | ✅ |
|
|
|
|
|
| Trojan | ✅ | ✅ |
|
|
|
|
|
| VMess | ❌ | ✅ |
|
|
|
|
|
| Vless | ❌ | ✅ |
|
2020-11-17 08:05:56 +08:00
|
|
|
|
2026-02-22 15:12:56 +08:00
|
|
|
### Transports & Security
|
2020-11-17 08:05:56 +08:00
|
|
|
|
2026-02-22 15:12:56 +08:00
|
|
|
| Transport | Inbound | Outbound | Notes |
|
|
|
|
|
|---|---|---|---|
|
|
|
|
|
| WebSocket | ✅ | ✅ | |
|
|
|
|
|
| TLS | ✅ | ✅ | |
|
|
|
|
|
| QUIC | ✅ | ✅ | |
|
|
|
|
|
| AMux | ✅ | ✅ | Leaf specific |
|
|
|
|
|
| Obfs | ❌ | ✅ | Simple obfuscation |
|
|
|
|
|
| Reality | ❌ | ✅ | Xray Reality |
|
2020-11-17 08:05:56 +08:00
|
|
|
|
2026-02-22 15:12:56 +08:00
|
|
|
### Traffic Control
|
2020-11-17 08:05:56 +08:00
|
|
|
|
2026-02-22 15:12:56 +08:00
|
|
|
| Feature | Inbound | Outbound | Notes |
|
|
|
|
|
|---|---|---|---|
|
|
|
|
|
| Chain | ✅ | ✅ | Proxy chaining |
|
|
|
|
|
| Failover | ❌ | ✅ | Failover with health check |
|
2021-05-07 17:55:14 +08:00
|
|
|
|
2026-02-22 15:12:56 +08:00
|
|
|
### Transparent Proxying
|
2020-10-27 12:50:30 +08:00
|
|
|
|
2026-02-22 15:12:56 +08:00
|
|
|
| Mechanism | Inbound | Outbound | Notes |
|
|
|
|
|
|---|---|---|---|
|
|
|
|
|
| TUN | ✅ | ❌ | Linux, macOS, Windows, iOS, Android; lwip, smoltcp |
|
|
|
|
|
| NF | ✅ | ❌ | Windows, [NetFilter SDK](https://netfiltersdk.com/) |
|
|
|
|
|
| TPROXY | ❌ | ❌ | Linux; Coming soon |
|
2020-10-27 12:50:30 +08:00
|
|
|
|
2026-02-22 15:12:56 +08:00
|
|
|
## Building
|
2020-10-27 12:50:30 +08:00
|
|
|
|
|
|
|
|
```sh
|
2026-02-22 15:12:56 +08:00
|
|
|
cargo build -p leaf-cli --release
|
2021-09-20 17:36:33 +08:00
|
|
|
./target/debug/leaf --help
|
2020-10-27 12:50:30 +08:00
|
|
|
```
|
2021-04-04 09:16:46 +08:00
|
|
|
|
|
|
|
|
## License
|
|
|
|
|
|
|
|
|
|
This project is licensed under the [Apache License 2.0](https://github.com/eycorsican/leaf/blob/master/LICENSE).
|