mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-12-02 03:00:05 +08:00
Move profile models and index rules into the crate, preserving serialization and returning a typed missing-profile error.
32 lines
823 B
Rust
32 lines
823 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(crate) use self::prfitem::{fetch_remote_profile, read_profile_item_file};
|
|
pub use self::{clash::*, encrypt::*, mixed_port::*, profiles::*, verge::*};
|
|
pub use clash_verge_profile::{PrfExtra, PrfItem, PrfOption, PrfSelected};
|
|
|
|
macro_rules! patch_opt_field {
|
|
($lv:expr, $rv:expr, $key:tt) => {
|
|
if ($rv.$key).is_some() {
|
|
$lv.$key = $rv.$key.clone();
|
|
}
|
|
};
|
|
}
|
|
pub(crate) use patch_opt_field;
|
|
|
|
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;";
|
|
}
|
|
"#;
|