DNS outbound: Add blockTypes (#3812)

This commit is contained in:
风扇滑翔翼 2024-09-15 12:21:51 +08:00 committed by GitHub
parent d7c5a0fc5f
commit 3fed0c773f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 39 additions and 16 deletions

View file

@ -13,6 +13,7 @@ type DNSOutboundConfig struct {
Port uint16 `json:"port"`
UserLevel uint32 `json:"userLevel"`
NonIPQuery string `json:"nonIPQuery"`
BlockTypes []int32 `json:"blockTypes"`
}
func (c *DNSOutboundConfig) Build() (proto.Message, error) {
@ -34,5 +35,6 @@ func (c *DNSOutboundConfig) Build() (proto.Message, error) {
return nil, errors.New(`unknown "nonIPQuery": `, c.NonIPQuery)
}
config.Non_IPQuery = c.NonIPQuery
config.BlockTypes = c.BlockTypes
return config, nil
}