feat: Support Tun Config (#416)

This commit is contained in:
MystiPanda
2024-02-20 23:27:03 +08:00
committed by GitHub
parent bca3685eda
commit 7551b45da2
8 changed files with 264 additions and 19 deletions

View File

@@ -30,12 +30,6 @@ pub fn use_tun(mut config: Mapping, enable: bool) -> Mapping {
});
revise!(tun_val, "enable", enable);
if enable {
append!(tun_val, "stack", "gvisor");
append!(tun_val, "dns-hijack", vec!["any:53"]);
append!(tun_val, "auto-route", true);
append!(tun_val, "auto-detect-interface", true);
}
revise!(config, "tun", tun_val);