Feature: support proxy-group in relay (#597)

This commit is contained in:
duama
2020-05-07 21:42:52 +08:00
committed by GitHub
parent b979ff0bc2
commit 752f87a8dc
8 changed files with 52 additions and 22 deletions

View File

@ -56,6 +56,11 @@ func (f *Fallback) MarshalJSON() ([]byte, error) {
})
}
func (f *Fallback) Unwrap(metadata *C.Metadata) C.Proxy {
proxy := f.findAliveProxy()
return proxy
}
func (f *Fallback) proxies() []C.Proxy {
elm, _, _ := f.single.Do(func() (interface{}, error) {
return getProvidersProxies(f.providers), nil