mirror of
https://github.com/SukkaW/Surge.git
synced 2026-01-28 17:41:54 +08:00
Chore: new way to attach description
This commit is contained in:
@@ -15,21 +15,17 @@ function createRulesetForStreamService(
|
||||
// Domains
|
||||
new RulesetOutput(span, fileId, 'non_ip')
|
||||
.withTitle(`Sukka's Ruleset - Stream Services: ${title}`)
|
||||
.withDescription([
|
||||
...SHARED_DESCRIPTION,
|
||||
'',
|
||||
...streamServices.map((i) => `- ${i.name}`)
|
||||
])
|
||||
.appendDescription(SHARED_DESCRIPTION)
|
||||
.appendDescription('')
|
||||
.appendDescription(streamServices.map((i) => `- ${i.name}`))
|
||||
.addFromRuleset(streamServices.flatMap((i) => i.rules))
|
||||
.write(),
|
||||
// IP
|
||||
new RulesetOutput(span, fileId, 'ip')
|
||||
.withTitle(`Sukka's Ruleset - Stream Services IPs: ${title}`)
|
||||
.withDescription([
|
||||
...SHARED_DESCRIPTION,
|
||||
'',
|
||||
...streamServices.map((i) => `- ${i.name}`)
|
||||
])
|
||||
.appendDescription(SHARED_DESCRIPTION)
|
||||
.appendDescription('')
|
||||
.appendDescription(streamServices.map((i) => `- ${i.name}`))
|
||||
.bulkAddCIDR4NoResolve(streamServices.flatMap(i => i.ip?.v4 ?? []))
|
||||
.bulkAddCIDR6NoResolve(streamServices.flatMap(i => i.ip?.v6 ?? []))
|
||||
.write()
|
||||
|
||||
Reference in New Issue
Block a user