This commit is contained in:
2025-07-05 22:54:02 +08:00
parent 0fa95888cb
commit ff81d03492
25 changed files with 221 additions and 118 deletions

View File

@ -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
}