去除linux上tap的支持

This commit is contained in:
lbl8603
2024-05-09 20:10:17 +08:00
parent 035ae46ee5
commit b61c140c24
6 changed files with 29 additions and 47 deletions
+2 -2
View File
@@ -12,7 +12,7 @@ use vnt::core::Config;
use crate::utils::*;
pub fn new_config(env: &mut JNIEnv, config: JObject) -> Result<Config, Error> {
#[cfg(any(target_os = "windows", target_os = "linux"))]
#[cfg(target_os = "windows")]
let tap = env.get_field(&config, "tap", "Z")?.z()?;
let token = to_string_not_null(env, &config, "token")?;
let name = to_string_not_null(env, &config, "name")?;
@@ -90,7 +90,7 @@ pub fn new_config(env: &mut JNIEnv, config: JObject) -> Result<Config, Error> {
#[cfg(not(target_os = "android"))]
let device_name = to_string(env, &config, "deviceName")?;
let config = match Config::new(
#[cfg(any(target_os = "windows", target_os = "linux"))]
#[cfg(target_os = "windows")]
tap,
token,
device_id,