feat: support builtin script for enhanced mode

This commit is contained in:
GyDi
2022-11-21 21:05:00 +08:00
parent 525e5f88ae
commit bd0e932910
7 changed files with 130 additions and 100 deletions

View File

@@ -84,15 +84,7 @@ impl Config {
/// 生成配置存好
pub fn generate() -> Result<()> {
let clash_config = { Config::clash().latest().clone() };
let tun_mode = { Config::verge().latest().enable_tun_mode.clone() };
let tun_mode = tun_mode.unwrap_or(false);
let pa = { Config::profiles().latest().gen_activate()? };
let (config, exists_keys, logs) =
enhance::enhance_config(clash_config.0, pa.current, pa.chain, pa.valid, tun_mode);
let (config, exists_keys, logs) = enhance::enhance();
*Config::runtime().draft() = IRuntime {
config: Some(config),