mirror of
https://github.com/nadoo/glider.git
synced 2026-11-19 07:09:42 +08:00
rule: allow to use root domains like com/net/cn... #43
This commit is contained in:
1 parent
8c922db612
commit
f9a21f5951
5 files changed
+12
-6
No files matched your search
@@ -126,7 +126,7 @@ func (m *Manager) AddDomainIP(domain, ip string) error {
|
||||
if ip != "" {
|
||||
domainParts := strings.Split(domain, ".")
|
||||
length := len(domainParts)
|
||||
for i := length - 2; i >= 0; i-- {
|
||||
for i := length - 1; i >= 0; i-- {
|
||||
domain := strings.Join(domainParts[i:length], ".")
|
||||
|
||||
// find in domainMap
|
||||
|
||||
Reference in new issue
Block a user