This commit is contained in:
WJQSERVER 2024-10-20 17:39:27 +08:00
parent c50f23c399
commit e5d941414e
11 changed files with 51 additions and 9 deletions

View file

@ -117,7 +117,8 @@ func NoRouteHandler(cfg *config.Config) gin.HandlerFunc {
func ProxyRequest(c *gin.Context, u string, cfg *config.Config, mode string) {
method := c.Request.Method
logInfo("%s %s %s %s", c.ClientIP(), method, u, c.Request.Header.Get("User-Agent"))
// 记录日志 IP 地址、请求方法、请求 URL、请求头 User-Agent 、HTTP版本
logInfo("%s %s %s %s %s", c.ClientIP(), method, u, c.Request.Header.Get("User-Agent"), c.Request.Proto)
client := createHTTPClient(mode)