mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2024-11-16 03:32:36 +08:00
chore: profile template typo
This commit is contained in:
parent
7edd7f27cb
commit
05fa6b9aba
|
@ -1,6 +1,6 @@
|
||||||
function main(params) {
|
function main(config) {
|
||||||
if (params.mode === "script") {
|
if (config.mode === "script") {
|
||||||
params.mode = "rule";
|
config.mode = "rule";
|
||||||
}
|
}
|
||||||
return params;
|
return config;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
function main(params) {
|
function main(config) {
|
||||||
if (Array.isArray(params.proxies)) {
|
if (Array.isArray(config.proxies)) {
|
||||||
params.proxies.forEach((p, i) => {
|
config.proxies.forEach((p, i) => {
|
||||||
if (p.type === "hysteria" && typeof p.alpn === "string") {
|
if (p.type === "hysteria" && typeof p.alpn === "string") {
|
||||||
params.proxies[i].alpn = [p.alpn];
|
config.proxies[i].alpn = [p.alpn];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return params;
|
return config;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,18 +1,17 @@
|
||||||
//! Some config file template
|
//! Some config file template
|
||||||
|
|
||||||
/// template for new a profile item
|
/// template for new a profile item
|
||||||
pub const ITEM_LOCAL: &str = "# Profile Template for clash verge
|
pub const ITEM_LOCAL: &str = "# Profile Template for Clash Verge
|
||||||
|
|
||||||
proxies:
|
proxies: []
|
||||||
|
|
||||||
proxy-groups:
|
proxy-groups: []
|
||||||
|
|
||||||
rules:
|
rules: []
|
||||||
";
|
";
|
||||||
|
|
||||||
/// enhanced profile
|
/// enhanced profile
|
||||||
pub const ITEM_MERGE: &str = "# Merge Template for clash verge
|
pub const ITEM_MERGE: &str = "# Profile Enhancement Merge Template for Clash Verge
|
||||||
# The `Merge` format used to enhance profile
|
|
||||||
|
|
||||||
prepend-rules: []
|
prepend-rules: []
|
||||||
|
|
||||||
|
@ -36,9 +35,9 @@ append-proxy-groups: []
|
||||||
";
|
";
|
||||||
|
|
||||||
/// enhanced profile
|
/// enhanced profile
|
||||||
pub const ITEM_SCRIPT: &str = "// Define the `main` function
|
pub const ITEM_SCRIPT: &str = "// Define main function (script entry)
|
||||||
|
|
||||||
function main(params) {
|
function main(config) {
|
||||||
return params;
|
return config;
|
||||||
}
|
}
|
||||||
";
|
";
|
||||||
|
|
Loading…
Reference in New Issue
Block a user