Re-exports§
pub use serde_yaml_ng;
Structs§
- AhoCorasick
- An automaton for searching multiple strings in linear time.
- Clash
Rule Matcher - convenient struct for checking all rules.
- Domain
Keyword Matcher - Domain
Suffix Matcher - Ip6Matcher
- IpMatcher
- IpTrie2
- Trie struct for Ipv4Net using radix_trie::Trie, which is a bit slower than prefix_trie::PrifixMap
- Prefix
Map - Prefix map implemented as a prefix tree.
- Rule
Config - RuleSet
- Trie
- Data-structure for storing and querying string-like keys and associated values.
Enums§
Constants§
Traits§
- Trie
Common - Common functionality available for tries and subtries.
Functions§
- check_
ip6_ trie - check_
ip_ trie - check_
ip_ trie2 - check_
keyword_ ac - check_
keyword_ ac2 - faster than ac, but requries an extra targets lookup vec by get_keywords_targets
- check_
keyword_ dummy - check_
prefix_ trie - unlike check_suffix_trie, this function matches prefix
- check_
suffix_ dummy - check_
suffix_ trie - the function matches suffix by reversing the domain
- gen_
ip6_ trie - the function store ips in the trie with their target index of the map
- gen_
ip_ trie - gen_
ip_ trie2 - gen_
keywords_ ac - gen_
keywords_ ac2 - gen_
prefix_ trie - the function store domains in the trie with their target index of the map
- gen_
suffix_ trie - the function store domain chars in the result trie in reversed order, and with their target index of the map
- get_
domain_ rules - get_
ip6_ cidr_ rules - get_
ip_ cidr_ rules - get_
item_ target_ map - for DOMAIN, PROCESS-NAME etc. that matches directly
- get_
keyword_ rules - get_
keywords_ targets - get_
suffix_ rules - get_
target_ item_ map - for SUFFIX, KEYWORD,CIDR etc. that require iter.
- load_
rule_ set_ from_ file - load_
rules_ from_ file - merge_
method_ rules_ map - parse_
rule_ set_ as_ classic - parse_
rule_ set_ as_ domain_ suffix_ trie - init like let mut trie = Trie::new();
- parse_
rule_ set_ as_ ip_ cidr_ trie - init like let mut trie = PrefixMap::<Ipv4Net, usize>::new();
- parse_
rules - parse clash rules into METHOD-rules hashmap, the ‘,’ splitted items is pushed in the inner Vec