added windows's cmd's creation_flag
This commit is contained in:
parent
538dea12f8
commit
029fe4389f
@ -1,5 +1,6 @@
|
|||||||
use sdlan_sn_rs::utils::{ip_to_string, net_bit_len_to_mask};
|
use sdlan_sn_rs::utils::{ip_to_string, net_bit_len_to_mask};
|
||||||
use std::io::{Error, ErrorKind};
|
use std::io::{Error, ErrorKind};
|
||||||
|
use std::os::windows::process::CommandExt;
|
||||||
use std::process::Command;
|
use std::process::Command;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use wintun;
|
use wintun;
|
||||||
@ -53,6 +54,7 @@ impl Iface {
|
|||||||
let mut cmd = Command::new("netsh");
|
let mut cmd = Command::new("netsh");
|
||||||
debug!("name={}, addr={}, mask={}", self.name, ip, netbit);
|
debug!("name={}, addr={}, mask={}", self.name, ip, netbit);
|
||||||
let command = cmd
|
let command = cmd
|
||||||
|
.creation_flags(0x08000000)
|
||||||
.arg("interface")
|
.arg("interface")
|
||||||
.arg("ip")
|
.arg("ip")
|
||||||
.arg("set")
|
.arg("set")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user