clash-verge/src-tauri/src/utils/tmpl.rs

74 lines
1.2 KiB
Rust
Raw Normal View History

2022-02-18 18:57:13 +03:00
///! Some config file template
/// template for clash core `config.yaml`
pub const CLASH_CONFIG: &[u8] = br#"# Default Config For Clash Core
mixed-port: 7890
log-level: info
allow-lan: false
external-controller: 127.0.0.1:9090
mode: rule
secret: ""
"#;
/// template for `profiles.yaml`
pub const PROFILES_CONFIG: &[u8] = b"# Profiles Config for Clash Verge
2022-03-01 03:58:47 +03:00
current: ~
2022-11-18 02:59:53 +03:00
chain: ~
valid:
- dns
2022-02-18 18:57:13 +03:00
items: ~
";
/// template for `verge.yaml`
2022-11-15 20:26:41 +03:00
pub const VERGE_CONFIG: &[u8] = b"# Default Config For Clash Verge
2022-02-18 18:57:13 +03:00
2022-11-18 02:59:53 +03:00
clash_core: clash
2022-03-12 18:07:45 +03:00
language: en
2022-11-18 02:59:53 +03:00
theme_mode: system
theme_blur: false
traffic_graph: true
2022-11-18 02:59:53 +03:00
enable_auto_launch: false
enable_silent_start: false
2022-02-18 18:57:13 +03:00
enable_system_proxy: false
2022-02-20 15:12:55 +03:00
enable_proxy_guard: false
proxy_guard_duration: 10
2022-11-18 02:59:53 +03:00
auto_close_connection: true
2022-02-18 18:57:13 +03:00
";
/// template for new a profile item
2022-03-05 14:04:20 +03:00
pub const ITEM_LOCAL: &str = "# Profile Template for clash verge
proxies:
proxy-groups:
rules:
";
/// enhanced profile
pub const ITEM_MERGE: &str = "# Merge Template for clash verge
# The `Merge` format used to enhance profile
prepend-rules:
prepend-proxies:
prepend-proxy-groups:
append-rules:
append-proxies:
append-proxy-groups:
";
/// enhanced profile
2022-09-11 15:58:55 +03:00
pub const ITEM_SCRIPT: &str = "// Define the `main` function
2022-11-18 02:59:53 +03:00
2022-03-05 14:04:20 +03:00
function main(params) {
return params;
}
2022-02-18 18:57:13 +03:00
";