mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-11-22 12:22:07 +08:00
Every settings toggle reparsed the profile and chain files, ran four Boa interpreters, serialized the runtime config twice, and re-ran mihomo -t over bytes the core had just accepted. Builtin and template scripts now run without Boa, custom scripts bind the config through JSON.parse and take ownership instead of per-script clones, the config serializes once, and mihomo -t is skipped unless the bytes, core build, or geo assets changed. Heavy parses and serializations moved to spawn_blocking. Large-subscription toggles drop from hundreds of milliseconds to ~140ms with no new retained state.
21 lines
486 B
Rust
21 lines
486 B
Rust
mod clash;
|
|
#[allow(clippy::module_inception)]
|
|
mod config;
|
|
pub(crate) mod dns;
|
|
mod encrypt;
|
|
mod mixed_port;
|
|
mod port;
|
|
mod prfitem;
|
|
pub mod profiles;
|
|
pub mod runtime;
|
|
pub(crate) mod snapshot;
|
|
mod verge;
|
|
|
|
pub(crate) use self::config::Config;
|
|
pub use self::{clash::*, encrypt::*, mixed_port::*, prfitem::*, profiles::*, verge::*};
|
|
|
|
pub const DEFAULT_PAC: &str = r#"function FindProxyForURL(url, host) {
|
|
return "PROXY 127.0.0.1:%mixed-port%; SOCKS5 127.0.0.1:%mixed-port%; DIRECT;";
|
|
}
|
|
"#;
|