feat UrlToMetadata

This commit is contained in:
timerzz 2024-12-11 13:22:19 +08:00
parent a581c72a65
commit 23dc1eaeff

View File

@ -51,7 +51,7 @@ func HTTPGetViaProxy(ctx context.Context, clashProxy C.Proxy, url string) error
ctx, cancel := context.WithTimeout(ctx, time.Duration(config.Config.HealthCheckTimeout)*time.Second)
defer cancel()
addr, err := urlToMetadata(url)
addr, err := UrlToMetadata(url)
if err != nil {
return err
}
@ -107,7 +107,7 @@ func HTTPGetViaProxy(ctx context.Context, clashProxy C.Proxy, url string) error
return nil
}
func urlToMetadata(rawURL string) (addr C.Metadata, err error) {
func UrlToMetadata(rawURL string) (addr C.Metadata, err error) {
u, err := url.Parse(rawURL)
if err != nil {
return