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