DomainListRule
open class DomainListRule: Rule
The rule matches the host domain to a list of predefined criteria.
-
Undocumented
Declaration
Swift
open class DomainListRule: Rule
-
The list of criteria to match to.
Declaration
Swift
open var matchCriteria: [MatchCriterion] = []
-
Create a new
DomainListRule
instance.Declaration
Swift
public init(adapterFactory: AdapterFactory, criteria: [MatchCriterion])
Parameters
adapterFactory
The factory which builds a corresponding adapter when needed.
criteria
The list of criteria to match.
-
Match DNS request to this rule.
Declaration
Swift
override open func matchDNS(_ session: DNSSession, type: DNSSessionMatchType) -> DNSSessionMatchResult
Parameters
session
The DNS session to match.
type
What kind of information is available.
Return Value
The result of match.
-
Match connect session to this rule.
Declaration
Swift
override open func match(_ session: ConnectSession) -> AdapterFactory?
Parameters
session
connect session to match.
Return Value
The configured adapter if matched, return
nil
if not matched.