Go to the source code of this file.
Classes | |
| struct | VerdictEntry |
Functions | |
| static uint64_t | now_ms () |
| static std::string | expand_user_path (const std::string &rel) |
| static std::string | to_ascii_idna (const std::string &host) |
| static void | load_blocklist (const std::string &hint) |
| static bool | match_blocklist_pattern (const std::string &pattern, const std::string &host) |
| static bool | is_blocked_host (const std::string &host) |
Variables | |
| static std::mutex | g_verdict_mutex |
| static std::unordered_map< std::string, VerdictEntry > | g_verdicts |
| static std::unordered_set< std::string > | g_blocklist |
| static std::shared_mutex | g_hot_mtx |
| static std::unordered_map< std::string, std::pair< bool, uint64_t > > | g_hot |
| static constexpr uint64_t | TTL_MS = 15000 |
| static const std::string | kBlocklistFile = "/.local/share/BastionGuard/blocklist_hosts.txt" |
|
static |
Definition at line 67 of file WebProbe.cpp.
References expand_user_path().
Referenced by expand_user_path(), and load_blocklist().
|
static |
Definition at line 130 of file WebProbe.cpp.
References g_blocklist, g_verdict_mutex, is_blocked_host(), and match_blocklist_pattern().
Referenced by WebProbe::check_url(), and is_blocked_host().
|
static |
Definition at line 89 of file WebProbe.cpp.
References _, expand_user_path(), g_blocklist, g_verdict_mutex, kBlocklistFile, load_blocklist(), and to_ascii_idna().
Referenced by load_blocklist(), WebProbe::reload_blocklist(), and WebProbe::WebProbe().
|
static |
Definition at line 119 of file WebProbe.cpp.
References match_blocklist_pattern().
Referenced by is_blocked_host(), and match_blocklist_pattern().
|
inlinestatic |
Definition at line 62 of file WebProbe.cpp.
References now_ms().
Referenced by WebProbe::check_url(), and now_ms().
|
static |
Definition at line 73 of file WebProbe.cpp.
References to_ascii_idna().
Referenced by WebProbe::extract_host(), load_blocklist(), and to_ascii_idna().
|
static |
Definition at line 57 of file WebProbe.cpp.
Referenced by is_blocked_host(), and load_blocklist().
|
static |
Definition at line 59 of file WebProbe.cpp.
Referenced by WebProbe::check_url().
|
static |
Definition at line 58 of file WebProbe.cpp.
Referenced by WebProbe::check_url().
|
static |
Definition at line 55 of file WebProbe.cpp.
Referenced by is_blocked_host(), and load_blocklist().
|
static |
Definition at line 56 of file WebProbe.cpp.
|
static |
Definition at line 87 of file WebProbe.cpp.
Referenced by load_blocklist().
|
staticconstexpr |
Definition at line 60 of file WebProbe.cpp.
Referenced by WebProbe::check_url().