refactor: user client and proxy handling; remove unused auth code

This commit is contained in:
krau
2025-06-29 22:25:05 +08:00
parent 3b85911e3d
commit c795f957a9
6 changed files with 75 additions and 36 deletions

View File

@@ -0,0 +1,15 @@
package netutil
import (
"net/url"
"golang.org/x/net/proxy"
)
func NewProxyDialer(proxyUrl string) (proxy.Dialer, error) {
url, err := url.Parse(proxyUrl)
if err != nil {
return nil, err
}
return proxy.FromURL(url, proxy.Direct)
}