Add Support for IPV6 and Arbitrary Server Address
Add IPV6 support for Apple Devices Note: Works in GUI not CLI Adds Support for Arbitrary Server Address
This commit is contained in:
parent
cca5999214
commit
cade672806
20 changed files with 276 additions and 56 deletions
|
|
@ -1,4 +1,5 @@
|
|||
use std::{io::Error, net::Ipv4Addr};
|
||||
use std::net::Ipv6Addr;
|
||||
|
||||
use fehler::throws;
|
||||
use tun::TunInterface;
|
||||
|
|
@ -33,3 +34,15 @@ fn write_packets() {
|
|||
let bytes_written = tun.send(&buf)?;
|
||||
assert_eq!(bytes_written, 1504);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[throws]
|
||||
#[ignore = "requires interactivity"]
|
||||
#[cfg(not(target_os = "windows"))]
|
||||
fn set_ipv6() {
|
||||
let tun = TunInterface::new()?;
|
||||
println!("tun name: {:?}", tun.name()?);
|
||||
let targ_addr: Ipv6Addr = "::1".parse().unwrap();
|
||||
println!("v6 addr: {:?}", targ_addr);
|
||||
tun.set_ipv6_addr(targ_addr)?;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue