Skip to content

Commit

Permalink
Pull request 295: Fix conf names
Browse files Browse the repository at this point in the history
Merge in GO/dnsproxy from fix-conf-names to master

Squashed commit of the following:

commit b8b5682
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date:   Tue Nov 7 14:13:25 2023 +0300

    main: fix yaml conf fields names
  • Loading branch information
EugeneOne1 committed Nov 7, 2023
1 parent 868c1de commit 254e5a8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions config.yaml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ listen-ports:
- 53
max-go-routines: 0
ratelimit: 0
ratelimit-subnet-len-ipv4: 24
ratelimit-subnet-len-ipv6: 64
udp-buf-size: 0
upstream:
- "1.1.1.1:53"
Expand Down
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,11 @@ type Options struct {

// RatelimitSubnetLenIPv4 is a subnet length for IPv4 addresses used for
// rate limiting requests
RatelimitSubnetLenIPv4 int `yaml:"ratelimit-subnet-len-v4" long:"ratelimit-subnet-len-ipv4" description:"Ratelimit subnet length for IPv4." default:"24"`
RatelimitSubnetLenIPv4 int `yaml:"ratelimit-subnet-len-ipv4" long:"ratelimit-subnet-len-ipv4" description:"Ratelimit subnet length for IPv4." default:"24"`

// RatelimitSubnetLenIPv6 is a subnet length for IPv6 addresses used for
// rate limiting requests
RatelimitSubnetLenIPv6 int `yaml:"ratelimit-subnet-len-v6" long:"ratelimit-subnet-len-ipv6" description:"Ratelimit subnet length for IPv6." default:"64"`
RatelimitSubnetLenIPv6 int `yaml:"ratelimit-subnet-len-ipv6" long:"ratelimit-subnet-len-ipv6" description:"Ratelimit subnet length for IPv6." default:"64"`

// If true, refuse ANY requests
RefuseAny bool `yaml:"refuse-any" long:"refuse-any" description:"If specified, refuse ANY requests" optional:"yes" optional-value:"true"`
Expand Down

0 comments on commit 254e5a8

Please sign in to comment.