From ea5ffff82c5703304ca0fb4c525733a832970212 Mon Sep 17 00:00:00 2001 From: ssrlive <30760636+ssrlive@users.noreply.github.com> Date: Sat, 10 Feb 2024 14:45:44 +0800 Subject: [PATCH] Bump version 0.2.5 --- Cargo.toml | 11 ++++++++--- README.md | 53 ++++++++++++++++++++++++++++++++++++----------------- src/args.rs | 2 +- 3 files changed, 45 insertions(+), 21 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 247f6af..7db99ec 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,8 +1,13 @@ [package] name = "tun2proxy" -version = "0.2.4" +version = "0.2.5" edition = "2021" -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +license = "MIT" +repository = "https://github.com/blechschmidt/tun2proxy" +homepage = "https://github.com/blechschmidt/tun2proxy" +authors = ["B. Blechschmidt", "ssrlive"] +description = "Tunnel interface to proxy" +readme = "README.md" [lib] crate-type = ["staticlib", "cdylib", "lib"] @@ -12,7 +17,7 @@ async-recursion = "1.0" async-trait = "0.1" base64 = { version = "0.21" } chrono = "0.4" -clap = { version = "4.4", features = ["derive", "wrap_help", "color"] } +clap = { version = "4.5", features = ["derive", "wrap_help", "color"] } ctrlc2 = { version = "3.5", features = ["tokio", "termination"] } digest_auth = "0.3" dotenvy = "0.15" diff --git a/README.md b/README.md index 78fb403..123b257 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,11 @@ # tun2proxy -A tunnel interface for HTTP and SOCKS proxies on Linux based on [smoltcp](https://github.com/smoltcp-rs/smoltcp). +A tunnel interface for HTTP and SOCKS proxies on Linux, Android, macOS, iOS and Windows. + +[](https://crates.io/crates/tun2proxy) + +[](https://docs.rs/tun2proxy) +[](https://crates.io/crates/tun2proxy) +[](https://github.com/blechschmidt/tun2proxy/blob/master/LICENSE) ## Features - HTTP proxy support (unauthenticated, basic and digest auth) @@ -17,22 +23,37 @@ Clone the repository and `cd` into the project folder. Then run the following: cargo build --release ``` +## Installation + +### Install from binary + +Download the binary from [releases](https://github.com/blechschmidt/tun2proxy/releases) and put it in your `PATH`. + +### Install from source + +If you have [rust](https://rustup.rs/) toolchain installed, this should work: +```shell +cargo install tun2proxy +``` +> Note: In Windows, you need to copy [wintun](https://www.wintun.net/) DLL to the same directory as the binary. +> It's `%USERPROFILE%\.cargo\bin` by default. + ## Setup ## Automated Setup -Using `--setup auto`, you can have tun2proxy configure your system to automatically route all traffic through the +Using `--setup`, you can have tun2proxy configure your system to automatically route all traffic through the specified proxy. This requires running the tool as root and will roughly perform the steps outlined in the section describing the manual setup, except that a bind mount is used to overlay the `/etc/resolv.conf` file. You would then run the tool as follows: ```bash -sudo ./target/release/tun2proxy --setup auto --proxy "socks5://1.2.3.4:1080" +sudo ./target/release/tun2proxy --setup --proxy "socks5://1.2.3.4:1080" ``` Apart from SOCKS5, SOCKS4 and HTTP are supported. Note that if your proxy is a non-global IP address (e.g. because the proxy is provided by some tunneling tool running locally), you will additionally need to provide the public IP address of the server through which the traffic is -actually tunneled. In such a case, the tool will tell you to specify the address through `--bypass-ip
` if you +actually tunneled. In such a case, the tool will tell you to specify the address through `--bypass