http: close remote conn after relay

This commit is contained in:
nadoo 2019-10-21 14:16:49 +08:00
parent 486c455236
commit 39cd60c50b
7 changed files with 21 additions and 12 deletions

View File

@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.13
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.13
@ -26,7 +26,7 @@ jobs:
needs: [test]
steps:
- name: Set up Go 1.13
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.13

View File

@ -9,14 +9,20 @@ jobs:
name: Release on GitHub
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.13
id: go
- name: Check out code
uses: actions/checkout@v1
- name: Create release on GitHub
uses: docker://goreleaser/goreleaser:latest
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
uses: goreleaser/goreleaser-action@v1
with:
version: latest
args: release
if: success()
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -2,10 +2,12 @@
# release:
# git tag -a v0.1.0 -m "v0.1.0"
# #git tag -d v0.1.0
# git push origin v0.1.0
# goreleaser release --skip-publish --rm-dist
# #git tag -d v0.1.0
# #git push origin --delete tag v0.1.0
# snapshot:
# goreleaser --snapshot --rm-dist

2
go.mod
View File

@ -16,7 +16,7 @@ require (
github.com/xtaci/lossyconn v0.0.0-20190602105132-8df528c0c9ae // indirect
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550
golang.org/x/net v0.0.0-20191014212845-da9a3fd4c582 // indirect
golang.org/x/sys v0.0.0-20191018095205-727590c5006e // indirect
golang.org/x/sys v0.0.0-20191020212454-3e7259c5e7c2 // indirect
)
// Replace dependency modules with local developing copy

4
go.sum
View File

@ -44,6 +44,6 @@ golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20191009170203-06d7bd2c5f4f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191010194322-b09406accb47 h1:/XfQ9z7ib8eEJX2hdgFTZJ/ntt0swNk5oYBziWeTCvY=
golang.org/x/sys v0.0.0-20191010194322-b09406accb47/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191018095205-727590c5006e h1:ZtoklVMHQy6BFRHkbG6JzK+S6rX82//Yeok1vMlizfQ=
golang.org/x/sys v0.0.0-20191018095205-727590c5006e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191020212454-3e7259c5e7c2 h1:nq114VpM8lsSlP+lyUbANecYHYiFcSNFtqcBlxRV+gA=
golang.org/x/sys v0.0.0-20191020212454-3e7259c5e7c2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=

View File

@ -30,7 +30,7 @@ import (
_ "github.com/nadoo/glider/proxy/ws"
)
var version = "0.9.0"
var version = "0.9.1"
func main() {
// read configs

View File

@ -93,6 +93,7 @@ func (s *HTTP) servHTTPS(r *request, c net.Conn) {
log.F("[http] %s <-> %s [c] via %s, error in dial: %v", c.RemoteAddr(), r.uri, p, err)
return
}
defer rc.Close()
c.Write([]byte("HTTP/1.1 200 Connection established\r\n\r\n"))