diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e476cb2..a47a148 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,6 +13,8 @@ jobs: uses: actions/setup-go@v1 with: go-version: 1.15.x + - name: Go Env + run: go env - name: Test run: go test -v . @@ -27,5 +29,7 @@ jobs: uses: actions/setup-go@v1 with: go-version: 1.15.x + - name: Go Env + run: go env - name: Build run: go build -v . \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cc21bfc..8cdb634 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,6 +17,8 @@ jobs: uses: actions/setup-go@v1 with: go-version: 1.15.x + - name: Go Env + run: go env - name: Run GoReleaser uses: goreleaser/goreleaser-action@v2 with: diff --git a/main.go b/main.go index 39f5896..85af223 100644 --- a/main.go +++ b/main.go @@ -1,10 +1,8 @@ package main import ( - "context" "fmt" stdlog "log" - "net" "os" "os/signal" "syscall" @@ -36,7 +34,7 @@ import ( _ "github.com/nadoo/glider/proxy/ws" ) -var version = "0.10.3" +var version = "0.10.4" func main() { // read configs @@ -78,12 +76,6 @@ func main() { } d.Start() - - net.DefaultResolver.PreferGo = true - net.DefaultResolver.Dial = func(ctx context.Context, network, address string) (net.Conn, error) { - d := net.Dialer{} - return d.DialContext(ctx, "udp", conf.DNS) - } } // enable checkers diff --git a/proxy/http/server.go b/proxy/http/server.go index ab0e70d..773e336 100644 --- a/proxy/http/server.go +++ b/proxy/http/server.go @@ -161,7 +161,7 @@ func (s *HTTP) servHTTP(req *request, c *conn.Conn) { writeStartLine(buf, proto, code, status) writeHeaders(buf, header) - log.F("[http] %s <-> %s", c.RemoteAddr(), req.target) + log.F("[http] %s <-> %s via %s", c.RemoteAddr(), req.target, dialer.Addr()) c.Write(buf.Bytes()) conn.Copy(c, r)