Skip to content

pippaye/x-force

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xforce

xforce runs a command inside an isolated rootless Linux network namespace and forces traffic through tun2socks.

Runtime Dependencies

  • slirp4netns

Usage

xforce [-x <proxy_url>] [-d <tun_dev>] [--tun-cidr <cidr>] [-u <uplink_dev>] [--resolv-conf <path>] [-l <tun2socks_log>] [--slirp-log <file>] [--] <command> [args...]

Example:

xforce -x socks5://192.168.231.2:7905 -- curl -vvv www.baidu.com
xforce -x socks5://192.168.231.2:7905 --tun-cidr 192.168.239.1/24 -- curl -vvv www.baidu.com

Build

CGO_ENABLED=0 go build -o main .

Test

CGO_ENABLED=0 go test ./...

Nix

nix build .#default
nix run .#xforce -- --version
nix develop

About

Run a command in an isolated rootless netns and force its traffic through tun2socks.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors