mirror of
https://github.com/tun2proxy/tun2proxy.git
synced 2025-05-15 22:42:48 +00:00
Add SOCKS4 support to CI
This commit is contained in:
parent
15703a4823
commit
6d9767db42
4 changed files with 32 additions and 22 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue