mirror of
https://github.com/MetaCubeX/subconverter.git
synced 2025-11-04 18:19:42 +08:00
Add support for setting profile-update-interval for Clash subscriptions
This commit is contained in:
parent
97c89150a5
commit
66af1ad54c
@ -1643,6 +1643,7 @@ std::string subconverter(RESPONSE_CALLBACK_ARGS)
|
||||
case "clash"_hash: case "clashr"_hash:
|
||||
writeLog(0, argTarget == "clashr" ? "Generate target: ClashR" : "Generate target: Clash", LOG_LEVEL_INFO);
|
||||
tpl_args.local_vars["clash.new_field_name"] = ext.clash_new_field_name ? "true" : "false";
|
||||
response.headers["profile-update-interval"] = interval / 3600;
|
||||
if(ext.nodelist)
|
||||
{
|
||||
YAML::Node yamlnode;
|
||||
@ -2047,6 +2048,7 @@ std::string surgeConfToClash(RESPONSE_CALLBACK_ARGS)
|
||||
}
|
||||
clash[rule_name] = rule;
|
||||
|
||||
response.headers["profile-update-interval"] = gUpdateInterval / 3600;
|
||||
writeLog(0, "Conversion completed.", LOG_LEVEL_INFO);
|
||||
return YAML::Dump(clash);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user