Changes to be committed:
modified: src/client.rs modified: src/server.rs Changes not staged for commit: modified: src/client.rs
This commit is contained in:
parent
e3dfad4094
commit
81fa1b1db3
@ -63,11 +63,11 @@ pub async fn client_mode(remote_addr: &str) -> io::Result<()> {
|
|||||||
config.address("10.8.0.2");
|
config.address("10.8.0.2");
|
||||||
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.tun_name("tun0");
|
||||||
config.up();
|
config.up();
|
||||||
|
|
||||||
#[cfg(target_os = "linux")]
|
#[cfg(target_os = "linux")]
|
||||||
config.platform(|config| {
|
config.platform_config(|config| {
|
||||||
config.packet_information(true);
|
config.packet_information(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -15,11 +15,11 @@ pub async fn server_mode() -> Result<(), BoxError> {
|
|||||||
|
|
||||||
let mut config = tun2::Configuration::default();
|
let mut config = tun2::Configuration::default();
|
||||||
config.address("10.8.0.1");
|
config.address("10.8.0.1");
|
||||||
config.name("tun0");
|
config.tun_name("tun0");
|
||||||
config.up();
|
config.up();
|
||||||
|
|
||||||
#[cfg(target_os = "linux")]
|
#[cfg(target_os = "linux")]
|
||||||
config.platform(|config| {
|
config.platform_config(|config| {
|
||||||
config.packet_information(true);
|
config.packet_information(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user