diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..7bbbb99 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,59 @@ +# Dependabot version updates for tunnel (moved here from GameplanePanel/Gameplane +# together with the code). CI is the shared Gameplane go-component workflow. +version: 2 +updates: + - package-ecosystem: "gomod" + directory: "/" + schedule: + interval: "weekly" + day: "monday" + time: "03:00" + commit-message: + prefix: "chore(deps)" + include: "scope" + open-pull-requests-limit: 5 + groups: + tunnel-minor-patch: + update-types: ["minor", "patch"] + + - package-ecosystem: "gomod" + directory: "/frpc" + schedule: + interval: "weekly" + day: "monday" + time: "03:00" + commit-message: + prefix: "chore(deps)" + include: "scope" + open-pull-requests-limit: 5 + groups: + tunnel-frpc-minor-patch: + update-types: ["minor", "patch"] + + - package-ecosystem: "docker" + directory: "/" + schedule: + interval: "weekly" + day: "monday" + time: "03:00" + commit-message: + prefix: "chore(deps)" + include: "scope" + open-pull-requests-limit: 5 + groups: + tunnel-docker-minor-patch: + update-types: ["minor", "patch"] + + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + day: "monday" + time: "03:00" + commit-message: + prefix: "chore(deps)" + include: "scope" + open-pull-requests-limit: 5 + groups: + actions-minor-patch: + update-types: ["minor", "patch"] diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..d25613f --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,30 @@ +# CI: the shared Gameplane workflow for split components (lint with Gameplane's +# .golangci.yml and .hadolint.yaml, race tests on amd64 and arm64 with the +# .testcoverage.yml gate, govulncheck, image build). Pinned by SHA. +name: ci + +on: + pull_request: + push: + branches: [main] + schedule: + - cron: "17 4 * * 1" # weekly, so govulncheck sees new advisories + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: ci-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + +jobs: + ci: + uses: GameplanePanel/Gameplane/.github/workflows/go-component.yaml@783aefb67b0744eaf8d0ee51cb10d94ae9739fd6 # master + with: + dockerfiles: Dockerfile.frp Dockerfile.tailscale Dockerfile.playit + # Profile local UDP forwarding against direct echo (moved from Gameplane's go job). + amd64-extra: | + go test -count=1 -v -run '^TestRelayLoadForwardingProfile$' -cpuprofile="$RUNNER_TEMP/relay.cpu" -memprofile="$RUNNER_TEMP/relay.mem" -o "$RUNNER_TEMP/relay.test" . + go tool pprof -top -cum -nodecount=12 -focus='forwarder' "$RUNNER_TEMP/relay.test" "$RUNNER_TEMP/relay.cpu" + go tool pprof -top -alloc_space -nodecount=12 -focus='forwarder' "$RUNNER_TEMP/relay.test" "$RUNNER_TEMP/relay.mem" diff --git a/Dockerfile.frp b/Dockerfile.frp index 3b5ca22..e1ea012 100644 --- a/Dockerfile.frp +++ b/Dockerfile.frp @@ -1,11 +1,8 @@ -FROM --platform=$BUILDPLATFORM golang:1.27.3-alpine AS build +FROM --platform=$BUILDPLATFORM golang:1.27.4-alpine AS build WORKDIR /src -# tunnel's go.mod currently has no gameaction requirement (no local -# replace directive), so this COPY is a no-op for the build. It is kept -# only for structural parity with sentinel/Dockerfile, api/Dockerfile, and -# agent/Dockerfile, which do depend on gameaction. -COPY gameaction/ ./gameaction/ +# Build context: the Gameplane repo root, where this repo is the tunnel/ +# submodule (standalone CI checks it out under tunnel/ for the same layout). COPY tunnel/go.mod tunnel/go.sum* ./tunnel/ WORKDIR /src/tunnel RUN go mod download diff --git a/Dockerfile.playit b/Dockerfile.playit index 4487939..6874bd4 100644 --- a/Dockerfile.playit +++ b/Dockerfile.playit @@ -1,11 +1,8 @@ -FROM --platform=$BUILDPLATFORM golang:1.27.3-alpine AS build +FROM --platform=$BUILDPLATFORM golang:1.27.4-alpine AS build WORKDIR /src -# tunnel's go.mod currently has no gameaction requirement (no local -# replace directive), so this COPY is a no-op for the build. It is kept -# only for structural parity with sentinel/Dockerfile, api/Dockerfile, and -# agent/Dockerfile, which do depend on gameaction. -COPY gameaction/ ./gameaction/ +# Build context: the Gameplane repo root, where this repo is the tunnel/ +# submodule (standalone CI checks it out under tunnel/ for the same layout). COPY tunnel/go.mod tunnel/go.sum* ./tunnel/ WORKDIR /src/tunnel RUN go mod download diff --git a/Dockerfile.tailscale b/Dockerfile.tailscale index fc74b83..3abb0d2 100644 --- a/Dockerfile.tailscale +++ b/Dockerfile.tailscale @@ -1,11 +1,8 @@ -FROM --platform=$BUILDPLATFORM golang:1.27.3-alpine AS build +FROM --platform=$BUILDPLATFORM golang:1.27.4-alpine AS build WORKDIR /src -# tunnel's go.mod currently has no gameaction requirement (no local -# replace directive), so this COPY is a no-op for the build. It is kept -# only for structural parity with sentinel/Dockerfile, api/Dockerfile, and -# agent/Dockerfile, which do depend on gameaction. -COPY gameaction/ ./gameaction/ +# Build context: the Gameplane repo root, where this repo is the tunnel/ +# submodule (standalone CI checks it out under tunnel/ for the same layout). COPY tunnel/go.mod tunnel/go.sum* ./tunnel/ WORKDIR /src/tunnel RUN go mod download diff --git a/go.mod b/go.mod index 12712b7..32f6254 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,8 @@ module github.com/GameplanePanel/gameplane/tunnel -go 1.27.3 +go 1.27.4 -require tailscale.com v1.104.5 +require tailscale.com v1.104.7 require ( filippo.io/edwards25519 v1.2.0 // indirect @@ -32,7 +32,7 @@ require ( github.com/tailscale/hujson v0.0.0-20260727124030-b80ff77dac4f // indirect github.com/tailscale/peercred v0.0.0-20250107143737-35a0c7bd7edc // indirect github.com/tailscale/web-client-prebuilt v0.0.0-20260917222731-e0ed2d0d0fea // indirect - github.com/tailscale/wireguard-go v0.0.0-20260928213032-417aef361226 // indirect + github.com/tailscale/wireguard-go v0.0.0-20261106233718-9e0ab45c16ca // indirect github.com/x448/float16 v0.8.4 // indirect go4.org/mem v0.0.0-20240501181205-ae6ca9944745 // indirect go4.org/netipx v0.0.0-20260823151212-3075585bcbeb // indirect diff --git a/go.sum b/go.sum index 3ff74d5..dd05e92 100644 --- a/go.sum +++ b/go.sum @@ -174,8 +174,8 @@ github.com/tailscale/web-client-prebuilt v0.0.0-20260917222731-e0ed2d0d0fea h1:a github.com/tailscale/web-client-prebuilt v0.0.0-20260917222731-e0ed2d0d0fea/go.mod h1:agQPE6y6ldqCOui2gkIh7ZMztTkIQKH049tv8siLuNQ= github.com/tailscale/wf v0.0.0-20240214030419-6fbb0a674ee6 h1:l10Gi6w9jxvinoiq15g8OToDdASBni4CyJOdHY1Hr8M= github.com/tailscale/wf v0.0.0-20240214030419-6fbb0a674ee6/go.mod h1:ZXRML051h7o4OcI0d3AaILDIad/Xw0IkXaHM17dic1Y= -github.com/tailscale/wireguard-go v0.0.0-20260928213032-417aef361226 h1:v3Lpj2iHPWQDqeCwemQPz4fWweIEMLqBkwJqCjRyJQc= -github.com/tailscale/wireguard-go v0.0.0-20260928213032-417aef361226/go.mod h1:rUelGmuK4UnSJYM5gl5Mknp6YbwwcL8+VAPMhNYe+jg= +github.com/tailscale/wireguard-go v0.0.0-20261106233718-9e0ab45c16ca h1:m34ObTyPjPiDaSFWeMk7FBQR8my9wpT98t1EXp5c5X0= +github.com/tailscale/wireguard-go v0.0.0-20261106233718-9e0ab45c16ca/go.mod h1:rUelGmuK4UnSJYM5gl5Mknp6YbwwcL8+VAPMhNYe+jg= github.com/tailscale/xnet v0.0.0-20240729143630-8497ac4dab2e h1:zOGKqN5D5hHhiYUp091JqK7DPCqSARyUfduhGUY8Bek= github.com/tailscale/xnet v0.0.0-20240729143630-8497ac4dab2e/go.mod h1:orPd6JZXXRyuDusYilywte7k094d7dycXXU5YnWsrwg= github.com/tc-hib/winres v0.3.1 h1:CwRjEGrKdbi5CvZ4ID+iyVhgyfatxFoizjPhzez9Io4= @@ -235,5 +235,5 @@ howett.net/plist v1.0.0 h1:7CrbWYbPPO/PyNy38b2EB/+gYbjCe2DXBxgtOOZbSQM= howett.net/plist v1.0.0/go.mod h1:lqaXoTrLY4hg8tnEzNru53gicrbv7rrk+2xJA/7hw9g= software.sslmate.com/src/go-pkcs12 v0.7.3 h1:JBQD3FDqYjTeyDAeZQklj2ar88ykBLtALloPJHyAauU= software.sslmate.com/src/go-pkcs12 v0.7.3/go.mod h1:Qiz0EyvDRJjjxGyUQa2cCNZn/wMyzrRJ/qcDXOQazLI= -tailscale.com v1.104.5 h1:TLemRww20+bcQ0FEVTTZ7yMtVDZ4pOpSCL86Oo9g3mA= -tailscale.com v1.104.5/go.mod h1:Hq4zB8UpaxMW1fvqO30CLVQo3A7Ith0t9MnvEyiuoSA= +tailscale.com v1.104.7 h1:YqImcXyNIe25x7Qwei8PgbtkjFd3pKed9cFY0Flkitc= +tailscale.com v1.104.7/go.mod h1:pNl682NgUoac2/Um3khv8pduX3D1YPBZTL067+zo8wY= diff --git a/specs.md b/specs.md index dd57694..e092279 100644 --- a/specs.md +++ b/specs.md @@ -232,9 +232,9 @@ When the pod receives SIGTERM (e.g., during cluster shutdown or pod deletion): **Internal:** None **External:** `tailscale.com/tsnet` v1.104.2 and Go stdlib. The playit status patch uses plain `net/http` against the API server without adding client-go. -**Go version:** 1.27.3+ (the minimum required by Tailscale v1.104.2) +**Go version:** 1.27.4+ (the minimum required by Tailscale v1.104.7) -The maintainer explicitly approved ending the stdlib-only policy for tsnet in #722. Version 1.104.2 preserves the upstream Tailscale security update while retaining the embedded TCP/UDP forwarding implementation. CI resolves the latest Go 1.27 patch; the workspace and tunnel module require at least Go 1.27.3, and tunnel image builders use Go 1.27.3. Track future tsnet/security updates through go.mod/go.sum. frpc and playitd remain external binaries. +The maintainer explicitly approved ending the stdlib-only policy for tsnet in #722. Version 1.104.2 preserves the upstream Tailscale security update while retaining the embedded TCP/UDP forwarding implementation. CI resolves the latest Go 1.27 patch; the workspace and tunnel module require at least Go 1.27.4, and tunnel image builders use Go 1.27.4. Track future tsnet/security updates through go.mod/go.sum. frpc and playitd remain external binaries. ## Security Considerations