A tun2socks implementation written in Rust.
https://rust-lang.github.io/rust-bindgen/requirements.html
brew install llvm
apt install llvm-dev libclang-dev clang
git clone --recurse-submodules https://github.com/eycorsican/tun2socks-rs.git
cd tun2socks-rs
cargo build
sudo RUST_LOG=debug ./target/debug/tun2socks --proxy-server 1.2.3.4:1080
sudo ifconfig utun7 10.10.0.2 netmask 255.255.255.0 10.10.0.1
sudo route delete default
sudo route add default 10.10.0.1
sudo ip route del default
sudo ip route add default via 10.10.0.1