From aaaddbd2049595a5d8196dd0a81153333d769e04 Mon Sep 17 00:00:00 2001 From: vincentliu77 <121923937+vincentliu77@users.noreply.github.com> Date: Sat, 18 Mar 2023 05:32:31 +0800 Subject: [PATCH] config/json: fix tun auto for json config (#358) --- leaf/src/config/json/config.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/leaf/src/config/json/config.rs b/leaf/src/config/json/config.rs index 2635d4c..1d9ec76 100644 --- a/leaf/src/config/json/config.rs +++ b/leaf/src/config/json/config.rs @@ -64,6 +64,7 @@ pub struct ChainInboundSettings { #[derive(Serialize, Deserialize, Debug)] pub struct TunInboundSettings { + pub auto: Option, pub fd: Option, pub name: Option, pub address: Option, @@ -335,6 +336,9 @@ pub fn to_internal(json: &mut Config) -> Result { 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 {