refactor(jni): remove legacy no_tun config field
fix(ui): clarify mapping exit description
This commit is contained in:
@@ -917,8 +917,6 @@ fn parse_config_from_json(json_str: &str) -> anyhow::Result<Config> {
|
||||
no_nat: bool,
|
||||
#[serde(default)]
|
||||
device_mode: DeviceMode,
|
||||
#[serde(default, rename = "no_tun")]
|
||||
legacy_no_tun: Option<bool>,
|
||||
#[serde(default)]
|
||||
mtu: Option<u16>,
|
||||
#[serde(default)]
|
||||
@@ -934,9 +932,6 @@ fn parse_config_from_json(json_str: &str) -> anyhow::Result<Config> {
|
||||
}
|
||||
|
||||
let cfg: ConfigJson = serde_json::from_str(json_str)?;
|
||||
if cfg.legacy_no_tun.is_some() {
|
||||
anyhow::bail!("configuration key 'no_tun' was removed; use device_mode = \"no|tun|tap\"");
|
||||
}
|
||||
|
||||
let server_addrs: Vec<ProtocolAddress> = cfg
|
||||
.server
|
||||
|
||||
@@ -504,7 +504,7 @@ const sectionTitleClass = "text-md mb-4 flex items-center font-bold text-slate-9
|
||||
<label :class="toggleLabelClass">
|
||||
<div class="flex-1">
|
||||
<div class="text-sm font-medium text-slate-800 dark:text-white">允许作为映射出口</div>
|
||||
<div class="text-xs text-slate-400 mt-0.5">允许其他设备使用本机作跳板</div>
|
||||
<div class="text-xs text-slate-400 mt-0.5">允许其他设备使用本机作跳板来进行端口映射</div>
|
||||
</div>
|
||||
<input v-model="formData.allow_mapping" type="checkbox" :class="checkboxClass" />
|
||||
</label>
|
||||
|
||||
Reference in New Issue
Block a user