github.com/yaling888/clash@v1.53.0/adapter/outboundgroup/common.go (about) 1 package outboundgroup 2 3 import ( 4 "time" 5 6 C "github.com/yaling888/clash/constant" 7 "github.com/yaling888/clash/constant/provider" 8 ) 9 10 const ( 11 defaultGetProxiesDuration = time.Second * 5 12 ) 13 14 func getProvidersProxies(providers []provider.ProxyProvider, touch bool) []C.Proxy { 15 proxies := []C.Proxy{} 16 for _, pd := range providers { 17 if touch { 18 pd.Touch() 19 } 20 proxies = append(proxies, pd.Proxies()...) 21 } 22 return proxies 23 } 24 25 func touchProvidersProxies(providers []provider.ProxyProvider) { 26 for _, pd := range providers { 27 pd.Touch() 28 } 29 }