mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-05-04 12:24:47 +00:00
Added rate limit whitelist
This commit is contained in:
parent
8df0781da6
commit
1bc1efbe56
6 changed files with 240 additions and 5 deletions
|
@ -25,6 +25,7 @@ class DnsInfo {
|
|||
int? blockedResponseTtl;
|
||||
int? ratelimitSubnetLenIpv4;
|
||||
int? ratelimitSubnetLenIpv6;
|
||||
List<String>? ratelimitWhitelist;
|
||||
|
||||
DnsInfo({
|
||||
required this.upstreamDns,
|
||||
|
@ -53,6 +54,7 @@ class DnsInfo {
|
|||
required this.blockedResponseTtl,
|
||||
required this.ratelimitSubnetLenIpv4,
|
||||
required this.ratelimitSubnetLenIpv6,
|
||||
required this.ratelimitWhitelist,
|
||||
});
|
||||
|
||||
factory DnsInfo.fromJson(Map<String, dynamic> json) => DnsInfo(
|
||||
|
@ -82,6 +84,7 @@ class DnsInfo {
|
|||
blockedResponseTtl: json["blocked_response_ttl"],
|
||||
ratelimitSubnetLenIpv4: json["ratelimit_subnet_len_ipv4"],
|
||||
ratelimitSubnetLenIpv6: json["ratelimit_subnet_len_ipv6"],
|
||||
ratelimitWhitelist: json["ratelimit_whitelist"] != null ? List<String>.from(json["ratelimit_whitelist"].map((x) => x)) : [],
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
|
@ -111,5 +114,6 @@ class DnsInfo {
|
|||
"blocked_response_ttl": blockedResponseTtl,
|
||||
"ratelimit_subnet_len_ipv4": ratelimitSubnetLenIpv4,
|
||||
"ratelimit_subnet_len_ipv6": ratelimitSubnetLenIpv6,
|
||||
"ratelimit_whitelist": ratelimitWhitelist != null ? List<String>.from(ratelimitWhitelist!.map((x) => x)) : null,
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue