mirror of
https://github.com/eycorsican/leaf.git
synced 2026-12-06 08:02:36 +00:00
config/json: fix tun auto for json config (#358)
This commit is contained in:
1 parent
a70d98db2b
commit
aaaddbd204
1 file changed
+4
@@ -64,6 +64,7 @@ pub struct ChainInboundSettings {
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
pub struct TunInboundSettings {
|
||||
pub auto: Option<bool>,
|
||||
pub fd: Option<i32>,
|
||||
pub name: Option<String>,
|
||||
pub address: Option<String>,
|
||||
@@ -335,6 +336,9 @@ pub fn to_internal(json: &mut Config) -> Result<internal::Config> {
|
||||
if let Some(ext_netmask) = ext_settings.netmask {
|
||||
settings.netmask = ext_netmask;
|
||||
}
|
||||
if let Some(ext_auto) = ext_settings.auto {
|
||||
settings.auto = ext_auto;
|
||||
}
|
||||
if let Some(ext_mtu) = ext_settings.mtu {
|
||||
settings.mtu = ext_mtu;
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user