mirror of
https://github.com/nadoo/glider.git
synced 2026-11-19 07:09:42 +08:00
This commit is contained in:
1 parent
38b34030bc
commit
579b427e9d
10 files changed
+47
-41
No files matched your search
+1
-1
@@ -56,7 +56,7 @@ func NewProxy(mainForwarders []string, mainStrategy *Strategy, rules []*Config)
|
||||
// if there's any forwarder defined in main config, make sure they will be accessed directly.
|
||||
if len(mainForwarders) > 0 {
|
||||
for _, f := range rd.main.fwdrs {
|
||||
addr := strings.Split(f.addr, ",")[0]
|
||||
addr, _, _ := strings.Cut(f.addr, ",")
|
||||
host, _, _ := net.SplitHostPort(addr)
|
||||
if _, err := netip.ParseAddr(host); err != nil {
|
||||
rd.domainMap.Store(strings.ToLower(host), direct)
|
||||
|
||||
Reference in new issue
Block a user