feat: Support Tun Config (#416)

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

No files matched your search

-6
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);