Merge branch 'main' into dev

This commit is contained in:
Owen
2025-12-06 11:45:46 -05:00
8 changed files with 558 additions and 3486 deletions

View File

@@ -36,7 +36,7 @@ jobs:
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
- name: Set up QEMU - name: Set up QEMU
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0 uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0
@@ -56,7 +56,7 @@ jobs:
shell: bash shell: bash
- name: Install Go - name: Install Go
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
with: with:
go-version: 1.24 go-version: 1.24
@@ -135,6 +135,13 @@ jobs:
docker://$DOCKERHUB_IMAGE:$TAG \ docker://$DOCKERHUB_IMAGE:$TAG \
docker://$GHCR_IMAGE:$TAG docker://$GHCR_IMAGE:$TAG
shell: bash shell: bash
- name: Login to GitHub Container Registry (for cosign)
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Install cosign - name: Install cosign
# cosign is used to sign and verify container images (key and keyless) # cosign is used to sign and verify container images (key and keyless)

View File

@@ -21,7 +21,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
- name: Set up Node.js - name: Set up Node.js
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0

View File

@@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with: with:

3985
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -33,9 +33,9 @@
}, },
"dependencies": { "dependencies": {
"@asteasolutions/zod-to-openapi": "8.1.0", "@asteasolutions/zod-to-openapi": "8.1.0",
"@aws-sdk/client-s3": "3.922.0",
"@faker-js/faker": "^10.1.0", "@faker-js/faker": "^10.1.0",
"@headlessui/react": "^2.2.9", "@headlessui/react": "^2.2.9",
"@aws-sdk/client-s3": "3.943.0",
"@hookform/resolvers": "5.2.2", "@hookform/resolvers": "5.2.2",
"@monaco-editor/react": "^4.7.0", "@monaco-editor/react": "^4.7.0",
"@node-rs/argon2": "^2.0.2", "@node-rs/argon2": "^2.0.2",
@@ -81,10 +81,10 @@
"crypto-js": "^4.2.0", "crypto-js": "^4.2.0",
"d3": "^7.9.0", "d3": "^7.9.0",
"date-fns": "4.1.0", "date-fns": "4.1.0",
"drizzle-orm": "0.44.7", "drizzle-orm": "0.45.0",
"eslint": "9.39.1", "eslint": "9.39.1",
"eslint-config-next": "16.0.3", "eslint-config-next": "16.0.3",
"express": "5.1.0", "express": "5.2.1",
"express-rate-limit": "8.2.1", "express-rate-limit": "8.2.1",
"glob": "11.1.0", "glob": "11.1.0",
"helmet": "8.1.0", "helmet": "8.1.0",
@@ -95,7 +95,7 @@
"jmespath": "^0.16.0", "jmespath": "^0.16.0",
"js-yaml": "4.1.1", "js-yaml": "4.1.1",
"jsonwebtoken": "^9.0.2", "jsonwebtoken": "^9.0.2",
"lucide-react": "^0.552.0", "lucide-react": "^0.556.0",
"maxmind": "5.0.1", "maxmind": "5.0.1",
"moment": "2.30.1", "moment": "2.30.1",
"next": "15.5.7", "next": "15.5.7",
@@ -104,7 +104,7 @@
"nextjs-toploader": "^3.9.17", "nextjs-toploader": "^3.9.17",
"node-cache": "5.1.2", "node-cache": "5.1.2",
"node-fetch": "3.3.2", "node-fetch": "3.3.2",
"nodemailer": "7.0.10", "nodemailer": "7.0.11",
"npm": "^11.6.4", "npm": "^11.6.4",
"nprogress": "^0.2.0", "nprogress": "^0.2.0",
"oslo": "1.2.1", "oslo": "1.2.1",
@@ -115,7 +115,7 @@
"react-day-picker": "9.11.1", "react-day-picker": "9.11.1",
"react-dom": "19.2.1", "react-dom": "19.2.1",
"react-easy-sort": "^1.8.0", "react-easy-sort": "^1.8.0",
"react-hook-form": "7.66.0", "react-hook-form": "7.68.0",
"react-icons": "^5.5.0", "react-icons": "^5.5.0",
"rebuild": "0.1.2", "rebuild": "0.1.2",
"recharts": "^2.15.4", "recharts": "^2.15.4",
@@ -124,8 +124,8 @@
"semver": "^7.7.3", "semver": "^7.7.3",
"stripe": "18.2.1", "stripe": "18.2.1",
"swagger-ui-express": "^5.0.1", "swagger-ui-express": "^5.0.1",
"tailwind-merge": "3.3.1",
"topojson-client": "^3.1.0", "topojson-client": "^3.1.0",
"tailwind-merge": "3.4.0",
"tw-animate-css": "^1.3.8", "tw-animate-css": "^1.3.8",
"uuid": "^13.0.0", "uuid": "^13.0.0",
"vaul": "1.1.2", "vaul": "1.1.2",
@@ -149,14 +149,14 @@
"@types/cors": "2.8.19", "@types/cors": "2.8.19",
"@types/crypto-js": "^4.2.2", "@types/crypto-js": "^4.2.2",
"@types/d3": "^7.4.3", "@types/d3": "^7.4.3",
"@types/express": "5.0.5", "@types/express": "5.0.6",
"@types/express-session": "^1.18.2", "@types/express-session": "^1.18.2",
"@types/jmespath": "^0.15.2", "@types/jmespath": "^0.15.2",
"@types/js-yaml": "4.0.9", "@types/js-yaml": "4.0.9",
"@types/jsonwebtoken": "^9.0.10", "@types/jsonwebtoken": "^9.0.10",
"@types/node": "24.10.1", "@types/node": "24.10.1",
"@types/nodemailer": "7.0.3",
"@types/nprogress": "^0.2.3", "@types/nprogress": "^0.2.3",
"@types/nodemailer": "7.0.4",
"@types/pg": "8.15.6", "@types/pg": "8.15.6",
"@types/react": "19.2.2", "@types/react": "19.2.2",
"@types/react-dom": "19.2.2", "@types/react-dom": "19.2.2",
@@ -164,16 +164,16 @@
"@types/swagger-ui-express": "^4.1.8", "@types/swagger-ui-express": "^4.1.8",
"@types/topojson-client": "^3.1.5", "@types/topojson-client": "^3.1.5",
"@types/ws": "8.18.1", "@types/ws": "8.18.1",
"@types/yargs": "17.0.34",
"babel-plugin-react-compiler": "^1.0.0", "babel-plugin-react-compiler": "^1.0.0",
"drizzle-kit": "0.31.6", "@types/yargs": "17.0.35",
"esbuild": "0.27.0", "drizzle-kit": "0.31.8",
"esbuild-node-externals": "1.19.1", "esbuild": "0.27.1",
"esbuild-node-externals": "1.20.1",
"postcss": "^8", "postcss": "^8",
"react-email": "4.3.2", "react-email": "4.3.2",
"tailwindcss": "^4.1.4", "tailwindcss": "^4.1.4",
"tsc-alias": "1.8.16", "tsc-alias": "1.8.16",
"tsx": "4.20.6", "tsx": "4.21.0",
"typescript": "^5", "typescript": "^5",
"typescript-eslint": "^8.46.3" "typescript-eslint": "^8.46.3"
}, },
@@ -183,4 +183,4 @@
"react-dom": "19.0.0" "react-dom": "19.0.0"
} }
} }
} }

View File

@@ -1,6 +1,7 @@
import { join } from "path"; import { join } from "path";
import { readFileSync } from "fs"; import { readFileSync } from "fs";
import { db, resources, siteResources } from "@server/db"; import { db, resources, siteResources } from "@server/db";
import { randomInt } from "crypto";
import { exitNodes, sites } from "@server/db"; import { exitNodes, sites } from "@server/db";
import { eq, and } from "drizzle-orm"; import { eq, and } from "drizzle-orm";
import { __DIRNAME } from "@server/lib/consts"; import { __DIRNAME } from "@server/lib/consts";
@@ -111,10 +112,10 @@ export async function getUniqueExitNodeEndpointName(): Promise<string> {
export function generateName(): string { export function generateName(): string {
const name = ( const name = (
names.descriptors[ names.descriptors[
Math.floor(Math.random() * names.descriptors.length) randomInt(names.descriptors.length)
] + ] +
"-" + "-" +
names.animals[Math.floor(Math.random() * names.animals.length)] names.animals[randomInt(names.animals.length)]
) )
.toLowerCase() .toLowerCase()
.replace(/\s/g, "-"); .replace(/\s/g, "-");

View File

@@ -203,6 +203,12 @@ export async function updateTarget(
hcHeaders = JSON.stringify(parsedBody.data.hcHeaders); hcHeaders = JSON.stringify(parsedBody.data.hcHeaders);
} }
// When health check is disabled, reset hcHealth to "unknown"
// to prevent previously unhealthy targets from being excluded
const hcHealthValue = (parsedBody.data.hcEnabled === false || parsedBody.data.hcEnabled === null)
? "unknown"
: undefined;
const [updatedHc] = await db const [updatedHc] = await db
.update(targetHealthCheck) .update(targetHealthCheck)
.set({ .set({
@@ -220,6 +226,7 @@ export async function updateTarget(
hcMethod: parsedBody.data.hcMethod, hcMethod: parsedBody.data.hcMethod,
hcStatus: parsedBody.data.hcStatus, hcStatus: parsedBody.data.hcStatus,
hcTlsServerName: parsedBody.data.hcTlsServerName, hcTlsServerName: parsedBody.data.hcTlsServerName,
...(hcHealthValue !== undefined && { hcHealth: hcHealthValue })
}) })
.where(eq(targetHealthCheck.targetId, targetId)) .where(eq(targetHealthCheck.targetId, targetId))
.returning(); .returning();

View File

@@ -426,7 +426,7 @@ export default function LoginForm({
<div className="text-center"> <div className="text-center">
<Link <Link
href={`${env.app.dashboardUrl}/auth/reset-password${form.getValues().email ? `?email=${form.getValues().email}` : ""}`} href={`${env.app.dashboardUrl}/auth/reset-password${form.getValues().email ? `?email=${encodeURIComponent(form.getValues().email)}` : ""}`}
className="text-sm text-muted-foreground" className="text-sm text-muted-foreground"
> >
{t("passwordForgot")} {t("passwordForgot")}