mirror of
https://github.com/bestnite/sub2clash.git
synced 2025-07-06 21:02:34 +08:00
u
This commit is contained in:
@ -77,14 +77,18 @@ func DecodeBase64(s string) (string, error) {
|
||||
return string(decodeStr), nil
|
||||
}
|
||||
|
||||
func ParseProxies(proxies ...string) ([]P.Proxy, error) {
|
||||
type ParseConfig struct {
|
||||
UseUDP bool
|
||||
}
|
||||
|
||||
func ParseProxies(config ParseConfig, proxies ...string) ([]P.Proxy, error) {
|
||||
var result []P.Proxy
|
||||
for _, proxy := range proxies {
|
||||
if proxy != "" {
|
||||
var proxyItem P.Proxy
|
||||
var err error
|
||||
|
||||
proxyItem, err = ParseProxyWithRegistry(proxy)
|
||||
proxyItem, err = ParseProxyWithRegistry(config, proxy)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
Reference in New Issue
Block a user