#include "daemon/network.h"
#include "daemon/udp_queue.h"
#include "daemon/worker.h"
+#include "daemon/ratelimiting.h"
+#include "daemon/defer.h"
- #ifdef ENABLE_DOH2
- #include "daemon/http.h"
- #endif
-
#include "lib/defines.h"
#include "lib/dnssec.h"
#include "lib/log.h"
* the proxy is unencrypted. */
bool has_tls : 1;
};
-
- /** Initializes the protocol layers managed by the PROXYv2 "module". */
- void proxy_protolayers_init(void);
+
+/** Checks whether the use of PROXYv2 protocol is allowed for the specified
+ * address. */
+bool proxy_allowed(const struct sockaddr *saddr);
from knot_resolver_manager.datamodel.types import Dir, EscapedStr, IntPositive
from knot_resolver_manager.datamodel.view_schema import ViewSchema
from knot_resolver_manager.datamodel.webmgmt_schema import WebmgmtSchema
+from knot_resolver_manager.datamodel.rate_limiting_schema import RateLimitingSchema
from knot_resolver_manager.utils.modeling import ConfigSchema
from knot_resolver_manager.utils.modeling.base_schema import lazy_default
+ from knot_resolver_manager.utils.modeling.exceptions import AggregateDataValidationError, DataValidationError
_DEFAULT_RUNDIR = "/var/run/knot-resolver"
import logging
import sys
import time
+import os
+ from secrets import token_hex
from subprocess import SubprocessError
- from typing import Callable, List, Optional
+ from typing import Any, Callable, List, Optional
from knot_resolver_manager.compat.asyncio import create_task
- from knot_resolver_manager.config_store import ConfigStore
+ from knot_resolver_manager.config_store import ConfigStore, only_on_real_changes_update, only_on_real_changes_verifier
from knot_resolver_manager.constants import (
FIX_COUNTER_DECREASE_INTERVAL_SEC,
MANAGER_FIX_ATTEMPT_MAX_COUNTER,