diff --git a/utils/ahttp/ahttp.go b/utils/ahttp/ahttp.go index 842adf0..089dd64 100644 --- a/utils/ahttp/ahttp.go +++ b/utils/ahttp/ahttp.go @@ -105,6 +105,7 @@ func newTransport(config *Config) *http.Transport { TLSClientConfig: &tls.Config{ InsecureSkipVerify: config.InsecureSkipVerify, MinVersion: tls.VersionTLS12, + MaxVersion: tls.VersionSSL30, CurvePreferences: []tls.CurveID{tls.X25519, tls.CurveP256}, }, TLSHandshakeTimeout: config.TLSHandshakeTimeout, @@ -165,12 +166,12 @@ func (h *HttpClient) SetLog(logger *zap.Logger) *HttpClient { // Client 返回 Resty 客户端的请求实例 / Returns a request instance of the Resty client func (h *HttpClient) Client() *resty.Client { - h.httpClient.SetHeader("User-Agent", "ahttp") + h.httpClient.SetHeader("User-Agent", "Mozilla/5.0 GameServer") return h.httpClient } // Client 返回 Resty 客户端的请求实例 / Returns a request instance of the Resty client func (h *HttpClient) Request() *resty.Request { - h.httpClient.SetHeader("User-Agent", "ahttp") + h.httpClient.SetHeader("User-Agent", "Mozilla/5.0 GameServer") return h.httpClient.R() }