diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 288445b..5ce162f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,4 +30,4 @@ jobs: - name: govulncheck run: go run golang.org/x/vuln/cmd/govulncheck@latest ./... - name: Docker build - run: docker build -t wgx:ci . + run: docker build -t ihasvpn:ci . diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index a0cfb1c..a6ed582 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -25,7 +25,7 @@ on: default: false env: - IMAGE: ghcr.io/coffey-labs/wgx + IMAGE: ghcr.io/coffey-labs/ihasvpn jobs: version: @@ -74,7 +74,7 @@ jobs: with: context: . platforms: ${{ matrix.platform }} - build-args: WGX_VERSION=${{ needs.version.outputs.version }} + build-args: IHASVPN_VERSION=${{ needs.version.outputs.version }} provenance: false sbom: false cache-from: type=gha,scope=${{ matrix.platform }} diff --git a/.gitignore b/.gitignore index 78e9dbf..1b1998a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ # Build output -/wgx +/ihasvpn /dist/ web/node_modules/ web/dist/ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 87f73db..a642ee9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,11 +1,11 @@ -# Contributing to WGX +# Contributing to ihasvpn Thanks for your interest. Bug reports, feature requests, code and documentation are all welcome. ## Before you start -- WGX is one container: the WireGuard server and the UI that manages it. +- ihasvpn is one container: the WireGuard server and the UI that manages it. Contributions that need a second service (a database, a message queue, a separate frontend host) are out of scope. - The kernel data plane is the point. Anything on the packet path has to @@ -22,7 +22,7 @@ You need Go (see `go.mod` for the version), Node 26 and Docker. cd web && npm ci && npm run dev # Backend against the in-memory mock data plane -- no privileges needed -WGX_BACKEND=mock WGX_DATA_DIR=/tmp/wgx WGX_HTTP_LISTEN=127.0.0.1:51821 go run ./cmd/wgx +IHASVPN_BACKEND=mock IHASVPN_DATA_DIR=/tmp/ihasvpn IHASVPN_HTTP_LISTEN=127.0.0.1:51821 go run ./cmd/ihasvpn ``` The mock simulates peers handshaking and moving traffic so the dashboard has @@ -30,9 +30,9 @@ something to show. For the real thing: ```sh cd web && npm run build && cd .. -docker build -t wgx:dev . +docker build -t ihasvpn:dev . docker run --rm --cap-add NET_ADMIN --sysctl net.ipv4.ip_forward=1 \ - -p 51820:51820/udp -p 127.0.0.1:51821:51821 -v wgx-dev:/data wgx:dev + -p 51820:51820/udp -p 127.0.0.1:51821:51821 -v ihasvpn-dev:/data ihasvpn:dev ``` ## Before you commit @@ -42,7 +42,7 @@ CI checks are not a substitute for building locally. Run, in this order: ```sh cd web && npm run build && cd .. # type-checks and builds the UI go vet ./... && go test -count=1 ./... -docker build -t wgx:dev . # when the change reaches the image +docker build -t ihasvpn:dev . # when the change reaches the image ``` `go test` covers the engine against the mock data plane and the whole HTTP diff --git a/Dockerfile b/Dockerfile index d8535c9..8a25669 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,14 +10,14 @@ RUN npm run build FROM golang:1.27-alpine AS build # The version string the binary reports. Worked out by whoever runs the # build (CI passes the tag); left empty it says "dev". -ARG WGX_VERSION=dev +ARG IHASVPN_VERSION=dev WORKDIR /src COPY go.mod go.sum ./ RUN go mod download COPY cmd/ cmd/ COPY internal/ internal/ COPY --from=web /src/internal/server/static/dist internal/server/static/dist -RUN CGO_ENABLED=0 go build -trimpath -ldflags="-s -w -X github.com/Coffey-Labs/WGX/internal/engine.Version=${WGX_VERSION}" -o /wgx ./cmd/wgx +RUN CGO_ENABLED=0 go build -trimpath -ldflags="-s -w -X github.com/Coffey-Labs/ihasvpn/internal/engine.Version=${IHASVPN_VERSION}" -o /ihasvpn ./cmd/ihasvpn # ---- runtime ---- FROM alpine:3.22 @@ -25,11 +25,11 @@ FROM alpine:3.22 # without the kernel module; wireguard-tools gives `wg show` for debugging. RUN apk add --no-cache nftables wireguard-go wireguard-tools ca-certificates tzdata \ && mkdir -p /data -COPY --from=build /wgx /usr/local/bin/wgx -ENV WGX_DATA_DIR=/data \ - WGX_HTTP_LISTEN=:51821 +COPY --from=build /ihasvpn /usr/local/bin/ihasvpn +ENV IHASVPN_DATA_DIR=/data \ + IHASVPN_HTTP_LISTEN=:51821 VOLUME ["/data"] EXPOSE 51820/udp 51821/tcp HEALTHCHECK --interval=30s --timeout=5s --start-period=10s \ CMD wget -qO- http://127.0.0.1:51821/api/health || exit 1 -ENTRYPOINT ["wgx"] +ENTRYPOINT ["ihasvpn"] diff --git a/NOTICE b/NOTICE index 9d1fdcb..346edd3 100644 --- a/NOTICE +++ b/NOTICE @@ -1,6 +1,6 @@ # Third-party notices -WGX is licensed under the AGPL-3.0; see LICENSE. This file records work by +ihasvpn is licensed under the AGPL-3.0; see LICENSE. This file records work by other people that ships inside the binary and the image, and the terms it comes under. Each project's own licence text travels with it in the Go module cache and in web/node_modules and is not repeated here. @@ -29,7 +29,7 @@ cache and in web/node_modules and is not repeated here. The container image is built on Alpine Linux and ships nftables, wireguard-tools and wireguard-go from its package repositories, each under its own licence (GPL-2.0 for nftables and wireguard-tools, MIT for -wireguard-go). They are separate programs invoked by WGX, not linked into it. +wireguard-go). They are separate programs invoked by ihasvpn, not linked into it. -WireGuard is a registered trademark of Jason A. Donenfeld. WGX is not +WireGuard is a registered trademark of Jason A. Donenfeld. ihasvpn is not affiliated with or endorsed by the WireGuard project. diff --git a/README.md b/README.md index e1efd92..439f0cc 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@
-
+