diff --git a/.golangci.yaml b/.golangci.yaml index 3455902..26a4188 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -1,13 +1,20 @@ linters: disable-all: true enable: - - gofumpt - - staticcheck - - govet - gci + - gofumpt + - gosimple + - govet + - ineffassign + - misspell + - staticcheck + - unconvert + - unused + - usestdlibvars linters-settings: gci: + custom-order: true sections: - standard - default diff --git a/component/simple-obfs/http.go b/component/simple-obfs/http.go index 57cdec6..f9a2ed1 100644 --- a/component/simple-obfs/http.go +++ b/component/simple-obfs/http.go @@ -65,7 +65,7 @@ func (ho *HTTPObfs) Write(b []byte) (int, error) { if ho.firstRequest { randBytes := make([]byte, 16) rand.Read(randBytes) - req, _ := http.NewRequest("GET", fmt.Sprintf("http://%s/", ho.host), bytes.NewBuffer(b[:])) + req, _ := http.NewRequest(http.MethodGet, fmt.Sprintf("http://%s/", ho.host), bytes.NewBuffer(b[:])) req.Header.Set("User-Agent", fmt.Sprintf("curl/7.%d.%d", mRand.Int()%54, mRand.Int()%2)) req.Header.Set("Upgrade", "websocket") req.Header.Set("Connection", "Upgrade")