diff --git a/.github/goreleaser.yml b/.github/goreleaser.yml new file mode 100644 index 0000000..82d9f61 --- /dev/null +++ b/.github/goreleaser.yml @@ -0,0 +1,32 @@ +# test this file with +# goreleaser --skip-publish --rm-dist --config goreleaser.yml +builds: + - main: ./main.go + env: + - CGO_ENABLED=0 + ldflags: + - -s -w -X main.version={{.Version}} + goos: + - linux + - darwin + - windows + goarch: + - 386 + - amd64 + - arm + - arm64 + goarm: + - 6 + - 7 +archives: + - format: gz + files: + - none* +release: + prerelease: auto +changelog: + sort: asc + filters: + exclude: + - "^docs:" + - "^test:" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..e9b226e --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,43 @@ +on: [push, pull_request] +name: CI +jobs: + # ================ + # TEST JOB + # runs on every push and PR + # runs 2x3 times (see matrix) + # ================ + test: + name: Test + strategy: + matrix: + go-version: [1.13.x, 1.14.x] + platform: [ubuntu-latest, macos-latest, windows-latest] + runs-on: ${{ matrix.platform }} + steps: + - name: Install Go + uses: actions/setup-go@v1 + with: + go-version: ${{ matrix.go-version }} + - name: Checkout code + uses: actions/checkout@v2 + - name: Build + run: go build -v . + # ================ + # RELEASE JOB + # runs after a success test + # only runs on push "v*" tag + # ================ + release: + name: Release + if: startsWith(github.ref, 'refs/tags/v') + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@v2 + - name: goreleaser + if: success() + uses: docker://goreleaser/goreleaser:latest + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + args: release --config .github/goreleaser.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index eefb3bd..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,19 +0,0 @@ -on: - push: - tags: - - "v*" -name: CI -jobs: - release: - name: Release - runs-on: ubuntu-latest - steps: - - name: Check out code - uses: actions/checkout@master - - name: goreleaser - uses: docker://goreleaser/goreleaser:latest - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - args: release - if: success() diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..aa8e54f --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 dev@jpillora.com + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index 2e53546..e2195ef 100644 --- a/README.md +++ b/README.md @@ -92,27 +92,4 @@ Replacing "ip": "([^"]+)" with "ip": "REDACTED" * Implement `tcpproxy.Conn` which provides accounting and hooks into the underlying `net.Conn` * Verify wire protocols by providing `encoding.BinaryUnmarshaler` to a `tcpproxy.Conn` * Modify wire protocols by also providing a map function -* Implement [SOCKS v5](https://www.ietf.org/rfc/rfc1928.txt) to allow for user-decided remote addresses - -#### MIT License - -Copyright © 2014 Jaime Pillora - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +* Implement [SOCKS v5](https://www.ietf.org/rfc/rfc1928.txt) to allow for user-decided remote addresses \ No newline at end of file