2 releases
Uses new Rust 2024
| 0.1.1 | Mar 3, 2026 |
|---|---|
| 0.1.0 | Mar 3, 2026 |
#20 in #socks5
26KB
271 lines
wg-socks
Turn a WireGuard config into a local SOCKS5 proxy.
Load a wireguard style config, start the proxy, and route traffic through bind address (127.0.0.1:1080).
Quick start
#[tokio::main]
async fn main() -> anyhow::Result<()> {
let proxy = wg_socks::WgSocksProxy::start_from_file(
"wireguard.conf",
"127.0.0.1:1080".parse()?)
.await?;
// use proxy.proxy_url()
proxy.shutdown();
Ok(())
}
API entry points: start, start_from_str, start_from_file
Dependencies
~24–41MB
~636K SLoC