mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2024-09-06 09:02:32 +00:00
24 lines
498 B
Go
24 lines
498 B
Go
package outboundgroup
|
|
|
|
import (
|
|
"time"
|
|
|
|
C "github.com/Dreamacro/clash/constant"
|
|
"github.com/Dreamacro/clash/constant/provider"
|
|
)
|
|
|
|
const (
|
|
defaultGetProxiesDuration = time.Second * 5
|
|
)
|
|
|
|
func getProvidersProxies(providers []provider.ProxyProvider, touch bool) []C.Proxy {
|
|
proxies := []C.Proxy{}
|
|
for _, provider := range providers {
|
|
if touch {
|
|
proxies = append(proxies, provider.ProxiesWithTouch()...)
|
|
} else {
|
|
proxies = append(proxies, provider.Proxies()...)
|
|
}
|
|
}
|
|
return proxies
|
|
}
|