forked from mirror/serenity
Add template.log
This commit is contained in:
parent
954ee213c9
commit
2c4472a571
@ -6,6 +6,7 @@
|
||||
|
||||
// Global
|
||||
|
||||
"log": {},
|
||||
"domain_strategy": "",
|
||||
"disable_traffic_bypass": false,
|
||||
"disable_rule_set": false,
|
||||
@ -81,6 +82,10 @@
|
||||
|
||||
Profile name.
|
||||
|
||||
#### log
|
||||
|
||||
Log configuration, see [Log](https://sing-box.sagernet.org/configuration/log/).
|
||||
|
||||
#### domain_strategy
|
||||
|
||||
Global sing-box domain strategy.
|
||||
|
@ -12,6 +12,7 @@ type Template struct {
|
||||
|
||||
// Global
|
||||
|
||||
Log *option.LogOptions `json:"log,omitempty"`
|
||||
DomainStrategy option.DomainStrategy `json:"domain_strategy,omitempty"`
|
||||
DisableTrafficBypass bool `json:"disable_traffic_bypass,omitempty"`
|
||||
DisableRuleSet bool `json:"disable_rule_set,omitempty"`
|
||||
|
@ -41,6 +41,7 @@ type ExtraGroup struct {
|
||||
|
||||
func (t *Template) Render(metadata M.Metadata, profileName string, outbounds [][]boxOption.Outbound, subscriptions []*subscription.Subscription) (*boxOption.Options, error) {
|
||||
var options boxOption.Options
|
||||
options.Log = t.Log
|
||||
err := t.renderDNS(metadata, &options)
|
||||
if err != nil {
|
||||
return nil, E.Cause(err, "render dns")
|
||||
|
Loading…
x
Reference in New Issue
Block a user