Changes to be committed:

modified:   src/client.rs
	modified:   src/server.rs
This commit is contained in:
Michael Wain 2024-08-10 22:06:57 +03:00
parent d89cce67b0
commit 149792eee5
2 changed files with 3 additions and 1 deletions

View File

@ -16,6 +16,7 @@ pub async fn client_mode(remote_addr: &str) -> io::Result<()> {
config.netmask("128.0.0.0"); config.netmask("128.0.0.0");
config.destination("0.0.0.0"); config.destination("0.0.0.0");
config.name("tun0"); config.name("tun0");
config.up();
#[cfg(target_os = "linux")] #[cfg(target_os = "linux")]
config.platform(|config| { config.platform(|config| {

View File

@ -16,6 +16,7 @@ pub async fn server_mode() -> io::Result<()> {
let mut config = tun::Configuration::default(); let mut config = tun::Configuration::default();
config.address("10.8.0.1"); config.address("10.8.0.1");
config.name("tun0"); config.name("tun0");
config.up();
#[cfg(target_os = "linux")] #[cfg(target_os = "linux")]
config.platform(|config| { config.platform(|config| {