mirror of
https://github.com/XTLS/Xray-core.git
synced 2026-05-08 14:13:22 +00:00
https://github.com/XTLS/Xray-core/pull/5814#issuecomment-4231071433 Closes https://github.com/XTLS/Xray-core/issues/4422
18 lines
358 B
Go
18 lines
358 B
Go
package geodata
|
|
|
|
type DomainRegistry struct {
|
|
factory DomainMatcherFactory
|
|
}
|
|
|
|
func (r *DomainRegistry) BuildDomainMatcher(rules []*DomainRule) (DomainMatcher, error) {
|
|
return r.factory.BuildMatcher(rules)
|
|
}
|
|
|
|
func newDomainRegistry() *DomainRegistry {
|
|
return &DomainRegistry{
|
|
factory: newDomainMatcherFactory(),
|
|
}
|
|
}
|
|
|
|
var DomainReg = newDomainRegistry()
|