Commit 4771cd35 authored by wangmingming's avatar wangmingming

11

parent e8398a84
......@@ -3,8 +3,8 @@ package main
import (
nested "github.com/antonfisher/nested-logrus-formatter"
"github.com/gin-gonic/gin"
"github.com/natefinch/lumberjack"
"github.com/sirupsen/logrus"
"gopkg.in/natefinch/lumberjack.v2"
"time"
"tls-forward/tls"
)
......@@ -44,7 +44,8 @@ func main() {
Compress: true, // disabled by default
}
logrus.SetOutput(logWriter)
//logrus.SetOutput(io.MultiWriter(logWriter, os.Stdout))
//logrus.SetOutput(os.Stdout)
r := gin.New() //创建一个默认的路由引擎
r.Use(LoggerMiddleware())
r.POST("/tls/forward", tls.Forward)
......
......@@ -26,6 +26,7 @@ func Forward(c *gin.Context) {
})
return
}
logrus.Infof("开始转发 url: %s proxy: %s", forWard.Url, forWard.Proxy)
t1 := time.Now()
// 开始转发
client, err := NewClient(forWard)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment