#include <bank_filter.hpp>
Classes | |
| struct | CidrEntry |
Public Member Functions | |
| void | load () |
| bool | is_proxy_bypass (const std::string &host) const |
| bool | is_secure (const std::string &host) const |
| bool | is_trusted (const std::string &host) const |
| bool | is_bank (const std::string &host) const |
| bool | is_payment (const std::string &host) const |
Static Public Member Functions | |
| static bool | is_local_network (const std::string &host_raw) |
Static Private Member Functions | |
| static const std::unordered_set< std::string > & | get_builtin_payment_providers () |
| static const std::unordered_set< std::string > & | get_builtin_exclusions () |
| static void | load_file (const std::filesystem::path &path, std::unordered_set< std::string > &target, const char *label) |
| static bool | match (const std::string &host, const std::unordered_set< std::string > &set) |
| static bool | parse_cidr (const std::string &s, CidrEntry &out) |
| static bool | match_cidr (const std::string &host_raw, const std::vector< CidrEntry > &cidrs) |
Private Attributes | |
| std::shared_mutex | mutex_ |
| std::unordered_set< std::string > | banks_ |
| std::unordered_set< std::string > | user_banks_ |
| std::unordered_set< std::string > | payments_ |
| std::unordered_set< std::string > | trusted_ |
| std::unordered_set< std::string > | exclusions_ |
| std::unordered_set< std::string > | proxy_bypass_ |
| std::vector< CidrEntry > | proxy_bypass_cidrs_ |
Definition at line 113 of file bank_filter.hpp.
|
inlinestaticprivate |
Definition at line 395 of file bank_filter.hpp.
Referenced by load().
|
inlinestaticprivate |
Definition at line 364 of file bank_filter.hpp.
Referenced by is_payment(), and is_secure().
|
inline |
Definition at line 321 of file bank_filter.hpp.
References banks_, exclusions_, is_local_network(), match(), mutex_, proxy_bypass_, and user_banks_.
Referenced by handle_client().
|
inlinestatic |
Definition at line 208 of file bank_filter.hpp.
References AF_INET, AF_INET6, and is_local_network().
Referenced by handle_client(), is_bank(), is_local_network(), is_payment(), and is_secure().
|
inline |
Definition at line 329 of file bank_filter.hpp.
References exclusions_, get_builtin_payment_providers(), is_local_network(), match(), mutex_, payments_, and proxy_bypass_.
|
inline |
Definition at line 178 of file bank_filter.hpp.
References match(), match_cidr(), mutex_, proxy_bypass_, and proxy_bypass_cidrs_.
Referenced by handle_client().
|
inline |
Definition at line 303 of file bank_filter.hpp.
References banks_, exclusions_, get_builtin_payment_providers(), is_local_network(), match(), mutex_, payments_, proxy_bypass_, and user_banks_.
Referenced by handle_client().
|
inline |
Definition at line 316 of file bank_filter.hpp.
|
inline |
Definition at line 115 of file bank_filter.hpp.
References _, banks_, exclusions_, get_builtin_exclusions(), load_file(), mutex_, parse_cidr(), payments_, proxy_bypass_, proxy_bypass_cidrs_, trusted_, and user_banks_.
Referenced by main().
|
inlinestaticprivate |
Definition at line 508 of file bank_filter.hpp.
References _, extract_list(), and read_file().
Referenced by load().
|
inlinestaticprivate |
Definition at line 527 of file bank_filter.hpp.
Referenced by is_bank(), is_payment(), is_proxy_bypass(), is_secure(), and is_trusted().
|
inlinestaticprivate |
Definition at line 595 of file bank_filter.hpp.
References AF_INET, and AF_INET6.
Referenced by is_proxy_bypass().
|
inlinestaticprivate |
Definition at line 563 of file bank_filter.hpp.
References DomainFilter::CidrEntry::addr, AF_INET, AF_INET6, DomainFilter::CidrEntry::is_v6, and DomainFilter::CidrEntry::prefix.
Referenced by load().
|
private |
Definition at line 341 of file bank_filter.hpp.
Referenced by is_bank(), is_secure(), and load().
|
private |
Definition at line 345 of file bank_filter.hpp.
Referenced by is_bank(), is_payment(), is_secure(), and load().
|
mutableprivate |
Definition at line 339 of file bank_filter.hpp.
Referenced by is_bank(), is_payment(), is_proxy_bypass(), is_secure(), is_trusted(), and load().
|
private |
Definition at line 343 of file bank_filter.hpp.
Referenced by is_payment(), is_secure(), and load().
|
private |
Definition at line 346 of file bank_filter.hpp.
Referenced by is_bank(), is_payment(), is_proxy_bypass(), is_secure(), and load().
|
private |
Definition at line 354 of file bank_filter.hpp.
Referenced by is_proxy_bypass(), and load().
|
private |
Definition at line 344 of file bank_filter.hpp.
Referenced by is_trusted(), and load().
|
private |
Definition at line 342 of file bank_filter.hpp.
Referenced by is_bank(), is_secure(), and load().