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:
Jett Chen 2024-02-02 14:48:13 +08:00 committed by Conrad Kramer
parent cca5999214
commit 2088ae6ede
20 changed files with 276 additions and 56 deletions

View file

@ -21,7 +21,7 @@ pub struct TunOptions {
/// (Apple) Retrieve the tun interface
pub tun_retrieve: bool,
/// (Linux) The IP address of the tun interface.
pub address: Option<String>,
pub address: Vec<String>,
}
impl TunOptions {
@ -44,8 +44,8 @@ impl TunOptions {
self
}
pub fn address(mut self, address: impl ToString) -> Self {
self.address = Some(address.to_string());
pub fn address(mut self, address: Vec<impl ToString>) -> Self {
self.address = address.iter().map(|x| x.to_string()).collect();
self
}