Add SOCKS4 support to CI

This commit is contained in:
B. Blechschmidt 2023-04-03 00:39:13 +02:00
parent 15703a4823
commit 6d9767db42
4 changed files with 32 additions and 22 deletions

View file

@ -3,6 +3,8 @@ mod tests {
extern crate reqwest;
use std::env;
use std::net::IpAddr;
use std::str::FromStr;
use fork::Fork;
use nix::sys::signal;
@ -64,12 +66,13 @@ mod tests {
continue;
}
let mut setup = Setup::new(
TUN_TEST_DEVICE,
&test.proxy.addr.ip(),
get_default_cidrs(),
false,
);
let bypass_ip = match env::var("BYPASS_IP") {
Err(_) => test.proxy.addr.ip(),
Ok(ip_str) => IpAddr::from_str(ip_str.as_str()).unwrap(),
};
let mut setup =
Setup::new(TUN_TEST_DEVICE, &bypass_ip, get_default_cidrs(), false);
setup.configure().unwrap();
match fork::fork() {