From e9caeef21f074e9c70565005aa00568fcd961fc7 Mon Sep 17 00:00:00 2001 From: theodorsm Date: Thu, 25 Apr 2024 00:01:29 +0200 Subject: [PATCH] Add lint workflow, update READE and fix import --- .github/workflows/lint.yaml | 31 +++++++++++++++++++++++++++++++ README.md | 2 +- pkg/mimicry/mimic_client_hello.go | 2 +- 3 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/lint.yaml diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml new file mode 100644 index 0000000..8944acf --- /dev/null +++ b/.github/workflows/lint.yaml @@ -0,0 +1,31 @@ +name: Lint +on: + pull_request: + branches: + - main + push: + branches: + +permissions: + contents: read + +jobs: + linting: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.ref }} + + - name: Setup go + uses: actions/setup-go@v5 + with: + go-version: '1.19' + + - name: golangci-lint + uses: golangci/golangci-lint-action@v4 + with: + version: v1.56.2 + skip-pkg-cache: true + skip-build-cache: true diff --git a/README.md b/README.md index 89af2e4..ecbe7db 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ covertDTLS is a library inspired by [uTLS](https://github.com/refraction-network ## Why does this library exists? -The censorship circumvention system [Snowflake](https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake) has previously been blocked by fingerprinting the dtls handshake. This library is a module that extends the `pion/dtls` library by hooking and manipulating messages to make them indistinguishable from other dtls implementations used for webrtc traffic. +The censorship circumvention system [Snowflake](https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake) has previously been blocked by fingerprinting the dtls handshake. This library is a module that extends the `pion/dtls` library by hooking and manipulating handshake messages to make them indistinguishable from other dtls implementations used for webrtc traffic. ## Fingerprint generation diff --git a/pkg/mimicry/mimic_client_hello.go b/pkg/mimicry/mimic_client_hello.go index 5a5b630..96ff1bc 100644 --- a/pkg/mimicry/mimic_client_hello.go +++ b/pkg/mimicry/mimic_client_hello.go @@ -6,7 +6,7 @@ import ( "github.com/pion/dtls/v2/pkg/protocol/extension" "github.com/pion/dtls/v2/pkg/protocol/handshake" - "github.com/theodorsm/dtls-webrtc-fingerprint/pkg/fingerprints" + "github.com/theodorsm/covert-dtls/pkg/fingerprints" ) var errBufferTooSmall = errors.New("buffer is too small") //nolint:goerr113