去除linux上的tap
This commit is contained in:
+3
-3
@@ -13,7 +13,7 @@ mod conn;
|
|||||||
|
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
pub struct Config {
|
pub struct Config {
|
||||||
#[cfg(any(target_os = "windows", target_os = "linux"))]
|
#[cfg(target_os = "windows")]
|
||||||
pub tap: bool,
|
pub tap: bool,
|
||||||
pub token: String,
|
pub token: String,
|
||||||
pub device_id: String,
|
pub device_id: String,
|
||||||
@@ -50,7 +50,7 @@ pub struct Config {
|
|||||||
|
|
||||||
impl Config {
|
impl Config {
|
||||||
pub fn new(
|
pub fn new(
|
||||||
#[cfg(any(target_os = "windows", target_os = "linux"))] tap: bool,
|
#[cfg(target_os = "windows")] tap: bool,
|
||||||
token: String,
|
token: String,
|
||||||
device_id: String,
|
device_id: String,
|
||||||
name: String,
|
name: String,
|
||||||
@@ -104,7 +104,7 @@ impl Config {
|
|||||||
#[cfg(feature = "port_mapping")]
|
#[cfg(feature = "port_mapping")]
|
||||||
let port_mapping_list = crate::port_mapping::convert(port_mapping_list)?;
|
let port_mapping_list = crate::port_mapping::convert(port_mapping_list)?;
|
||||||
Ok(Self {
|
Ok(Self {
|
||||||
#[cfg(any(target_os = "windows", target_os = "linux"))]
|
#[cfg(target_os = "windows")]
|
||||||
tap,
|
tap,
|
||||||
token,
|
token,
|
||||||
device_id,
|
device_id,
|
||||||
|
|||||||
Reference in New Issue
Block a user