mirror of
https://github.com/nadoo/glider.git
synced 2026-11-19 07:09:42 +08:00
direct: optimize codes
This commit is contained in:
1 parent
7f85f664e3
commit
53fe94251f
3 files changed
+12
-9
No files matched your search
+3
-1
@@ -40,9 +40,11 @@ func NewProxy(mainForwarders []string, mainStrategy *Strategy, rules []*Config)
|
||||
}
|
||||
}
|
||||
|
||||
direct := NewFwdrGroup("", nil, mainStrategy)
|
||||
rd.domainMap.Store("direct", direct)
|
||||
|
||||
// if there's any forwarder defined in main config, make sure they will be accessed directly.
|
||||
if len(mainForwarders) > 0 {
|
||||
direct := NewFwdrGroup("", nil, mainStrategy)
|
||||
for _, f := range rd.main.fwdrs {
|
||||
addr := strings.Split(f.addr, ",")[0]
|
||||
host, _, _ := net.SplitHostPort(addr)
|
||||
|
||||
Reference in new issue
Block a user