diff --git a/option/template.go b/option/template.go index 7c4ba1b..863a230 100644 --- a/option/template.go +++ b/option/template.go @@ -116,6 +116,8 @@ type GitHubRuleSetOptions struct { Owner string `json:"owner,omitempty"` Repo string `json:"repo,omitempty"` Branch string `json:"branch,omitempty"` + Path string `json:"path,omitempty"` + Prefix string `json:"prefix,omitempty"` RuleSet option.Listable[string] `json:"rule_set,omitempty"` } diff --git a/template/render_geo_resources.go b/template/render_geo_resources.go index 05914c0..a53d2c7 100644 --- a/template/render_geo_resources.go +++ b/template/render_geo_resources.go @@ -120,14 +120,15 @@ func (t *Template) renderRuleSet(ruleSets []option.RuleSet) []boxOption.RuleSet for _, code := range ruleSet.GitHubOptions.RuleSet { result = append(result, boxOption.RuleSet{ Type: C.RuleSetTypeRemote, - Tag: code, + Tag: ruleSet.GitHubOptions.Prefix + code, Format: C.RuleSetFormatBinary, RemoteOptions: boxOption.RemoteRuleSet{ URL: downloadURL + ruleSet.GitHubOptions.Owner + "/" + - ruleSet.GitHubOptions.Repo + "/" + + ruleSet.GitHubOptions.Repo + branchSplit + ruleSet.GitHubOptions.Branch + "/" + + ruleSet.GitHubOptions.Path + code + ".srs", DownloadDetour: downloadDetour, },