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
+1
-1
@@ -219,7 +219,7 @@ func (c *Client) SetServers(domain string, servers ...string) {
|
||||
func (c *Client) GetServers(domain string) []string {
|
||||
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], ".")
|
||||
|
||||
if servers, ok := c.upServerMap[domain]; ok {
|
||||
|
||||
Reference in new issue
Block a user