feat: support users to customize download ua

This commit is contained in:
xishang0128
2023-09-07 18:44:58 +08:00
parent a1eab125ee
commit 7286391883
3 changed files with 12 additions and 4 deletions

View File

@ -10,14 +10,12 @@ import (
"time"
"github.com/Dreamacro/clash/component/tls"
C "github.com/Dreamacro/clash/constant"
"github.com/Dreamacro/clash/listener/inner"
)
const (
UA = "clash.meta"
)
func HttpRequest(ctx context.Context, url, method string, header map[string][]string, body io.Reader) (*http.Response, error) {
UA := C.UA
method = strings.ToUpper(method)
urlRes, err := URL.Parse(url)
if err != nil {