Skip to content
Merged
Show file tree
Hide file tree
Changes from 31 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
93d7d1c
fix(tunnel): add ping timeout so dead connections are detected
jpillora Jun 12, 2026
05c0c2b
fix(settings): make authfile watcher survive rename/truncate/symlink
jpillora Jun 12, 2026
4071b54
fix(tunnel): enforce per-user ACL on socks channels
jpillora Jun 12, 2026
54f64dd
fix(tunnel): sweep over-cap UDP flows instead of leaking them
jpillora Jun 12, 2026
cd1652c
chore(tracker): triage stale dependabot PRs and resolved issues
jpillora Jun 12, 2026
7b24637
chore(ci): scope permissions, goreleaser-built docker images
jpillora Jun 12, 2026
267a4d0
feat(tunnel): half-close support and dial-failure propagation
jpillora Jun 12, 2026
4036830
feat(server): graceful shutdown on SIGTERM with http drain
jpillora Jun 12, 2026
9091b8c
fix(cnet): cap websocket message size (pre-auth memory DoS)
jpillora Jun 12, 2026
8ee4cdf
fix(share): fall back to module version when ldflags absent
jpillora Jun 12, 2026
612cf5f
fix(tunnel): unbind earlier proxies when BindRemotes partially fails
jpillora Jun 12, 2026
91cb35d
fix(server): remove auth session map, harden authUser
jpillora Jun 12, 2026
6cb6683
fix(client): non-zero exit on give-up, saner retry backoff
jpillora Jun 12, 2026
aae75eb
fix(server): auth string validation, pinned --auth user, live ACLs
jpillora Jun 12, 2026
24efc7f
feat(server): info-level session open/close and failed-auth logs
jpillora Jun 12, 2026
973fc8f
fix(settings): lowercase /UDP remote suffix proto
jpillora Jun 12, 2026
a684ca4
fix(server): return key-loading errors instead of log.Fatal
jpillora Jun 12, 2026
b7d0f3c
docs: fix help-text errors, refresh README, document env knobs
jpillora Jun 12, 2026
2d6034f
feat(client): accept socks5:// scheme in --proxy
jpillora Jun 12, 2026
72b71d6
chore: typo sweep, server_listen dead code, codespell CI
jpillora Jun 12, 2026
b1636e0
fix(client): exact legacy fingerprint match, warn unanchored ACLs
jpillora Jun 12, 2026
0e6584b
chore(build): makefile flags, build tags, api deprecations, test nits
jpillora Jun 12, 2026
d728513
test(e2e): wait for reverse listeners after client readiness
jpillora Jun 12, 2026
fcf3aec
docs: state minimum OS versions for release binaries
jpillora Jun 12, 2026
af80499
chore(tracker): record parked statuses for decision-gated tasks
jpillora Jun 12, 2026
7f47b44
docs: add 1.12 unreleased changelog entry for this branch
jpillora Jun 12, 2026
47ea977
docs: reflect branch changes throughout the README body
jpillora Jun 12, 2026
1bcc1af
chore(deps): bump go modules and CI action versions
jpillora Jul 1, 2026
3c66f9b
fix(tunnel): log ACL denials at info level
jpillora Jul 1, 2026
c4038c3
docs: 1.12 upgrade notes, changelog breaking entries, fingerprint help
jpillora Jul 1, 2026
e0b639d
chore(deps): bump x/crypto, x/net, x/sync to latest dependabot targets
jpillora Jul 16, 2026
cc321cf
docs: add 1.12-changes.md (UX & compatibility notes)
jpillora Jul 16, 2026
0b2d06e
fix(cnet): full-close fallback when a stream can't half-close
jpillora Jul 17, 2026
49e1b0b
fix(settings): poll for symlink swaps; close watcher on setup error
jpillora Jul 17, 2026
3d91397
fix(server): don't panic when client drops before config request
jpillora Jul 17, 2026
4b5cb3c
feat(ci): two-stage release β€” draft + versioned images, then promote
jpillora Jul 17, 2026
10bf226
chore(release): replace stale drafts on re-run; document CloseWrite f…
jpillora Jul 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[codespell]
skip = go.sum,go.mod,.git,dist,TASKS.md
ignore-words-list = unparseable
20 changes: 7 additions & 13 deletions .github/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
# build stage
FROM golang:alpine AS build
RUN apk update && apk add git
ADD . /src
WORKDIR /src
ENV CGO_ENABLED=0
RUN go build \
-ldflags "-X github.com/jpillora/chisel/share.BuildVersion=$(git describe --abbrev=0 --tags)" \
-o /tmp/bin
# run stage
# goreleaser builds the binary and provides it in the build context
FROM alpine:3 AS certs
RUN apk add --no-cache ca-certificates

FROM scratch
LABEL maintainer="dev@jpillora.com"
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
WORKDIR /app
COPY --from=build /tmp/bin /app/bin
ENTRYPOINT ["/app/bin"]
COPY chisel /app/bin
ENTRYPOINT ["/app/bin"]
136 changes: 136 additions & 0 deletions .github/goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,139 @@ changelog:
exclude:
- "^docs:"
- "^test:"

dockers:
- image_templates:
- "ghcr.io/jpillora/chisel:{{ .Version }}-amd64"
- "docker.io/jpillora/chisel:{{ .Version }}-amd64"
use: buildx
dockerfile: .github/Dockerfile
build_flag_templates:
- "--platform=linux/amd64"
goarch: amd64

- image_templates:
- "ghcr.io/jpillora/chisel:{{ .Version }}-arm64"
- "docker.io/jpillora/chisel:{{ .Version }}-arm64"
use: buildx
dockerfile: .github/Dockerfile
build_flag_templates:
- "--platform=linux/arm64"
goarch: arm64

- image_templates:
- "ghcr.io/jpillora/chisel:{{ .Version }}-armv7"
- "docker.io/jpillora/chisel:{{ .Version }}-armv7"
use: buildx
dockerfile: .github/Dockerfile
build_flag_templates:
- "--platform=linux/arm/v7"
goarch: arm
goarm: "7"

- image_templates:
- "ghcr.io/jpillora/chisel:{{ .Version }}-armv6"
- "docker.io/jpillora/chisel:{{ .Version }}-armv6"
use: buildx
dockerfile: .github/Dockerfile
build_flag_templates:
- "--platform=linux/arm/v6"
goarch: arm
goarm: "6"

- image_templates:
- "ghcr.io/jpillora/chisel:{{ .Version }}-386"
- "docker.io/jpillora/chisel:{{ .Version }}-386"
use: buildx
dockerfile: .github/Dockerfile
build_flag_templates:
- "--platform=linux/386"
goarch: "386"

- image_templates:
- "ghcr.io/jpillora/chisel:{{ .Version }}-ppc64le"
- "docker.io/jpillora/chisel:{{ .Version }}-ppc64le"
use: buildx
dockerfile: .github/Dockerfile
build_flag_templates:
- "--platform=linux/ppc64le"
goarch: ppc64le

docker_manifests:
- name_template: "ghcr.io/jpillora/chisel:{{ .Version }}"
image_templates:
- "ghcr.io/jpillora/chisel:{{ .Version }}-amd64"
- "ghcr.io/jpillora/chisel:{{ .Version }}-arm64"
- "ghcr.io/jpillora/chisel:{{ .Version }}-armv7"
- "ghcr.io/jpillora/chisel:{{ .Version }}-armv6"
- "ghcr.io/jpillora/chisel:{{ .Version }}-386"
- "ghcr.io/jpillora/chisel:{{ .Version }}-ppc64le"

- name_template: "ghcr.io/jpillora/chisel:{{ .Major }}"
skip_push: "{{ if .Prerelease }}true{{ else }}false{{ end }}"
image_templates:
- "ghcr.io/jpillora/chisel:{{ .Version }}-amd64"
- "ghcr.io/jpillora/chisel:{{ .Version }}-arm64"
- "ghcr.io/jpillora/chisel:{{ .Version }}-armv7"
- "ghcr.io/jpillora/chisel:{{ .Version }}-armv6"
- "ghcr.io/jpillora/chisel:{{ .Version }}-386"
- "ghcr.io/jpillora/chisel:{{ .Version }}-ppc64le"

- name_template: "ghcr.io/jpillora/chisel:{{ .Major }}.{{ .Minor }}"
skip_push: "{{ if .Prerelease }}true{{ else }}false{{ end }}"
image_templates:
- "ghcr.io/jpillora/chisel:{{ .Version }}-amd64"
- "ghcr.io/jpillora/chisel:{{ .Version }}-arm64"
- "ghcr.io/jpillora/chisel:{{ .Version }}-armv7"
- "ghcr.io/jpillora/chisel:{{ .Version }}-armv6"
- "ghcr.io/jpillora/chisel:{{ .Version }}-386"
- "ghcr.io/jpillora/chisel:{{ .Version }}-ppc64le"

- name_template: "ghcr.io/jpillora/chisel:latest"
skip_push: "{{ if .Prerelease }}true{{ else }}false{{ end }}"
image_templates:
- "ghcr.io/jpillora/chisel:{{ .Version }}-amd64"
- "ghcr.io/jpillora/chisel:{{ .Version }}-arm64"
- "ghcr.io/jpillora/chisel:{{ .Version }}-armv7"
- "ghcr.io/jpillora/chisel:{{ .Version }}-armv6"
- "ghcr.io/jpillora/chisel:{{ .Version }}-386"
- "ghcr.io/jpillora/chisel:{{ .Version }}-ppc64le"

- name_template: "docker.io/jpillora/chisel:{{ .Version }}"
image_templates:
- "docker.io/jpillora/chisel:{{ .Version }}-amd64"
- "docker.io/jpillora/chisel:{{ .Version }}-arm64"
- "docker.io/jpillora/chisel:{{ .Version }}-armv7"
- "docker.io/jpillora/chisel:{{ .Version }}-armv6"
- "docker.io/jpillora/chisel:{{ .Version }}-386"
- "docker.io/jpillora/chisel:{{ .Version }}-ppc64le"

- name_template: "docker.io/jpillora/chisel:{{ .Major }}"
skip_push: "{{ if .Prerelease }}true{{ else }}false{{ end }}"
image_templates:
- "docker.io/jpillora/chisel:{{ .Version }}-amd64"
- "docker.io/jpillora/chisel:{{ .Version }}-arm64"
- "docker.io/jpillora/chisel:{{ .Version }}-armv7"
- "docker.io/jpillora/chisel:{{ .Version }}-armv6"
- "docker.io/jpillora/chisel:{{ .Version }}-386"
- "docker.io/jpillora/chisel:{{ .Version }}-ppc64le"

- name_template: "docker.io/jpillora/chisel:{{ .Major }}.{{ .Minor }}"
skip_push: "{{ if .Prerelease }}true{{ else }}false{{ end }}"
image_templates:
- "docker.io/jpillora/chisel:{{ .Version }}-amd64"
- "docker.io/jpillora/chisel:{{ .Version }}-arm64"
- "docker.io/jpillora/chisel:{{ .Version }}-armv7"
- "docker.io/jpillora/chisel:{{ .Version }}-armv6"
- "docker.io/jpillora/chisel:{{ .Version }}-386"
- "docker.io/jpillora/chisel:{{ .Version }}-ppc64le"

- name_template: "docker.io/jpillora/chisel:latest"
skip_push: "{{ if .Prerelease }}true{{ else }}false{{ end }}"
image_templates:
- "docker.io/jpillora/chisel:{{ .Version }}-amd64"
- "docker.io/jpillora/chisel:{{ .Version }}-arm64"
- "docker.io/jpillora/chisel:{{ .Version }}-armv7"
- "docker.io/jpillora/chisel:{{ .Version }}-armv6"
- "docker.io/jpillora/chisel:{{ .Version }}-386"
- "docker.io/jpillora/chisel:{{ .Version }}-ppc64le"
97 changes: 47 additions & 50 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,24 @@
name: CI
on:
pull_request: {}
push: {}
permissions: write-all
push:
branches: [master]
tags: ["v*"]
permissions:
contents: read
jobs:
# ================
# SPELLING CHECK
# ================
codespell:
name: Spelling
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7
- name: codespell
uses: codespell-project/actions-codespell@v2
# ================
# BUILD AND TEST JOB
# ================
test:
Expand All @@ -16,7 +30,7 @@ jobs:
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Set up Go
Expand All @@ -29,64 +43,47 @@ jobs:
- name: Test
run: go test -v ./...
# ================
# RELEASE BINARIES (on push "v*" tag)
# RELEASE (on push "v*" tag)
# Builds binaries, packages, and multi-arch Docker images via GoReleaser
# ================
release_binaries:
name: Release Binaries
release:
name: Release
needs: test
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- name: Check out code
uses: actions/checkout@v5
- name: Checkout
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: goreleaser
if: success()
uses: docker://goreleaser/goreleaser:latest
env:
GITHUB_USER: ${{ github.repository_owner }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GOTOOLCHAIN: auto
- name: Set up Go
uses: actions/setup-go@v6
with:
args: release --config .github/goreleaser.yml
# ================
# RELEASE DOCKER IMAGES (on push "v*" tag)
# ================
release_docker:
name: Release Docker Images
needs: test
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v5
go-version: stable
cache: true
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
uses: docker/setup-qemu-action@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
uses: docker/setup-buildx-action@v4
- name: Login to GHCR
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Docker Hub
uses: docker/login-action@v4
with:
username: jpillora
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: jpillora/chisel
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
- name: Build and push
uses: docker/build-push-action@v6
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
context: .
file: .github/Dockerfile
platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/386,linux/arm/v7,linux/arm/v6
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
distribution: goreleaser
version: v2.12.7
args: release --clean --config .github/goreleaser.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26 changes: 12 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,39 +8,37 @@ LDFLAGS=-ldflags "-s -w ${XBUILD} -buildid=${BUILD} -X github.com/jpillora/chise
GOFILES=`go list ./...`
GOFILESNOTEST=`go list ./... | grep -v test`

# Make Directory to store executables
$(shell mkdir -p ${DIR})

all:
@goreleaser build --skip-validate --single-target --config .github/goreleaser.yml

freebsd: lint
freebsd: lint ${DIR}
env CGO_ENABLED=0 GOOS=freebsd GOARCH=amd64 go build -trimpath ${LDFLAGS} ${GCFLAGS} ${ASMFLAGS} -o ${DIR}/chisel-freebsd_amd64 .

linux: lint
env CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -trimpath ${LDFLAGS} ${GCFLAGS} ${ASMFLAGS} -o ${DIR}/chisel-linux_amd64 .
linux: lint ${DIR}
env CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath ${LDFLAGS} ${GCFLAGS} ${ASMFLAGS} -o ${DIR}/chisel-linux_amd64 .

windows: lint
env CGO_ENABLED=1 GOOS=windows GOARCH=amd64 go build -trimpath ${LDFLAGS} ${GCFLAGS} ${ASMFLAGS} -o ${DIR}/chisel-windows_amd64 .
windows: lint ${DIR}
env CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -trimpath ${LDFLAGS} ${GCFLAGS} ${ASMFLAGS} -o ${DIR}/chisel-windows_amd64 .

darwin:
darwin: ${DIR}
env CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -trimpath ${LDFLAGS} ${GCFLAGS} ${ASMFLAGS} -o ${DIR}/chisel-darwin_amd64 .

docker:
@docker build .

dep: ## Get the dependencies
@go get -u github.com/goreleaser/goreleaser
@go get -u github.com/boumenot/gocover-cobertura
@go get -v -d ./...
@go get -u all
@go install github.com/goreleaser/goreleaser/v2@latest
@go install github.com/boumenot/gocover-cobertura@latest
@go mod tidy

lint: ## Lint the files
@go fmt ${GOFILES}
@go vet ${GOFILESNOTEST}

test: ## Run unit tests
${DIR}:
mkdir -p ${DIR}

test: ${DIR} ## Run unit tests
@go test -coverprofile=${DIR}/coverage.out -race -short ${GOFILESNOTEST}
@go tool cover -html=${DIR}/coverage.out -o ${DIR}/coverage.html
@gocover-cobertura < ${DIR}/coverage.out > ${DIR}/coverage.xml
Expand Down
Loading
Loading