Compare commits

..

949 Commits

Author SHA1 Message Date
Owen
b63a8fd3ed Merge branch 'dev' 2025-12-08 15:16:12 -05:00
Owen
ada3c6f2ef Update and add server version 2025-12-08 15:16:05 -05:00
Owen
aafca7694d Update and add server version 2025-12-08 15:15:42 -05:00
miloschwartz
4345669793 remove file 2025-12-08 14:12:46 -05:00
Milo Schwartz
66cae9802d Merge pull request #2017 from fosrl/dev
1.13.0-rc.0
2025-12-08 11:10:36 -08:00
Owen Schwartz
2325e30f26 Merge pull request #2015 from fosrl/crowdin_dev
New Crowdin updates
2025-12-08 11:57:17 -05:00
Owen Schwartz
d1c98cf650 New translations en-us.json (Norwegian Bokmal) 2025-12-08 11:56:43 -05:00
Owen Schwartz
d06cd9b5be New translations en-us.json (Chinese Simplified) 2025-12-08 11:56:42 -05:00
Owen Schwartz
2eb440d019 New translations en-us.json (Turkish) 2025-12-08 11:56:40 -05:00
Owen Schwartz
4084c85c00 New translations en-us.json (Russian) 2025-12-08 11:56:39 -05:00
Owen Schwartz
4fee65e5a4 New translations en-us.json (Portuguese) 2025-12-08 11:56:37 -05:00
Owen Schwartz
17ee51249c New translations en-us.json (Polish) 2025-12-08 11:56:36 -05:00
Owen Schwartz
f239c4370e New translations en-us.json (Dutch) 2025-12-08 11:56:34 -05:00
Owen Schwartz
c2a32a50cd New translations en-us.json (Korean) 2025-12-08 11:56:32 -05:00
Owen Schwartz
7229bfa51b New translations en-us.json (Italian) 2025-12-08 11:56:31 -05:00
Owen Schwartz
080e2f0a3a New translations en-us.json (German) 2025-12-08 11:56:28 -05:00
Owen Schwartz
64e5cc172d New translations en-us.json (Czech) 2025-12-08 11:56:27 -05:00
Owen Schwartz
c51a1c9c4d New translations en-us.json (Bulgarian) 2025-12-08 11:56:25 -05:00
Owen Schwartz
79958be380 New translations en-us.json (Spanish) 2025-12-08 11:56:22 -05:00
Owen Schwartz
05daedc6ad New translations en-us.json (French) 2025-12-08 11:56:21 -05:00
miloschwartz
0234234108 fix settings footer buttons break point on mobile 2025-12-08 10:38:29 -05:00
miloschwartz
f9b15b9156 add color to health check 2025-12-08 10:31:53 -05:00
miloschwartz
37830d211d use static.pangolin.net 2025-12-08 10:23:11 -05:00
Owen
24cdac95cd Fix not rebuilding site resources from blueprint 2025-12-07 22:13:26 -05:00
Owen
e10f7efcbe Fix blueprints zod update 2025-12-07 22:00:55 -05:00
Owen
1d7f4322e3 Migrations working 2025-12-07 21:14:36 -05:00
Owen
e8f10b049e Generate resources for remote subnets 2025-12-07 20:04:30 -05:00
Owen
a3ba4fff54 Bump version to 1.13.0-rc.0 2025-12-07 17:57:22 -05:00
miloschwartz
eecfcd640c add pg and modify sqlite 2025-12-07 15:30:10 -05:00
Owen
40c38fa070 Clear the associations first 2025-12-07 15:19:40 -05:00
Owen
042c88ccb8 Calc session id correctly 2025-12-07 15:01:18 -05:00
Owen
5a60f66ae0 Update sqlite migration to update caches 2025-12-07 14:47:20 -05:00
Owen
4d665e8596 Try to fix the expires at problem 2025-12-07 14:30:06 -05:00
miloschwartz
9221bcf889 add disconnect button to clients 2025-12-07 13:50:05 -05:00
miloschwartz
2418813902 add sqlite migration 2025-12-07 12:58:01 -05:00
miloschwartz
f66a9bdd33 only show updates number if more than one 2025-12-07 11:47:19 -05:00
miloschwartz
bc7a1f4673 change translation 2025-12-07 11:45:58 -05:00
miloschwartz
9010803046 fix verifySiteAccess middleware 2025-12-07 11:40:06 -05:00
miloschwartz
311233b9f7 update remote node version col 2025-12-07 11:13:43 -05:00
miloschwartz
38203a0e7c adjustments to update notification 2025-12-07 11:10:44 -05:00
Owen
5e9d660e26 We need to generate a niceId every time we make a client 2025-12-07 11:07:08 -05:00
Owen
110e950476 Send site name 2025-12-07 10:51:38 -05:00
Owen
4e7843c1f3 Fix null subdomain causing overwriting
Fixes #1645
2025-12-06 21:59:03 -05:00
miloschwartz
502d15b9dc fix newt version styling 2025-12-06 21:39:58 -05:00
Owen
71db29c09c Merge branch 'dev' of github.com:fosrl/pangolin into dev 2025-12-06 21:37:24 -05:00
Owen
8cced5011b Fix empty strip preventing create 2025-12-06 21:37:10 -05:00
Owen
a812dde026 Update lock 2025-12-06 21:37:05 -05:00
Owen Schwartz
58374f77c9 Merge pull request #1996 from fosrl/crowdin_dev
New Crowdin updates
2025-12-06 21:35:43 -05:00
miloschwartz
8df3fa0ac0 make product update text a more readable 2025-12-06 21:31:12 -05:00
Owen Schwartz
840e9914cb New translations en-us.json (Norwegian Bokmal) 2025-12-06 21:30:08 -05:00
Owen Schwartz
f30a4f3cfd New translations en-us.json (Chinese Simplified) 2025-12-06 21:30:07 -05:00
Owen Schwartz
27004f9d0c New translations en-us.json (Turkish) 2025-12-06 21:30:05 -05:00
Owen Schwartz
427638ed3d New translations en-us.json (Russian) 2025-12-06 21:30:04 -05:00
Owen Schwartz
350379b0c7 New translations en-us.json (Portuguese) 2025-12-06 21:30:03 -05:00
Owen Schwartz
cf80c9d45c New translations en-us.json (Polish) 2025-12-06 21:30:02 -05:00
Owen Schwartz
2d801b8ea5 New translations en-us.json (Dutch) 2025-12-06 21:30:00 -05:00
Owen Schwartz
f82d01d39b New translations en-us.json (Korean) 2025-12-06 21:29:59 -05:00
Owen Schwartz
e959ce1698 New translations en-us.json (Italian) 2025-12-06 21:29:58 -05:00
Owen Schwartz
25e176e8d5 New translations en-us.json (German) 2025-12-06 21:29:57 -05:00
Owen Schwartz
8df01eb13a New translations en-us.json (Czech) 2025-12-06 21:29:55 -05:00
Owen Schwartz
8d87f31bec New translations en-us.json (Bulgarian) 2025-12-06 21:29:54 -05:00
Owen Schwartz
2b3594a5ea New translations en-us.json (Spanish) 2025-12-06 21:29:52 -05:00
Owen Schwartz
72b7c8de0c New translations en-us.json (French) 2025-12-06 21:29:51 -05:00
miloschwartz
b329dbb585 add agent to table 2025-12-06 21:21:39 -05:00
miloschwartz
56d30ad6bd clean up targets input a little 2025-12-06 21:00:57 -05:00
Owen
e24a13fb11 Implement previous year delete 2025-12-06 20:49:53 -05:00
miloschwartz
d7e06161a8 use niceId for client routes 2025-12-06 20:31:20 -05:00
Owen
8a8c0edad3 Speed up writing to not block io operations 2025-12-06 17:54:39 -05:00
Owen
66fc8529c2 Update blueprints to support new clients 2025-12-06 17:32:49 -05:00
Owen
0beaadf512 Merge branch 'dev' of github.com:fosrl/pangolin into dev 2025-12-06 17:24:16 -05:00
Owen
58177f4a02 Add niceid 2025-12-06 17:24:00 -05:00
miloschwartz
28725dd164 update logging 2025-12-06 16:18:44 -05:00
miloschwartz
1714140ee7 fix branding favicon and subtitle texts 2025-12-06 16:16:42 -05:00
Owen
6329c3d140 Merge branch 'main' into dev 2025-12-06 16:11:28 -05:00
Owen Schwartz
44113ad93a Merge pull request #1995 from fosrl/copilot/fix-crowdsec-setup-token
Fix: Display setup token after CrowdSec installation
2025-12-06 16:10:20 -05:00
Owen
ee1af459cc Add default to path for hc
Fixes #1905
2025-12-06 16:07:47 -05:00
copilot-swe-agent[bot]
69561caa74 Fix setup token display condition to include CrowdSec installation
Co-authored-by: oschwartz10612 <4999704+oschwartz10612@users.noreply.github.com>
2025-12-06 20:57:57 +00:00
Owen Schwartz
6f03d099b8 New translations en-us.json (Norwegian Bokmal) 2025-12-06 15:43:29 -05:00
Owen Schwartz
1581b5cb74 New translations en-us.json (Chinese Simplified) 2025-12-06 15:43:28 -05:00
Owen Schwartz
e09ec56fad New translations en-us.json (Turkish) 2025-12-06 15:43:26 -05:00
Owen Schwartz
8bcad76eb5 New translations en-us.json (Russian) 2025-12-06 15:43:25 -05:00
Owen Schwartz
ff4a6b1d3f New translations en-us.json (Portuguese) 2025-12-06 15:43:24 -05:00
Owen Schwartz
07b04b2603 New translations en-us.json (Polish) 2025-12-06 15:43:23 -05:00
Owen Schwartz
54471c703c New translations en-us.json (Dutch) 2025-12-06 15:43:21 -05:00
Owen Schwartz
8a160ec0fe New translations en-us.json (Korean) 2025-12-06 15:43:20 -05:00
Owen Schwartz
15da2f130b New translations en-us.json (Italian) 2025-12-06 15:43:19 -05:00
Owen Schwartz
d64d2d6916 New translations en-us.json (German) 2025-12-06 15:43:18 -05:00
Owen Schwartz
68928843a5 New translations en-us.json (Czech) 2025-12-06 15:43:16 -05:00
Owen Schwartz
1228fddb01 New translations en-us.json (Bulgarian) 2025-12-06 15:43:15 -05:00
Owen Schwartz
3fa0b01c41 New translations en-us.json (Spanish) 2025-12-06 15:43:14 -05:00
Owen Schwartz
a4884f90a9 New translations en-us.json (French) 2025-12-06 15:43:12 -05:00
copilot-swe-agent[bot]
d7311ad947 Add setup token printing after CrowdSec installation
Co-authored-by: oschwartz10612 <4999704+oschwartz10612@users.noreply.github.com>
2025-12-06 20:38:40 +00:00
copilot-swe-agent[bot]
1aa155a0af Initial plan 2025-12-06 20:35:40 +00:00
Owen Schwartz
4f1c207083 Merge pull request #1993 from fosrl/copilot/fix-install-script-no-reply-email
Make no-reply email address required in install script
2025-12-06 15:21:18 -05:00
Owen
dc6ee70eba Update lock, downgrade to node 24 2025-12-06 15:12:58 -05:00
miloschwartz
0f9f4dfaeb fix orgs query 2025-12-06 13:21:58 -05:00
miloschwartz
22941c0653 show credentials tab in oss 2025-12-06 13:11:53 -05:00
miloschwartz
d714f7d52c remove old component 2025-12-06 12:51:57 -05:00
Milo Schwartz
4f2dd92e81 Merge pull request #1988 from Fredkiss3/refactor/show-product-updates-conditionnally
refactor: Only show the product updates to an org admin or owner
2025-12-06 09:39:48 -08:00
Milo Schwartz
090706c816 Merge branch 'dev' into refactor/show-product-updates-conditionnally 2025-12-06 09:38:39 -08:00
miloschwartz
f449fdc7ec add optial disconnect on regenerate credentials 2025-12-06 12:36:31 -05:00
copilot-swe-agent[bot]
394d1503dd Make no-reply email address required when email is enabled
- Added helpful hint in prompt suggesting to use SMTP username
- Added validation to ensure no-reply email is not empty when email is enabled
- Applied gofmt formatting improvements

Co-authored-by: oschwartz10612 <4999704+oschwartz10612@users.noreply.github.com>
2025-12-06 17:35:11 +00:00
copilot-swe-agent[bot]
60380b70ed Initial plan 2025-12-06 17:27:20 +00:00
Owen Schwartz
cece7a59bf Merge pull request #1992 from fosrl/dependabot/npm_and_yarn/prod-patch-updates-affb329a3f
Bump the prod-patch-updates group across 1 directory with 5 updates
2025-12-06 12:17:04 -05:00
miloschwartz
00174be8c0 show id in credential regen 2025-12-06 12:07:43 -05:00
miloschwartz
1d303feca2 restyle client regen credentials 2025-12-06 11:47:58 -05:00
Owen
3f4fae8f09 Merge branch 'dev' of github.com:fosrl/pangolin into dev 2025-12-06 11:46:18 -05:00
Owen
dab795e94a Merge branch 'main' into dev 2025-12-06 11:45:46 -05:00
miloschwartz
bd2165c553 prevent modal flash 2025-12-06 11:44:47 -05:00
miloschwartz
646497cda0 improve site regenerate cred ui 2025-12-06 11:40:28 -05:00
Owen Schwartz
dbc046397b Merge pull request #1949 from marcschaeferger-org/fix-security/other
Fix multiple reported Security Issues
2025-12-06 11:24:01 -05:00
dependabot[bot]
fbafb48562 Bump the prod-patch-updates group across 1 directory with 5 updates
Bumps the prod-patch-updates group with 5 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [eslint-config-next](https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next) | `16.0.3` | `16.0.7` |
| [http-errors](https://github.com/jshttp/http-errors) | `2.0.0` | `2.0.1` |
| [react](https://github.com/facebook/react/tree/HEAD/packages/react) | `19.2.0` | `19.2.1` |
| [react-day-picker](https://github.com/gpbl/react-day-picker) | `9.11.1` | `9.11.3` |
| [react-dom](https://github.com/facebook/react/tree/HEAD/packages/react-dom) | `19.2.0` | `19.2.1` |



Updates `eslint-config-next` from 16.0.3 to 16.0.7
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/commits/v16.0.7/packages/eslint-config-next)

Updates `http-errors` from 2.0.0 to 2.0.1
- [Release notes](https://github.com/jshttp/http-errors/releases)
- [Changelog](https://github.com/jshttp/http-errors/blob/master/HISTORY.md)
- [Commits](https://github.com/jshttp/http-errors/compare/v2.0.0...v2.0.1)

Updates `react` from 19.2.0 to 19.2.1
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/v19.2.1/packages/react)

Updates `react-day-picker` from 9.11.1 to 9.11.3
- [Release notes](https://github.com/gpbl/react-day-picker/releases)
- [Changelog](https://github.com/gpbl/react-day-picker/blob/main/CHANGELOG.md)
- [Commits](https://github.com/gpbl/react-day-picker/compare/v9.11.1...v9.11.3)

Updates `react-dom` from 19.2.0 to 19.2.1
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/v19.2.1/packages/react-dom)

---
updated-dependencies:
- dependency-name: eslint-config-next
  dependency-version: 16.0.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-patch-updates
- dependency-name: http-errors
  dependency-version: 2.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-patch-updates
- dependency-name: react
  dependency-version: 19.2.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-patch-updates
- dependency-name: react-day-picker
  dependency-version: 9.11.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-patch-updates
- dependency-name: react-dom
  dependency-version: 19.2.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-patch-updates
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-06 16:21:43 +00:00
Owen Schwartz
ccb17cdbbf Merge pull request #1991 from fosrl/dependabot/npm_and_yarn/dev-patch-updates-0afe584c4c
Bump the dev-patch-updates group across 1 directory with 4 updates
2025-12-06 11:21:33 -05:00
Owen Schwartz
c56512dc7d Merge pull request #1881 from fosrl/dependabot/npm_and_yarn/react-email/tailwind-2.0.1
Bump @react-email/tailwind from 1.2.2 to 2.0.1
2025-12-06 11:20:50 -05:00
Owen Schwartz
a92edf519e Merge pull request #1900 from fosrl/copilot/fix-hc-health-status-unknown
Reset hcHealth to "unknown" when health check is disabled
2025-12-06 11:20:38 -05:00
dependabot[bot]
6cd3f2df1b Bump the dev-patch-updates group across 1 directory with 4 updates
Bumps the dev-patch-updates group with 4 updates in the / directory: [@types/nodemailer](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/nodemailer), [@types/yargs](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/yargs), [drizzle-kit](https://github.com/drizzle-team/drizzle-orm) and [esbuild](https://github.com/evanw/esbuild).


Updates `@types/nodemailer` from 7.0.3 to 7.0.4
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/nodemailer)

Updates `@types/yargs` from 17.0.34 to 17.0.35
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/yargs)

Updates `drizzle-kit` from 0.31.6 to 0.31.8
- [Release notes](https://github.com/drizzle-team/drizzle-orm/releases)
- [Commits](https://github.com/drizzle-team/drizzle-orm/compare/drizzle-kit@0.31.6...drizzle-kit@0.31.8)

Updates `esbuild` from 0.27.0 to 0.27.1
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.27.0...v0.27.1)

---
updated-dependencies:
- dependency-name: "@types/nodemailer"
  dependency-version: 7.0.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-patch-updates
- dependency-name: "@types/yargs"
  dependency-version: 17.0.35
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-patch-updates
- dependency-name: drizzle-kit
  dependency-version: 0.31.8
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-patch-updates
- dependency-name: esbuild
  dependency-version: 0.27.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-patch-updates
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-06 16:19:59 +00:00
Owen Schwartz
b9c0089fac Merge pull request #1913 from fosrl/dependabot/github_actions/actions/setup-go-6.1.0
Bump actions/setup-go from 6.0.0 to 6.1.0
2025-12-06 11:17:30 -05:00
Owen Schwartz
b2f78c9149 Merge pull request #1914 from fosrl/dependabot/github_actions/actions/checkout-6.0.0
Bump actions/checkout from 5.0.0 to 6.0.0
2025-12-06 11:17:23 -05:00
Owen Schwartz
2a361b010f Merge pull request #1962 from fosrl/dependabot/npm_and_yarn/nodemailer-7.0.11
Bump nodemailer from 7.0.10 to 7.0.11
2025-12-06 11:17:11 -05:00
Owen Schwartz
7bfa732a90 Merge pull request #1983 from fosrl/dependabot/npm_and_yarn/dev-minor-updates-42b6b37ac0
Bump the dev-minor-updates group across 1 directory with 2 updates
2025-12-06 11:16:53 -05:00
Owen Schwartz
c554364001 Merge pull request #1985 from fosrl/dependabot/npm_and_yarn/prod-minor-updates-35f2f5c31e
Bump the prod-minor-updates group across 1 directory with 6 updates
2025-12-06 11:16:33 -05:00
Owen
5e52c48e77 Fix import 2025-12-05 21:48:45 -05:00
Owen
c233fc564e Fix credentials 2025-12-05 21:28:41 -05:00
Fred KISSIE
151cd3e6de Trigger Build 2025-12-06 01:01:48 +01:00
Fred KISSIE
97489b9564 ♻️ check by current Org 2025-12-06 00:58:11 +01:00
Fred KISSIE
d263d282ee Merge branch 'dev' into refactor/show-product-updates-conditionnally 2025-12-06 00:55:18 +01:00
Owen
d1c7832e40 Update rekey endpoints and pages 2025-12-05 18:30:43 -05:00
Owen
313d3c72da Fix query logging 2025-12-05 18:30:43 -05:00
Owen
c8ec94c307 Fix session test for olm and show proper alert for ee 2025-12-05 18:30:43 -05:00
Owen
4809b64f7d Reset package lock 2025-12-05 18:30:43 -05:00
miloschwartz
26e49ca39d simplify sidebar titles 2025-12-05 17:33:30 -05:00
miloschwartz
bb1472d25c prefill alias if enter hostname in destination 2025-12-05 17:14:39 -05:00
Owen
8ea7b2ce02 Merge branch 'clients-user' into dev 2025-12-05 16:40:56 -05:00
Owen
1ee70e04ed Fix a couple things wiht destinations 2025-12-05 16:40:43 -05:00
miloschwartz
d90f3bb6be remember sidebar expand 2025-12-05 16:34:44 -05:00
miloschwartz
149f4c1332 remove org id from olm command 2025-12-05 16:28:34 -05:00
miloschwartz
8e3b5688d5 allow server admins to generate password reset code 2025-12-05 16:27:08 -05:00
Fred KISSIE
bfd1293847 🚨 fix lint errors 2025-12-05 22:16:55 +01:00
Fred KISSIE
f4701f3da5 🐛 fix lockfile bugs with node version 2025-12-05 22:12:44 +01:00
Fred KISSIE
93af09ee97 📦 update lockfile 2025-12-05 21:56:01 +01:00
Fred KISSIE
897ddbec01 📦 fix lockfile 2025-12-05 21:41:52 +01:00
Fred KISSIE
889b381e96 ♻️ only show product updates if the user is an admin or the owner 2025-12-05 21:33:35 +01:00
miloschwartz
54c05c8345 show contact admin on forgot password if no smtp server 2025-12-05 15:23:26 -05:00
miloschwartz
a3b852ef45 Merge branch 'dev' into clients-user 2025-12-05 15:17:32 -05:00
miloschwartz
53bb4efbb2 change tunnel to site 2025-12-05 14:58:09 -05:00
miloschwartz
96dbec9352 small fixes from testing 2025-12-05 14:48:33 -05:00
miloschwartz
2d3fbb9704 translate setup page 2025-12-05 12:19:40 -05:00
miloschwartz
d3be1fbf4c update descriptions and add adress back 2025-12-05 12:09:13 -05:00
Owen
89ee57cdf9 Enforce fqdn 2025-12-05 12:03:00 -05:00
miloschwartz
bdfc7fbcdb change phrase 2025-12-05 11:53:13 -05:00
miloschwartz
8726a7f931 remove device code ip check and fix edit resource dialog state issue 2025-12-05 11:47:59 -05:00
miloschwartz
1cae815be5 split install and run commands 2025-12-05 10:51:38 -05:00
Owen Schwartz
8d62fb3865 Merge pull request #1986 from marcschaeferger/fix-ci
Fix Github CI Action
2025-12-05 10:25:09 -05:00
miloschwartz
c5befee134 fix close button spacing on mobile 2025-12-05 10:08:35 -05:00
miloschwartz
9cf2dbc2cc fix login page spacing on mobile 2025-12-05 10:04:12 -05:00
Marc Schäfer
6217086cd5 Add login step for GitHub Container Registry
Added GitHub Container Registry login step for cosign.
2025-12-05 15:54:59 +01:00
dependabot[bot]
6fbe25e91f Bump the prod-minor-updates group across 1 directory with 6 updates
Bumps the prod-minor-updates group with 6 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [@aws-sdk/client-s3](https://github.com/aws/aws-sdk-js-v3/tree/HEAD/clients/client-s3) | `3.922.0` | `3.943.0` |
| [drizzle-orm](https://github.com/drizzle-team/drizzle-orm) | `0.44.7` | `0.45.0` |
| [express](https://github.com/expressjs/express) | `5.1.0` | `5.2.1` |
| [lucide-react](https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react) | `0.552.0` | `0.556.0` |
| [react-hook-form](https://github.com/react-hook-form/react-hook-form) | `7.66.0` | `7.68.0` |
| [tailwind-merge](https://github.com/dcastil/tailwind-merge) | `3.3.1` | `3.4.0` |



Updates `@aws-sdk/client-s3` from 3.922.0 to 3.943.0
- [Release notes](https://github.com/aws/aws-sdk-js-v3/releases)
- [Changelog](https://github.com/aws/aws-sdk-js-v3/blob/main/clients/client-s3/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-js-v3/commits/v3.943.0/clients/client-s3)

Updates `drizzle-orm` from 0.44.7 to 0.45.0
- [Release notes](https://github.com/drizzle-team/drizzle-orm/releases)
- [Commits](https://github.com/drizzle-team/drizzle-orm/compare/0.44.7...0.45.0)

Updates `express` from 5.1.0 to 5.2.1
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/v5.1.0...v5.2.1)

Updates `lucide-react` from 0.552.0 to 0.556.0
- [Release notes](https://github.com/lucide-icons/lucide/releases)
- [Commits](https://github.com/lucide-icons/lucide/commits/0.556.0/packages/lucide-react)

Updates `react-hook-form` from 7.66.0 to 7.68.0
- [Release notes](https://github.com/react-hook-form/react-hook-form/releases)
- [Changelog](https://github.com/react-hook-form/react-hook-form/blob/master/CHANGELOG.md)
- [Commits](https://github.com/react-hook-form/react-hook-form/compare/v7.66.0...v7.68.0)

Updates `tailwind-merge` from 3.3.1 to 3.4.0
- [Release notes](https://github.com/dcastil/tailwind-merge/releases)
- [Commits](https://github.com/dcastil/tailwind-merge/compare/v3.3.1...v3.4.0)

---
updated-dependencies:
- dependency-name: "@aws-sdk/client-s3"
  dependency-version: 3.943.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: prod-minor-updates
- dependency-name: drizzle-orm
  dependency-version: 0.45.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: prod-minor-updates
- dependency-name: express
  dependency-version: 5.2.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: prod-minor-updates
- dependency-name: lucide-react
  dependency-version: 0.556.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: prod-minor-updates
- dependency-name: react-hook-form
  dependency-version: 7.68.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: prod-minor-updates
- dependency-name: tailwind-merge
  dependency-version: 3.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: prod-minor-updates
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-05 14:49:26 +00:00
dependabot[bot]
57b3f49819 Bump the dev-minor-updates group across 1 directory with 2 updates
Bumps the dev-minor-updates group with 2 updates in the / directory: [esbuild-node-externals](https://github.com/pradel/esbuild-node-externals) and [tsx](https://github.com/privatenumber/tsx).


Updates `esbuild-node-externals` from 1.19.1 to 1.20.1
- [Release notes](https://github.com/pradel/esbuild-node-externals/releases)
- [Commits](https://github.com/pradel/esbuild-node-externals/compare/esbuild-node-externals-v1.19.1...esbuild-node-externals-v1.20.1)

Updates `tsx` from 4.20.6 to 4.21.0
- [Release notes](https://github.com/privatenumber/tsx/releases)
- [Changelog](https://github.com/privatenumber/tsx/blob/master/release.config.cjs)
- [Commits](https://github.com/privatenumber/tsx/compare/v4.20.6...v4.21.0)

---
updated-dependencies:
- dependency-name: esbuild-node-externals
  dependency-version: 1.20.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-minor-updates
- dependency-name: tsx
  dependency-version: 4.21.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-minor-updates
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-05 14:45:55 +00:00
Owen
35f9c67cfe Merge branch 'main' into dev 2025-12-05 09:45:17 -05:00
Owen
6707b3c7fe Merge branch 'main' of github.com:fosrl/pangolin 2025-12-05 09:42:58 -05:00
Owen Schwartz
dfb85f2c89 Merge pull request #1980 from bjoernch/patch-1
Update de-DE.json
2025-12-05 09:42:30 -05:00
Björn Felgner
17dec6cf0b Update de-DE.json
I noticed an odd translation in the Pangolin dashboard for the Client feature. It is currently translated into German as “Kunden”, which actually means customers. In German, there is no 1:1 translation for the IT term client, so this wording is misleading. I would suggest removing the translation entirely and leaving it as "Client" which correctly conveys the meaning of client devices.
2025-12-05 10:41:54 +01:00
miloschwartz
8ee4ee7baf remove bg-muted on target sep 2025-12-04 22:11:27 -05:00
Owen
b1b0702886 Make query optional 2025-12-04 22:07:48 -05:00
Owen
92aed108cd Update package 2025-12-04 22:07:48 -05:00
miloschwartz
2dcc94cd14 fix hc port NaN issue 2025-12-04 22:03:37 -05:00
miloschwartz
a7185ff913 add auth info tip 2025-12-04 21:28:42 -05:00
miloschwartz
04e73515b8 add alias to client resources table 2025-12-04 21:21:48 -05:00
miloschwartz
2bad9daaea move edit resource to proxy subpath 2025-12-04 21:18:17 -05:00
miloschwartz
54670e150d simplify create site wizard 2025-12-04 21:12:14 -05:00
miloschwartz
761ed1de9a ensure unique niceId for site resources and normal resources 2025-12-04 21:07:14 -05:00
miloschwartz
078692c818 invalidate queries on save 2025-12-04 17:56:11 -05:00
Owen
53ab51691a update packages 2025-12-04 17:26:24 -05:00
Milo Schwartz
54e2d95b55 Merge pull request #1977 from Fredkiss3/fix/some-fixes
fix: bugs introduced in `separate-tables`
2025-12-04 14:25:30 -08:00
miloschwartz
6e6fa77625 bump version 2025-12-04 17:10:59 -05:00
Owen
5c0c12cabe Update lock 2025-12-04 17:02:45 -05:00
Owen
b3ed7c0129 Merge branch 'dev' of github.com:fosrl/pangolin into dev 2025-12-04 17:00:54 -05:00
miloschwartz
10a00ff225 update next version 2025-12-04 16:56:39 -05:00
Fred KISSIE
ba09479827 ♻️ organize imports 2025-12-04 22:50:17 +01:00
Fred KISSIE
1c5c36fc12 ♻️ set the staleTime to Zero for queries so that they are refetched everytime 2025-12-04 22:50:04 +01:00
Fred KISSIE
d37ff6e15b 🐛 resource rols & resource clients shouldn't have the same query key 2025-12-04 22:49:40 +01:00
Owen Schwartz
9288575341 Merge pull request #1971 from water-sucks/add-tls-server-name-to-health-check-fields
feat(healthcheck): add SNI support for target healthchecks
2025-12-04 14:42:25 -05:00
Fred KISSIE
0ceed4c812 📦 update lockfile 2025-12-04 20:30:41 +01:00
Owen
4b61a38501 Merge branch 'add-tls-server-name-to-health-check-fields' of github.com:water-sucks/pangolin into dev 2025-12-04 12:11:41 -05:00
Varun Narravula
ca9273c9ea feat(healthcheck): add SNI input field to target healthcheck config 2025-12-04 12:11:25 -05:00
Owen
810704e190 Merge branch 'add-tls-server-name-to-health-check-fields' of github.com:water-sucks/pangolin into dev 2025-12-04 12:00:51 -05:00
Varun Narravula
f33be1434b feat(schema): add TLS server name column to target healthcheck tables 2025-12-04 12:00:40 -05:00
Varun Narravula
82a9f2b24f feat(healthcheck): add SNI input field to target healthcheck config 2025-12-04 12:00:40 -05:00
Owen
7204b5f0de Merge branch 'add-tls-server-name-to-health-check-fields' of github.com:water-sucks/pangolin into dev 2025-12-04 12:00:04 -05:00
Owen
9b372780bd Merge branch 'dev' of github.com:fosrl/pangolin into dev 2025-12-04 11:59:53 -05:00
Varun Narravula
9065385b87 feat(healthcheck): add SNI input field to target healthcheck config 2025-12-04 11:59:18 -05:00
miloschwartz
77306e8c97 add integration routes 2025-12-04 11:48:01 -05:00
miloschwartz
a746ef36a8 Merge branch 'dev' into clients-user 2025-12-04 11:38:05 -05:00
Owen
6e565f1331 Merge branch 'add-tls-server-name-to-health-check-fields' of github.com:water-sucks/pangolin into dev 2025-12-04 11:28:47 -05:00
Varun Narravula
84c608c2cf feat(healthcheck): add SNI input field to target healthcheck config 2025-12-04 11:27:18 -05:00
Milo Schwartz
6da7f58ced Merge pull request #1897 from Fredkiss3/feat/log-analytics
feat: request log analytics
2025-12-04 07:38:54 -08:00
Varun Narravula
351097b04d feat(healthcheck): add SNI input field to target healthcheck config 2025-12-04 10:33:01 -05:00
Varun Narravula
bd3d339905 feat(schema): add TLS server name column to target healthcheck tables 2025-12-04 10:18:20 -05:00
miloschwartz
c6ad36d78e update to next 15.5.7 2025-12-04 09:58:21 -05:00
miloschwartz
eaeb65e9b4 update wording 2025-12-03 22:26:22 -05:00
miloschwartz
4176bdbc81 clarify rules action types closes #1679 2025-12-03 21:30:44 -05:00
miloschwartz
a2cdd8484c changes to wording 2025-12-03 21:17:10 -05:00
Milo Schwartz
23ab76ae08 Merge pull request #1967 from Fredkiss3/refactor/separate-tables-2
Refactor: separate tables (2)
2025-12-03 17:31:46 -08:00
Owen
8eec122114 Fixing holepunching and other bugs 2025-12-03 20:31:37 -05:00
Fred KISSIE
79ccbc8e92 ♻️ compute everything in useQueries 2025-12-04 00:51:56 +01:00
Fred KISSIE
d70da2aa70 🐛 fix paths 2025-12-04 00:51:40 +01:00
Fred KISSIE
c695f50122 ♻️ use Queries 2025-12-04 00:42:59 +01:00
Fred KISSIE
1b09e5b9f9 🚚 move subpages to correct paths 2025-12-04 00:42:50 +01:00
miloschwartz
7efc947e26 auto collapse sidebar on small screens 2025-12-03 18:33:46 -05:00
miloschwartz
4b580105cd change default sort on logs tables closes #1907 2025-12-03 18:20:28 -05:00
miloschwartz
a61c82570a add logs routes to integration api routes closes #1963 2025-12-03 17:45:19 -05:00
Fred KISSIE
6734003d85 ⬆️ upgrade react & next to fix **CVE-2025-55182** 2025-12-03 22:58:02 +01:00
miloschwartz
e49d796b06 fix headers getting cleared on resource save and hide domain type without pangolin dns 2025-12-03 16:04:44 -05:00
miloschwartz
4ab4029625 ease expand animation a little 2025-12-03 15:53:41 -05:00
miloschwartz
5afff3c662 add extra org policy checks to middlewares 2025-12-03 15:50:24 -05:00
miloschwartz
9be5a01173 add niceId col back to table but hide by default 2025-12-03 15:27:58 -05:00
miloschwartz
357f297a3e remove enable_clients flag from config 2025-12-03 15:02:39 -05:00
miloschwartz
e1edbe6067 remove double clients permissions check boxes 2025-12-03 14:56:10 -05:00
miloschwartz
5a859aad29 update create client description 2025-12-03 14:52:57 -05:00
miloschwartz
a28b15a81d update descriptions 2025-12-03 14:47:59 -05:00
miloschwartz
e62186f395 change olm creds text 2025-12-03 14:46:57 -05:00
miloschwartz
11c1efc19c refactor to use DataTable component 2025-12-03 14:45:21 -05:00
Milo Schwartz
8b0491eb52 Merge pull request #1960 from Fredkiss3/refactor/separate-tables
refactor: separate tables
2025-12-03 11:28:21 -08:00
miloschwartz
0032634004 add owner devices to org on create org 2025-12-03 14:19:18 -05:00
miloschwartz
4af10c8108 change to --disable-clients flag 2025-12-03 14:12:53 -05:00
miloschwartz
56cb685813 fix spinner 2025-12-03 14:05:02 -05:00
miloschwartz
ccfe1f7d0a update description text for subnets 2025-12-03 14:01:13 -05:00
Fred KISSIE
bf987d867c 🚧 WIP 2025-12-03 19:28:07 +01:00
Fred KISSIE
3870ced635 Merge branch 'clients-user' into refactor/separate-tables 2025-12-03 17:01:50 +01:00
Fred KISSIE
cb3861a5c8 🚚 rename react-query-provider to TanstackQueryProvider 2025-12-03 16:58:40 +01:00
Fred KISSIE
f5bfddd262 🚨 run eslint --fix 2025-12-03 16:58:12 +01:00
Fred KISSIE
f060063f53 💬 update text 2025-12-02 19:24:02 +01:00
Fred KISSIE
6eb6b44f41 💬 update some text labels 2025-12-02 19:22:43 +01:00
Fred KISSIE
c93ab34021 ♻️ some refactors 2025-12-02 19:08:35 +01:00
Fred KISSIE
06a31bb716 ♻️ separate machine client & user devices tables + move common functions into hooks 2025-12-02 18:58:51 +01:00
Owen
152fb47ca4 Handle unrelay and relaying better 2025-12-02 11:17:08 -05:00
Fred KISSIE
3d400b2321 ♻️ ignore hydrateSaas script and exit(0) on PG migrations 2025-12-02 16:06:10 +01:00
dependabot[bot]
2cdc23d63e Bump nodemailer from 7.0.10 to 7.0.11
Bumps [nodemailer](https://github.com/nodemailer/nodemailer) from 7.0.10 to 7.0.11.
- [Release notes](https://github.com/nodemailer/nodemailer/releases)
- [Changelog](https://github.com/nodemailer/nodemailer/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodemailer/nodemailer/compare/v7.0.10...v7.0.11)

---
updated-dependencies:
- dependency-name: nodemailer
  dependency-version: 7.0.11
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-02 03:55:03 +00:00
Fred KISSIE
45a82f3ecc 🚧WIP: Separate user & machine clients 2025-12-02 03:14:02 +01:00
Fred KISSIE
342bedc012 🎨 format with prettier 2025-12-02 02:40:50 +01:00
Fred KISSIE
18db4a11c8 ♻️ separate client & proxy resources tables 2025-12-02 02:33:43 +01:00
Owen
a7e32d4013 Fix bugs with updating a resource 2025-12-01 19:57:23 -05:00
Owen
beea28daf3 Handle hp oddities 2025-12-01 16:20:10 -05:00
Owen
b5e94d44ae Fix switching orgs having connections from other orgs 2025-12-01 15:44:25 -05:00
Owen
a623604e96 Improve holepunching 2025-12-01 13:54:30 -05:00
miloschwartz
8c62dfa706 respond with relative code expiration time 2025-12-01 12:36:13 -05:00
Fred KISSIE
610e46f2d5 🚧 WIP: separate proxy & client resources 2025-12-01 18:26:32 +01:00
Owen
92125611e9 Add validation and fix thrown error from updatePeerData 2025-11-30 17:49:55 -05:00
Owen
096da391e5 Add a utility subnet 2025-11-30 17:38:12 -05:00
Owen
dd6b1d88d3 Update peer data when HP changes 2025-11-30 11:39:40 -05:00
Owen
79f0d60533 Start working on HP IP changes 2025-11-30 11:39:40 -05:00
Owen
67665864c2 Clarify that PP is only for TCP 2025-11-29 22:58:09 -05:00
Marc Schäfer
336d31ce39 fix(validators): restore 2+ char domain label requirement
- Replace (?:[a-z\\d-]{0,61}[a-z\\d])? with (?:[a-z\\d-]{1,61}[a-z\\d]) to keep labels 2–63 chars
- Avoid unintentionally allowing single-character labels (e.g. a.com) introduced by the previous regex change

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-30 02:41:03 +01:00
Marc Schäfer
8df62e8b6a Potential fix for code scanning alert no. 19: Inefficient regular expression
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-11-29 23:40:20 +01:00
Marc Schäfer
3eab3b0827 Potential fix for code scanning alert no. 8: DOM text reinterpreted as HTML
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-11-29 23:39:54 +01:00
Marc Schäfer
fbbab60956 Potential fix for code scanning alert no. 7: Insecure randomness
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-11-29 23:39:41 +01:00
Owen Schwartz
c4de617751 Merge pull request #1940 from fosrl/dependabot/npm_and_yarn/multi-4aa959df0f
Bump dompurify and monaco-editor
2025-11-29 13:15:49 -05:00
Owen Schwartz
19e3c5045e Merge pull request #1942 from fosrl/dependabot/npm_and_yarn/multi-f170272c46
Bump glob and npm
2025-11-29 13:15:30 -05:00
Owen Schwartz
9f63d8bb5b Merge pull request #1941 from fosrl/dependabot/npm_and_yarn/multi-b50d6d7a59
Bump tar and npm
2025-11-29 13:15:09 -05:00
dependabot[bot]
49348c6ab7 Bump glob and npm
Bumps [glob](https://github.com/isaacs/node-glob) to 11.1.0 and updates ancestor dependencies [glob](https://github.com/isaacs/node-glob) and [npm](https://github.com/npm/cli). These dependencies need to be updated together.


Updates `glob` from 11.0.3 to 11.1.0
- [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/node-glob/compare/v11.0.3...v11.1.0)

Updates `glob` from 10.4.5 to 10.5.0
- [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/node-glob/compare/v11.0.3...v11.1.0)

Updates `npm` from 11.6.2 to 11.6.4
- [Release notes](https://github.com/npm/cli/releases)
- [Changelog](https://github.com/npm/cli/blob/latest/CHANGELOG.md)
- [Commits](https://github.com/npm/cli/compare/v11.6.2...v11.6.4)

---
updated-dependencies:
- dependency-name: glob
  dependency-version: 11.1.0
  dependency-type: direct:production
- dependency-name: glob
  dependency-version: 10.5.0
  dependency-type: indirect
- dependency-name: npm
  dependency-version: 11.6.4
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-29 18:11:23 +00:00
dependabot[bot]
0961ac1da1 Bump tar and npm
Removes [tar](https://github.com/isaacs/node-tar). It's no longer used after updating ancestor dependency [npm](https://github.com/npm/cli). These dependencies need to be updated together.


Removes `tar`

Updates `npm` from 11.6.2 to 11.6.4
- [Release notes](https://github.com/npm/cli/releases)
- [Changelog](https://github.com/npm/cli/blob/latest/CHANGELOG.md)
- [Commits](https://github.com/npm/cli/compare/v11.6.2...v11.6.4)

---
updated-dependencies:
- dependency-name: tar
  dependency-version: 
  dependency-type: indirect
- dependency-name: npm
  dependency-version: 11.6.4
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-29 18:11:22 +00:00
dependabot[bot]
6a79436516 Bump dompurify and monaco-editor
Bumps [dompurify](https://github.com/cure53/DOMPurify) and [monaco-editor](https://github.com/microsoft/monaco-editor). These dependencies needed to be updated together.

Updates `dompurify` from 3.1.7 to 3.2.7
- [Release notes](https://github.com/cure53/DOMPurify/releases)
- [Commits](https://github.com/cure53/DOMPurify/compare/3.1.7...3.2.7)

Updates `monaco-editor` from 0.54.0 to 0.55.1
- [Release notes](https://github.com/microsoft/monaco-editor/releases)
- [Changelog](https://github.com/microsoft/monaco-editor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/microsoft/monaco-editor/compare/v0.54.0...v0.55.1)

---
updated-dependencies:
- dependency-name: dompurify
  dependency-version: 3.2.7
  dependency-type: indirect
- dependency-name: monaco-editor
  dependency-version: 0.55.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-29 18:11:10 +00:00
Owen Schwartz
85b46392e1 Merge pull request #1922 from fosrl/dependabot/npm_and_yarn/body-parser-2.2.1
Bump body-parser from 2.2.0 to 2.2.1
2025-11-29 13:10:02 -05:00
Owen Schwartz
f721c983aa Merge pull request #1936 from PavanendraBaahubali/Pavan/fix-custom-header-reset
Fix: prevent custom headers from being cleared on save
2025-11-29 11:00:46 -05:00
Pavan Kumar
ff0b30fc2e Merge branch 'main' of https://github.com/fosrl/pangolin into fix-custom-header-reset 2025-11-28 19:06:42 +05:30
Pavan Kumar
18070a37a8 fix: keep custom header values when editing resource 2025-11-28 19:06:09 +05:30
miloschwartz
5bd31f87f0 only allow one device auth per session 2025-11-26 15:48:49 -05:00
Owen
de83cf9d8c Handle delete org and checking org policy 2025-11-26 15:35:33 -05:00
Owen
ceae787cf5 Attempt to handle creating/deleting clients and role 2025-11-25 18:20:02 -05:00
Owen
ce6afd0019 Merge branch 'clients-user' of github.com:fosrl/pangolin into clients-user 2025-11-25 15:47:19 -05:00
miloschwartz
d977d57b2a use border instead of bg 2025-11-25 15:45:32 -05:00
dependabot[bot]
7bcd6adf01 Bump body-parser from 2.2.0 to 2.2.1
Bumps [body-parser](https://github.com/expressjs/body-parser) from 2.2.0 to 2.2.1.
- [Release notes](https://github.com/expressjs/body-parser/releases)
- [Changelog](https://github.com/expressjs/body-parser/blob/master/HISTORY.md)
- [Commits](https://github.com/expressjs/body-parser/compare/v2.2.0...v2.2.1)

---
updated-dependencies:
- dependency-name: body-parser
  dependency-version: 2.2.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-25 18:31:04 +00:00
miloschwartz
ac68dbd545 add my-device and force login 2025-11-25 10:51:53 -05:00
Owen Schwartz
d450e2c3ab Merge pull request #1920 from ThanatosDi/feat/add-zh-tw-language
feat: Add zh-TW language
2025-11-25 10:17:46 -05:00
古丁丁
9440a4f879 feat: Add zh-TW language 2025-11-25 11:23:48 +08:00
Owen
73b0411e1c Add alias config 2025-11-24 20:43:26 -05:00
dependabot[bot]
a8d11d78fc Bump actions/checkout from 5.0.0 to 6.0.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 5.0.0 to 6.0.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](08c6903cd8...1af3b93b68)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 6.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-24 01:27:21 +00:00
dependabot[bot]
e16aa6e90b Bump actions/setup-go from 6.0.0 to 6.1.0
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 6.0.0 to 6.1.0.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](4469467582...4dc6199c7b)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-version: 6.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-24 01:27:15 +00:00
Fred KISSIE
6368b9d837 ♻️ use linechart 2025-11-21 06:33:47 +01:00
Fred KISSIE
1b643fb4b6 🐛 fix Dockerfile 2025-11-21 06:27:13 +01:00
Fred KISSIE
d118c6b666 ♻️also export build file 2025-11-21 06:18:32 +01:00
Fred KISSIE
380e062d25 ♻️export driver in Dockerfile 2025-11-21 06:17:14 +01:00
Fred KISSIE
261f0333b8 💄 remove chart animations 2025-11-21 06:15:05 +01:00
Fred KISSIE
24adca6108 ♻️add auto refetch every 30 seconds 2025-11-21 06:14:48 +01:00
Fred KISSIE
3f440f0f7a 🏷️ fix type for SQLite 2025-11-21 06:10:01 +01:00
Fred KISSIE
ba6defa87c Add request by day chart 2025-11-21 06:03:34 +01:00
Fred KISSIE
887a0ef574 💄 chart for analytics 2025-11-21 05:36:30 +01:00
Fred KISSIE
200743747d 🚧add css variables for chart 2025-11-21 04:51:10 +01:00
Fred KISSIE
2082c5eed2 🚧 Add shadCN chart 2025-11-21 04:50:06 +01:00
Fred KISSIE
a42d012788 load logs per day 2025-11-21 04:48:01 +01:00
Fred KISSIE
82cc51424b 🔨also export driver in the db driver generation script 2025-11-21 04:47:42 +01:00
Fred KISSIE
7924f195aa 💄handle empty data 2025-11-21 04:47:13 +01:00
Fred KISSIE
d41bd3023f 🐛 filter by resource UI 2025-11-21 03:05:40 +01:00
Fred KISSIE
87a0dd2d12 ♻️ remove click 2025-11-21 02:57:44 +01:00
Fred KISSIE
5fd64596eb add top countries list 2025-11-21 02:00:47 +01:00
Owen
d23f61d995 Take into account the existing associations
Use to filter adds and removes in the associations
2025-11-20 16:42:55 -05:00
Owen
7ac27b3883 Switch to update 2025-11-20 16:08:03 -05:00
Owen
9420b41e39 Update the remote subnets 2025-11-20 15:17:48 -05:00
Owen
2cfb0e05cf Lock working without redis? 2025-11-20 14:03:25 -05:00
Owen
5b9386b18a Add lock 2025-11-20 12:40:25 -05:00
Owen
f5c3dff43c Some small bug fixes 2025-11-20 12:24:24 -05:00
Owen
eeb82c8cfe Merge branch 'main' of github.com:fosrl/pangolin 2025-11-20 10:36:38 -05:00
Owen
3750c36aa7 Working on orchestration 2025-11-20 10:31:09 -05:00
copilot-swe-agent[bot]
be4d697dfe Set hcHealth to 'unknown' when health check is disabled in updateTarget
Co-authored-by: oschwartz10612 <4999704+oschwartz10612@users.noreply.github.com>
2025-11-20 15:29:01 +00:00
copilot-swe-agent[bot]
94b34c489c Initial plan 2025-11-20 15:23:27 +00:00
Fred KISSIE
3801354ae6 🚧 add country code flag emoji function 2025-11-20 08:37:49 +01:00
Fred KISSIE
266fbb1762 💄nicer colors 2025-11-20 08:22:16 +01:00
Fred KISSIE
5d1f81a92c world map 2025-11-20 08:19:11 +01:00
Fred KISSIE
d6e8eb5307 🧑‍💻add tailwind indicator component 2025-11-20 05:23:16 +01:00
Fred KISSIE
2bc82f49ed add enpoint for getting all resource names 2025-11-20 04:20:31 +01:00
Fred KISSIE
487985558d add react compiler 2025-11-20 04:19:58 +01:00
Fred KISSIE
dc237b8052 💬 update text message from the API 2025-11-20 03:19:43 +01:00
Fred KISSIE
4ed4515262 🚧 starting request analytics page 2025-11-20 02:55:52 +01:00
Fred KISSIE
cd76fa0139 add analytics endpoint 2025-11-20 02:55:33 +01:00
Fred KISSIE
af4b9e83f7 ✏️ fix typos 2025-11-20 02:55:03 +01:00
Owen
fa5facdf33 Fix bugs 2025-11-19 20:03:57 -05:00
Owen
937b36e756 Build client site resource associations and send messages 2025-11-19 18:05:42 -05:00
Fred KISSIE
e90bdf8f97 ♻️ translate sidebar headings 2025-11-19 21:43:34 +01:00
Owen Schwartz
56491cc17b Merge pull request #1896 from fosrl/copilot/configure-auto-login-idp-blueprints
Add blueprint support for auto-login-idp configuration
2025-11-19 14:33:17 -05:00
copilot-swe-agent[bot]
6da531e99b Use IDP ID instead of IDP name for auto-login-idp
Co-authored-by: oschwartz10612 <4999704+oschwartz10612@users.noreply.github.com>
2025-11-19 19:29:52 +00:00
copilot-swe-agent[bot]
01b5158b73 Add auto-login-idp support to blueprints
Co-authored-by: oschwartz10612 <4999704+oschwartz10612@users.noreply.github.com>
2025-11-19 16:50:06 +00:00
copilot-swe-agent[bot]
8f9b665bef Initial plan 2025-11-19 16:43:50 +00:00
Owen
806949879a Merge branch 'dev' into clients-user 2025-11-18 13:53:12 -05:00
Owen
e72e2b53aa Working on targets 2025-11-18 13:53:04 -05:00
Owen Schwartz
10f42fe2e6 Merge pull request #1884 from v1rusnl/main
Bump Traefik to v3.6 due to Docker 29.X.X compatibility
2025-11-18 09:42:38 -05:00
v1rusnl
51b438117a Update Traefik image version to v3.6 2025-11-18 12:44:10 +01:00
v1rusnl
d73825dd24 Update Traefik image version to v3.6 2025-11-18 12:41:12 +01:00
miloschwartz
b5c6191c67 add email consent and update audience 2025-11-17 20:50:24 -05:00
Owen
97c707248e Working on updating targets 2025-11-17 20:44:39 -05:00
miloschwartz
02fbc279b5 add email consent and update audience 2025-11-17 20:37:24 -05:00
dependabot[bot]
447b706909 Bump @react-email/tailwind from 1.2.2 to 2.0.1
Bumps [@react-email/tailwind](https://github.com/resend/react-email/tree/HEAD/packages/tailwind) from 1.2.2 to 2.0.1.
- [Release notes](https://github.com/resend/react-email/releases)
- [Changelog](https://github.com/resend/react-email/blob/canary/packages/tailwind/CHANGELOG.md)
- [Commits](https://github.com/resend/react-email/commits/@react-email/tailwind@2.0.1/packages/tailwind)

---
updated-dependencies:
- dependency-name: "@react-email/tailwind"
  dependency-version: 2.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-18 01:31:38 +00:00
Owen Schwartz
80a68507cd Merge pull request #1876 from fosrl/crowdin_dev
New Crowdin updates
2025-11-17 11:48:54 -05:00
Owen
dbb1e37033 Update lock 2025-11-17 11:30:25 -05:00
Owen
364b84359e Merge branch 'dev' into clients-user 2025-11-17 11:30:12 -05:00
Owen
93d4a40977 Merge branch 'main' into dev 2025-11-17 11:30:05 -05:00
Owen
97312343e4 Merge branch 'dev' into clients-user 2025-11-17 11:28:47 -05:00
Owen Schwartz
1736ad486a New translations en-us.json (Norwegian Bokmal) 2025-11-17 11:03:26 -05:00
Owen Schwartz
a07ad843a2 New translations en-us.json (Chinese Simplified) 2025-11-17 11:03:24 -05:00
Owen Schwartz
fef9101058 New translations en-us.json (Turkish) 2025-11-17 11:03:23 -05:00
Owen Schwartz
2890ff2605 New translations en-us.json (Russian) 2025-11-17 11:03:21 -05:00
Owen Schwartz
026ad2ccb9 New translations en-us.json (Portuguese) 2025-11-17 11:03:19 -05:00
Owen Schwartz
a82969b778 New translations en-us.json (Polish) 2025-11-17 11:03:18 -05:00
Owen Schwartz
612b04c26f New translations en-us.json (Dutch) 2025-11-17 11:03:16 -05:00
Owen Schwartz
2162f5f76f New translations en-us.json (Korean) 2025-11-17 11:03:14 -05:00
Owen Schwartz
710f16ce68 New translations en-us.json (Italian) 2025-11-17 11:03:13 -05:00
Owen Schwartz
61a4f468ba New translations en-us.json (German) 2025-11-17 11:03:11 -05:00
Owen Schwartz
b00fea5656 New translations en-us.json (Czech) 2025-11-17 11:03:09 -05:00
Owen Schwartz
269ff630aa New translations en-us.json (Bulgarian) 2025-11-17 11:03:08 -05:00
Owen Schwartz
986f7121bd New translations en-us.json (Spanish) 2025-11-17 11:03:06 -05:00
Owen Schwartz
21f0501bc6 New translations en-us.json (French) 2025-11-17 11:03:04 -05:00
Owen Schwartz
2b31dd955c Merge pull request #1848 from fosrl/dependabot/npm_and_yarn/dev-minor-updates-040abfaff9
Bump the dev-minor-updates group across 1 directory with 3 updates
2025-11-17 10:54:38 -05:00
Owen Schwartz
e7aeb4ff89 Merge pull request #1849 from fosrl/dependabot/go_modules/install/prod-minor-updates-4e8dbec1a6
Bump golang.org/x/term from 0.36.0 to 0.37.0 in /install in the prod-minor-updates group
2025-11-17 10:54:23 -05:00
Owen Schwartz
9dd1192033 Merge pull request #1855 from fosrl/dependabot/npm_and_yarn/prod-patch-updates-6d8f9bd785
Bump the prod-patch-updates group across 1 directory with 12 updates
2025-11-17 10:54:15 -05:00
Owen Schwartz
e61da0958f Merge pull request #1841 from fosrl/dependabot/github_actions/docker/setup-qemu-action-3.7.0
Bump docker/setup-qemu-action from 3.6.0 to 3.7.0
2025-11-17 10:49:20 -05:00
Owen Schwartz
fce588057e Merge pull request #1870 from fosrl/dependabot/npm_and_yarn/js-yaml-4.1.1
Bump js-yaml from 4.1.0 to 4.1.1
2025-11-17 10:48:32 -05:00
Owen
33331fd3c8 Merge branch 'Lokowitz-fix-zod-new' into dev 2025-11-17 10:46:40 -05:00
Owen
1261ad3a00 Standardize remote subnets build 2025-11-17 10:22:22 -05:00
Owen
7dcf4d5192 Remove remote subnet 2025-11-17 10:22:22 -05:00
Lokowitz
dc87df5d38 remove temp test 2025-11-17 14:01:11 +00:00
Lokowitz
5d2f65daa9 fix for zod 2025-11-17 13:23:30 +00:00
Lokowitz
58cf471bc4 fix z.coerce.number 2025-11-16 14:29:19 +00:00
Lokowitz
7db99a7dd5 used zod codemod 2025-11-16 14:18:17 +00:00
Lokowitz
000904eb31 upgrade zod 2025-11-16 14:09:22 +00:00
dependabot[bot]
6d1713b6b9 Bump js-yaml from 4.1.0 to 4.1.1
Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 4.1.0 to 4.1.1.
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/compare/4.1.0...4.1.1)

---
updated-dependencies:
- dependency-name: js-yaml
  dependency-version: 4.1.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-16 06:21:01 +00:00
Owen
de8262d7b9 Batch deletes 2025-11-15 11:51:52 -05:00
miloschwartz
4f026acad8 adjust icon in product update 2025-11-14 17:35:51 -05:00
miloschwartz
5b31bbce8d remove frontend env parsing 2025-11-14 12:25:32 -05:00
Milo Schwartz
e6e80f6fc7 Merge pull request #1814 from Fredkiss3/feat/update-popup
Feat: version updates & product updates popup
2025-11-14 09:13:15 -08:00
Milo Schwartz
bde4492d49 Merge branch 'dev' into feat/update-popup 2025-11-14 09:12:11 -08:00
miloschwartz
7c728c144c fix broken inputs in health check form 2025-11-14 12:00:15 -05:00
Owen
8ad7bcc0d6 Adjust rate limiting position 2025-11-14 11:33:52 -05:00
Owen
e62806d6fb Clean up old timestamps 2025-11-14 11:33:51 -05:00
miloschwartz
4e0a2e441b hide domain status info if not flags.use_pangolin_dns 2025-11-14 11:31:44 -05:00
Owen Schwartz
aabe39137b Merge pull request #1856 from LaurenceJJones/fix-remove-return-before-showing-token
fix: Remove return in installer which prevents showing token
2025-11-14 10:23:21 -05:00
miloschwartz
d9564ed6fe improve spacing and colors 2025-11-13 22:04:29 -05:00
miloschwartz
0798a0c6c2 clean up info box 2025-11-13 21:48:37 -05:00
dependabot[bot]
c9786946b7 Bump the prod-patch-updates group across 1 directory with 12 updates
Bumps the prod-patch-updates group with 12 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [@radix-ui/react-avatar](https://github.com/radix-ui/primitives) | `1.1.10` | `1.1.11` |
| [@radix-ui/react-label](https://github.com/radix-ui/primitives) | `2.1.7` | `2.1.8` |
| [@radix-ui/react-progress](https://github.com/radix-ui/primitives) | `1.1.7` | `1.1.8` |
| [@radix-ui/react-separator](https://github.com/radix-ui/primitives) | `1.1.7` | `1.1.8` |
| [@radix-ui/react-slot](https://github.com/radix-ui/primitives) | `1.2.3` | `1.2.4` |
| [axios](https://github.com/axios/axios) | `1.13.1` | `1.13.2` |
| [eslint](https://github.com/eslint/eslint) | `9.39.0` | `9.39.1` |
| [eslint-config-next](https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next) | `16.0.1` | `16.0.2` |
| [js-yaml](https://github.com/nodeca/js-yaml) | `4.1.0` | `4.1.1` |
| [maxmind](https://github.com/runk/node-maxmind) | `5.0.0` | `5.0.1` |
| [posthog-node](https://github.com/PostHog/posthog-js/tree/HEAD/packages/node) | `5.11.0` | `5.11.2` |
| [resend](https://github.com/resend/resend-node) | `6.4.0` | `6.4.2` |



Updates `@radix-ui/react-avatar` from 1.1.10 to 1.1.11
- [Changelog](https://github.com/radix-ui/primitives/blob/main/release-process.md)
- [Commits](https://github.com/radix-ui/primitives/commits)

Updates `@radix-ui/react-label` from 2.1.7 to 2.1.8
- [Changelog](https://github.com/radix-ui/primitives/blob/main/release-process.md)
- [Commits](https://github.com/radix-ui/primitives/commits)

Updates `@radix-ui/react-progress` from 1.1.7 to 1.1.8
- [Changelog](https://github.com/radix-ui/primitives/blob/main/release-process.md)
- [Commits](https://github.com/radix-ui/primitives/commits)

Updates `@radix-ui/react-separator` from 1.1.7 to 1.1.8
- [Changelog](https://github.com/radix-ui/primitives/blob/main/release-process.md)
- [Commits](https://github.com/radix-ui/primitives/commits)

Updates `@radix-ui/react-slot` from 1.2.3 to 1.2.4
- [Changelog](https://github.com/radix-ui/primitives/blob/main/release-process.md)
- [Commits](https://github.com/radix-ui/primitives/commits)

Updates `axios` from 1.13.1 to 1.13.2
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.13.1...v1.13.2)

Updates `eslint` from 9.39.0 to 9.39.1
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/compare/v9.39.0...v9.39.1)

Updates `eslint-config-next` from 16.0.1 to 16.0.2
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/commits/v16.0.2/packages/eslint-config-next)

Updates `js-yaml` from 4.1.0 to 4.1.1
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/compare/4.1.0...4.1.1)

Updates `maxmind` from 5.0.0 to 5.0.1
- [Release notes](https://github.com/runk/node-maxmind/releases)
- [Commits](https://github.com/runk/node-maxmind/compare/v5.0.0...v5.0.1)

Updates `posthog-node` from 5.11.0 to 5.11.2
- [Release notes](https://github.com/PostHog/posthog-js/releases)
- [Changelog](https://github.com/PostHog/posthog-js/blob/main/packages/node/CHANGELOG.md)
- [Commits](https://github.com/PostHog/posthog-js/commits/posthog-node@5.11.2/packages/node)

Updates `resend` from 6.4.0 to 6.4.2
- [Release notes](https://github.com/resend/resend-node/releases)
- [Commits](https://github.com/resend/resend-node/compare/v6.4.0...v6.4.2)

---
updated-dependencies:
- dependency-name: "@radix-ui/react-avatar"
  dependency-version: 1.1.11
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-patch-updates
- dependency-name: "@radix-ui/react-label"
  dependency-version: 2.1.8
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-patch-updates
- dependency-name: "@radix-ui/react-progress"
  dependency-version: 1.1.8
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-patch-updates
- dependency-name: "@radix-ui/react-separator"
  dependency-version: 1.1.8
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-patch-updates
- dependency-name: "@radix-ui/react-slot"
  dependency-version: 1.2.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-patch-updates
- dependency-name: axios
  dependency-version: 1.13.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-patch-updates
- dependency-name: eslint
  dependency-version: 9.39.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-patch-updates
- dependency-name: eslint-config-next
  dependency-version: 16.0.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-patch-updates
- dependency-name: js-yaml
  dependency-version: 4.1.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-patch-updates
- dependency-name: maxmind
  dependency-version: 5.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-patch-updates
- dependency-name: posthog-node
  dependency-version: 5.11.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-patch-updates
- dependency-name: resend
  dependency-version: 6.4.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-patch-updates
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-14 01:24:49 +00:00
dependabot[bot]
9344ab3546 Bump golang.org/x/term in /install in the prod-minor-updates group
Bumps the prod-minor-updates group in /install with 1 update: [golang.org/x/term](https://github.com/golang/term).


Updates `golang.org/x/term` from 0.36.0 to 0.37.0
- [Commits](https://github.com/golang/term/compare/v0.36.0...v0.37.0)

---
updated-dependencies:
- dependency-name: golang.org/x/term
  dependency-version: 0.37.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: prod-minor-updates
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-14 01:23:32 +00:00
dependabot[bot]
1a4078b8a1 Bump the dev-minor-updates group across 1 directory with 3 updates
Bumps the dev-minor-updates group with 3 updates in the / directory: [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node), [esbuild](https://github.com/evanw/esbuild) and [esbuild-node-externals](https://github.com/pradel/esbuild-node-externals).


Updates `@types/node` from 24.9.2 to 24.10.1
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `esbuild` from 0.25.12 to 0.27.0
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.25.12...v0.27.0)

Updates `esbuild-node-externals` from 1.18.0 to 1.19.1
- [Release notes](https://github.com/pradel/esbuild-node-externals/releases)
- [Commits](https://github.com/pradel/esbuild-node-externals/compare/v1.18.0...esbuild-node-externals-v1.19.1)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-version: 24.10.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-minor-updates
- dependency-name: esbuild
  dependency-version: 0.27.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-minor-updates
- dependency-name: esbuild-node-externals
  dependency-version: 1.19.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-minor-updates
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-14 01:21:19 +00:00
miloschwartz
ca66637270 remove from address in saas suppport email 2025-11-13 17:37:27 -05:00
miloschwartz
8674ca931b remove from address in saas suppport email 2025-11-13 17:34:49 -05:00
miloschwartz
08c82e072e Merge branch 'clients-user' of https://github.com/fosrl/pangolin into clients-user 2025-11-13 17:33:37 -05:00
miloschwartz
23c9827e4c remove create user client route 2025-11-13 17:32:35 -05:00
Owen Schwartz
864b587b89 Merge pull request #1858 from Pallavikumarimdb/role-in-headers
Role in headers
2025-11-13 17:16:31 -05:00
Owen Schwartz
ca89aa7ce8 Merge pull request #1847 from Pallavikumarimdb/fix/ipv6-validation
Fix: Improve IPv6 and IPV4 validation to support all variants using ipaddr.js
2025-11-13 17:10:47 -05:00
Pallavi Kumari
63a1ecfb86 role in header 2025-11-13 23:31:29 +05:30
Laurence Jones
fbce392137 Remove unnecessary return after success message
Remove redundant return statement after success message.
2025-11-13 12:52:21 +00:00
Pallavi Kumari
c004e969cb improve IPv6 validation to support all variants using ipaddr.js 2025-11-12 00:30:08 +05:30
dependabot[bot]
c6611471b1 Bump docker/setup-qemu-action from 3.6.0 to 3.7.0
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 3.6.0 to 3.7.0.
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](29109295f8...c7c5346462)

---
updated-dependencies:
- dependency-name: docker/setup-qemu-action
  dependency-version: 3.7.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-10 01:37:59 +00:00
Owen
bdf1625976 Add headers 2025-11-09 10:46:46 -08:00
Owen
0a5dc17800 Merge branch 'dev' into feat/option-to-regenerate-keys 2025-11-09 10:43:26 -08:00
Owen
fa7aa508ea Merge branch 'dev' into pallavi/feat/make-niceId-editable 2025-11-09 10:39:30 -08:00
Owen
2973b61676 Fix merge confilct 2025-11-08 18:01:42 -08:00
Owen
2428413442 Dont create client 2025-11-08 17:57:54 -08:00
miloschwartz
5602d8ee64 sync user clients to org on add/remove user org 2025-11-08 17:52:05 -08:00
Owen
a70799c8c0 Merge branch 'dev' into clients-user 2025-11-08 16:51:45 -08:00
Owen
d38b321f85 Add missing header 2025-11-08 16:47:03 -08:00
Owen Schwartz
b0ff50a76f Merge pull request #1834 from fosrl/dev
Small Bug Fixes
2025-11-08 16:35:50 -08:00
Owen
37acdc2796 Revert transaction 2025-11-08 16:33:48 -08:00
Owen Schwartz
f3d31cb6de Merge pull request #1833 from fosrl/crowdin_dev
New Crowdin updates
2025-11-08 16:23:11 -08:00
Owen Schwartz
a336955066 New translations en-us.json (Norwegian Bokmal) 2025-11-08 16:22:42 -08:00
Owen Schwartz
a229fc1c61 New translations en-us.json (Chinese Simplified) 2025-11-08 16:22:40 -08:00
Owen Schwartz
7995fd364e New translations en-us.json (Turkish) 2025-11-08 16:22:39 -08:00
Owen Schwartz
5e0d822d45 New translations en-us.json (Russian) 2025-11-08 16:22:38 -08:00
Owen Schwartz
4fddaa8f11 New translations en-us.json (Portuguese) 2025-11-08 16:22:36 -08:00
Owen Schwartz
4a87cecf89 New translations en-us.json (Polish) 2025-11-08 16:22:35 -08:00
Owen Schwartz
ac5ee5c7ca New translations en-us.json (Dutch) 2025-11-08 16:22:34 -08:00
Owen Schwartz
8a8c357563 New translations en-us.json (Korean) 2025-11-08 16:22:32 -08:00
Owen Schwartz
263fd80c18 New translations en-us.json (Italian) 2025-11-08 16:22:31 -08:00
Owen Schwartz
7bdf05bdf5 New translations en-us.json (German) 2025-11-08 16:22:30 -08:00
Owen Schwartz
d00f12967d New translations en-us.json (Czech) 2025-11-08 16:22:28 -08:00
Owen Schwartz
d9991a18e2 New translations en-us.json (Bulgarian) 2025-11-08 16:22:27 -08:00
Owen Schwartz
a51c21cdd2 New translations en-us.json (Spanish) 2025-11-08 16:22:26 -08:00
Owen Schwartz
265cab5b64 New translations en-us.json (French) 2025-11-08 16:22:24 -08:00
Owen
da15e5e77b Remove software-properties-common
Fixes #1828
2025-11-08 16:13:42 -08:00
Owen
a717ca2675 Only uppercase the value if its a country
Fixes #1813
2025-11-08 15:42:46 -08:00
miloschwartz
693c9fbe0f make actions sticky in targets and rules input 2025-11-08 14:39:14 -08:00
Owen
564b290244 Fix #1830 2025-11-08 14:24:28 -08:00
Owen
84d78df67e Merge branch 'main' into dev 2025-11-08 14:20:40 -08:00
Owen
107053a98f Merge branch 'main' of github.com:fosrl/pangolin 2025-11-08 14:20:35 -08:00
Owen Schwartz
6422a78e6f Merge pull request #1830 from hetlelid/patch-2
Update resourceRawSettingsDescription with details
2025-11-08 14:20:21 -08:00
miloschwartz
10f8298161 reset nav logo size 2025-11-08 14:18:43 -08:00
miloschwartz
5f11630e27 minor adjustments to blueprints screens 2025-11-08 14:15:47 -08:00
Owen
a776b2ea94 Fix: qiery perferWildcardCert from db
Fixes #1816
Fixes #1829
2025-11-08 14:14:17 -08:00
miloschwartz
b83ec1b503 remove target unique check 2025-11-08 13:57:00 -08:00
Owen
83bd5957cd Dont allow editing a config managed domain
Ref #1816
2025-11-08 12:18:36 -08:00
Owen
f98b4baa73 Add remote subnets back based on resources 2025-11-08 12:17:33 -08:00
Pallavi Kumari
0af51cebbe scope niceid to the orgId 2025-11-08 19:44:23 +05:30
Pallavi Kumari
abc5f8ec68 show the identifier in the info box 2025-11-08 19:44:23 +05:30
Owen
ddc14d164e Rename nice id to Identifier in the ui 2025-11-08 19:44:23 +05:30
Pallavi Kumari
aeda85fcfb move resource niceid update to general page 2025-11-08 19:44:23 +05:30
Pallavi Kumari
66124f09c4 move site niceId details to general setting page 2025-11-08 19:44:23 +05:30
Pallavi Kumari
ac5fe1486a update url to prevent page redirect 2025-11-08 19:44:23 +05:30
Pallavi Kumari
50ac52d316 fix lint 2025-11-08 19:44:22 +05:30
Pallavi Kumari
f85d9f8b6e fix col 2025-11-08 19:44:22 +05:30
Pallavi Kumari
feb0bd58c8 make resource niceid editable 2025-11-08 19:44:22 +05:30
Pallavi Kumari
32949127d2 Make site niceId editable 2025-11-08 19:44:22 +05:30
Pallavi Kumari
84d24d9bf5 niceId inside resource info 2025-11-08 19:44:22 +05:30
Pallavi Kumari
8e1bb6a6fd add niceId inside info box 2025-11-08 19:44:22 +05:30
hetlelid
66c14c2d09 Update resourceRawSettingsDescription with details
Expanded the description for resourceRawSettings to include mapping details and a documentation link.
2025-11-08 13:24:51 +01:00
miloschwartz
cad4d97fb3 update works 2025-11-07 22:26:28 -08:00
Owen
de53cfb912 Update package lock 2025-11-07 21:57:31 -08:00
miloschwartz
55fd276773 update to node 25? 2025-11-07 21:55:09 -08:00
miloschwartz
7125b49024 add fade 2025-11-07 20:38:36 -08:00
miloschwartz
fb9ed8f592 dont auto close hide col popover on click 2025-11-07 18:22:13 -08:00
miloschwartz
020cb2d794 add friendly col names 2025-11-07 18:16:14 -08:00
miloschwartz
9b2c0d0b67 make org selector sticky top 2025-11-07 18:05:34 -08:00
miloschwartz
3993e5b705 add sitcky table cols for left and right cols 2025-11-07 18:03:44 -08:00
Owen
47bcadb329 Also include direct associations 2025-11-07 16:55:32 -08:00
Owen
00df2c876f Fix delete issue 2025-11-07 16:44:31 -08:00
Fred KISSIE
b4535f3dc4 ✏️ typo fix 2025-11-08 01:34:08 +01:00
miloschwartz
e51fca1f61 add clients to resource 2025-11-07 16:33:17 -08:00
Fred KISSIE
0e7f5b1aef 🌐 localize product update empty text 2025-11-08 00:57:07 +01:00
Fred KISSIE
579a4e1021 add flags for enabling notifications for product updates & new releases 2025-11-08 00:51:56 +01:00
Owen
c813202f92 Add DoNotCreateNewClient 2025-11-07 15:24:32 -08:00
Fred KISSIE
94e1c534ca 💄 add link to read more 2025-11-08 00:19:30 +01:00
Owen
41e21acf42 Fix error related to user id col 2025-11-07 14:59:45 -08:00
Pallavi Kumari
b6e98632b5 move re-key API routes to private api 2025-11-08 02:43:47 +05:30
Owen Schwartz
51db267a4a Merge pull request #1779 from fosrl/dependabot/npm_and_yarn/eslint-config-next-16.0.1
Bump eslint-config-next from 15.5.6 to 16.0.1
2025-11-07 12:15:19 -08:00
Pallavi Kumari
8a5f59cb9f disable re-key button for non licensed 2025-11-08 01:38:47 +05:30
dependabot[bot]
669817818a Bump eslint-config-next from 15.5.6 to 16.0.1
Bumps [eslint-config-next](https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next) from 15.5.6 to 16.0.1.
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/commits/v16.0.1/packages/eslint-config-next)

---
updated-dependencies:
- dependency-name: eslint-config-next
  dependency-version: 16.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-07 20:07:29 +00:00
Owen Schwartz
b84453bfbe Merge pull request #1825 from fosrl/dependabot/npm_and_yarn/dev-patch-updates-282bba5f0a
Bump the dev-patch-updates group across 1 directory with 5 updates
2025-11-07 12:06:08 -08:00
Owen Schwartz
15d561f59f Merge pull request #1824 from robtec/patch-1
Fix typo in shareSeeOnce message
2025-11-07 12:05:59 -08:00
Fred KISSIE
0745734273 ♻️ include build when getting product udpates 2025-11-07 20:05:51 +01:00
Fred KISSIE
aa3f07f1ba ♻️ make fossorial remote API only configurable on the frontend and only in DEV 2025-11-07 20:05:29 +01:00
Pallavi Kumari
2b8204fdc8 seperate credentials rekeying in modal for reuse 2025-11-07 23:30:24 +05:30
Pallavi Kumari
90e72c6aca hide credentials tab for local sites 2025-11-07 19:27:03 +05:30
Pallavi Kumari
62e2b7ca9e change alert text 2025-11-07 19:27:03 +05:30
Pallavi Kumari
f7e7993fd4 regenerate secret for wireguard 2025-11-07 19:27:03 +05:30
Pallavi Kumari
18cdf070c7 add view setting options 2025-11-07 19:27:03 +05:30
Pallavi Kumari
563a5b3e7e disable credential regenerate button for local and wireguard 2025-11-07 19:27:03 +05:30
Pallavi Kumari
3756aaecda change file naming structure to reGenerate exit node keys 2025-11-07 19:27:03 +05:30
Pallavi Kumari
58a13de0ff fix lint 2025-11-07 19:27:03 +05:30
Pallavi Kumari
d32505a833 Option to regenerate Newt keys 2025-11-07 19:27:03 +05:30
Pallavi Kumari
42091e88cb rename exit node tab to credentials 2025-11-07 19:27:03 +05:30
Pallavi Kumari
c2f607bb9a Option to regenerate olm keys inside client 2025-11-07 19:27:03 +05:30
Pallavi Kumari
3f38080b46 fix lint 2025-11-07 19:27:03 +05:30
Pallavi Kumari
9f9aa07c2d Option to regenerate remote-nodes keys 2025-11-07 19:27:03 +05:30
miloschwartz
76d54b2d0f add add/remove user/roles to siteResources/resources to integration api 2025-11-06 21:27:01 -08:00
Owen
bdb564823d Require valid user token 2025-11-06 21:19:37 -08:00
miloschwartz
b3a616c9f3 remove alerts from cleints and resources tables 2025-11-06 20:21:26 -08:00
Owen
ec1f94791a Remove siteIds and build associations from user role chnages 2025-11-06 20:19:15 -08:00
miloschwartz
bea1c65076 remove remote subnets from front end 2025-11-06 20:16:24 -08:00
miloschwartz
2274a3525b update olm and client routes 2025-11-06 20:12:54 -08:00
dependabot[bot]
749cea5a4d Bump the dev-patch-updates group across 1 directory with 5 updates
Bumps the dev-patch-updates group with 4 updates in the / directory: [@dotenvx/dotenvx](https://github.com/dotenvx/dotenvx), [@tailwindcss/postcss](https://github.com/tailwindlabs/tailwindcss/tree/HEAD/packages/@tailwindcss-postcss), [esbuild](https://github.com/evanw/esbuild) and [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint).


Updates `@dotenvx/dotenvx` from 1.51.0 to 1.51.1
- [Release notes](https://github.com/dotenvx/dotenvx/releases)
- [Changelog](https://github.com/dotenvx/dotenvx/blob/main/CHANGELOG.md)
- [Commits](https://github.com/dotenvx/dotenvx/compare/v1.51.0...v1.51.1)

Updates `@tailwindcss/postcss` from 4.1.16 to 4.1.17
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss/commits/v4.1.17/packages/@tailwindcss-postcss)

Updates `esbuild` from 0.25.11 to 0.25.12
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.25.11...v0.25.12)

Updates `tailwindcss` from 4.1.16 to 4.1.17
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss/commits/v4.1.17/packages/tailwindcss)

Updates `typescript-eslint` from 8.46.2 to 8.46.3
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.46.3/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: "@dotenvx/dotenvx"
  dependency-version: 1.51.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-patch-updates
- dependency-name: "@tailwindcss/postcss"
  dependency-version: 4.1.17
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-patch-updates
- dependency-name: esbuild
  dependency-version: 0.25.12
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-patch-updates
- dependency-name: tailwindcss
  dependency-version: 4.1.17
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-patch-updates
- dependency-name: typescript-eslint
  dependency-version: 8.46.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-patch-updates
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-07 01:23:55 +00:00
miloschwartz
999fb2fff1 Merge branch 'dev' into clients-user 2025-11-06 16:55:16 -08:00
miloschwartz
2a7529c39e don't delete user 2025-11-06 16:48:53 -08:00
Fred KISSIE
f27ae210ed Merge branch 'dev' into feat/update-popup 2025-11-07 01:30:18 +01:00
Fred KISSIE
ea744f8d28 💄 show update type 2025-11-07 01:14:05 +01:00
Fred KISSIE
0b70cbb1a3 💄 show update type in badge 2025-11-07 01:10:20 +01:00
miloschwartz
fce887436d fix bug causing auto provision to override manually created users 2025-11-06 15:46:54 -08:00
Fred KISSIE
f928708156 💄 animate exit and more 2025-11-07 00:27:57 +01:00
miloschwartz
fae899a8f1 remove dialog border 2025-11-06 15:17:19 -08:00
Rob
3489107a49 Fix typo in shareSeeOnce message 2025-11-06 23:09:52 +00:00
Fred KISSIE
45fb0a4156 💄 button for mark as read 2025-11-06 23:26:13 +01:00
Fred KISSIE
a62299c387 🎨 prettier format 2025-11-06 23:25:53 +01:00
Fred KISSIE
18757d7eb3 💄 show product updates list 2025-11-06 22:42:49 +01:00
Owen Schwartz
296b220bf3 Merge pull request #1819 from Pallavikumarimdb/fix/resourceTable-typeError
Fix/Revert column from Resource table to fix type error and match overall styling
2025-11-06 12:03:15 -08:00
Pallavi Kumari
0a9f37c44d revert column from resource table 2025-11-06 22:57:03 +05:30
miloschwartz
776c33d79d persist column filters 2025-11-05 17:34:50 -08:00
miloschwartz
9fd6af3a31 view devices for profile 2025-11-05 17:27:16 -08:00
miloschwartz
4ade878320 split clients table 2025-11-05 16:43:27 -08:00
miloschwartz
9e2477587c if one logs dont show nested 2025-11-05 16:13:51 -08:00
miloschwartz
c7787352c8 add sidebar groups 2025-11-05 16:09:12 -08:00
miloschwartz
85892c30b2 add site resource modes and alias 2025-11-05 15:24:07 -08:00
Fred KISSIE
7a2dd31019 🚧 use popup 2025-11-06 00:16:07 +01:00
Fred KISSIE
096ca379ce ♻️ refactor 2025-11-06 00:06:05 +01:00
Fred KISSIE
41601010f4 💡 comment 2025-11-05 23:58:56 +01:00
Fred KISSIE
64b87e203a 💄 animate product updates & new version 2025-11-05 23:57:43 +01:00
Fred KISSIE
c64b102aaa ♻️ refactor 2025-11-05 23:29:48 +01:00
Fred KISSIE
f371c7df81 add headless/ui for better enter/exit animations 2025-11-05 23:29:36 +01:00
Fred KISSIE
030f90db2e ♻️ validate env variables only in DEV 2025-11-05 21:41:29 +01:00
miloschwartz
e51b6b545e add users and roles to site resources 2025-11-05 12:24:50 -08:00
Owen Schwartz
ef5d72663f Merge pull request #1328 from Pallavikumarimdb/enhancement-#906/dashboard-enhancements
Enhancement #906/Resources Dashboard: Targets Column, Customizable Columns & Status Indicators
2025-11-05 11:41:43 -08:00
Owen
6ddfc9b8fe Revert columns 2025-11-05 11:41:07 -08:00
Owen
301654b63e Fix styling 2025-11-05 11:38:14 -08:00
miloschwartz
c73f8c88f7 hide sites inputs on clients 2025-11-05 10:37:52 -08:00
miloschwartz
2274404324 update tables 2025-11-05 10:29:29 -08:00
Fred KISSIE
6d349693a7 🚧 wip 2025-11-05 08:45:56 +01:00
Fred KISSIE
b9ce316574 🚧 wip 2025-11-05 08:38:23 +01:00
Fred KISSIE
a247ef7564 ♻️ import type 2025-11-05 07:33:25 +01:00
Fred KISSIE
18566c09dc add tanstack query 2025-11-05 07:32:28 +01:00
Fred KISSIE
1090dca634 Merge branch 'main' into feat/update-popup 2025-11-05 07:30:12 +01:00
Fred KISSIE
44f419d4f7 💄 animate popup 2025-11-05 07:30:01 +01:00
Fred KISSIE
162c6d567c revert package.json changes 2025-11-05 07:26:41 +01:00
Fred KISSIE
2f1abfbef8 🚧 New version popup 2025-11-05 06:55:08 +01:00
Fred KISSIE
a26a441d56 ♻️ validate env and add remote fossorial API as an env variable 2025-11-05 06:54:56 +01:00
miloschwartz
f628a76223 add them back 2025-11-04 16:56:56 -08:00
miloschwartz
8088e30e06 remove userClients and roleClients 2025-11-04 16:53:00 -08:00
miloschwartz
801cdec7f3 add deviceWebAuthCodes table to pg schema 2025-11-04 16:51:31 -08:00
Owen
3fd3f9871d Remove user check 2025-11-04 11:56:00 -08:00
miloschwartz
959a562e7c fix more shadows 2025-11-04 11:09:08 -08:00
Owen Schwartz
3b12a77cf0 Merge pull request #1809 from clemone210/patch-2
Update German translations for client and blueprint terms
2025-11-04 10:34:26 -08:00
Fred KISSIE
03e0e8d9c2 🚧 wip 2025-11-04 13:57:55 +01:00
Timo
7cd31313d8 Update German translations for client and blueprint terms
"Kunden" is generally used for "Customers", so in this case I suggest to stick with Client, as this is a widely used term in german tech sector. The same for "Bauplan" or "Blaupause". "Bauplan" is a "Construction plan" for building houses. "Blaupause" is pretty much the right translation for blueprints, but I would stick with Blueprint here as well.
2025-11-04 07:40:33 +01:00
miloschwartz
52a311bf36 fix colors and footer 2025-11-03 21:44:34 -08:00
Milo Schwartz
9822deb4bf Update README.md 2025-11-03 22:56:57 -05:00
Owen
83e0282212 Merge branch 'dev' into clients-user 2025-11-03 17:39:10 -08:00
Owen
8942cb7aa7 Update const 2025-11-03 17:38:50 -08:00
Owen
f0f219f293 Merge branch 'main' into dev 2025-11-03 17:38:43 -08:00
Owen
dc75d72522 Merge branch 'dev' into clients-user 2025-11-03 17:38:26 -08:00
Owen
6da81b3817 Fix bad request in non-enterprise 2025-11-03 17:33:50 -08:00
miloschwartz
847479b639 Merge branch 'cli-web-auth' into clients-user 2025-11-03 17:14:12 -08:00
miloschwartz
0790f37f5e hash device codes 2025-11-03 17:03:46 -08:00
Owen
9dd472c59b Creating olm working 2025-11-03 16:54:06 -08:00
miloschwartz
5746d69f98 reduce header padding 2025-11-03 16:22:40 -08:00
Owen
8356c5933f Small fixes around handling olm users 2025-11-03 16:22:13 -08:00
Owen
2c488baa80 Add name and lock client to specific olm 2025-11-03 16:16:19 -08:00
Owen
d30743a428 Update schmea; create client when registering 2025-11-03 15:42:22 -08:00
miloschwartz
009d84a3c6 remove shadows and outline ring 2025-11-03 11:22:00 -08:00
miloschwartz
e888b76747 complete web device auth flow 2025-11-03 11:10:17 -08:00
Owen
6174599754 Allow >30 days on oss 2025-11-03 09:54:41 -08:00
Owen Schwartz
8ba04aeb74 Merge pull request #1802 from fosrl/dependabot/npm_and_yarn/prod-minor-updates-700e856888
Bump the prod-minor-updates group across 1 directory with 9 updates
2025-11-03 09:49:01 -08:00
Owen
43590896e9 Add fosrl 2025-11-02 18:56:46 -08:00
Owen Schwartz
3547c4832b Revert "Refactor CI/CD workflow for improved release process" 2025-11-02 18:56:46 -08:00
Marc Schäfer
1cd098252e Refactor CI/CD workflow for improved release process
Updated CI/CD workflow to include new permissions, job definitions, and steps for version validation, tagging, and artifact management.
2025-11-02 18:56:46 -08:00
Owen
4adbc31dae Fix blueprints not applying
Fixes #1795
2025-11-02 18:56:46 -08:00
Owen
99031feb35 Fix camel case in health checks 2025-11-02 18:56:46 -08:00
Owen
d363b06d0e Fix rewritePath
Closes #1528
2025-11-02 18:56:46 -08:00
Owen
2af100cc86 Warning -> debug 2025-11-02 18:56:46 -08:00
dependabot[bot]
3e90211108 Bump the prod-minor-updates group across 1 directory with 9 updates
Bumps the prod-minor-updates group with 9 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [@aws-sdk/client-s3](https://github.com/aws/aws-sdk-js-v3/tree/HEAD/clients/client-s3) | `3.908.0` | `3.922.0` |
| [axios](https://github.com/axios/axios) | `1.12.2` | `1.13.1` |
| [eslint](https://github.com/eslint/eslint) | `9.37.0` | `9.39.0` |
| [express-rate-limit](https://github.com/express-rate-limit/express-rate-limit) | `8.1.0` | `8.2.1` |
| [lucide-react](https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react) | `0.545.0` | `0.552.0` |
| [next-intl](https://github.com/amannn/next-intl) | `4.3.12` | `4.4.0` |
| [posthog-node](https://github.com/PostHog/posthog-js/tree/HEAD/packages/node) | `5.10.4` | `5.11.0` |
| [react-hook-form](https://github.com/react-hook-form/react-hook-form) | `7.65.0` | `7.66.0` |
| [resend](https://github.com/resend/resend-node) | `6.1.3` | `6.4.0` |



Updates `@aws-sdk/client-s3` from 3.908.0 to 3.922.0
- [Release notes](https://github.com/aws/aws-sdk-js-v3/releases)
- [Changelog](https://github.com/aws/aws-sdk-js-v3/blob/main/clients/client-s3/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-js-v3/commits/v3.922.0/clients/client-s3)

Updates `axios` from 1.12.2 to 1.13.1
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.12.2...v1.13.1)

Updates `eslint` from 9.37.0 to 9.39.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/compare/v9.37.0...v9.39.0)

Updates `express-rate-limit` from 8.1.0 to 8.2.1
- [Release notes](https://github.com/express-rate-limit/express-rate-limit/releases)
- [Commits](https://github.com/express-rate-limit/express-rate-limit/compare/v8.1.0...v8.2.1)

Updates `lucide-react` from 0.545.0 to 0.552.0
- [Release notes](https://github.com/lucide-icons/lucide/releases)
- [Commits](https://github.com/lucide-icons/lucide/commits/0.552.0/packages/lucide-react)

Updates `next-intl` from 4.3.12 to 4.4.0
- [Release notes](https://github.com/amannn/next-intl/releases)
- [Changelog](https://github.com/amannn/next-intl/blob/main/CHANGELOG.md)
- [Commits](https://github.com/amannn/next-intl/compare/v4.3.12...v4.4.0)

Updates `posthog-node` from 5.10.4 to 5.11.0
- [Release notes](https://github.com/PostHog/posthog-js/releases)
- [Changelog](https://github.com/PostHog/posthog-js/blob/main/packages/node/CHANGELOG.md)
- [Commits](https://github.com/PostHog/posthog-js/commits/posthog-node@5.11.0/packages/node)

Updates `react-hook-form` from 7.65.0 to 7.66.0
- [Release notes](https://github.com/react-hook-form/react-hook-form/releases)
- [Changelog](https://github.com/react-hook-form/react-hook-form/blob/master/CHANGELOG.md)
- [Commits](https://github.com/react-hook-form/react-hook-form/compare/v7.65.0...v7.66.0)

Updates `resend` from 6.1.3 to 6.4.0
- [Release notes](https://github.com/resend/resend-node/releases)
- [Commits](https://github.com/resend/resend-node/compare/v6.1.3...v6.4.0)

---
updated-dependencies:
- dependency-name: "@aws-sdk/client-s3"
  dependency-version: 3.922.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: prod-minor-updates
- dependency-name: axios
  dependency-version: 1.13.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: prod-minor-updates
- dependency-name: eslint
  dependency-version: 9.39.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: prod-minor-updates
- dependency-name: express-rate-limit
  dependency-version: 8.2.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: prod-minor-updates
- dependency-name: lucide-react
  dependency-version: 0.552.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: prod-minor-updates
- dependency-name: next-intl
  dependency-version: 4.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: prod-minor-updates
- dependency-name: posthog-node
  dependency-version: 5.11.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: prod-minor-updates
- dependency-name: react-hook-form
  dependency-version: 7.66.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: prod-minor-updates
- dependency-name: resend
  dependency-version: 6.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: prod-minor-updates
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-03 01:34:13 +00:00
Owen
6dd161fe17 Add fosrl 2025-11-02 15:35:02 -08:00
Owen Schwartz
558bd040c6 Merge pull request #1801 from fosrl/revert-1792-main
Revert "Refactor CI/CD workflow for improved release process"
2025-11-02 15:22:12 -08:00
Owen Schwartz
f2c48975f6 Revert "Refactor CI/CD workflow for improved release process" 2025-11-02 15:22:03 -08:00
Owen Schwartz
fc43a56bb3 Merge pull request #1792 from marcschaeferger/main
Refactor CI/CD workflow for improved release process
2025-11-02 15:00:09 -08:00
Owen
ca7f557a3c Fix blueprints not applying
Fixes #1795
2025-11-02 14:56:19 -08:00
Owen
7477713eef Fix camel case in health checks 2025-11-02 14:17:38 -08:00
Owen
c16e762fa4 Fix rewritePath
Closes #1528
2025-11-02 14:05:41 -08:00
Owen Schwartz
41592133a6 Merge pull request #1788 from Pallavikumarimdb/fix/deleting-and-adding-back-a-target
Add transaction while deleting targets
2025-11-02 13:51:08 -08:00
Pallavi Kumari
54f7525f1b add status column in resource table 2025-11-02 13:55:17 +05:30
Pallavi Kumari
ad6bb3da9f fix type error 2025-11-02 13:55:17 +05:30
Pallavi Kumari
49bc2dc5da fix duplicate 2025-11-02 13:55:16 +05:30
Pallavi
cdf77087cd get niceid 2025-11-02 13:55:16 +05:30
Pallavi
8e5dde887c list targes in frontend 2025-11-02 13:55:16 +05:30
Pallavi
f21188000e remove status check and add column filtering on all of the tables 2025-11-02 13:55:16 +05:30
Pallavi
1b3eb32bf4 Show targets and status icons in the dashboard 2025-11-02 13:55:16 +05:30
Marc Schäfer
eec3f183e6 Refactor CI/CD workflow for improved release process
Updated CI/CD workflow to include new permissions, job definitions, and steps for version validation, tagging, and artifact management.
2025-11-02 00:44:03 +01:00
Owen
31b66cd911 Warning -> debug 2025-11-01 10:46:09 -07:00
Pallavi Kumari
ad425e8d9e add transaction while deleting targets 2025-11-01 11:58:09 +05:30
miloschwartz
da0196a308 no reset password for external users 2025-10-30 22:24:07 -07:00
miloschwartz
e585972b7b remove useSubscriptionStatusContext from HorizontalTabs 2025-10-30 21:31:48 -07:00
miloschwartz
cc62cd4add remove sqlite driver logger 2025-10-30 21:23:05 -07:00
Owen
25225a452c Return instead of throwing error 2025-10-30 21:18:26 -07:00
Owen
678644c7fb Fix empty blueprint 2025-10-30 21:09:20 -07:00
Owen
32f20ed984 Bugfixes for remote nodes 2025-10-30 21:01:45 -07:00
Owen
4eb5bf08d5 UI fixes 2025-10-30 17:44:22 -07:00
Owen
35c93f38e0 Fix small ui issues 2025-10-30 17:32:03 -07:00
Owen
f60c2f4fb9 Make refresh work 2025-10-30 17:25:49 -07:00
Owen
b2cf152b9e Add copy to clip 2025-10-30 16:17:20 -07:00
Owen
444928dffd Add wildcard 2025-10-30 15:27:24 -07:00
Owen
4d7e2d5840 Minor fixes to rc 2025-10-30 11:42:31 -07:00
Owen Schwartz
318046ce1d Merge pull request #1780 from fosrl/crowdin_dev
New Crowdin updates
2025-10-29 21:17:18 -07:00
Owen Schwartz
808ad1e272 New translations en-us.json (Norwegian Bokmal) 2025-10-29 21:16:51 -07:00
Owen Schwartz
05a1195661 New translations en-us.json (Chinese Simplified) 2025-10-29 21:16:49 -07:00
Owen Schwartz
c46322c6a6 New translations en-us.json (Turkish) 2025-10-29 21:16:48 -07:00
Owen Schwartz
80d5efc41f New translations en-us.json (Russian) 2025-10-29 21:16:47 -07:00
Owen Schwartz
0409ab7dc1 New translations en-us.json (Portuguese) 2025-10-29 21:16:46 -07:00
Owen Schwartz
63f079ec76 New translations en-us.json (Polish) 2025-10-29 21:16:45 -07:00
Owen Schwartz
5988f1e8da New translations en-us.json (Dutch) 2025-10-29 21:16:43 -07:00
Owen Schwartz
ed0c0edeba New translations en-us.json (Korean) 2025-10-29 21:16:42 -07:00
Owen Schwartz
34b4841f4d New translations en-us.json (Italian) 2025-10-29 21:16:40 -07:00
Owen Schwartz
ff47c5a8ad New translations en-us.json (German) 2025-10-29 21:16:39 -07:00
Owen Schwartz
9430a53c0c New translations en-us.json (Czech) 2025-10-29 21:16:38 -07:00
Owen Schwartz
03334e3f0f New translations en-us.json (Bulgarian) 2025-10-29 21:16:37 -07:00
Owen Schwartz
6f2ecf9d0d New translations en-us.json (Spanish) 2025-10-29 21:16:35 -07:00
Owen Schwartz
6f803c3b4b New translations en-us.json (French) 2025-10-29 21:16:34 -07:00
Owen
15d400c842 Fix migration and install faker 2025-10-29 21:12:12 -07:00
Owen Schwartz
3ddf150661 New translations en-us.json (Norwegian Bokmal) 2025-10-29 21:00:51 -07:00
Owen Schwartz
5b519afee4 New translations en-us.json (Chinese Simplified) 2025-10-29 21:00:50 -07:00
Owen Schwartz
15ea9f3dcc New translations en-us.json (Turkish) 2025-10-29 21:00:48 -07:00
Owen Schwartz
d5e2536f8d New translations en-us.json (Russian) 2025-10-29 21:00:47 -07:00
Owen Schwartz
d7e9083e06 New translations en-us.json (Portuguese) 2025-10-29 21:00:45 -07:00
Owen Schwartz
e0cc338c3a New translations en-us.json (Polish) 2025-10-29 21:00:44 -07:00
Owen Schwartz
624c5741e2 New translations en-us.json (Dutch) 2025-10-29 21:00:43 -07:00
Owen Schwartz
558507dd71 New translations en-us.json (Korean) 2025-10-29 21:00:41 -07:00
Owen Schwartz
565340bd53 New translations en-us.json (Italian) 2025-10-29 21:00:40 -07:00
Owen Schwartz
756745487a New translations en-us.json (German) 2025-10-29 21:00:39 -07:00
Owen Schwartz
d2ece4d370 New translations en-us.json (Czech) 2025-10-29 21:00:37 -07:00
Owen Schwartz
d5f5d1da1e New translations en-us.json (Bulgarian) 2025-10-29 21:00:35 -07:00
Owen Schwartz
dfaf1a72cc New translations en-us.json (Spanish) 2025-10-29 21:00:34 -07:00
Owen Schwartz
ff8e5b871c New translations en-us.json (French) 2025-10-29 21:00:33 -07:00
Owen
927dda4e53 Add blueprints to migrations 2025-10-29 20:50:36 -07:00
Owen
0e51bac307 Merge branch 'dev' of github.com:fosrl/pangolin into dev 2025-10-29 20:46:13 -07:00
Owen Schwartz
7a50af14f3 Merge pull request #1733 from Fredkiss3/feat-blueprint-ui-on-dashboard
feat: blueprint ui on dashboard
2025-10-29 20:45:31 -07:00
Owen
396477c2e2 Update makefiles 2025-10-29 20:42:56 -07:00
Fred KISSIE
8765874d9a ♻️ include Blueprint applied with errors: in blueprint message when it fails 2025-10-30 02:33:45 +01:00
Fred KISSIE
49dffe086d ♻️ show warning toast and do not throw error in case of UI source 2025-10-30 02:18:48 +01:00
Owen Schwartz
77ddadcded Merge pull request #1777 from fosrl/crowdin_dev
New Crowdin updates
2025-10-29 17:51:22 -07:00
Owen Schwartz
05b297ddec New translations en-us.json (Norwegian Bokmal) 2025-10-29 17:49:16 -07:00
Owen Schwartz
feb0de9a08 New translations en-us.json (Chinese Simplified) 2025-10-29 17:49:14 -07:00
Owen Schwartz
f4f2361d22 New translations en-us.json (Turkish) 2025-10-29 17:49:13 -07:00
Owen Schwartz
cae6a9f51c New translations en-us.json (Russian) 2025-10-29 17:49:12 -07:00
Owen Schwartz
2872f5c018 New translations en-us.json (Portuguese) 2025-10-29 17:49:10 -07:00
Owen Schwartz
0512c21ad7 New translations en-us.json (Polish) 2025-10-29 17:49:09 -07:00
Owen Schwartz
922a69feed New translations en-us.json (Dutch) 2025-10-29 17:49:08 -07:00
Owen Schwartz
24192c79d4 New translations en-us.json (Korean) 2025-10-29 17:49:07 -07:00
Owen Schwartz
17c22a635f New translations en-us.json (Italian) 2025-10-29 17:49:05 -07:00
Owen Schwartz
bcbcf417b5 New translations en-us.json (German) 2025-10-29 17:49:04 -07:00
Owen Schwartz
acf7596368 New translations en-us.json (Czech) 2025-10-29 17:49:03 -07:00
Owen Schwartz
34c7d925ca New translations en-us.json (Bulgarian) 2025-10-29 17:49:01 -07:00
Owen Schwartz
c10730ebb9 New translations en-us.json (Spanish) 2025-10-29 17:49:00 -07:00
Owen Schwartz
e50743b922 New translations en-us.json (French) 2025-10-29 17:48:59 -07:00
Owen
75b0745e42 Add proxy procotol to private config 2025-10-29 17:42:21 -07:00
Owen
ebd99f95a3 Also order by id 2025-10-29 17:37:29 -07:00
Owen
0e649883cb More bugfixes 2025-10-29 17:21:32 -07:00
Fred KISSIE
3d376c8d14 ♻️ change default blueprint table ordering to createdAt: desc 2025-10-30 00:55:12 +01:00
Fred KISSIE
adedb0e391 💬 Show Success: Blueprint applied successfully 2025-10-30 00:54:15 +01:00
Fred KISSIE
521935786c 💄 remove rounded-sm 2025-10-30 00:34:14 +01:00
Fred KISSIE
885b9d186b ♻️ remove blueprint name form description 2025-10-30 00:32:55 +01:00
Fred KISSIE
356f023539 💬 fix capitalization 2025-10-30 00:32:08 +01:00
Fred KISSIE
de8d3f45da 💬 uppercase blueprint in create blueprint 2025-10-30 00:30:50 +01:00
Fred KISSIE
72c9956190 💄 Standardize go back to blueprints 2025-10-30 00:27:27 +01:00
Owen
6dc4cbe448 Check country code 2025-10-29 16:24:35 -07:00
Fred KISSIE
77364488c2 💄 show action on the right of the column 2025-10-30 00:21:59 +01:00
Fred KISSIE
5a61040027 💄 remove form description and format w/ prettier 2025-10-30 00:21:39 +01:00
Owen
c6f7be40df Sort by descending 2025-10-29 16:16:25 -07:00
Fred KISSIE
c36fb63f8c 🔨 add drizzle in docker-compose DEV for viewing the postgres db in local development 2025-10-30 00:10:49 +01:00
Owen
48aebea6cf Show error 2025-10-29 15:23:53 -07:00
Owen
55082d2ef8 Rename file 2025-10-29 14:49:53 -07:00
Owen
cc03b97234 Merge branch 'dev' into feat-blueprint-ui-on-dashboard 2025-10-29 14:46:34 -07:00
Owen
5542873368 Merge branch 'dev' of github.com:fosrl/pangolin into dev 2025-10-29 14:43:32 -07:00
Owen
1db5d76ef1 Merge branch 'main' into dev 2025-10-29 14:43:18 -07:00
Owen
ca6c45087b Fix the ordering of deleting targets 2025-10-29 14:40:09 -07:00
Owen Schwartz
3333eb95f9 Merge pull request #1773 from Pallavikumarimdb/fix/long-copy-box
Fix text overflow in CopyToClipboard by setting a max width
2025-10-29 14:11:27 -07:00
Pallavi Kumari
d681725fc3 update max width of CopyToClipboard 2025-10-30 00:59:08 +05:30
Owen
f5eadc9e1e Various fixes 2025-10-29 12:16:28 -07:00
miloschwartz
219e213c1e change logs to debug 2025-10-29 11:39:45 -07:00
miloschwartz
af654e663b add missing translation key 2025-10-29 11:34:13 -07:00
Fred KISSIE
39b3b4ef9d 🐛 add missing orgId to blueprints table 2025-10-29 14:39:42 +01:00
Owen Schwartz
6c62a0900f Merge pull request #1763 from fosrl/dependabot/npm_and_yarn/prod-patch-updates-56e321e524
Bump posthog-node from 5.10.3 to 5.10.4 in the prod-patch-updates group
2025-10-28 21:15:31 -07:00
Owen Schwartz
ddd772eb43 Merge pull request #1769 from fosrl/dependabot/npm_and_yarn/dev-patch-updates-a759a3dffa
Bump the dev-patch-updates group across 1 directory with 4 updates
2025-10-28 21:15:24 -07:00
Fred KISSIE
69458ab649 🔇 remove console.log 2025-10-29 04:25:37 +01:00
Fred KISSIE
c7df70143e ♻️ log only in DEV 2025-10-29 03:50:36 +01:00
Fred KISSIE
a81ea7cc8f 🐛 fix merge errors 2025-10-29 03:34:44 +01:00
Fred KISSIE
02330a0756 Merge branch 'dev' into feat-blueprint-ui-on-dashboard 2025-10-29 03:31:51 +01:00
Fred KISSIE
db49b599b5 add faker dependency 2025-10-29 03:09:16 +01:00
Fred KISSIE
bb0bfd440a ♻️ refactor 2025-10-29 03:09:02 +01:00
Fred KISSIE
10ce732b8d 🚚 rename integration API applyBlueprint to apply JSON blueprint and the UI applyBlueprint to apply YAML blueprint 2025-10-29 03:08:48 +01:00
Fred KISSIE
4c567cf2d7 ♻️ refactor docker and websocket blueprint to call the new applyBlueprint function 2025-10-29 03:07:55 +01:00
Fred KISSIE
2783d2989d ♻️ refactor 2025-10-29 03:06:42 +01:00
Fred KISSIE
c3d6510231 💬 update the text in the blueprint details page to say parsed contents 2025-10-29 03:06:28 +01:00
Fred KISSIE
3bb948991f ♻️ applyBlueprint core logic now saves the blueprint in the DB 2025-10-29 03:01:25 +01:00
dependabot[bot]
4b9ce22f06 Bump the dev-patch-updates group across 1 directory with 4 updates
Bumps the dev-patch-updates group with 4 updates in the / directory: [@types/express](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/express), [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node), [@types/pg](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/pg) and [drizzle-kit](https://github.com/drizzle-team/drizzle-orm).


Updates `@types/express` from 5.0.4 to 5.0.5
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/express)

Updates `@types/node` from 24.9.1 to 24.9.2
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `@types/pg` from 8.15.5 to 8.15.6
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/pg)

Updates `drizzle-kit` from 0.31.5 to 0.31.6
- [Release notes](https://github.com/drizzle-team/drizzle-orm/releases)
- [Commits](https://github.com/drizzle-team/drizzle-orm/compare/drizzle-kit@0.31.5...drizzle-kit@0.31.6)

---
updated-dependencies:
- dependency-name: "@types/express"
  dependency-version: 5.0.5
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-patch-updates
- dependency-name: "@types/node"
  dependency-version: 24.9.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-patch-updates
- dependency-name: "@types/pg"
  dependency-version: 8.15.6
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-patch-updates
- dependency-name: drizzle-kit
  dependency-version: 0.31.6
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-patch-updates
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-29 01:22:53 +00:00
miloschwartz
772bda69f9 check for user email in support request 2025-10-27 21:56:22 -07:00
miloschwartz
8b4722b1c9 add support message button in saas 2025-10-27 21:55:34 -07:00
Owen
9e5c9d9c34 Check role access when inviting users 2025-10-27 20:51:16 -07:00
dependabot[bot]
ee533df38f Bump posthog-node from 5.10.3 to 5.10.4 in the prod-patch-updates group
Bumps the prod-patch-updates group with 1 update: [posthog-node](https://github.com/PostHog/posthog-js/tree/HEAD/packages/node).


Updates `posthog-node` from 5.10.3 to 5.10.4
- [Release notes](https://github.com/PostHog/posthog-js/releases)
- [Changelog](https://github.com/PostHog/posthog-js/blob/main/packages/node/CHANGELOG.md)
- [Commits](https://github.com/PostHog/posthog-js/commits/posthog-node@5.10.4/packages/node)

---
updated-dependencies:
- dependency-name: posthog-node
  dependency-version: 5.10.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-patch-updates
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-28 01:31:57 +00:00
Owen
52dc8e011c Merge branch 'dev' of github.com:fosrl/pangolin into dev 2025-10-27 17:55:10 -07:00
Owen
bd5cc790d6 Fixing various things 2025-10-27 17:52:39 -07:00
Milo Schwartz
7d6d5a7787 Update README.md 2025-10-27 20:15:44 -04:00
Milo Schwartz
ba6e7dd06a Update README.md 2025-10-27 20:08:14 -04:00
miloschwartz
6270fb3237 consolidate install commands 2025-10-27 16:58:11 -07:00
miloschwartz
16ec50a6ee add alaytics to saas 2025-10-27 16:43:52 -07:00
miloschwartz
3d2021c8a1 use select component 2025-10-27 16:38:04 -07:00
Owen
15d63ddffa Various fixes for rc 2025-10-27 16:33:21 -07:00
Fred KISSIE
7ce6fadb3d blueprint details page 2025-10-28 00:14:27 +01:00
Owen
6b18a24f9b @server/private -> #dynamic 2025-10-27 13:46:54 -07:00
Owen
a38cb961c7 Create missing stubs 2025-10-27 13:45:24 -07:00
Owen
3c5fe21078 Add missing header 2025-10-27 11:54:56 -07:00
Owen
b44305694f Add postgres migration 2025-10-27 11:52:45 -07:00
Owen
be217e2b6f Create 1.12.0 sqlite migration 2025-10-27 11:47:14 -07:00
Owen
6ce04c2aa1 Change migration to 1.12.0 2025-10-27 11:34:46 -07:00
Owen
85e4b649db Update cicd: allow to run on rc 2025-10-27 11:14:56 -07:00
Owen
73a3335148 Update cicd: login to ghcr 2025-10-27 11:13:05 -07:00
Owen
32845c5a3d Fix const issue 2025-10-27 11:03:16 -07:00
Owen Schwartz
05a878ac34 Merge pull request #1759 from fosrl/crowdin_dev
New Crowdin updates
2025-10-27 10:55:59 -07:00
Owen Schwartz
847d015243 New translations en-us.json (Spanish) 2025-10-27 10:55:27 -07:00
Owen Schwartz
51cde2681c New translations en-us.json (Norwegian Bokmal) 2025-10-27 10:55:26 -07:00
Owen Schwartz
9c0606942c New translations en-us.json (Chinese Simplified) 2025-10-27 10:55:24 -07:00
Owen Schwartz
646d476bdb New translations en-us.json (Turkish) 2025-10-27 10:55:23 -07:00
Owen Schwartz
31261681a0 New translations en-us.json (Russian) 2025-10-27 10:55:21 -07:00
Owen Schwartz
f6fae820c4 New translations en-us.json (Portuguese) 2025-10-27 10:55:20 -07:00
Owen Schwartz
b3cbf925aa New translations en-us.json (Polish) 2025-10-27 10:55:19 -07:00
Owen Schwartz
aa1ae3ee42 New translations en-us.json (Dutch) 2025-10-27 10:55:17 -07:00
Owen Schwartz
80f6c8b74e New translations en-us.json (Korean) 2025-10-27 10:55:16 -07:00
Owen Schwartz
79d8e8d59d New translations en-us.json (Italian) 2025-10-27 10:55:15 -07:00
Owen Schwartz
9193375586 New translations en-us.json (German) 2025-10-27 10:55:13 -07:00
Owen Schwartz
240bcb8759 New translations en-us.json (Czech) 2025-10-27 10:55:12 -07:00
Owen Schwartz
a5dcafb84c New translations en-us.json (Bulgarian) 2025-10-27 10:55:11 -07:00
Owen Schwartz
192207a857 New translations en-us.json (French) 2025-10-27 10:55:09 -07:00
Owen Schwartz
d18fafb0ef Merge pull request #1757 from fosrl/user-compliance
Enforce org user compliance
2025-10-27 10:44:13 -07:00
Owen
380c86898c Fix lint 2025-10-27 10:43:44 -07:00
Owen
b59a6b82ef Merge branch 'dev' into user-compliance 2025-10-27 10:37:53 -07:00
Owen Schwartz
77ba568c36 Merge pull request #1755 from fosrl/audit-logs
Request, action, and access logs
2025-10-27 10:10:57 -07:00
Owen
a0f05cc77b Resolve export of logActionAudit 2025-10-27 10:09:06 -07:00
Owen
80f43a9774 Fix lint 2025-10-27 10:05:31 -07:00
Owen
c04d9eda6b Merge branch 'dev' into audit-logs 2025-10-27 10:02:32 -07:00
Owen Schwartz
cabf3e9695 Merge pull request #1749 from fosrl/dependabot/npm_and_yarn/dev-patch-updates-b7f346f221
Bump the dev-patch-updates group with 7 updates
2025-10-27 09:57:14 -07:00
Owen Schwartz
ff7b4386d6 Merge pull request #1750 from fosrl/dependabot/npm_and_yarn/prod-patch-updates-c81bf49cf4
Bump the prod-patch-updates group with 5 updates
2025-10-27 09:57:03 -07:00
Owen Schwartz
4dbbe159ee Merge pull request #1751 from fosrl/dependabot/github_actions/actions/upload-artifact-5.0.0
Bump actions/upload-artifact from 4.6.2 to 5.0.0
2025-10-27 09:56:52 -07:00
miloschwartz
eeab92719a add smaller time values and update translations 2025-10-27 09:52:25 -07:00
miloschwartz
43e6b7de07 remove delete on cascade for skipToIdp on resource closes #1654 2025-10-27 09:46:26 -07:00
miloschwartz
4cfd1b1ff5 always check resource session length 2025-10-27 09:45:12 -07:00
dependabot[bot]
09ba018493 Bump actions/upload-artifact from 4.6.2 to 5.0.0
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.6.2 to 5.0.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](ea165f8d65...330a01c490)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: 5.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-27 01:41:35 +00:00
dependabot[bot]
7acf7dd0eb Bump the prod-patch-updates group with 5 updates
Bumps the prod-patch-updates group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [canvas-confetti](https://github.com/catdad/canvas-confetti) | `1.9.3` | `1.9.4` |
| [drizzle-orm](https://github.com/drizzle-team/drizzle-orm) | `0.44.6` | `0.44.7` |
| [ioredis](https://github.com/luin/ioredis) | `5.8.1` | `5.8.2` |
| [nodemailer](https://github.com/nodemailer/nodemailer) | `7.0.9` | `7.0.10` |
| [posthog-node](https://github.com/PostHog/posthog-js/tree/HEAD/packages/node) | `5.10.0` | `5.10.3` |


Updates `canvas-confetti` from 1.9.3 to 1.9.4
- [Release notes](https://github.com/catdad/canvas-confetti/releases)
- [Commits](https://github.com/catdad/canvas-confetti/compare/1.9.3...1.9.4)

Updates `drizzle-orm` from 0.44.6 to 0.44.7
- [Release notes](https://github.com/drizzle-team/drizzle-orm/releases)
- [Commits](https://github.com/drizzle-team/drizzle-orm/compare/0.44.6...0.44.7)

Updates `ioredis` from 5.8.1 to 5.8.2
- [Release notes](https://github.com/luin/ioredis/releases)
- [Changelog](https://github.com/redis/ioredis/blob/main/CHANGELOG.md)
- [Commits](https://github.com/luin/ioredis/compare/v5.8.1...v5.8.2)

Updates `nodemailer` from 7.0.9 to 7.0.10
- [Release notes](https://github.com/nodemailer/nodemailer/releases)
- [Changelog](https://github.com/nodemailer/nodemailer/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodemailer/nodemailer/compare/v7.0.9...v7.0.10)

Updates `posthog-node` from 5.10.0 to 5.10.3
- [Release notes](https://github.com/PostHog/posthog-js/releases)
- [Changelog](https://github.com/PostHog/posthog-js/blob/main/packages/node/CHANGELOG.md)
- [Commits](https://github.com/PostHog/posthog-js/commits/posthog-node@5.10.3/packages/node)

---
updated-dependencies:
- dependency-name: canvas-confetti
  dependency-version: 1.9.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-patch-updates
- dependency-name: drizzle-orm
  dependency-version: 0.44.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-patch-updates
- dependency-name: ioredis
  dependency-version: 5.8.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-patch-updates
- dependency-name: nodemailer
  dependency-version: 7.0.10
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-patch-updates
- dependency-name: posthog-node
  dependency-version: 5.10.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-patch-updates
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-27 01:36:44 +00:00
Owen
592d085de6 Lock down days 2025-10-26 18:36:09 -07:00
dependabot[bot]
2cf2c64651 Bump the dev-patch-updates group with 7 updates
Bumps the dev-patch-updates group with 7 updates:

| Package | From | To |
| --- | --- | --- |
| [@react-email/preview-server](https://github.com/resend/react-email/tree/HEAD/packages/preview-server) | `4.3.1` | `4.3.2` |
| [@tailwindcss/postcss](https://github.com/tailwindlabs/tailwindcss/tree/HEAD/packages/@tailwindcss-postcss) | `4.1.15` | `4.1.16` |
| [@types/cookie-parser](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/cookie-parser) | `1.4.9` | `1.4.10` |
| [@types/express](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/express) | `5.0.3` | `5.0.4` |
| [@types/yargs](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/yargs) | `17.0.33` | `17.0.34` |
| [react-email](https://github.com/resend/react-email/tree/HEAD/packages/react-email) | `4.3.1` | `4.3.2` |
| [tailwindcss](https://github.com/tailwindlabs/tailwindcss/tree/HEAD/packages/tailwindcss) | `4.1.15` | `4.1.16` |


Updates `@react-email/preview-server` from 4.3.1 to 4.3.2
- [Release notes](https://github.com/resend/react-email/releases)
- [Changelog](https://github.com/resend/react-email/blob/canary/packages/preview-server/CHANGELOG.md)
- [Commits](https://github.com/resend/react-email/commits/@react-email/preview-server@4.3.2/packages/preview-server)

Updates `@tailwindcss/postcss` from 4.1.15 to 4.1.16
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss/commits/v4.1.16/packages/@tailwindcss-postcss)

Updates `@types/cookie-parser` from 1.4.9 to 1.4.10
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/cookie-parser)

Updates `@types/express` from 5.0.3 to 5.0.4
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/express)

Updates `@types/yargs` from 17.0.33 to 17.0.34
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/yargs)

Updates `react-email` from 4.3.1 to 4.3.2
- [Release notes](https://github.com/resend/react-email/releases)
- [Changelog](https://github.com/resend/react-email/blob/canary/packages/react-email/CHANGELOG.md)
- [Commits](https://github.com/resend/react-email/commits/react-email@4.3.2/packages/react-email)

Updates `tailwindcss` from 4.1.15 to 4.1.16
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss/commits/v4.1.16/packages/tailwindcss)

---
updated-dependencies:
- dependency-name: "@react-email/preview-server"
  dependency-version: 4.3.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-patch-updates
- dependency-name: "@tailwindcss/postcss"
  dependency-version: 4.1.16
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-patch-updates
- dependency-name: "@types/cookie-parser"
  dependency-version: 1.4.10
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-patch-updates
- dependency-name: "@types/express"
  dependency-version: 5.0.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-patch-updates
- dependency-name: "@types/yargs"
  dependency-version: 17.0.34
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-patch-updates
- dependency-name: react-email
  dependency-version: 4.3.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-patch-updates
- dependency-name: tailwindcss
  dependency-version: 4.1.16
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-patch-updates
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-27 01:27:47 +00:00
Owen
560974f7d2 Merge branch 'feat/add-proxy-protocol-support' into dev 2025-10-26 18:16:38 -07:00
Owen
85270f497a Restrict raw resources and use st from config 2025-10-26 18:15:39 -07:00
miloschwartz
9fbea4a380 move enterprise/subscription required alert to component 2025-10-26 17:12:47 -07:00
miloschwartz
cbf9c5361e redirect to org login via query param 2025-10-26 17:08:35 -07:00
miloschwartz
44316731c0 enforce resource session length 2025-10-26 16:52:15 -07:00
Owen Schwartz
60513af8ed Merge pull request #1716 from fosrl/dependabot/npm_and_yarn/dev-patch-updates-5d11ea411f
Bump the dev-patch-updates group with 3 updates
2025-10-26 16:31:27 -07:00
Owen Schwartz
24cfe02979 Merge pull request #1717 from fosrl/dependabot/npm_and_yarn/dev-minor-updates-648ae407da
Bump @types/node from 24.8.1 to 24.9.1 in the dev-minor-updates group
2025-10-26 16:31:18 -07:00
Owen
8f3324560a Install maxmind by default 2025-10-26 16:04:19 -07:00
Owen
2041edcf30 Allow protocols on the same port
Fixes #1745
2025-10-26 15:57:12 -07:00
miloschwartz
1227b3c11a use alert instead of badge for unlock status 2025-10-25 17:21:21 -07:00
miloschwartz
8973726f63 add org policy check to verify session 2025-10-25 17:15:37 -07:00
Owen
5559fef1bc Merge branch 'dev' of github.com:fosrl/pangolin into dev 2025-10-25 16:27:12 -07:00
Owen
9cb3c3821a Merge branch 'Pallavikumarimdb-feat/cert-resolver-through-UI' into dev 2025-10-25 16:25:51 -07:00
Owen
c85e367ded Merge branch 'feat/cert-resolver-through-UI' of github.com:Pallavikumarimdb/pangolin into Pallavikumarimdb-feat/cert-resolver-through-UI 2025-10-25 16:25:42 -07:00
Owen Schwartz
5e20487216 Merge pull request #1732 from Pallavikumarimdb/feat/show-update-for-client-olm
Client olm version show in the table with an update prompt
2025-10-25 16:23:51 -07:00
Owen Schwartz
bc6b9eb905 Merge pull request #1736 from Lokowitz/fix-geoip-blueprint
fix blueprint country issue - fix #1705 - option 2
2025-10-25 16:21:49 -07:00
Owen
5940bbd498 Uppercase 2025-10-25 16:20:50 -07:00
Owen
f4a0f6a2e6 Update ui 2025-10-25 16:17:45 -07:00
Milo Schwartz
0df7d45678 Update README.md 2025-10-25 13:48:14 -04:00
Fred KISSIE
a05ee2483b 💄 adjust form style for createblueprintform 2025-10-25 03:22:51 +02:00
Fred KISSIE
f5dbc18c05 create and apply blueprint 2025-10-25 03:06:54 +02:00
Fred KISSIE
dd052fa1af 💄 Gave a relooking to the blueprint table 2025-10-25 03:06:45 +02:00
Fred KISSIE
2cc4ad9c30 💄 fix header & cell misalignment in table 2025-10-25 03:05:47 +02:00
Fred KISSIE
4dd741cc3f 🔊 log all SQL queries 2025-10-25 02:55:19 +02:00
miloschwartz
9ce81b34c9 add confirm dialog to update security settings 2025-10-24 17:30:39 -07:00
miloschwartz
460df46abc update translation and send password reset email 2025-10-24 17:18:34 -07:00
miloschwartz
1e70e4289b add password expiry enforcement 2025-10-24 17:11:39 -07:00
Owen
5fa0ac5927 Add hybrid request logs function 2025-10-24 17:05:05 -07:00
Owen
4b40e7b8d6 Restrict features 2025-10-24 16:29:37 -07:00
Fred KISSIE
29cd035a05 🚧 add & validate blueprint yaml 2025-10-25 01:25:19 +02:00
miloschwartz
39d6b93d42 enforce max session length 2025-10-24 16:14:21 -07:00
miloschwartz
629f17294a 2fa policy check working 2025-10-24 14:31:50 -07:00
Owen
10a5af67aa Merge branch 'dev' into audit-logs 2025-10-24 11:15:39 -07:00
Owen
b542d82553 Consolidate into central cache 2025-10-24 11:14:07 -07:00
Owen
2a644c3f88 Working on settings 2025-10-24 10:51:32 -07:00
Owen
f6de61968d Merge branch 'dev' into audit-logs 2025-10-24 10:31:54 -07:00
Owen
68f0c4df3a Working on licencing 2025-10-24 10:11:28 -07:00
Pallavi Kumari
0743daf56a add en-US for proxy protocol 2025-10-24 16:30:34 +05:30
Pallavi Kumari
58b6ab2601 Implement Proxy Protocol handling in Traefik config generator 2025-10-24 15:56:46 +05:30
Fred KISSIE
038f8829c2 🚧 create blueprint form 2025-10-24 04:17:13 +02:00
miloschwartz
ddcf77a62d add basic org policy check in middleware 2025-10-23 18:15:00 -07:00
Owen
adefbdbeb3 Fix various ui bugs 2025-10-23 17:36:24 -07:00
Owen
921285e5b1 Filtering on all tables 2025-10-23 15:33:29 -07:00
Owen
264bf46798 Filtering working on both access and request 2025-10-23 14:34:56 -07:00
miloschwartz
5a7b5d65a4 remove org settings json 2025-10-23 14:22:50 -07:00
Fred KISSIE
23b13f0a0e 💄 add toploader navigation 2025-10-23 23:10:28 +02:00
Fred KISSIE
90ddffce0e 🚧 create blueprint page 2025-10-23 22:27:14 +02:00
Fred KISSIE
e30fde5237 💄 blueprint data table 2025-10-23 22:14:09 +02:00
Pallavi Kumari
ac683c3ff7 add pg schema for proxy protocol 2025-10-23 23:24:42 +05:30
Pallavi Kumari
b5a931c96e UI and backend update to add proxy protocol support 2025-10-23 23:07:26 +05:30
Lokowitz
5b61742075 change geoip to country 2025-10-23 13:27:34 +00:00
Lokowitz
4e4a38f7e9 move to match type country instead of geoip 2025-10-23 13:19:27 +00:00
miloschwartz
c1bb029a1c simplify telemetry collection 2025-10-22 21:41:36 -07:00
Owen
eae2c37388 Add expandable columns 2025-10-22 18:21:54 -07:00
dependabot[bot]
7193fea068 Bump the dev-patch-updates group with 3 updates
Bumps the dev-patch-updates group with 3 updates: [@tailwindcss/postcss](https://github.com/tailwindlabs/tailwindcss/tree/HEAD/packages/@tailwindcss-postcss), [tailwindcss](https://github.com/tailwindlabs/tailwindcss/tree/HEAD/packages/tailwindcss) and [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint).


Updates `@tailwindcss/postcss` from 4.1.14 to 4.1.15
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss/commits/v4.1.15/packages/@tailwindcss-postcss)

Updates `tailwindcss` from 4.1.14 to 4.1.15
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss/commits/v4.1.15/packages/tailwindcss)

Updates `typescript-eslint` from 8.46.1 to 8.46.2
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.46.2/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: "@tailwindcss/postcss"
  dependency-version: 4.1.15
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-patch-updates
- dependency-name: tailwindcss
  dependency-version: 4.1.15
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-patch-updates
- dependency-name: typescript-eslint
  dependency-version: 8.46.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-patch-updates
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-23 01:20:34 +00:00
dependabot[bot]
9b85deebf8 Bump @types/node from 24.8.1 to 24.9.1 in the dev-minor-updates group
Bumps the dev-minor-updates group with 1 update: [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node).


Updates `@types/node` from 24.8.1 to 24.9.1
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-version: 24.9.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-minor-updates
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-23 01:20:13 +00:00
Owen
0211f75cb6 Access logs working 2025-10-22 17:42:27 -07:00
Fred KISSIE
fa6b7ca3ed 🚧 (WIP) blueprints table 2025-10-23 00:33:49 +02:00
Fred KISSIE
007d03e7f6 ♻️ refactor 2025-10-23 00:27:07 +02:00
Fred KISSIE
a534301eb7 ♻️ make source not null 2025-10-23 00:26:41 +02:00
miloschwartz
1baa987016 update resend ids 2025-10-22 15:14:57 -07:00
Fred KISSIE
a5b48ab392 🚧 blueprints page 2025-10-23 00:13:31 +02:00
Owen
7f981f05fb Show resource link in table for requests 2025-10-22 14:58:18 -07:00
Fred KISSIE
259cea1c42 add API endpoint for listing blueprints 2025-10-22 23:49:43 +02:00
Fred KISSIE
9024b2a974 🗃️ finish db schemas for blueprints 2025-10-22 23:49:13 +02:00
Owen
f2c31d3ca6 Add actor data to request 2025-10-22 14:27:21 -07:00
miloschwartz
6f8b5dd909 change get to post for whitelist 2025-10-22 14:02:43 -07:00
Fred KISSIE
6521b66b7c 🍱 add jsonschema for blueprint yaml validation 2025-10-22 21:58:19 +02:00
Fred KISSIE
202d2075a6 🚧 add blueprint to the sidebar and scaffold page 2025-10-22 21:56:26 +02:00
Fred KISSIE
e575fae73b 🚧 SQLite database schema with modes (is it okay ?) 2025-10-22 21:56:10 +02:00
Fred KISSIE
d84ee3d03d 🌐 add blueprint section title in the sidebar in messages (en-US for now) 2025-10-22 21:55:41 +02:00
Fred KISSIE
ba745588e9 🎨 format with prettier 2025-10-22 21:55:09 +02:00
Pallavi Kumari
84731bdc19 client olm version show in the table 2025-10-23 00:55:48 +05:30
Owen
f748c5dbe4 Basic request log working 2025-10-22 12:23:48 -07:00
Owen
fdd4d5244f Temp dont ignore org 2025-10-22 10:59:35 -07:00
Owen
9301477262 Merge branch 'dev' into audit-logs 2025-10-22 10:34:31 -07:00
Owen
9a787e6ef8 Merge branch 'main' into dev 2025-10-22 10:34:21 -07:00
Owen Schwartz
5b8cdf7884 Merge pull request #1730 from Pallavikumarimdb/fix/shareable-link-resource-URI
Update shareable link resource URI to use NiceId instead of resourceId
2025-10-22 10:11:10 -07:00
Fred KISSIE
5fd104bb30 🗃️ add bluePrintRuns model 2025-10-22 14:02:37 +02:00
Pallavi Kumari
9ba42a8fa3 add niceid to CreateShareLinkForm 2025-10-22 16:18:19 +05:30
Pallavi Kumari
fe8fd2e3a8 change shareable link resource URI from resource Id to NiceId 2025-10-22 15:53:29 +05:30
Owen
9ebce35d2b Dont do local sites undefined in cloud 2025-10-21 22:02:09 -07:00
Owen
654145be84 Clean up imports and ordering 2025-10-21 21:58:09 -07:00
Owen
3662d42374 Add resource id and cc 2025-10-21 21:42:53 -07:00
Owen
d392fb371e Add logging for all auth 2025-10-21 21:22:56 -07:00
Owen
1142d6ac48 Date picker working 2025-10-21 20:15:43 -07:00
Owen
bdc3b2425b Basic table working 2025-10-21 17:35:13 -07:00
Owen
9a64f45815 Basic log table there 2025-10-21 15:26:03 -07:00
Fred KISSIE
3633e02ff7 🔨 run next server with turbopack (easy win) 2025-10-22 00:17:42 +02:00
Owen Schwartz
2c502ec764 Merge pull request #1728 from jonasmerkel/main
Update German translations for client terminology
2025-10-21 14:29:23 -07:00
Jonas
b17d7f0e27 Update German translations for client terminology 2025-10-21 23:26:27 +02:00
Owen
65364d6b0f Merge branch 'dev' into audit-logs 2025-10-21 11:31:33 -07:00
Owen
6fd6c77ce6 Further revert 2025-10-21 11:29:27 -07:00
Owen
e447549de1 revert changes around sites assigned to exit nodes 2025-10-21 11:12:27 -07:00
Pallavi Kumari
6b0dd00aa5 show IP of the server inside DNS records 2025-10-21 20:43:42 +05:30
Pallavi Kumari
461866836e Remove the popup after creating domain and redirect to domain details page 2025-10-21 17:41:14 +05:30
Pallavi Kumari
3ae42f054f show the wildcard record info 2025-10-21 17:07:34 +05:30
Pallavi Kumari
5a571f19e1 add each form control it's own form field/item/control 2025-10-21 16:10:23 +05:30
Owen
70aeaf7b5d Change badges and button size 2025-10-21 15:37:03 +05:30
Pallavi Kumari
7a6838f5a5 fix lint 2025-10-21 15:37:03 +05:30
Pallavi Kumari
07f5e8f215 add update domain Settings for wildcard 2025-10-21 15:37:03 +05:30
Pallavi Kumari
2b05bc1f5f ui and layout fix 2025-10-21 15:37:03 +05:30
Pallavi Kumari
edf64ae7b5 fix invalid "default" 2025-10-21 15:37:03 +05:30
Pallavi Kumari
7370448be9 pg schema 2025-10-21 15:37:02 +05:30
Pallavi Kumari
51af293d66 add doc link button and fix continuous polling 2025-10-21 15:37:02 +05:30
Pallavi Kumari
d37e28215e add restart button 2025-10-21 15:37:02 +05:30
Pallavi Kumari
2c01849f2e fix import 2025-10-21 15:37:02 +05:30
Pallavi Kumari
c29ba9bb5f add DNS Records table 2025-10-21 15:37:02 +05:30
Pallavi Kumari
8fdf120ec2 backend setup to store and get DNS Records 2025-10-21 15:37:02 +05:30
Pallavi Kumari
a9b9161c40 template for Domain Settings 2025-10-21 15:37:02 +05:30
Pallavi Kumari
43f907ebec remove import 2025-10-21 15:37:02 +05:30
Pallavi Kumari
ae670e1eb5 initial setup for viewing domain details 2025-10-21 15:37:02 +05:30
Pallavi Kumari
f102718901 add edit button to domain table 2025-10-21 15:37:02 +05:30
Pallavi Kumari
9d452efc7d fix treafik config mismatch 2025-10-21 15:37:02 +05:30
Pallavi Kumari
156fe529b5 fix code conflicts and match dev change 2025-10-21 15:37:02 +05:30
Owen
df24525105 Fix type issues 2025-10-21 15:37:02 +05:30
Owen
d938345deb Copy in config to db, remove 2nd column, + prefer 2025-10-21 15:37:02 +05:30
Pallavi Kumari
d6681733dd remove custom cery type form config file 2025-10-21 15:37:02 +05:30
Pallavi Kumari
2f1aec02f0 traefik config update for custom Cert Resolver 2025-10-21 15:37:01 +05:30
Pallavi Kumari
d30e0a3c51 schema add 2025-10-21 15:37:01 +05:30
Pallavi Kumari
3f3e9cf1bb add cert resolver 2025-10-21 15:37:01 +05:30
Owen
e77909d498 Change runs on 2025-10-20 21:45:40 -07:00
Owen
d10830f892 Fix exitNodeId col 2025-10-20 21:34:10 -07:00
Owen
18d8f72da2 Change runner back 2025-10-20 21:01:45 -07:00
Owen
4a59823e58 Actually run the migrations; update exit nodes
Fix #1718
Fix #1720
2025-10-20 20:55:47 -07:00
Owen
f3149e46cd Starting to create frontend 2025-10-20 20:40:04 -07:00
Owen
60379a7b4e Merge branch 'dev' 2025-10-20 17:17:02 -07:00
dependabot[bot]
605b3cccee Bump @types/node from 24.7.2 to 24.8.1 in the dev-minor-updates group
Bumps the dev-minor-updates group with 1 update: [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node).


Updates `@types/node` from 24.7.2 to 24.8.1
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-version: 24.8.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-minor-updates
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-20 17:16:40 -07:00
dependabot[bot]
843799f4f6 Bump the dev-patch-updates group with 2 updates
Bumps the dev-patch-updates group with 2 updates: [@react-email/preview-server](https://github.com/resend/react-email/tree/HEAD/packages/preview-server) and [react-email](https://github.com/resend/react-email/tree/HEAD/packages/react-email).


Updates `@react-email/preview-server` from 4.3.0 to 4.3.1
- [Release notes](https://github.com/resend/react-email/releases)
- [Changelog](https://github.com/resend/react-email/blob/canary/packages/preview-server/CHANGELOG.md)
- [Commits](https://github.com/resend/react-email/commits/@react-email/preview-server@4.3.1/packages/preview-server)

Updates `react-email` from 4.3.0 to 4.3.1
- [Release notes](https://github.com/resend/react-email/releases)
- [Changelog](https://github.com/resend/react-email/blob/canary/packages/react-email/CHANGELOG.md)
- [Commits](https://github.com/resend/react-email/commits/react-email@4.3.1/packages/react-email)

---
updated-dependencies:
- dependency-name: "@react-email/preview-server"
  dependency-version: 4.3.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-patch-updates
- dependency-name: react-email
  dependency-version: 4.3.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-patch-updates
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-20 17:16:40 -07:00
Marc Schäfer
a69cda5c13 ci(actions): add GHCR mirroring and cosign signing for Docker images
- mirror images from Docker Hub to GHCR using skopeo (preserves multi-arch manifests)
- login to GHCR via docker/login-action for signing/pushing
- install cosign and perform dual signing: keyless (OIDC) + key-based; verify signatures
- add required permissions for id-token/packages and reference necessary secrets
2025-10-20 17:16:40 -07:00
Marc Schäfer
dbaa3dbd52 ci(actions): add permissions section to workflows 2025-10-20 17:16:40 -07:00
Marc Schäfer
58197c6fb2 ci(actions): change runner from ubuntu-latest to amd64-runner 2025-10-20 17:16:40 -07:00
Marc Schäfer
7813093452 ci(actions): pin action versions to commit SHAs for security
- Pin actions/checkout to SHA for v5.0.0
- Pin docker/setup-qemu-action to SHA for v3.6.0
- Pin docker/setup-buildx-action to SHA for v3.11.1
- Pin docker/login-action to SHA for v3.6.0
- Pin actions/setup-go to SHA for v6.0.0
- Pin actions/upload-artifact to SHA for v4.6.2
- Pin actions/setup-node to SHA for v6.0.0
- Pin actions/stale to SHA for v10.1.0
2025-10-20 17:16:40 -07:00
Marc Schäfer
3f2c3dc987 feat(actions): Sync Images from Docker to GHCR 2025-10-20 17:16:40 -07:00
miloschwartz
08ddba25d0 hide method selector on raw resources 2025-10-20 17:15:45 -07:00
Owen Schwartz
d47fa7e64f Merge pull request #1715 from marcschaeferger/gh-action
Adding GHCR to CI/CD Release Workflow & further improvements
2025-10-20 17:12:05 -07:00
Marc Schäfer
c87aa2e537 Merge branch 'fosrl:main' into gh-action 2025-10-21 02:09:04 +02:00
Marc Schäfer
bc430546bc ci(actions): add GHCR mirroring and cosign signing for Docker images
- mirror images from Docker Hub to GHCR using skopeo (preserves multi-arch manifests)
- login to GHCR via docker/login-action for signing/pushing
- install cosign and perform dual signing: keyless (OIDC) + key-based; verify signatures
- add required permissions for id-token/packages and reference necessary secrets
2025-10-21 02:07:26 +02:00
Owen Schwartz
9428e065eb Merge pull request #1707 from fosrl/dependabot/npm_and_yarn/dev-minor-updates-be6156b6cb
Bump @types/node from 24.7.2 to 24.8.1 in the dev-minor-updates group
2025-10-20 17:06:20 -07:00
Owen Schwartz
10408c5717 Merge pull request #1706 from fosrl/dependabot/npm_and_yarn/dev-patch-updates-b03f25c1b7
Bump the dev-patch-updates group with 2 updates
2025-10-20 17:06:13 -07:00
Owen Schwartz
ae902da913 Merge pull request #1714 from fosrl/crowdin_dev
New Crowdin updates
2025-10-20 17:06:00 -07:00
Owen Schwartz
0be5a91eff New translations en-us.json (Spanish) 2025-10-20 17:05:44 -07:00
Owen Schwartz
7dcf46ce98 New translations en-us.json (Norwegian Bokmal) 2025-10-20 17:05:42 -07:00
Owen Schwartz
33e6e4b411 New translations en-us.json (Chinese Simplified) 2025-10-20 17:05:41 -07:00
Owen Schwartz
bab6e4eb0d New translations en-us.json (Turkish) 2025-10-20 17:05:39 -07:00
Owen Schwartz
6a7c7521d8 New translations en-us.json (Russian) 2025-10-20 17:05:38 -07:00
Owen Schwartz
d070244ea7 New translations en-us.json (Portuguese) 2025-10-20 17:05:37 -07:00
Owen Schwartz
9219bb7d6e New translations en-us.json (Polish) 2025-10-20 17:05:35 -07:00
Owen Schwartz
54e83f35e5 New translations en-us.json (Dutch) 2025-10-20 17:05:34 -07:00
Owen Schwartz
eb138d6526 New translations en-us.json (Korean) 2025-10-20 17:05:33 -07:00
Owen Schwartz
edd0c3099b New translations en-us.json (Italian) 2025-10-20 17:05:31 -07:00
Owen Schwartz
04455d40cf New translations en-us.json (German) 2025-10-20 17:05:30 -07:00
Owen Schwartz
221af94d15 New translations en-us.json (Czech) 2025-10-20 17:05:29 -07:00
Owen Schwartz
48ac3bb7af New translations en-us.json (Bulgarian) 2025-10-20 17:05:27 -07:00
Owen Schwartz
07273b8b7f New translations en-us.json (French) 2025-10-20 17:05:26 -07:00
Marc Schäfer
bfb5b2864d ci(actions): add permissions section to workflows 2025-10-21 01:59:52 +02:00
Marc Schäfer
07330e84fb ci(actions): change runner from ubuntu-latest to amd64-runner 2025-10-21 01:54:23 +02:00
Marc Schäfer
0e39704b3a ci(actions): pin action versions to commit SHAs for security
- Pin actions/checkout to SHA for v5.0.0
- Pin docker/setup-qemu-action to SHA for v3.6.0
- Pin docker/setup-buildx-action to SHA for v3.11.1
- Pin docker/login-action to SHA for v3.6.0
- Pin actions/setup-go to SHA for v6.0.0
- Pin actions/upload-artifact to SHA for v4.6.2
- Pin actions/setup-node to SHA for v6.0.0
- Pin actions/stale to SHA for v10.1.0
2025-10-21 01:53:20 +02:00
miloschwartz
f25e794e7c add checks to prevent fk failure in ensureActions 2025-10-20 16:01:40 -07:00
Owen Schwartz
df46ce8bdc Merge pull request #1712 from marcschaeferger/ghcr
feat(actions): Sync Images from Docker to GHCR
2025-10-20 13:07:34 -07:00
Marc Schäfer
4d83f537dc feat(actions): Sync Images from Docker to GHCR 2025-10-20 22:06:36 +02:00
Owen
58443ef53f Reorder log middleware 2025-10-19 22:25:00 -07:00
Owen
1ee52ad86b Add headers 2025-10-19 21:59:51 -07:00
Owen
bc941239ec Fix the indexes 2025-10-19 21:59:41 -07:00
Owen
9a52d5387d Merge branch 'dev' into audit-logs 2025-10-19 21:54:26 -07:00
Owen
1f50bc3752 Add logActionAudit and query endpoint 2025-10-19 21:53:00 -07:00
dependabot[bot]
0819df0910 Bump @types/node from 24.7.2 to 24.8.1 in the dev-minor-updates group
Bumps the dev-minor-updates group with 1 update: [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node).


Updates `@types/node` from 24.7.2 to 24.8.1
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-version: 24.8.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-minor-updates
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-20 01:35:01 +00:00
dependabot[bot]
663787c15b Bump the dev-patch-updates group with 2 updates
Bumps the dev-patch-updates group with 2 updates: [@react-email/preview-server](https://github.com/resend/react-email/tree/HEAD/packages/preview-server) and [react-email](https://github.com/resend/react-email/tree/HEAD/packages/react-email).


Updates `@react-email/preview-server` from 4.3.0 to 4.3.1
- [Release notes](https://github.com/resend/react-email/releases)
- [Changelog](https://github.com/resend/react-email/blob/canary/packages/preview-server/CHANGELOG.md)
- [Commits](https://github.com/resend/react-email/commits/@react-email/preview-server@4.3.1/packages/preview-server)

Updates `react-email` from 4.3.0 to 4.3.1
- [Release notes](https://github.com/resend/react-email/releases)
- [Changelog](https://github.com/resend/react-email/blob/canary/packages/react-email/CHANGELOG.md)
- [Commits](https://github.com/resend/react-email/commits/react-email@4.3.1/packages/react-email)

---
updated-dependencies:
- dependency-name: "@react-email/preview-server"
  dependency-version: 4.3.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-patch-updates
- dependency-name: react-email
  dependency-version: 4.3.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-patch-updates
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-20 01:32:52 +00:00
Owen
2c39d07261 Add missing headers 2025-10-19 17:59:40 -07:00
Owen
dce84b9b09 Add action audit middleware and tables 2025-10-19 17:58:52 -07:00
Owen
a5bab6bb80 Merge branch 'dev' of github.com:fosrl/pangolin into dev 2025-10-19 12:04:59 -07:00
miloschwartz
7536c03f63 add int api routes for add/remote email to resource email whitelist 2025-10-19 12:04:20 -07:00
Owen
ada5d2ef0e Update domain 2025-10-19 11:59:10 -07:00
Owen
b8bead0590 Select exit node for local sites 2025-10-19 11:13:33 -07:00
Milo Schwartz
68f852d6d1 Merge pull request #1699 from Pallavikumarimdb/make-easier-to-delete
Make it easier to delete things
2025-10-19 14:00:19 -04:00
Owen
d9fe5a8819 Always set exit node to online
Fixes #1692
2025-10-19 10:47:32 -07:00
Owen
346183a23f Only allow nodes to pull with defined exitNodeID 2025-10-19 10:46:25 -07:00
Owen
dcfd7f5443 Merge branch 'dev' of github.com:fosrl/pangolin into dev 2025-10-19 10:43:39 -07:00
Pallavi Kumari
e59cd6672b fix space 2025-10-19 22:23:57 +05:30
Pallavi Kumari
7c8c440f67 fix text 2025-10-19 21:36:47 +05:30
Pallavi Kumari
f258c41f15 easier to delete 2025-10-19 20:37:07 +05:30
Pallavi Kumari
ae4a24f4aa easier to delete resources 2025-10-19 15:50:00 +05:30
Pallavi Kumari
476cdcfe86 easier to delete sites 2025-10-19 15:02:35 +05:30
Owen
f869df2f65 Working on fixing exit node issue 2025-10-18 21:32:26 -07:00
Owen Schwartz
03cfabacd9 Merge pull request #1695 from Pallavikumarimdb/fix/rule-priority-input
Make priority input box focused on pressing the up/down arrows
2025-10-18 13:38:54 -07:00
miloschwartz
47ac5875f3 change digpangolin.com to pangolin.net 2025-10-18 11:51:09 -07:00
miloschwartz
f67327358e Merge branch 'main' into dev 2025-10-18 11:41:06 -07:00
Milo Schwartz
4901823f15 Update README.md 2025-10-18 14:25:22 -04:00
Pallavi Kumari
5407e3c821 make priority input box focus on up/down click 2025-10-18 23:38:14 +05:30
Owen Schwartz
1d5cdad8b7 Merge pull request #1693 from Pallavikumarimdb/fix/sorting-resources-alphabetically-by-default
Sorting Resources Alphabetically by Default
2025-10-18 10:03:28 -07:00
Owen Schwartz
cd2424cb77 Merge pull request #1691 from fosrl/dependabot/npm_and_yarn/prod-patch-updates-30703f013a
Bump the prod-patch-updates group across 1 directory with 4 updates
2025-10-18 10:03:23 -07:00
Pallavi Kumari
c17efde6bf Sorting Resources Alphabetically by Default 2025-10-18 14:43:54 +05:30
Owen
40cd8cdec7 Merge branch 'dev' 2025-10-17 16:25:01 -07:00
Owen
6768672a44 Merge branch 'main' of github.com:fosrl/pangolin 2025-10-17 16:24:55 -07:00
Owen
240c5b005b Add more transactions support 2025-10-17 16:22:43 -07:00
dependabot[bot]
8dde170a35 Bump the prod-patch-updates group across 1 directory with 4 updates
Bumps the prod-patch-updates group with 3 updates in the / directory: [@react-email/components](https://github.com/resend/react-email/tree/HEAD/packages/components), [eslint-config-next](https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next) and [next](https://github.com/vercel/next.js).


Updates `@react-email/components` from 0.5.6 to 0.5.7
- [Release notes](https://github.com/resend/react-email/releases)
- [Changelog](https://github.com/resend/react-email/blob/canary/packages/components/CHANGELOG.md)
- [Commits](https://github.com/resend/react-email/commits/@react-email/components@0.5.7/packages/components)

Updates `@react-email/render` from 1.3.2 to 1.4.0
- [Release notes](https://github.com/resend/react-email/releases)
- [Changelog](https://github.com/resend/react-email/blob/canary/packages/render/CHANGELOG.md)
- [Commits](https://github.com/resend/react-email/commits/@react-email/render@1.4.0/packages/render)

Updates `eslint-config-next` from 15.5.5 to 15.5.6
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/commits/v15.5.6/packages/eslint-config-next)

Updates `next` from 15.5.5 to 15.5.6
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/compare/v15.5.5...v15.5.6)

---
updated-dependencies:
- dependency-name: "@react-email/components"
  dependency-version: 0.5.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-patch-updates
- dependency-name: "@react-email/render"
  dependency-version: 1.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: prod-patch-updates
- dependency-name: eslint-config-next
  dependency-version: 15.5.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-patch-updates
- dependency-name: next
  dependency-version: 15.5.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-patch-updates
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-17 21:06:44 +00:00
Owen
c07abf8ff9 Pass through transaction 2025-10-17 14:05:17 -07:00
Owen
e5a436593f Delete all before migrating 2025-10-17 14:05:17 -07:00
Owen
bb6e093ac6 Priority needs to be def 2025-10-17 14:05:17 -07:00
Milo Schwartz
59a334ce24 Update README.md 2025-10-17 14:05:17 -07:00
Owen
d241dcfb27 Fix typo 2025-10-17 14:05:17 -07:00
Owen
af263e7913 Pass through transaction 2025-10-17 14:04:49 -07:00
Owen Schwartz
6610e7d405 Merge pull request #1673 from fosrl/dependabot/npm_and_yarn/prod-patch-updates-ac45ae572b
Bump the prod-patch-updates group across 1 directory with 2 updates
2025-10-17 14:02:36 -07:00
Owen Schwartz
c476e65cf2 Merge pull request #1677 from fosrl/dependabot/npm_and_yarn/dev-patch-updates-3f2a7d9f8f
Bump the dev-patch-updates group across 1 directory with 2 updates
2025-10-17 14:01:57 -07:00
Owen Schwartz
b69b2eeeb3 Merge pull request #1689 from barnabehvrd/patch-2
FR translation update
2025-10-17 13:57:09 -07:00
Barnabé Havard
89dab0917b Fixed (again ...) indentation issues 2025-10-17 22:42:07 +02:00
Barnabé Havard
73efdb95ae Fixed indentation issues 2025-10-17 22:36:08 +02:00
Barnabé Havard
1bcca88614 Updated several translation 2025-10-17 22:32:51 +02:00
Owen Schwartz
8387571c1d Merge pull request #1684 from Pallavikumarimdb/fix/make-priority-optional
Make priority optional in schema
2025-10-17 10:14:01 -07:00
Pallavi Kumari
1d017f60b4 make priority optional in schema 2025-10-17 19:51:32 +05:30
dependabot[bot]
81effda9e8 Bump the prod-patch-updates group across 1 directory with 2 updates
Bumps the prod-patch-updates group with 2 updates in the / directory: [eslint-config-next](https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next) and [next](https://github.com/vercel/next.js).


Updates `eslint-config-next` from 15.5.4 to 15.5.5
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/commits/v15.5.5/packages/eslint-config-next)

Updates `next` from 15.5.4 to 15.5.5
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/compare/v15.5.4...v15.5.5)

---
updated-dependencies:
- dependency-name: eslint-config-next
  dependency-version: 15.5.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-patch-updates
- dependency-name: next
  dependency-version: 15.5.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-patch-updates
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-17 01:22:32 +00:00
dependabot[bot]
9343906ab1 Bump the dev-patch-updates group across 1 directory with 2 updates
Bumps the dev-patch-updates group with 2 updates in the / directory: [@types/react-dom](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-dom) and [esbuild](https://github.com/evanw/esbuild).


Updates `@types/react-dom` from 19.2.1 to 19.2.2
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-dom)

Updates `esbuild` from 0.25.10 to 0.25.11
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.25.10...v0.25.11)

---
updated-dependencies:
- dependency-name: "@types/react-dom"
  dependency-version: 19.2.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-patch-updates
- dependency-name: esbuild
  dependency-version: 0.25.11
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-patch-updates
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-17 01:20:39 +00:00
627 changed files with 57559 additions and 14502 deletions

View File

@@ -1,34 +1,62 @@
name: CI/CD Pipeline
# CI/CD workflow for building, publishing, mirroring, signing container images and building release binaries.
# Actions are pinned to specific SHAs to reduce supply-chain risk. This workflow triggers on tag push events.
permissions:
contents: read
packages: write # for GHCR push
id-token: write # for Cosign Keyless (OIDC) Signing
# Required secrets:
# - DOCKER_HUB_USERNAME / DOCKER_HUB_ACCESS_TOKEN: push to Docker Hub
# - GITHUB_TOKEN: used for GHCR login and OIDC keyless signing
# - COSIGN_PRIVATE_KEY / COSIGN_PASSWORD / COSIGN_PUBLIC_KEY: for key-based signing
on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+"
- "[0-9]+.[0-9]+.[0-9]+.rc.[0-9]+"
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
release:
name: Build and Release
runs-on: amd64-runner
runs-on: [self-hosted, linux, x64]
# Job-level timeout to avoid runaway or stuck runs
timeout-minutes: 120
env:
# Target images
DOCKERHUB_IMAGE: docker.io/fosrl/${{ github.event.repository.name }}
GHCR_IMAGE: ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}
steps:
- name: Checkout code
uses: actions/checkout@v5
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
- name: Set up QEMU
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
- name: Log in to Docker Hub
uses: docker/login-action@v3
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
with:
registry: docker.io
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Extract tag name
id: get-tag
run: echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
shell: bash
- name: Install Go
uses: actions/setup-go@v6
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
with:
go-version: 1.24
@@ -37,18 +65,21 @@ jobs:
TAG=${{ env.TAG }}
sed -i "s/export const APP_VERSION = \".*\";/export const APP_VERSION = \"$TAG\";/" server/lib/consts.ts
cat server/lib/consts.ts
shell: bash
- name: Pull latest Gerbil version
id: get-gerbil-tag
run: |
LATEST_TAG=$(curl -s https://api.github.com/repos/fosrl/gerbil/tags | jq -r '.[0].name')
echo "LATEST_GERBIL_TAG=$LATEST_TAG" >> $GITHUB_ENV
shell: bash
- name: Pull latest Badger version
id: get-badger-tag
run: |
LATEST_TAG=$(curl -s https://api.github.com/repos/fosrl/badger/tags | jq -r '.[0].name')
echo "LATEST_BADGER_TAG=$LATEST_TAG" >> $GITHUB_ENV
shell: bash
- name: Update install/main.go
run: |
@@ -60,6 +91,7 @@ jobs:
sed -i "s/config.BadgerVersion = \".*\"/config.BadgerVersion = \"$BADGER_VERSION\"/" install/main.go
echo "Updated install/main.go with Pangolin version $PANGOLIN_VERSION, Gerbil version $GERBIL_VERSION, and Badger version $BADGER_VERSION"
cat install/main.go
shell: bash
- name: Build installer
working-directory: install
@@ -67,12 +99,89 @@ jobs:
make go-build-release
- name: Upload artifacts from /install/bin
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
with:
name: install-bin
path: install/bin/
- name: Build and push Docker images
- name: Build and push Docker images (Docker Hub)
run: |
TAG=${{ env.TAG }}
make build-release tag=$TAG
echo "Built & pushed to: ${{ env.DOCKERHUB_IMAGE }}:${TAG}"
shell: bash
- name: Install skopeo + jq
# skopeo: copy/inspect images between registries
# jq: JSON parsing tool used to extract digest values
run: |
sudo apt-get update -y
sudo apt-get install -y skopeo jq
skopeo --version
shell: bash
- name: Login to GHCR
run: |
skopeo login ghcr.io -u "${{ github.actor }}" -p "${{ secrets.GITHUB_TOKEN }}"
shell: bash
- name: Copy tag from Docker Hub to GHCR
# Mirror the already-built image (all architectures) to GHCR so we can sign it
run: |
set -euo pipefail
TAG=${{ env.TAG }}
echo "Copying ${{ env.DOCKERHUB_IMAGE }}:${TAG} -> ${{ env.GHCR_IMAGE }}:${TAG}"
skopeo copy --all --retry-times 3 \
docker://$DOCKERHUB_IMAGE:$TAG \
docker://$GHCR_IMAGE:$TAG
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
# cosign is used to sign and verify container images (key and keyless)
uses: sigstore/cosign-installer@faadad0cce49287aee09b3a48701e75088a2c6ad # v4.0.0
- name: Dual-sign and verify (GHCR & Docker Hub)
# Sign each image by digest using keyless (OIDC) and key-based signing,
# then verify both the public key signature and the keyless OIDC signature.
env:
TAG: ${{ env.TAG }}
COSIGN_PRIVATE_KEY: ${{ secrets.COSIGN_PRIVATE_KEY }}
COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }}
COSIGN_PUBLIC_KEY: ${{ secrets.COSIGN_PUBLIC_KEY }}
COSIGN_YES: "true"
run: |
set -euo pipefail
issuer="https://token.actions.githubusercontent.com"
id_regex="^https://github.com/${{ github.repository }}/.+" # accept this repo (all workflows/refs)
for IMAGE in "${GHCR_IMAGE}" "${DOCKERHUB_IMAGE}"; do
echo "Processing ${IMAGE}:${TAG}"
DIGEST="$(skopeo inspect --retry-times 3 docker://${IMAGE}:${TAG} | jq -r '.Digest')"
REF="${IMAGE}@${DIGEST}"
echo "Resolved digest: ${REF}"
echo "==> cosign sign (keyless) --recursive ${REF}"
cosign sign --recursive "${REF}"
echo "==> cosign sign (key) --recursive ${REF}"
cosign sign --key env://COSIGN_PRIVATE_KEY --recursive "${REF}"
echo "==> cosign verify (public key) ${REF}"
cosign verify --key env://COSIGN_PUBLIC_KEY "${REF}" -o text
echo "==> cosign verify (keyless policy) ${REF}"
cosign verify \
--certificate-oidc-issuer "${issuer}" \
--certificate-identity-regexp "${id_regex}" \
"${REF}" -o text
done
shell: bash

View File

@@ -1,5 +1,8 @@
name: ESLint
permissions:
contents: read
on:
pull_request:
paths:
@@ -18,10 +21,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
- name: Set up Node.js
uses: actions/setup-node@v5
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: '22'
@@ -32,4 +35,4 @@ jobs:
run: npm run set:oss
- name: Run ESLint
run: npx eslint . --ext .js,.jsx,.ts,.tsx
run: npx eslint . --ext .js,.jsx,.ts,.tsx

132
.github/workflows/mirror.yaml vendored Normal file
View File

@@ -0,0 +1,132 @@
name: Mirror & Sign (Docker Hub to GHCR)
on:
workflow_dispatch: {}
permissions:
contents: read
packages: write
id-token: write # for keyless OIDC
env:
SOURCE_IMAGE: docker.io/fosrl/pangolin
DEST_IMAGE: ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}
jobs:
mirror-and-dual-sign:
runs-on: amd64-runner
steps:
- name: Install skopeo + jq
run: |
sudo apt-get update -y
sudo apt-get install -y skopeo jq
skopeo --version
- name: Install cosign
uses: sigstore/cosign-installer@faadad0cce49287aee09b3a48701e75088a2c6ad # v4.0.0
- name: Input check
run: |
test -n "${SOURCE_IMAGE}" || (echo "SOURCE_IMAGE is empty" && exit 1)
echo "Source : ${SOURCE_IMAGE}"
echo "Target : ${DEST_IMAGE}"
# Auth for skopeo (containers-auth)
- name: Skopeo login to GHCR
run: |
skopeo login ghcr.io -u "${{ github.actor }}" -p "${{ secrets.GITHUB_TOKEN }}"
# Auth for cosign (docker-config)
- name: Docker login to GHCR (for cosign)
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u "${{ github.actor }}" --password-stdin
- name: List source tags
run: |
set -euo pipefail
skopeo list-tags --retry-times 3 docker://"${SOURCE_IMAGE}" \
| jq -r '.Tags[]' | sort -u > src-tags.txt
echo "Found source tags: $(wc -l < src-tags.txt)"
head -n 20 src-tags.txt || true
- name: List destination tags (skip existing)
run: |
set -euo pipefail
if skopeo list-tags --retry-times 3 docker://"${DEST_IMAGE}" >/tmp/dst.json 2>/dev/null; then
jq -r '.Tags[]' /tmp/dst.json | sort -u > dst-tags.txt
else
: > dst-tags.txt
fi
echo "Existing destination tags: $(wc -l < dst-tags.txt)"
- name: Mirror, dual-sign, and verify
env:
# keyless
COSIGN_YES: "true"
# key-based
COSIGN_PRIVATE_KEY: ${{ secrets.COSIGN_PRIVATE_KEY }}
COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }}
# verify
COSIGN_PUBLIC_KEY: ${{ secrets.COSIGN_PUBLIC_KEY }}
run: |
set -euo pipefail
copied=0; skipped=0; v_ok=0; errs=0
issuer="https://token.actions.githubusercontent.com"
id_regex="^https://github.com/${{ github.repository }}/.+"
while read -r tag; do
[ -z "$tag" ] && continue
if grep -Fxq "$tag" dst-tags.txt; then
echo "::notice ::Skip (exists) ${DEST_IMAGE}:${tag}"
skipped=$((skipped+1))
continue
fi
echo "==> Copy ${SOURCE_IMAGE}:${tag} → ${DEST_IMAGE}:${tag}"
if ! skopeo copy --all --retry-times 3 \
docker://"${SOURCE_IMAGE}:${tag}" docker://"${DEST_IMAGE}:${tag}"; then
echo "::warning title=Copy failed::${SOURCE_IMAGE}:${tag}"
errs=$((errs+1)); continue
fi
copied=$((copied+1))
digest="$(skopeo inspect --retry-times 3 docker://"${DEST_IMAGE}:${tag}" | jq -r '.Digest')"
ref="${DEST_IMAGE}@${digest}"
echo "==> cosign sign (keyless) --recursive ${ref}"
if ! cosign sign --recursive "${ref}"; then
echo "::warning title=Keyless sign failed::${ref}"
errs=$((errs+1))
fi
echo "==> cosign sign (key) --recursive ${ref}"
if ! cosign sign --key env://COSIGN_PRIVATE_KEY --recursive "${ref}"; then
echo "::warning title=Key sign failed::${ref}"
errs=$((errs+1))
fi
echo "==> cosign verify (public key) ${ref}"
if ! cosign verify --key env://COSIGN_PUBLIC_KEY "${ref}" -o text; then
echo "::warning title=Verify(pubkey) failed::${ref}"
errs=$((errs+1))
fi
echo "==> cosign verify (keyless policy) ${ref}"
if ! cosign verify \
--certificate-oidc-issuer "${issuer}" \
--certificate-identity-regexp "${id_regex}" \
"${ref}" -o text; then
echo "::warning title=Verify(keyless) failed::${ref}"
errs=$((errs+1))
else
v_ok=$((v_ok+1))
fi
done < src-tags.txt
echo "---- Summary ----"
echo "Copied : $copied"
echo "Skipped : $skipped"
echo "Verified OK : $v_ok"
echo "Errors : $errs"

View File

@@ -14,7 +14,7 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v10
- uses: actions/stale@5f858e3efba33a5ca4407a664cc011ad407f2008 # v10.1.0
with:
days-before-stale: 14
days-before-close: 14
@@ -34,4 +34,4 @@ jobs:
operations-per-run: 100
remove-stale-when-updated: true
delete-branch: false
enable-statistics: true
enable-statistics: true

View File

@@ -1,5 +1,8 @@
name: Run Tests
permissions:
contents: read
on:
pull_request:
branches:
@@ -11,9 +14,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
- uses: actions/setup-node@v5
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: '22'

3
.gitignore vendored
View File

@@ -49,4 +49,5 @@ postgres/
dynamic/
*.mmdb
scratch/
tsconfig.json
tsconfig.json
hydrateSaas.ts

2
.nvmrc
View File

@@ -1 +1 @@
22
24

View File

@@ -4,7 +4,7 @@ Contributions are welcome!
Please see the contribution and local development guide on the docs page before getting started:
https://docs.digpangolin.com/development/contributing
https://docs.pangolin.net/development/contributing
### Licensing Considerations

View File

@@ -1,10 +1,12 @@
FROM node:22-alpine AS builder
FROM node:24-alpine AS builder
WORKDIR /app
ARG BUILD=oss
ARG DATABASE=sqlite
RUN apk add --no-cache curl tzdata python3 make g++
# COPY package.json package-lock.json ./
COPY package*.json ./
RUN npm ci
@@ -12,8 +14,9 @@ RUN npm ci
COPY . .
RUN echo "export * from \"./$DATABASE\";" > server/db/index.ts
RUN echo "export const driver: \"pg\" | \"sqlite\" = \"$DATABASE\";" >> server/db/index.ts
RUN echo "export const build = \"$BUILD\" as any;" > server/build.ts
RUN echo "export const build = \"$BUILD\" as \"saas\" | \"enterprise\" | \"oss\";" > server/build.ts
# Copy the appropriate TypeScript configuration based on build type
RUN if [ "$BUILD" = "oss" ]; then cp tsconfig.oss.json tsconfig.json; \
@@ -30,9 +33,9 @@ RUN mkdir -p dist
RUN npm run next:build
RUN node esbuild.mjs -e server/index.ts -o dist/server.mjs -b $BUILD
RUN if [ "$DATABASE" = "pg" ]; then \
node esbuild.mjs -e server/setup/migrationsPg.ts -o dist/migrations.mjs; \
node esbuild.mjs -e server/setup/migrationsPg.ts -o dist/migrations.mjs; \
else \
node esbuild.mjs -e server/setup/migrationsSqlite.ts -o dist/migrations.mjs; \
node esbuild.mjs -e server/setup/migrationsSqlite.ts -o dist/migrations.mjs; \
fi
# test to make sure the build output is there and error if not
@@ -40,12 +43,13 @@ RUN test -f dist/server.mjs
RUN npm run build:cli
FROM node:22-alpine AS runner
FROM node:24-alpine AS runner
WORKDIR /app
# Curl used for the health checks
RUN apk add --no-cache curl tzdata
# Python and build tools needed for better-sqlite3 native compilation
RUN apk add --no-cache curl tzdata python3 make g++
# COPY package.json package-lock.json ./
COPY package*.json ./

View File

@@ -44,6 +44,36 @@ build-release:
--tag fosrl/pangolin:ee-postgresql-$(tag) \
--push .
build-rc:
@if [ -z "$(tag)" ]; then \
echo "Error: tag is required. Usage: make build-release tag=<tag>"; \
exit 1; \
fi
docker buildx build \
--build-arg BUILD=oss \
--build-arg DATABASE=sqlite \
--platform linux/arm64,linux/amd64 \
--tag fosrl/pangolin:$(tag) \
--push .
docker buildx build \
--build-arg BUILD=oss \
--build-arg DATABASE=pg \
--platform linux/arm64,linux/amd64 \
--tag fosrl/pangolin:postgresql-$(tag) \
--push .
docker buildx build \
--build-arg BUILD=enterprise \
--build-arg DATABASE=sqlite \
--platform linux/arm64,linux/amd64 \
--tag fosrl/pangolin:ee-$(tag) \
--push .
docker buildx build \
--build-arg BUILD=enterprise \
--build-arg DATABASE=pg \
--platform linux/arm64,linux/amd64 \
--tag fosrl/pangolin:ee-postgresql-$(tag) \
--push .
build-arm:
docker buildx build --platform linux/arm64 -t fosrl/pangolin:latest .

View File

@@ -1,6 +1,6 @@
<div align="center">
<h2>
<a href="https://digpangolin.com">
<a href="https://pangolin.net/">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="public/logo/word_mark_white.png">
<img alt="Pangolin Logo" src="public/logo/word_mark_black.png" width="350">
@@ -11,15 +11,15 @@
<div align="center">
<h5>
<a href="https://digpangolin.com">
<a href="https://pangolin.net/">
Website
</a>
<span> | </span>
<a href="https://docs.digpangolin.com/">
<a href="https://docs.pangolin.net/">
Documentation
</a>
<span> | </span>
<a href="mailto:contact@fossorial.io">
<a href="mailto:contact@pangolin.net">
Contact Us
</a>
</h5>
@@ -28,7 +28,7 @@
<div align="center">
[![Discord](https://img.shields.io/discord/1325658630518865980?logo=discord&style=flat-square)](https://discord.gg/HCJR8Xhme4)
[![Slack](https://img.shields.io/badge/chat-slack-yellow?style=flat-square&logo=slack)](https://digpangolin.com/slack)
[![Slack](https://img.shields.io/badge/chat-slack-yellow?style=flat-square&logo=slack)](https://pangolin.net/slack)
[![Docker](https://img.shields.io/docker/pulls/fosrl/pangolin?style=flat-square)](https://hub.docker.com/r/fosrl/pangolin)
![Stars](https://img.shields.io/github/stars/fosrl/pangolin?style=flat-square)
[![YouTube](https://img.shields.io/badge/YouTube-red?logo=youtube&logoColor=white&style=flat-square)](https://www.youtube.com/@fossorial-app)
@@ -37,7 +37,7 @@
<p align="center">
<strong>
Start testing Pangolin at <a href="https://pangolin.fossorial.io/auth/signup">pangolin.fossorial.io</a>
Start testing Pangolin at <a href="https://app.pangolin.net/auth/signup">app.pangolin.net</a>
</strong>
</p>
@@ -45,7 +45,10 @@ Pangolin is a self-hosted tunneled reverse proxy server with identity and contex
## Installation
Check out the [quick install guide](https://docs.digpangolin.com/self-host/quick-install) for how to install and set up Pangolin.
- Check out the [quick install guide](https://docs.pangolin.net/self-host/quick-install) for how to install and set up Pangolin.
- Install from the [DigitalOcean marketplace](https://marketplace.digitalocean.com/apps/pangolin-ce-1?refcode=edf0480eeb81) for a one-click pre-configured installer.
<img src="public/screenshots/hero.png" />
## Deployment Options
@@ -53,7 +56,7 @@ Check out the [quick install guide](https://docs.digpangolin.com/self-host/quick
|-----------------|--------------|
| **Self-Host: Community Edition** | Free, open source, and licensed under AGPL-3. |
| **Self-Host: Enterprise Edition** | Licensed under Fossorial Commercial License. Free for personal and hobbyist use, and for businesses earning under \$100K USD annually. |
| **Pangolin Cloud** | Fully managed service with instant setup and pay-as-you-go pricing — no infrastructure required. Or, self-host your own [remote node](https://docs.digpangolin.com/manage/remote-node/nodes) and connect to our control plane. |
| **Pangolin Cloud** | Fully managed service with instant setup and pay-as-you-go pricing — no infrastructure required. Or, self-host your own [remote node](https://docs.pangolin.net/manage/remote-node/nodes) and connect to our control plane. |
## Key Features
@@ -71,18 +74,22 @@ Pangolin packages everything you need for seamless application access and exposu
### Check out the docs
We encourage everyone to read the full documentation first, which is
available at [docs.digpangolin.com](https://docs.digpangolin.com). This README provides only a very brief subset of
available at [docs.pangolin.net](https://docs.pangolin.net). This README provides only a very brief subset of
the docs to illustrate some basic ideas.
### Sign up and try now
For Pangolin's managed service, you will first need to create an account at
[pangolin.fossorial.io](https://pangolin.fossorial.io). We have a generous free tier to get started.
[app.pangolin.net](https://app.pangolin.net). We have a generous free tier to get started.
## Licensing
Pangolin is dual licensed under the AGPL-3 and the [Fossorial Commercial License](https://digpangolin.com/fcl.html). For inquiries about commercial licensing, please contact us at [contact@fossorial.io](mailto:contact@fossorial.io).
Pangolin is dual licensed under the AGPL-3 and the [Fossorial Commercial License](https://pangolin.net/fcl.html). For inquiries about commercial licensing, please contact us at [contact@pangolin.net](mailto:contact@pangolin.net).
## Contributions
Please see [CONTRIBUTING](./CONTRIBUTING.md) in the repository for guidelines and best practices.
---
WireGuard® is a registered trademark of Jason A. Donenfeld.

View File

@@ -3,7 +3,7 @@
If you discover a security vulnerability, please follow the steps below to responsibly disclose it to us:
1. **Do not create a public GitHub issue or discussion post.** This could put the security of other users at risk.
2. Send a detailed report to [security@fossorial.io](mailto:security@fossorial.io) or send a **private** message to a maintainer on [Discord](https://discord.gg/HCJR8Xhme4). Include:
2. Send a detailed report to [security@pangolin.net](mailto:security@pangolin.net) or send a **private** message to a maintainer on [Discord](https://discord.gg/HCJR8Xhme4). Include:
- Description and location of the vulnerability.
- Potential impact of the vulnerability.

View File

@@ -8,7 +8,7 @@ import base64
YAML_FILE_PATH = 'blueprint.yaml'
# The API endpoint and headers from the curl request
API_URL = 'http://api.pangolin.fossorial.io/v1/org/test/blueprint'
API_URL = 'http://api.pangolin.net/v1/org/test/blueprint'
HEADERS = {
'accept': '*/*',
'Authorization': 'Bearer <your_token_here>',

View File

@@ -28,9 +28,10 @@ proxy-resources:
# sso-roles:
# - Member
# sso-users:
# - owen@fossorial.io
# - owen@pangolin.net
# whitelist-users:
# - owen@fossorial.io
# - owen@pangolin.net
# auto-login-idp: 1
headers:
- name: X-Example-Header
value: example-value

View File

@@ -5,14 +5,14 @@ meta {
}
post {
url: http://localhost:4000/api/v1/auth/login
url: http://localhost:3000/api/v1/auth/login
body: json
auth: none
}
body:json {
{
"email": "owen@fossorial.io",
"email": "admin@fosrl.io",
"password": "Password123!"
}
}

View File

@@ -12,6 +12,6 @@ post {
body:json {
{
"email": "milo@fossorial.io"
"email": "milo@pangolin.net"
}
}

View File

@@ -12,7 +12,7 @@ put {
body:json {
{
"email": "numbat@fossorial.io",
"email": "numbat@pangolin.net",
"password": "Password123!"
}
}

15
bruno/Olm/createOlm.bru Normal file
View File

@@ -0,0 +1,15 @@
meta {
name: createOlm
type: http
seq: 1
}
put {
url: http://localhost:3000/api/v1/olm
body: none
auth: inherit
}
settings {
encodeUrl: true
}

8
bruno/Olm/folder.bru Normal file
View File

@@ -0,0 +1,8 @@
meta {
name: Olm
seq: 15
}
auth {
mode: inherit
}

View File

@@ -1,6 +1,6 @@
{
"version": "1",
"name": "Pangolin Saas",
"name": "Pangolin",
"type": "collection",
"ignore": [
"node_modules",

View File

@@ -90,7 +90,8 @@ export const setAdminCredentials: CommandModule<{}, SetAdminCredentialsArgs> = {
passwordHash,
dateCreated: moment().toISOString(),
serverAdmin: true,
emailVerified: true
emailVerified: true,
lastPasswordChange: new Date().getTime()
});
console.log("Server admin created");

View File

@@ -1,5 +1,5 @@
# To see all available options, please visit the docs:
# https://docs.digpangolin.com/self-host/advanced/config-file
# https://docs.pangolin.net/self-host/advanced/config-file
app:
dashboard_url: http://localhost:3002
@@ -25,4 +25,3 @@ flags:
disable_user_create_org: true
allow_raw_resources: true
enable_integration_api: true
enable_clients: true

View File

@@ -0,0 +1,15 @@
services:
drizzle-gateway:
image: ghcr.io/drizzle-team/gateway:latest
ports:
- "4984:4983"
depends_on:
- db
environment:
- STORE_PATH=/app
- DATABASE_URL=postgresql://postgres:password@db:5432/postgres
volumes:
- drizzle-gateway-data:/app
volumes:
drizzle-gateway-data:

View File

@@ -35,7 +35,7 @@ services:
- 80:80 # Port for traefik because of the network_mode
traefik:
image: traefik:v3.5
image: traefik:v3.6
container_name: traefik
restart: unless-stopped
network_mode: service:gerbil # Ports appear on the gerbil service
@@ -52,4 +52,4 @@ networks:
default:
driver: bridge
name: pangolin
enable_ipv6: true
enable_ipv6: true

View File

@@ -11,7 +11,7 @@ services:
- ./config/postgres:/var/lib/postgresql/data
ports:
- "5432:5432" # Map host port 5432 to container port 5432
restart: no
restart: no
redis:
image: redis:latest # Use the latest Redis image

View File

@@ -18,7 +18,11 @@ put-back:
mv main.go.bak main.go
dev-update-versions:
PANGOLIN_VERSION=$$(curl -s https://api.github.com/repos/fosrl/pangolin/tags | jq -r '.[0].name') && \
if [ -z "$(tag)" ]; then \
PANGOLIN_VERSION=$$(curl -s https://api.github.com/repos/fosrl/pangolin/tags | jq -r '.[0].name'); \
else \
PANGOLIN_VERSION=$(tag); \
fi && \
GERBIL_VERSION=$$(curl -s https://api.github.com/repos/fosrl/gerbil/tags | jq -r '.[0].name') && \
BADGER_VERSION=$$(curl -s https://api.github.com/repos/fosrl/badger/tags | jq -r '.[0].name') && \
echo "Latest versions - Pangolin: $$PANGOLIN_VERSION, Gerbil: $$GERBIL_VERSION, Badger: $$BADGER_VERSION" && \

View File

@@ -1,5 +1,5 @@
# To see all available options, please visit the docs:
# https://docs.digpangolin.com/
# https://docs.pangolin.net/
gerbil:
start_port: 51820
@@ -14,7 +14,6 @@ app:
domains:
domain1:
base_domain: "{{.BaseDomain}}"
cert_resolver: "letsencrypt"
server:
secret: "{{.Secret}}"
@@ -36,4 +35,4 @@ flags:
require_email_verification: {{.EnableEmail}}
disable_signup_without_invite: true
disable_user_create_org: false
allow_raw_resources: true
allow_raw_resources: true

View File

@@ -35,7 +35,7 @@ services:
- 80:80
{{end}}
traefik:
image: docker.io/traefik:v3.5
image: docker.io/traefik:v3.6
container_name: traefik
restart: unless-stopped
{{if .InstallGerbil}}
@@ -59,4 +59,4 @@ networks:
default:
driver: bridge
name: pangolin
{{if .EnableIPv6}} enable_ipv6: true{{end}}
{{if .EnableIPv6}} enable_ipv6: true{{end}}

View File

@@ -51,3 +51,12 @@ http:
loadBalancer:
servers:
- url: "http://pangolin:3000" # API/WebSocket server
tcp:
serversTransports:
pp-transport-v1:
proxyProtocol:
version: 1
pp-transport-v2:
proxyProtocol:
version: 2

View File

@@ -73,7 +73,7 @@ func installDocker() error {
case strings.Contains(osRelease, "ID=ubuntu"):
installCmd = exec.Command("bash", "-c", fmt.Sprintf(`
apt-get update &&
apt-get install -y apt-transport-https ca-certificates curl software-properties-common &&
apt-get install -y apt-transport-https ca-certificates curl &&
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg &&
echo "deb [arch=%s signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" > /etc/apt/sources.list.d/docker.list &&
apt-get update &&
@@ -82,7 +82,7 @@ func installDocker() error {
case strings.Contains(osRelease, "ID=debian"):
installCmd = exec.Command("bash", "-c", fmt.Sprintf(`
apt-get update &&
apt-get install -y apt-transport-https ca-certificates curl software-properties-common &&
apt-get install -y apt-transport-https ca-certificates curl &&
curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg &&
echo "deb [arch=%s signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" > /etc/apt/sources.list.d/docker.list &&
apt-get update &&

View File

@@ -3,8 +3,8 @@ module installer
go 1.24.0
require (
golang.org/x/term v0.36.0
golang.org/x/term v0.37.0
gopkg.in/yaml.v3 v3.0.1
)
require golang.org/x/sys v0.37.0 // indirect
require golang.org/x/sys v0.38.0 // indirect

View File

@@ -1,7 +1,7 @@
golang.org/x/sys v0.37.0 h1:fdNQudmxPjkdUTPnLn5mdQv7Zwvbvpaxqs831goi9kQ=
golang.org/x/sys v0.37.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/term v0.36.0 h1:zMPR+aF8gfksFprF/Nc/rd1wRS1EI6nDBGyWAvDzx2Q=
golang.org/x/term v0.36.0/go.mod h1:Qu394IJq6V6dCBRgwqshf3mPF85AqzYEzofzRdZkWss=
golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc=
golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/term v0.37.0 h1:8EGAD0qCmHYZg6J17DvsMy9/wJ7/D/4pV/wfnld5lTU=
golang.org/x/term v0.37.0/go.mod h1:5pB4lxRNYYVZuTLmy8oR2BH8dflOR+IbTYFD8fi3254=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=

View File

@@ -54,8 +54,8 @@ type Config struct {
type SupportedContainer string
const (
Docker SupportedContainer = "docker"
Podman SupportedContainer = "podman"
Docker SupportedContainer = "docker"
Podman SupportedContainer = "podman"
Undefined SupportedContainer = "undefined"
)
@@ -160,7 +160,7 @@ func main() {
} else {
alreadyInstalled = true
fmt.Println("Looks like you already installed Pangolin!")
// Check if MaxMind database exists and offer to update it
fmt.Println("\n=== MaxMind Database Update ===")
if _, err := os.Stat("config/GeoLite2-Country.mmdb"); err == nil {
@@ -209,8 +209,8 @@ func main() {
parsedURL, err := url.Parse(appConfig.DashboardURL)
if err != nil {
fmt.Printf("Error parsing URL: %v\n", err)
return
fmt.Printf("Error parsing URL: %v\n", err)
return
}
config.DashboardDomain = parsedURL.Hostname()
@@ -238,12 +238,11 @@ func main() {
}
fmt.Println("CrowdSec installed successfully!")
return
}
}
}
if !alreadyInstalled {
if !alreadyInstalled || config.DoCrowdsecInstall {
// Setup Token Section
fmt.Println("\n=== Setup Token ===")
@@ -360,7 +359,7 @@ func collectUserInput(reader *bufio.Reader) Config {
config.EmailSMTPPort = readInt(reader, "Enter SMTP port (default 587)", 587)
config.EmailSMTPUser = readString(reader, "Enter SMTP username", "")
config.EmailSMTPPass = readString(reader, "Enter SMTP password", "") // Should this be readPassword?
config.EmailNoReply = readString(reader, "Enter no-reply email address", "")
config.EmailNoReply = readString(reader, "Enter no-reply email address (often the same as SMTP username)", "")
}
// Validate required fields
@@ -372,13 +371,17 @@ func collectUserInput(reader *bufio.Reader) Config {
fmt.Println("Error: Let's Encrypt email is required")
os.Exit(1)
}
if config.EnableEmail && config.EmailNoReply == "" {
fmt.Println("Error: No-reply email address is required when email is enabled")
os.Exit(1)
}
// Advanced configuration
fmt.Println("\n=== Advanced Configuration ===")
config.EnableIPv6 = readBool(reader, "Is your server IPv6 capable?", true)
config.EnableGeoblocking = readBool(reader, "Do you want to download the MaxMind GeoLite2 database for geoblocking functionality?", false)
config.EnableGeoblocking = readBool(reader, "Do you want to download the MaxMind GeoLite2 database for geoblocking functionality?", true)
if config.DashboardDomain == "" {
fmt.Println("Error: Dashboard Domain name is required")
@@ -644,28 +647,28 @@ func checkPortsAvailable(port int) error {
func downloadMaxMindDatabase() error {
fmt.Println("Downloading MaxMind GeoLite2 Country database...")
// Download the GeoLite2 Country database
if err := run("curl", "-L", "-o", "GeoLite2-Country.tar.gz",
if err := run("curl", "-L", "-o", "GeoLite2-Country.tar.gz",
"https://github.com/GitSquared/node-geolite2-redist/raw/refs/heads/master/redist/GeoLite2-Country.tar.gz"); err != nil {
return fmt.Errorf("failed to download GeoLite2 database: %v", err)
}
// Extract the database
if err := run("tar", "-xzf", "GeoLite2-Country.tar.gz"); err != nil {
return fmt.Errorf("failed to extract GeoLite2 database: %v", err)
}
// Find the .mmdb file and move it to the config directory
if err := run("bash", "-c", "mv GeoLite2-Country_*/GeoLite2-Country.mmdb config/"); err != nil {
return fmt.Errorf("failed to move GeoLite2 database to config directory: %v", err)
}
// Clean up the downloaded files
if err := run("rm", "-rf", "GeoLite2-Country.tar.gz", "GeoLite2-Country_*"); err != nil {
fmt.Printf("Warning: failed to clean up temporary files: %v\n", err)
}
fmt.Println("MaxMind GeoLite2 Country database downloaded successfully!")
return nil
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

2099
messages/zh-TW.json Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,12 +1,15 @@
import type { NextConfig } from "next";
import createNextIntlPlugin from "next-intl/plugin";
const withNextIntl = createNextIntlPlugin();
/** @type {import("next").NextConfig} */
const nextConfig = {
const nextConfig: NextConfig = {
eslint: {
ignoreDuringBuilds: true
},
experimental: {
reactCompiler: true
},
output: "standalone"
};

9229
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -22,8 +22,8 @@
"set:oss": "echo 'export const build = \"oss\" as any;' > server/build.ts && cp tsconfig.oss.json tsconfig.json",
"set:saas": "echo 'export const build = \"saas\" as any;' > server/build.ts && cp tsconfig.saas.json tsconfig.json",
"set:enterprise": "echo 'export const build = \"enterprise\" as any;' > server/build.ts && cp tsconfig.enterprise.json tsconfig.json",
"set:sqlite": "echo 'export * from \"./sqlite\";' > server/db/index.ts",
"set:pg": "echo 'export * from \"./pg\";' > server/db/index.ts",
"set:sqlite": "echo 'export * from \"./sqlite\";\nexport const driver: \"pg\" | \"sqlite\" = \"sqlite\";' > server/db/index.ts",
"set:pg": "echo 'export * from \"./pg\";\nexport const driver: \"pg\" | \"sqlite\" = \"pg\";' > server/db/index.ts",
"next:build": "next build",
"build:sqlite": "mkdir -p dist && next build && node esbuild.mjs -e server/index.ts -o dist/server.mjs && node esbuild.mjs -e server/setup/migrationsSqlite.ts -o dist/migrations.mjs",
"build:pg": "mkdir -p dist && next build && node esbuild.mjs -e server/index.ts -o dist/server.mjs && node esbuild.mjs -e server/setup/migrationsPg.ts -o dist/migrations.mjs",
@@ -32,41 +32,45 @@
"build:cli": "node esbuild.mjs -e cli/index.ts -o dist/cli.mjs"
},
"dependencies": {
"@asteasolutions/zod-to-openapi": "^7.3.4",
"@aws-sdk/client-s3": "3.908.0",
"@asteasolutions/zod-to-openapi": "8.1.0",
"@faker-js/faker": "^10.1.0",
"@headlessui/react": "^2.2.9",
"@aws-sdk/client-s3": "3.943.0",
"@hookform/resolvers": "5.2.2",
"@monaco-editor/react": "^4.7.0",
"@node-rs/argon2": "^2.0.2",
"@oslojs/crypto": "1.0.1",
"@oslojs/encoding": "1.1.0",
"@radix-ui/react-avatar": "1.1.10",
"@radix-ui/react-avatar": "1.1.11",
"@radix-ui/react-checkbox": "1.3.3",
"@radix-ui/react-collapsible": "1.1.12",
"@radix-ui/react-dialog": "1.1.15",
"@radix-ui/react-dropdown-menu": "2.1.16",
"@radix-ui/react-icons": "1.3.2",
"@radix-ui/react-label": "2.1.7",
"@radix-ui/react-label": "2.1.8",
"@radix-ui/react-popover": "1.1.15",
"@radix-ui/react-progress": "^1.1.7",
"@radix-ui/react-progress": "^1.1.8",
"@radix-ui/react-radio-group": "1.3.8",
"@radix-ui/react-scroll-area": "^1.2.10",
"@radix-ui/react-select": "2.2.6",
"@radix-ui/react-separator": "1.1.7",
"@radix-ui/react-slot": "1.2.3",
"@radix-ui/react-separator": "1.1.8",
"@radix-ui/react-slot": "1.2.4",
"@radix-ui/react-switch": "1.2.6",
"@radix-ui/react-tabs": "1.1.13",
"@radix-ui/react-toast": "1.2.15",
"@radix-ui/react-tooltip": "^1.2.8",
"@react-email/components": "0.5.6",
"@react-email/components": "0.5.7",
"@react-email/render": "^1.3.2",
"@react-email/tailwind": "1.2.2",
"@simplewebauthn/browser": "^13.2.2",
"@simplewebauthn/server": "^13.2.2",
"@tailwindcss/forms": "^0.5.10",
"@tanstack/react-query": "^5.90.6",
"@tanstack/react-table": "8.21.3",
"arctic": "^3.7.0",
"axios": "^1.12.2",
"axios": "^1.13.2",
"better-sqlite3": "11.7.0",
"canvas-confetti": "1.9.3",
"canvas-confetti": "1.9.4",
"class-variance-authority": "^0.7.1",
"clsx": "2.1.1",
"cmdk": "1.1.1",
@@ -75,89 +79,103 @@
"cookies": "^0.9.1",
"cors": "2.8.5",
"crypto-js": "^4.2.0",
"drizzle-orm": "0.44.6",
"eslint": "9.37.0",
"eslint-config-next": "15.5.4",
"express": "5.1.0",
"express-rate-limit": "8.1.0",
"glob": "11.0.3",
"d3": "^7.9.0",
"date-fns": "4.1.0",
"drizzle-orm": "0.45.0",
"eslint": "9.39.1",
"eslint-config-next": "16.0.7",
"express": "5.2.1",
"express-rate-limit": "8.2.1",
"glob": "11.1.0",
"helmet": "8.1.0",
"http-errors": "2.0.0",
"http-errors": "2.0.1",
"i": "^0.3.7",
"input-otp": "1.4.2",
"ioredis": "5.8.1",
"ioredis": "5.8.2",
"jmespath": "^0.16.0",
"js-yaml": "4.1.0",
"js-yaml": "4.1.1",
"jsonwebtoken": "^9.0.2",
"lucide-react": "^0.545.0",
"maxmind": "5.0.0",
"lucide-react": "^0.556.0",
"maxmind": "5.0.1",
"moment": "2.30.1",
"next": "15.5.4",
"next-intl": "^4.3.12",
"next": "15.5.7",
"next-intl": "^4.4.0",
"next-themes": "0.4.6",
"nextjs-toploader": "^3.9.17",
"node-cache": "5.1.2",
"node-fetch": "3.3.2",
"nodemailer": "7.0.9",
"npm": "^11.6.2",
"nodemailer": "7.0.11",
"npm": "^11.6.4",
"nprogress": "^0.2.0",
"oslo": "1.2.1",
"pg": "^8.16.2",
"posthog-node": "^5.9.5",
"posthog-node": "^5.11.2",
"qrcode.react": "4.2.0",
"react": "19.2.0",
"react-dom": "19.2.0",
"react": "19.2.1",
"react-day-picker": "9.11.3",
"react-dom": "19.2.1",
"react-easy-sort": "^1.8.0",
"react-hook-form": "7.65.0",
"react-hook-form": "7.68.0",
"react-icons": "^5.5.0",
"rebuild": "0.1.2",
"recharts": "^2.15.4",
"reodotdev": "^1.0.0",
"resend": "^6.1.2",
"resend": "^6.4.2",
"semver": "^7.7.3",
"stripe": "18.2.1",
"swagger-ui-express": "^5.0.1",
"tailwind-merge": "3.3.1",
"topojson-client": "^3.1.0",
"tailwind-merge": "3.4.0",
"tw-animate-css": "^1.3.8",
"uuid": "^13.0.0",
"vaul": "1.1.2",
"visionscarto-world-atlas": "^1.0.0",
"winston": "3.18.3",
"winston-daily-rotate-file": "5.0.0",
"ws": "8.18.3",
"yaml": "^2.8.1",
"yargs": "18.0.0",
"zod": "3.25.76",
"zod-validation-error": "3.5.2"
"zod": "4.1.12",
"zod-validation-error": "5.0.0"
},
"devDependencies": {
"@dotenvx/dotenvx": "1.51.0",
"@dotenvx/dotenvx": "1.51.1",
"@esbuild-plugins/tsconfig-paths": "0.1.2",
"@react-email/preview-server": "4.3.0",
"@tailwindcss/postcss": "^4.1.14",
"@react-email/preview-server": "4.3.2",
"@tailwindcss/postcss": "^4.1.17",
"@tanstack/react-query-devtools": "^5.90.2",
"@types/better-sqlite3": "7.6.12",
"@types/cookie-parser": "1.4.9",
"@types/cookie-parser": "1.4.10",
"@types/cors": "2.8.19",
"@types/crypto-js": "^4.2.2",
"@types/express": "5.0.3",
"@types/d3": "^7.4.3",
"@types/express": "5.0.6",
"@types/express-session": "^1.18.2",
"@types/jmespath": "^0.15.2",
"@types/js-yaml": "4.0.9",
"@types/jsonwebtoken": "^9.0.10",
"@types/node": "24.7.2",
"@types/nodemailer": "7.0.2",
"@types/pg": "8.15.5",
"@types/react": "19.2.2",
"@types/react-dom": "19.2.1",
"@types/node": "24.10.1",
"@types/nprogress": "^0.2.3",
"@types/nodemailer": "7.0.4",
"@types/pg": "8.15.6",
"@types/react": "19.2.7",
"@types/react-dom": "19.2.3",
"@types/semver": "^7.7.1",
"@types/swagger-ui-express": "^4.1.8",
"@types/topojson-client": "^3.1.5",
"@types/ws": "8.18.1",
"@types/yargs": "17.0.33",
"drizzle-kit": "0.31.5",
"esbuild": "0.25.10",
"esbuild-node-externals": "1.18.0",
"babel-plugin-react-compiler": "^1.0.0",
"@types/yargs": "17.0.35",
"drizzle-kit": "0.31.8",
"esbuild": "0.27.1",
"esbuild-node-externals": "1.20.1",
"postcss": "^8",
"react-email": "4.3.0",
"react-email": "4.3.2",
"tailwindcss": "^4.1.4",
"tsc-alias": "1.8.16",
"tsx": "4.20.6",
"tsx": "4.21.0",
"typescript": "^5",
"typescript-eslint": "^8.46.0"
"typescript-eslint": "^8.46.3"
},
"overrides": {
"emblor": {
@@ -165,4 +183,4 @@
"react-dom": "19.0.0"
}
}
}
}

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -79,6 +79,12 @@ export function createApiServer() {
// Add request timeout middleware
apiServer.use(requestTimeoutMiddleware(60000)); // 60 second timeout
apiServer.use(logIncomingMiddleware);
if (build !== "oss") {
apiServer.use(`${prefix}/hybrid`, hybridRouter); // put before rate limiting because we will rate limit there separately because some of the routes are heavily used
}
if (!dev) {
apiServer.use(
rateLimit({
@@ -101,11 +107,7 @@ export function createApiServer() {
}
// API routes
apiServer.use(logIncomingMiddleware);
apiServer.use(prefix, unauthenticated);
if (build !== "oss") {
apiServer.use(`${prefix}/hybrid`, hybridRouter);
}
apiServer.use(prefix, authenticated);
// WebSocket routes

View File

@@ -19,6 +19,7 @@ export enum ActionsEnum {
getSite = "getSite",
listSites = "listSites",
updateSite = "updateSite",
reGenerateSecret = "reGenerateSecret",
createResource = "createResource",
deleteResource = "deleteResource",
getResource = "getResource",
@@ -81,7 +82,11 @@ export enum ActionsEnum {
listClients = "listClients",
getClient = "getClient",
listOrgDomains = "listOrgDomains",
getDomain = "getDomain",
updateOrgDomain = "updateOrgDomain",
getDNSRecords = "getDNSRecords",
createNewt = "createNewt",
createOlm = "createOlm",
createIdp = "createIdp",
updateIdp = "updateIdp",
deleteIdp = "deleteIdp",
@@ -116,7 +121,11 @@ export enum ActionsEnum {
updateLoginPage = "updateLoginPage",
getLoginPage = "getLoginPage",
deleteLoginPage = "deleteLoginPage",
applyBlueprint = "applyBlueprint"
listBlueprints = "listBlueprints",
getBlueprint = "getBlueprint",
applyBlueprint = "applyBlueprint",
viewLogs = "viewLogs",
exportLogs = "exportLogs"
}
export async function checkUserActionPermission(
@@ -193,7 +202,6 @@ export async function checkUserActionPermission(
.limit(1);
return roleActionPermission.length > 0;
} catch (error) {
console.error("Error checking user action permission:", error);
throw createHttpError(

View File

@@ -36,12 +36,15 @@ export async function createSession(
const sessionId = encodeHexLowerCase(
sha256(new TextEncoder().encode(token))
);
const session: Session = {
sessionId: sessionId,
userId,
expiresAt: new Date(Date.now() + SESSION_COOKIE_EXPIRES).getTime()
};
await db.insert(sessions).values(session);
const [session] = await db
.insert(sessions)
.values({
sessionId: sessionId,
userId,
expiresAt: new Date(Date.now() + SESSION_COOKIE_EXPIRES).getTime(),
issuedAt: new Date().getTime()
})
.returning();
return session;
}

View File

@@ -50,7 +50,8 @@ export async function createResourceSession(opts: {
doNotExtend: opts.doNotExtend || false,
accessTokenId: opts.accessTokenId || null,
isRequestToken: opts.isRequestToken || false,
userSessionId: opts.userSessionId || null
userSessionId: opts.userSessionId || null,
issuedAt: new Date().getTime()
};
await db.insert(resourceSessions).values(session);

View File

@@ -1,9 +1,43 @@
import { Request } from "express";
import { validateSessionToken, SESSION_COOKIE_NAME } from "@server/auth/sessions/app";
import {
validateSessionToken,
SESSION_COOKIE_NAME
} from "@server/auth/sessions/app";
export async function verifySession(req: Request) {
export async function verifySession(req: Request, forceLogin?: boolean) {
const res = await validateSessionToken(
req.cookies[SESSION_COOKIE_NAME] ?? "",
req.cookies[SESSION_COOKIE_NAME] ?? ""
);
if (!forceLogin) {
return res;
}
if (!res.session || !res.user) {
return {
session: null,
user: null
};
}
if (res.session.deviceAuthUsed) {
return {
session: null,
user: null
};
}
if (!res.session.issuedAt) {
return {
session: null,
user: null
};
}
const mins = 5 * 60 * 1000;
const now = new Date().getTime();
if (now - res.session.issuedAt > mins) {
return {
session: null,
user: null
};
}
return res;
}

View File

@@ -1,4 +1,4 @@
import { cleanup as wsCleanup } from "@server/routers/ws";
import { cleanup as wsCleanup } from "#dynamic/routers/ws";
async function cleanup() {
await wsCleanup();

View File

@@ -1,6 +1,7 @@
import { join } from "path";
import { readFileSync } from "fs";
import { db, resources, siteResources } from "@server/db";
import { clients, db, resources, siteResources } from "@server/db";
import { randomInt } from "crypto";
import { exitNodes, sites } from "@server/db";
import { eq, and } from "drizzle-orm";
import { __DIRNAME } from "@server/lib/consts";
@@ -15,6 +16,25 @@ if (!dev) {
}
export const names = JSON.parse(readFileSync(file, "utf-8"));
export async function getUniqueClientName(orgId: string): Promise<string> {
let loops = 0;
while (true) {
if (loops > 100) {
throw new Error("Could not generate a unique name");
}
const name = generateName();
const count = await db
.select({ niceId: clients.niceId, orgId: clients.orgId })
.from(clients)
.where(and(eq(clients.niceId, name), eq(clients.orgId, orgId)));
if (count.length === 0) {
return name;
}
loops++;
}
}
export async function getUniqueSiteName(orgId: string): Promise<string> {
let loops = 0;
while (true) {
@@ -42,18 +62,36 @@ export async function getUniqueResourceName(orgId: string): Promise<string> {
}
const name = generateName();
const count = await db
.select({ niceId: resources.niceId, orgId: resources.orgId })
.from(resources)
.where(and(eq(resources.niceId, name), eq(resources.orgId, orgId)));
if (count.length === 0) {
const [resourceCount, siteResourceCount] = await Promise.all([
db
.select({ niceId: resources.niceId, orgId: resources.orgId })
.from(resources)
.where(
and(eq(resources.niceId, name), eq(resources.orgId, orgId))
),
db
.select({
niceId: siteResources.niceId,
orgId: siteResources.orgId
})
.from(siteResources)
.where(
and(
eq(siteResources.niceId, name),
eq(siteResources.orgId, orgId)
)
)
]);
if (resourceCount.length === 0 && siteResourceCount.length === 0) {
return name;
}
loops++;
}
}
export async function getUniqueSiteResourceName(orgId: string): Promise<string> {
export async function getUniqueSiteResourceName(
orgId: string
): Promise<string> {
let loops = 0;
while (true) {
if (loops > 100) {
@@ -61,11 +99,27 @@ export async function getUniqueSiteResourceName(orgId: string): Promise<string>
}
const name = generateName();
const count = await db
.select({ niceId: siteResources.niceId, orgId: siteResources.orgId })
.from(siteResources)
.where(and(eq(siteResources.niceId, name), eq(siteResources.orgId, orgId)));
if (count.length === 0) {
const [resourceCount, siteResourceCount] = await Promise.all([
db
.select({ niceId: resources.niceId, orgId: resources.orgId })
.from(resources)
.where(
and(eq(resources.niceId, name), eq(resources.orgId, orgId))
),
db
.select({
niceId: siteResources.niceId,
orgId: siteResources.orgId
})
.from(siteResources)
.where(
and(
eq(siteResources.niceId, name),
eq(siteResources.orgId, orgId)
)
)
]);
if (resourceCount.length === 0 && siteResourceCount.length === 0) {
return name;
}
loops++;
@@ -74,9 +128,7 @@ export async function getUniqueSiteResourceName(orgId: string): Promise<string>
export async function getUniqueExitNodeEndpointName(): Promise<string> {
let loops = 0;
const count = await db
.select()
.from(exitNodes);
const count = await db.select().from(exitNodes);
while (true) {
if (loops > 100) {
throw new Error("Could not generate a unique name");
@@ -95,14 +147,11 @@ export async function getUniqueExitNodeEndpointName(): Promise<string> {
}
}
export function generateName(): string {
const name = (
names.descriptors[
Math.floor(Math.random() * names.descriptors.length)
] +
names.descriptors[randomInt(names.descriptors.length)] +
"-" +
names.animals[Math.floor(Math.random() * names.animals.length)]
names.animals[randomInt(names.animals.length)]
)
.toLowerCase()
.replace(/\s/g, "-");

View File

@@ -13,9 +13,12 @@ function createDb() {
connection_string: process.env.POSTGRES_CONNECTION_STRING
};
if (process.env.POSTGRES_REPLICA_CONNECTION_STRINGS) {
const replicas = process.env.POSTGRES_REPLICA_CONNECTION_STRINGS.split(",").map((conn) => ({
connection_string: conn.trim()
}));
const replicas =
process.env.POSTGRES_REPLICA_CONNECTION_STRINGS.split(
","
).map((conn) => ({
connection_string: conn.trim()
}));
config.postgres.replicas = replicas;
}
} else {
@@ -40,28 +43,44 @@ function createDb() {
connectionString,
max: poolConfig?.max_connections || 20,
idleTimeoutMillis: poolConfig?.idle_timeout_ms || 30000,
connectionTimeoutMillis: poolConfig?.connection_timeout_ms || 5000,
connectionTimeoutMillis: poolConfig?.connection_timeout_ms || 5000
});
const replicas = [];
if (!replicaConnections.length) {
replicas.push(DrizzlePostgres(primaryPool));
replicas.push(
DrizzlePostgres(primaryPool, {
logger: process.env.QUERY_LOGGING == "true"
})
);
} else {
for (const conn of replicaConnections) {
const replicaPool = new Pool({
connectionString: conn.connection_string,
max: poolConfig?.max_replica_connections || 20,
idleTimeoutMillis: poolConfig?.idle_timeout_ms || 30000,
connectionTimeoutMillis: poolConfig?.connection_timeout_ms || 5000,
connectionTimeoutMillis:
poolConfig?.connection_timeout_ms || 5000
});
replicas.push(DrizzlePostgres(replicaPool));
replicas.push(
DrizzlePostgres(replicaPool, {
logger: process.env.QUERY_LOGGING == "true"
})
);
}
}
return withReplicas(DrizzlePostgres(primaryPool), replicas as any);
return withReplicas(
DrizzlePostgres(primaryPool, {
logger: process.env.QUERY_LOGGING == "true"
}),
replicas as any
);
}
export const db = createDb();
export default db;
export type Transaction = Parameters<Parameters<typeof db["transaction"]>[0]>[0];
export type Transaction = Parameters<
Parameters<(typeof db)["transaction"]>[0]
>[0];

View File

@@ -11,6 +11,7 @@ const runMigrations = async () => {
migrationsFolder: migrationsFolder
});
console.log("Migrations completed successfully.");
process.exit(0);
} catch (error) {
console.error("Error running migrations:", error);
process.exit(1);

View File

@@ -6,7 +6,8 @@ import {
integer,
bigint,
real,
text
text,
index
} from "drizzle-orm/pg-core";
import { InferSelectModel } from "drizzle-orm";
import { domains, orgs, targets, users, exitNodes, sessions } from "./schema";
@@ -166,6 +167,7 @@ export const remoteExitNodes = pgTable("remoteExitNode", {
secretHash: varchar("secretHash").notNull(),
dateCreated: varchar("dateCreated").notNull(),
version: varchar("version"),
secondaryVersion: varchar("secondaryVersion"), // This is to detect the new nodes after the transition to pangolin-node
exitNodeId: integer("exitNodeId").references(() => exitNodes.exitNodeId, {
onDelete: "cascade"
})
@@ -213,6 +215,43 @@ export const sessionTransferToken = pgTable("sessionTransferToken", {
expiresAt: bigint("expiresAt", { mode: "number" }).notNull()
});
export const actionAuditLog = pgTable("actionAuditLog", {
id: serial("id").primaryKey(),
timestamp: bigint("timestamp", { mode: "number" }).notNull(), // this is EPOCH time in seconds
orgId: varchar("orgId")
.notNull()
.references(() => orgs.orgId, { onDelete: "cascade" }),
actorType: varchar("actorType", { length: 50 }).notNull(),
actor: varchar("actor", { length: 255 }).notNull(),
actorId: varchar("actorId", { length: 255 }).notNull(),
action: varchar("action", { length: 100 }).notNull(),
metadata: text("metadata")
}, (table) => ([
index("idx_actionAuditLog_timestamp").on(table.timestamp),
index("idx_actionAuditLog_org_timestamp").on(table.orgId, table.timestamp)
]));
export const accessAuditLog = pgTable("accessAuditLog", {
id: serial("id").primaryKey(),
timestamp: bigint("timestamp", { mode: "number" }).notNull(), // this is EPOCH time in seconds
orgId: varchar("orgId")
.notNull()
.references(() => orgs.orgId, { onDelete: "cascade" }),
actorType: varchar("actorType", { length: 50 }),
actor: varchar("actor", { length: 255 }),
actorId: varchar("actorId", { length: 255 }),
resourceId: integer("resourceId"),
ip: varchar("ip", { length: 45 }),
type: varchar("type", { length: 100 }).notNull(),
action: boolean("action").notNull(),
location: text("location"),
userAgent: text("userAgent"),
metadata: text("metadata")
}, (table) => ([
index("idx_identityAuditLog_timestamp").on(table.timestamp),
index("idx_identityAuditLog_org_timestamp").on(table.orgId, table.timestamp)
]));
export type Limit = InferSelectModel<typeof limits>;
export type Account = InferSelectModel<typeof account>;
export type Certificate = InferSelectModel<typeof certificates>;
@@ -230,3 +269,5 @@ export type RemoteExitNodeSession = InferSelectModel<
>;
export type ExitNodeOrg = InferSelectModel<typeof exitNodeOrgs>;
export type LoginPage = InferSelectModel<typeof loginPage>;
export type ActionAuditLog = InferSelectModel<typeof actionAuditLog>;
export type AccessAuditLog = InferSelectModel<typeof accessAuditLog>;

View File

@@ -6,10 +6,12 @@ import {
integer,
bigint,
real,
text
text,
index
} from "drizzle-orm/pg-core";
import { InferSelectModel } from "drizzle-orm";
import { randomUUID } from "crypto";
import { alias } from "yargs";
export const domains = pgTable("domains", {
domainId: varchar("domainId").primaryKey(),
@@ -18,15 +20,41 @@ export const domains = pgTable("domains", {
type: varchar("type"), // "ns", "cname", "wildcard"
verified: boolean("verified").notNull().default(false),
failed: boolean("failed").notNull().default(false),
tries: integer("tries").notNull().default(0)
tries: integer("tries").notNull().default(0),
certResolver: varchar("certResolver"),
customCertResolver: varchar("customCertResolver"),
preferWildcardCert: boolean("preferWildcardCert")
});
export const dnsRecords = pgTable("dnsRecords", {
id: serial("id").primaryKey(),
domainId: varchar("domainId")
.notNull()
.references(() => domains.domainId, { onDelete: "cascade" }),
recordType: varchar("recordType").notNull(), // "NS" | "CNAME" | "A" | "TXT"
baseDomain: varchar("baseDomain"),
value: varchar("value").notNull(),
verified: boolean("verified").notNull().default(false)
});
export const orgs = pgTable("orgs", {
orgId: varchar("orgId").primaryKey(),
name: varchar("name").notNull(),
subnet: varchar("subnet"),
utilitySubnet: varchar("utilitySubnet"), // this is the subnet for utility addresses
createdAt: text("createdAt"),
settings: text("settings") // JSON blob of org-specific settings
requireTwoFactor: boolean("requireTwoFactor"),
maxSessionLengthHours: integer("maxSessionLengthHours"),
passwordExpiryDays: integer("passwordExpiryDays"),
settingsLogRetentionDaysRequest: integer("settingsLogRetentionDaysRequest") // where 0 = dont keep logs and -1 = keep forever, and 9001 = end of the following year
.notNull()
.default(7),
settingsLogRetentionDaysAccess: integer("settingsLogRetentionDaysAccess") // where 0 = dont keep logs and -1 = keep forever and 9001 = end of the following year
.notNull()
.default(0),
settingsLogRetentionDaysAction: integer("settingsLogRetentionDaysAction") // where 0 = dont keep logs and -1 = keep forever and 9001 = end of the following year
.notNull()
.default(0)
});
export const orgDomains = pgTable("orgDomains", {
@@ -62,8 +90,7 @@ export const sites = pgTable("sites", {
publicKey: varchar("publicKey"),
lastHolePunch: bigint("lastHolePunch", { mode: "number" }),
listenPort: integer("listenPort"),
dockerSocketEnabled: boolean("dockerSocketEnabled").notNull().default(true),
remoteSubnets: text("remoteSubnets") // comma-separated list of subnets that this site can access
dockerSocketEnabled: boolean("dockerSocketEnabled").notNull().default(true)
});
export const resources = pgTable("resources", {
@@ -100,9 +127,11 @@ export const resources = pgTable("resources", {
setHostHeader: varchar("setHostHeader"),
enableProxy: boolean("enableProxy").default(true),
skipToIdpId: integer("skipToIdpId").references(() => idp.idpId, {
onDelete: "cascade"
onDelete: "set null"
}),
headers: text("headers") // comma-separated list of headers to add to the request
headers: text("headers"), // comma-separated list of headers to add to the request
proxyProtocol: boolean("proxyProtocol").notNull().default(false),
proxyProtocolVersion: integer("proxyProtocolVersion").default(1)
});
export const targets = pgTable("targets", {
@@ -147,7 +176,8 @@ export const targetHealthCheck = pgTable("targetHealthCheck", {
hcFollowRedirects: boolean("hcFollowRedirects").default(true),
hcMethod: varchar("hcMethod").default("GET"),
hcStatus: integer("hcStatus"), // http code
hcHealth: text("hcHealth").default("unknown") // "unknown", "healthy", "unhealthy"
hcHealth: text("hcHealth").default("unknown"), // "unknown", "healthy", "unhealthy"
hcTlsServerName: text("hcTlsServerName"),
});
export const exitNodes = pgTable("exitNodes", {
@@ -176,11 +206,41 @@ export const siteResources = pgTable("siteResources", {
.references(() => orgs.orgId, { onDelete: "cascade" }),
niceId: varchar("niceId").notNull(),
name: varchar("name").notNull(),
protocol: varchar("protocol").notNull(),
proxyPort: integer("proxyPort").notNull(),
destinationPort: integer("destinationPort").notNull(),
destinationIp: varchar("destinationIp").notNull(),
enabled: boolean("enabled").notNull().default(true)
mode: varchar("mode").notNull(), // "host" | "cidr" | "port"
protocol: varchar("protocol"), // only for port mode
proxyPort: integer("proxyPort"), // only for port mode
destinationPort: integer("destinationPort"), // only for port mode
destination: varchar("destination").notNull(), // ip, cidr, hostname; validate against the mode
enabled: boolean("enabled").notNull().default(true),
alias: varchar("alias"),
aliasAddress: varchar("aliasAddress")
});
export const clientSiteResources = pgTable("clientSiteResources", {
clientId: integer("clientId")
.notNull()
.references(() => clients.clientId, { onDelete: "cascade" }),
siteResourceId: integer("siteResourceId")
.notNull()
.references(() => siteResources.siteResourceId, { onDelete: "cascade" })
});
export const roleSiteResources = pgTable("roleSiteResources", {
roleId: integer("roleId")
.notNull()
.references(() => roles.roleId, { onDelete: "cascade" }),
siteResourceId: integer("siteResourceId")
.notNull()
.references(() => siteResources.siteResourceId, { onDelete: "cascade" })
});
export const userSiteResources = pgTable("userSiteResources", {
userId: varchar("userId")
.notNull()
.references(() => users.userId, { onDelete: "cascade" }),
siteResourceId: integer("siteResourceId")
.notNull()
.references(() => siteResources.siteResourceId, { onDelete: "cascade" })
});
export const users = pgTable("user", {
@@ -200,7 +260,8 @@ export const users = pgTable("user", {
dateCreated: varchar("dateCreated").notNull(),
termsAcceptedTimestamp: varchar("termsAcceptedTimestamp"),
termsVersion: varchar("termsVersion"),
serverAdmin: boolean("serverAdmin").notNull().default(false)
serverAdmin: boolean("serverAdmin").notNull().default(false),
lastPasswordChange: bigint("lastPasswordChange", { mode: "number" })
});
export const newts = pgTable("newt", {
@@ -226,7 +287,9 @@ export const sessions = pgTable("session", {
userId: varchar("userId")
.notNull()
.references(() => users.userId, { onDelete: "cascade" }),
expiresAt: bigint("expiresAt", { mode: "number" }).notNull()
expiresAt: bigint("expiresAt", { mode: "number" }).notNull(),
issuedAt: bigint("issuedAt", { mode: "number" }),
deviceAuthUsed: boolean("deviceAuthUsed").notNull().default(false)
});
export const newtSessions = pgTable("newtSession", {
@@ -443,7 +506,8 @@ export const resourceSessions = pgTable("resourceSessions", {
{
onDelete: "cascade"
}
)
),
issuedAt: bigint("issuedAt", { mode: "number" })
});
export const resourceWhitelist = pgTable("resourceWhitelist", {
@@ -567,7 +631,7 @@ export const idpOrg = pgTable("idpOrg", {
});
export const clients = pgTable("clients", {
clientId: serial("id").primaryKey(),
clientId: serial("clientId").primaryKey(),
orgId: varchar("orgId")
.references(() => orgs.orgId, {
onDelete: "cascade"
@@ -576,6 +640,12 @@ export const clients = pgTable("clients", {
exitNodeId: integer("exitNode").references(() => exitNodes.exitNodeId, {
onDelete: "set null"
}),
userId: text("userId").references(() => users.userId, {
// optionally tied to a user and in this case delete when the user deletes
onDelete: "cascade"
}),
niceId: varchar("niceId").notNull(),
olmId: text("olmId"), // to lock it to a specific olm optionally
name: varchar("name").notNull(),
pubKey: varchar("pubKey"),
subnet: varchar("subnet").notNull(),
@@ -590,23 +660,40 @@ export const clients = pgTable("clients", {
maxConnections: integer("maxConnections")
});
export const clientSites = pgTable("clientSites", {
clientId: integer("clientId")
.notNull()
.references(() => clients.clientId, { onDelete: "cascade" }),
siteId: integer("siteId")
.notNull()
.references(() => sites.siteId, { onDelete: "cascade" }),
isRelayed: boolean("isRelayed").notNull().default(false),
endpoint: varchar("endpoint")
});
export const clientSitesAssociationsCache = pgTable(
"clientSitesAssociationsCache",
{
clientId: integer("clientId") // not a foreign key here so after its deleted the rebuild function can delete it and send the message
.notNull(),
siteId: integer("siteId").notNull(),
isRelayed: boolean("isRelayed").notNull().default(false),
endpoint: varchar("endpoint"),
publicKey: varchar("publicKey") // this will act as the session's public key for hole punching so we can track when it changes
}
);
export const clientSiteResourcesAssociationsCache = pgTable(
"clientSiteResourcesAssociationsCache",
{
clientId: integer("clientId") // not a foreign key here so after its deleted the rebuild function can delete it and send the message
.notNull(),
siteResourceId: integer("siteResourceId").notNull()
}
);
export const olms = pgTable("olms", {
olmId: varchar("id").primaryKey(),
secretHash: varchar("secretHash").notNull(),
dateCreated: varchar("dateCreated").notNull(),
version: text("version"),
agent: text("agent"),
name: varchar("name"),
clientId: integer("clientId").references(() => clients.clientId, {
// we will switch this depending on the current org it wants to connect to
onDelete: "set null"
}),
userId: text("userId").references(() => users.userId, {
// optionally tied to a user and in this case delete when the user deletes
onDelete: "cascade"
})
});
@@ -671,6 +758,72 @@ export const setupTokens = pgTable("setupTokens", {
dateUsed: varchar("dateUsed")
});
// Blueprint runs
export const blueprints = pgTable("blueprints", {
blueprintId: serial("blueprintId").primaryKey(),
orgId: text("orgId")
.references(() => orgs.orgId, {
onDelete: "cascade"
})
.notNull(),
name: varchar("name").notNull(),
source: varchar("source").notNull(),
createdAt: integer("createdAt").notNull(),
succeeded: boolean("succeeded").notNull(),
contents: text("contents").notNull(),
message: text("message")
});
export const requestAuditLog = pgTable(
"requestAuditLog",
{
id: serial("id").primaryKey(),
timestamp: integer("timestamp").notNull(), // this is EPOCH time in seconds
orgId: text("orgId").references(() => orgs.orgId, {
onDelete: "cascade"
}),
action: boolean("action").notNull(),
reason: integer("reason").notNull(),
actorType: text("actorType"),
actor: text("actor"),
actorId: text("actorId"),
resourceId: integer("resourceId"),
ip: text("ip"),
location: text("location"),
userAgent: text("userAgent"),
metadata: text("metadata"),
headers: text("headers"), // JSON blob
query: text("query"), // JSON blob
originalRequestURL: text("originalRequestURL"),
scheme: text("scheme"),
host: text("host"),
path: text("path"),
method: text("method"),
tls: boolean("tls")
},
(table) => [
index("idx_requestAuditLog_timestamp").on(table.timestamp),
index("idx_requestAuditLog_org_timestamp").on(
table.orgId,
table.timestamp
)
]
);
export const deviceWebAuthCodes = pgTable("deviceWebAuthCodes", {
codeId: serial("codeId").primaryKey(),
code: text("code").notNull().unique(),
ip: text("ip"),
city: text("city"),
deviceName: text("deviceName"),
applicationName: text("applicationName").notNull(),
expiresAt: bigint("expiresAt", { mode: "number" }).notNull(),
createdAt: bigint("createdAt", { mode: "number" }).notNull(),
verified: boolean("verified").notNull().default(false),
userId: varchar("userId").references(() => users.userId, {
onDelete: "cascade"
})
});
export type Org = InferSelectModel<typeof orgs>;
export type User = InferSelectModel<typeof users>;
export type Site = InferSelectModel<typeof sites>;
@@ -711,7 +864,7 @@ export type ApiKey = InferSelectModel<typeof apiKeys>;
export type ApiKeyAction = InferSelectModel<typeof apiKeyActions>;
export type ApiKeyOrg = InferSelectModel<typeof apiKeyOrg>;
export type Client = InferSelectModel<typeof clients>;
export type ClientSite = InferSelectModel<typeof clientSites>;
export type ClientSite = InferSelectModel<typeof clientSitesAssociationsCache>;
export type Olm = InferSelectModel<typeof olms>;
export type OlmSession = InferSelectModel<typeof olmSessions>;
export type UserClient = InferSelectModel<typeof userClients>;
@@ -722,3 +875,9 @@ export type SetupToken = InferSelectModel<typeof setupTokens>;
export type HostMeta = InferSelectModel<typeof hostMeta>;
export type TargetHealthCheck = InferSelectModel<typeof targetHealthCheck>;
export type IdpOidcConfig = InferSelectModel<typeof idpOidcConfig>;
export type Blueprint = InferSelectModel<typeof blueprints>;
export type LicenseKey = InferSelectModel<typeof licenseKey>;
export type SecurityKey = InferSelectModel<typeof securityKeys>;
export type WebauthnChallenge = InferSelectModel<typeof webauthnChallenge>;
export type DeviceWebAuthCode = InferSelectModel<typeof deviceWebAuthCodes>;
export type RequestAuditLog = InferSelectModel<typeof requestAuditLog>;

View File

@@ -1,4 +1,4 @@
import { db, loginPage, LoginPage, loginPageOrg } from "@server/db";
import { db, loginPage, LoginPage, loginPageOrg, Org, orgs } from "@server/db";
import {
Resource,
ResourcePassword,
@@ -23,6 +23,7 @@ export type ResourceWithAuth = {
pincode: ResourcePincode | null;
password: ResourcePassword | null;
headerAuth: ResourceHeaderAuth | null;
org: Org;
};
export type UserSessionWithUser = {
@@ -51,6 +52,10 @@ export async function getResourceByDomain(
resourceHeaderAuth,
eq(resourceHeaderAuth.resourceId, resources.resourceId)
)
.innerJoin(
orgs,
eq(orgs.orgId, resources.orgId)
)
.where(eq(resources.fullDomain, domain))
.limit(1);
@@ -62,7 +67,8 @@ export async function getResourceByDomain(
resource: result.resources,
pincode: result.resourcePincode,
password: result.resourcePassword,
headerAuth: result.resourceHeaderAuth
headerAuth: result.resourceHeaderAuth,
org: result.orgs
};
}

View File

@@ -13,12 +13,16 @@ bootstrapVolume();
function createDb() {
const sqlite = new Database(location);
return DrizzleSqlite(sqlite, { schema });
return DrizzleSqlite(sqlite, {
schema
});
}
export const db = createDb();
export default db;
export type Transaction = Parameters<Parameters<typeof db["transaction"]>[0]>[0];
export type Transaction = Parameters<
Parameters<(typeof db)["transaction"]>[0]
>[0];
function checkFileExists(filePath: string): boolean {
try {

View File

@@ -2,10 +2,12 @@ import {
sqliteTable,
integer,
text,
real
real,
index
} from "drizzle-orm/sqlite-core";
import { InferSelectModel } from "drizzle-orm";
import { domains, orgs, targets, users, exitNodes, sessions } from "./schema";
import { metadata } from "@app/app/[orgId]/settings/layout";
export const certificates = sqliteTable("certificates", {
certId: integer("certId").primaryKey({ autoIncrement: true }),
@@ -160,6 +162,7 @@ export const remoteExitNodes = sqliteTable("remoteExitNode", {
secretHash: text("secretHash").notNull(),
dateCreated: text("dateCreated").notNull(),
version: text("version"),
secondaryVersion: text("secondaryVersion"), // This is to detect the new nodes after the transition to pangolin-node
exitNodeId: integer("exitNodeId").references(() => exitNodes.exitNodeId, {
onDelete: "cascade"
})
@@ -207,6 +210,43 @@ export const sessionTransferToken = sqliteTable("sessionTransferToken", {
expiresAt: integer("expiresAt").notNull()
});
export const actionAuditLog = sqliteTable("actionAuditLog", {
id: integer("id").primaryKey({ autoIncrement: true }),
timestamp: integer("timestamp").notNull(), // this is EPOCH time in seconds
orgId: text("orgId")
.notNull()
.references(() => orgs.orgId, { onDelete: "cascade" }),
actorType: text("actorType").notNull(),
actor: text("actor").notNull(),
actorId: text("actorId").notNull(),
action: text("action").notNull(),
metadata: text("metadata")
}, (table) => ([
index("idx_actionAuditLog_timestamp").on(table.timestamp),
index("idx_actionAuditLog_org_timestamp").on(table.orgId, table.timestamp)
]));
export const accessAuditLog = sqliteTable("accessAuditLog", {
id: integer("id").primaryKey({ autoIncrement: true }),
timestamp: integer("timestamp").notNull(), // this is EPOCH time in seconds
orgId: text("orgId")
.notNull()
.references(() => orgs.orgId, { onDelete: "cascade" }),
actorType: text("actorType"),
actor: text("actor"),
actorId: text("actorId"),
resourceId: integer("resourceId"),
ip: text("ip"),
location: text("location"),
type: text("type").notNull(),
action: integer("action", { mode: "boolean" }).notNull(),
userAgent: text("userAgent"),
metadata: text("metadata")
}, (table) => ([
index("idx_identityAuditLog_timestamp").on(table.timestamp),
index("idx_identityAuditLog_org_timestamp").on(table.orgId, table.timestamp)
]));
export type Limit = InferSelectModel<typeof limits>;
export type Account = InferSelectModel<typeof account>;
export type Certificate = InferSelectModel<typeof certificates>;
@@ -224,3 +264,5 @@ export type RemoteExitNodeSession = InferSelectModel<
>;
export type ExitNodeOrg = InferSelectModel<typeof exitNodeOrgs>;
export type LoginPage = InferSelectModel<typeof loginPage>;
export type ActionAuditLog = InferSelectModel<typeof actionAuditLog>;
export type AccessAuditLog = InferSelectModel<typeof accessAuditLog>;

View File

@@ -1,6 +1,7 @@
import { randomUUID } from "crypto";
import { InferSelectModel } from "drizzle-orm";
import { sqliteTable, text, integer } from "drizzle-orm/sqlite-core";
import { sqliteTable, text, integer, index } from "drizzle-orm/sqlite-core";
import { no } from "zod/v4/locales";
export const domains = sqliteTable("domains", {
domainId: text("domainId").primaryKey(),
@@ -11,15 +12,41 @@ export const domains = sqliteTable("domains", {
type: text("type"), // "ns", "cname", "wildcard"
verified: integer("verified", { mode: "boolean" }).notNull().default(false),
failed: integer("failed", { mode: "boolean" }).notNull().default(false),
tries: integer("tries").notNull().default(0)
tries: integer("tries").notNull().default(0),
certResolver: text("certResolver"),
preferWildcardCert: integer("preferWildcardCert", { mode: "boolean" })
});
export const dnsRecords = sqliteTable("dnsRecords", {
id: integer("id").primaryKey({ autoIncrement: true }),
domainId: text("domainId")
.notNull()
.references(() => domains.domainId, { onDelete: "cascade" }),
recordType: text("recordType").notNull(), // "NS" | "CNAME" | "A" | "TXT"
baseDomain: text("baseDomain"),
value: text("value").notNull(),
verified: integer("verified", { mode: "boolean" }).notNull().default(false)
});
export const orgs = sqliteTable("orgs", {
orgId: text("orgId").primaryKey(),
name: text("name").notNull(),
subnet: text("subnet"),
utilitySubnet: text("utilitySubnet"), // this is the subnet for utility addresses
createdAt: text("createdAt"),
settings: text("settings") // JSON blob of org-specific settings
requireTwoFactor: integer("requireTwoFactor", { mode: "boolean" }),
maxSessionLengthHours: integer("maxSessionLengthHours"), // hours
passwordExpiryDays: integer("passwordExpiryDays"), // days
settingsLogRetentionDaysRequest: integer("settingsLogRetentionDaysRequest") // where 0 = dont keep logs and -1 = keep forever and 9001 = end of the following year
.notNull()
.default(7),
settingsLogRetentionDaysAccess: integer("settingsLogRetentionDaysAccess") // where 0 = dont keep logs and -1 = keep forever and 9001 = end of the following year
.notNull()
.default(0),
settingsLogRetentionDaysAction: integer("settingsLogRetentionDaysAction") // where 0 = dont keep logs and -1 = keep forever and 9001 = end of the following year
.notNull()
.default(0)
});
export const userDomains = sqliteTable("userDomains", {
@@ -68,8 +95,7 @@ export const sites = sqliteTable("sites", {
listenPort: integer("listenPort"),
dockerSocketEnabled: integer("dockerSocketEnabled", { mode: "boolean" })
.notNull()
.default(true),
remoteSubnets: text("remoteSubnets") // comma-separated list of subnets that this site can access
.default(true)
});
export const resources = sqliteTable("resources", {
@@ -112,9 +138,13 @@ export const resources = sqliteTable("resources", {
setHostHeader: text("setHostHeader"),
enableProxy: integer("enableProxy", { mode: "boolean" }).default(true),
skipToIdpId: integer("skipToIdpId").references(() => idp.idpId, {
onDelete: "cascade"
onDelete: "set null"
}),
headers: text("headers") // comma-separated list of headers to add to the request
headers: text("headers"), // comma-separated list of headers to add to the request
proxyProtocol: integer("proxyProtocol", { mode: "boolean" })
.notNull()
.default(false),
proxyProtocolVersion: integer("proxyProtocolVersion").default(1)
});
export const targets = sqliteTable("targets", {
@@ -142,11 +172,15 @@ export const targets = sqliteTable("targets", {
});
export const targetHealthCheck = sqliteTable("targetHealthCheck", {
targetHealthCheckId: integer("targetHealthCheckId").primaryKey({ autoIncrement: true }),
targetHealthCheckId: integer("targetHealthCheckId").primaryKey({
autoIncrement: true
}),
targetId: integer("targetId")
.notNull()
.references(() => targets.targetId, { onDelete: "cascade" }),
hcEnabled: integer("hcEnabled", { mode: "boolean" }).notNull().default(false),
hcEnabled: integer("hcEnabled", { mode: "boolean" })
.notNull()
.default(false),
hcPath: text("hcPath"),
hcScheme: text("hcScheme"),
hcMode: text("hcMode").default("http"),
@@ -156,10 +190,13 @@ export const targetHealthCheck = sqliteTable("targetHealthCheck", {
hcUnhealthyInterval: integer("hcUnhealthyInterval").default(30), // in seconds
hcTimeout: integer("hcTimeout").default(5), // in seconds
hcHeaders: text("hcHeaders"),
hcFollowRedirects: integer("hcFollowRedirects", { mode: "boolean" }).default(true),
hcFollowRedirects: integer("hcFollowRedirects", {
mode: "boolean"
}).default(true),
hcMethod: text("hcMethod").default("GET"),
hcStatus: integer("hcStatus"), // http code
hcHealth: text("hcHealth").default("unknown") // "unknown", "healthy", "unhealthy"
hcHealth: text("hcHealth").default("unknown"), // "unknown", "healthy", "unhealthy"
hcTlsServerName: text("hcTlsServerName")
});
export const exitNodes = sqliteTable("exitNodes", {
@@ -190,11 +227,41 @@ export const siteResources = sqliteTable("siteResources", {
.references(() => orgs.orgId, { onDelete: "cascade" }),
niceId: text("niceId").notNull(),
name: text("name").notNull(),
protocol: text("protocol").notNull(),
proxyPort: integer("proxyPort").notNull(),
destinationPort: integer("destinationPort").notNull(),
destinationIp: text("destinationIp").notNull(),
enabled: integer("enabled", { mode: "boolean" }).notNull().default(true)
mode: text("mode").notNull(), // "host" | "cidr" | "port"
protocol: text("protocol"), // only for port mode
proxyPort: integer("proxyPort"), // only for port mode
destinationPort: integer("destinationPort"), // only for port mode
destination: text("destination").notNull(), // ip, cidr, hostname
enabled: integer("enabled", { mode: "boolean" }).notNull().default(true),
alias: text("alias"),
aliasAddress: text("aliasAddress")
});
export const clientSiteResources = sqliteTable("clientSiteResources", {
clientId: integer("clientId")
.notNull()
.references(() => clients.clientId, { onDelete: "cascade" }),
siteResourceId: integer("siteResourceId")
.notNull()
.references(() => siteResources.siteResourceId, { onDelete: "cascade" })
});
export const roleSiteResources = sqliteTable("roleSiteResources", {
roleId: integer("roleId")
.notNull()
.references(() => roles.roleId, { onDelete: "cascade" }),
siteResourceId: integer("siteResourceId")
.notNull()
.references(() => siteResources.siteResourceId, { onDelete: "cascade" })
});
export const userSiteResources = sqliteTable("userSiteResources", {
userId: text("userId")
.notNull()
.references(() => users.userId, { onDelete: "cascade" }),
siteResourceId: integer("siteResourceId")
.notNull()
.references(() => siteResources.siteResourceId, { onDelete: "cascade" })
});
export const users = sqliteTable("user", {
@@ -222,7 +289,8 @@ export const users = sqliteTable("user", {
termsVersion: text("termsVersion"),
serverAdmin: integer("serverAdmin", { mode: "boolean" })
.notNull()
.default(false)
.default(false),
lastPasswordChange: integer("lastPasswordChange")
});
export const securityKeys = sqliteTable("webauthnCredentials", {
@@ -269,7 +337,7 @@ export const newts = sqliteTable("newt", {
});
export const clients = sqliteTable("clients", {
clientId: integer("id").primaryKey({ autoIncrement: true }),
clientId: integer("clientId").primaryKey({ autoIncrement: true }),
orgId: text("orgId")
.references(() => orgs.orgId, {
onDelete: "cascade"
@@ -278,8 +346,14 @@ export const clients = sqliteTable("clients", {
exitNodeId: integer("exitNode").references(() => exitNodes.exitNodeId, {
onDelete: "set null"
}),
userId: text("userId").references(() => users.userId, {
// optionally tied to a user and in this case delete when the user deletes
onDelete: "cascade"
}),
niceId: text("niceId").notNull(),
name: text("name").notNull(),
pubKey: text("pubKey"),
olmId: text("olmId"), // to lock it to a specific olm optionally
subnet: text("subnet").notNull(),
megabytesIn: integer("bytesIn"),
megabytesOut: integer("bytesOut"),
@@ -291,25 +365,42 @@ export const clients = sqliteTable("clients", {
lastHolePunch: integer("lastHolePunch")
});
export const clientSites = sqliteTable("clientSites", {
clientId: integer("clientId")
.notNull()
.references(() => clients.clientId, { onDelete: "cascade" }),
siteId: integer("siteId")
.notNull()
.references(() => sites.siteId, { onDelete: "cascade" }),
isRelayed: integer("isRelayed", { mode: "boolean" })
.notNull()
.default(false),
endpoint: text("endpoint")
});
export const clientSitesAssociationsCache = sqliteTable(
"clientSitesAssociationsCache",
{
clientId: integer("clientId") // not a foreign key here so after its deleted the rebuild function can delete it and send the message
.notNull(),
siteId: integer("siteId").notNull(),
isRelayed: integer("isRelayed", { mode: "boolean" })
.notNull()
.default(false),
endpoint: text("endpoint"),
publicKey: text("publicKey") // this will act as the session's public key for hole punching so we can track when it changes
}
);
export const clientSiteResourcesAssociationsCache = sqliteTable(
"clientSiteResourcesAssociationsCache",
{
clientId: integer("clientId") // not a foreign key here so after its deleted the rebuild function can delete it and send the message
.notNull(),
siteResourceId: integer("siteResourceId").notNull()
}
);
export const olms = sqliteTable("olms", {
olmId: text("id").primaryKey(),
secretHash: text("secretHash").notNull(),
dateCreated: text("dateCreated").notNull(),
version: text("version"),
agent: text("agent"),
name: text("name"),
clientId: integer("clientId").references(() => clients.clientId, {
// we will switch this depending on the current org it wants to connect to
onDelete: "set null"
}),
userId: text("userId").references(() => users.userId, {
// optionally tied to a user and in this case delete when the user deletes
onDelete: "cascade"
})
});
@@ -327,7 +418,11 @@ export const sessions = sqliteTable("session", {
userId: text("userId")
.notNull()
.references(() => users.userId, { onDelete: "cascade" }),
expiresAt: integer("expiresAt").notNull()
expiresAt: integer("expiresAt").notNull(),
issuedAt: integer("issuedAt"),
deviceAuthUsed: integer("deviceAuthUsed", { mode: "boolean" })
.notNull()
.default(false)
});
export const newtSessions = sqliteTable("newtSession", {
@@ -577,7 +672,8 @@ export const resourceSessions = sqliteTable("resourceSessions", {
{
onDelete: "cascade"
}
)
),
issuedAt: integer("issuedAt")
});
export const resourceWhitelist = sqliteTable("resourceWhitelist", {
@@ -710,6 +806,74 @@ export const idpOrg = sqliteTable("idpOrg", {
orgMapping: text("orgMapping")
});
// Blueprint runs
export const blueprints = sqliteTable("blueprints", {
blueprintId: integer("blueprintId").primaryKey({
autoIncrement: true
}),
orgId: text("orgId")
.references(() => orgs.orgId, {
onDelete: "cascade"
})
.notNull(),
name: text("name").notNull(),
source: text("source").notNull(),
createdAt: integer("createdAt").notNull(),
succeeded: integer("succeeded", { mode: "boolean" }).notNull(),
contents: text("contents").notNull(),
message: text("message")
});
export const requestAuditLog = sqliteTable(
"requestAuditLog",
{
id: integer("id").primaryKey({ autoIncrement: true }),
timestamp: integer("timestamp").notNull(), // this is EPOCH time in seconds
orgId: text("orgId").references(() => orgs.orgId, {
onDelete: "cascade"
}),
action: integer("action", { mode: "boolean" }).notNull(),
reason: integer("reason").notNull(),
actorType: text("actorType"),
actor: text("actor"),
actorId: text("actorId"),
resourceId: integer("resourceId"),
ip: text("ip"),
location: text("location"),
userAgent: text("userAgent"),
metadata: text("metadata"),
headers: text("headers"), // JSON blob
query: text("query"), // JSON blob
originalRequestURL: text("originalRequestURL"),
scheme: text("scheme"),
host: text("host"),
path: text("path"),
method: text("method"),
tls: integer("tls", { mode: "boolean" })
},
(table) => [
index("idx_requestAuditLog_timestamp").on(table.timestamp),
index("idx_requestAuditLog_org_timestamp").on(
table.orgId,
table.timestamp
)
]
);
export const deviceWebAuthCodes = sqliteTable("deviceWebAuthCodes", {
codeId: integer("codeId").primaryKey({ autoIncrement: true }),
code: text("code").notNull().unique(),
ip: text("ip"),
city: text("city"),
deviceName: text("deviceName"),
applicationName: text("applicationName").notNull(),
expiresAt: integer("expiresAt").notNull(),
createdAt: integer("createdAt").notNull(),
verified: integer("verified", { mode: "boolean" }).notNull().default(false),
userId: text("userId").references(() => users.userId, {
onDelete: "cascade"
})
});
export type Org = InferSelectModel<typeof orgs>;
export type User = InferSelectModel<typeof users>;
export type Site = InferSelectModel<typeof sites>;
@@ -746,8 +910,9 @@ export type ResourceWhitelist = InferSelectModel<typeof resourceWhitelist>;
export type VersionMigration = InferSelectModel<typeof versionMigrations>;
export type ResourceRule = InferSelectModel<typeof resourceRules>;
export type Domain = InferSelectModel<typeof domains>;
export type DnsRecord = InferSelectModel<typeof dnsRecords>;
export type Client = InferSelectModel<typeof clients>;
export type ClientSite = InferSelectModel<typeof clientSites>;
export type ClientSite = InferSelectModel<typeof clientSitesAssociationsCache>;
export type RoleClient = InferSelectModel<typeof roleClients>;
export type UserClient = InferSelectModel<typeof userClients>;
export type SupporterKey = InferSelectModel<typeof supporterKey>;
@@ -761,3 +926,9 @@ export type SetupToken = InferSelectModel<typeof setupTokens>;
export type HostMeta = InferSelectModel<typeof hostMeta>;
export type TargetHealthCheck = InferSelectModel<typeof targetHealthCheck>;
export type IdpOidcConfig = InferSelectModel<typeof idpOidcConfig>;
export type Blueprint = InferSelectModel<typeof blueprints>;
export type LicenseKey = InferSelectModel<typeof licenseKey>;
export type SecurityKey = InferSelectModel<typeof securityKeys>;
export type WebauthnChallenge = InferSelectModel<typeof webauthnChallenge>;
export type RequestAuditLog = InferSelectModel<typeof requestAuditLog>;
export type DeviceWebAuthCode = InferSelectModel<typeof deviceWebAuthCodes>;

View File

@@ -0,0 +1,56 @@
import React from "react";
import { Body, Head, Html, Preview, Tailwind } from "@react-email/components";
import { themeColors } from "./lib/theme";
import {
EmailContainer,
EmailGreeting,
EmailLetterHead,
EmailText
} from "./components/Email";
interface SupportEmailProps {
email: string;
username: string;
subject: string;
body: string;
}
export const SupportEmail = ({
username,
email,
body,
subject
}: SupportEmailProps) => {
const previewText = subject;
return (
<Html>
<Head />
<Preview>{previewText}</Preview>
<Tailwind config={themeColors}>
<Body className="font-sans bg-gray-50">
<EmailContainer>
<EmailLetterHead />
<EmailGreeting>Hi support,</EmailGreeting>
<EmailText>
You have received a new support request from{" "}
<strong>{username}</strong> ({email}).
</EmailText>
<EmailText>
<strong>Subject:</strong> {subject}
</EmailText>
<EmailText>
<strong>Message:</strong> {body}
</EmailText>
</EmailContainer>
</Body>
</Tailwind>
</Html>
);
};
export default SupportEmail;

View File

@@ -88,7 +88,7 @@ export const WelcomeQuickStart = ({
To learn how to use Newt, including more
installation methods, visit the{" "}
<a
href="https://docs.digpangolin.com/manage/sites/install-site"
href="https://docs.pangolin.net/manage/sites/install-site"
className="underline"
>
docs

View File

@@ -89,7 +89,7 @@ export function EmailFooter({ children }: { children: React.ReactNode }) {
<p className="text-xs text-gray-400 mt-4">
For any questions or support, please contact us at:
<br />
support@fossorial.io
support@pangolin.net
</p>
<p className="text-xs text-gray-300 text-center mt-4">
&copy; {new Date().getFullYear()} Fossorial, Inc. All

View File

@@ -5,21 +5,24 @@ import { runSetupFunctions } from "./setup";
import { createApiServer } from "./apiServer";
import { createNextServer } from "./nextServer";
import { createInternalServer } from "./internalServer";
import { createIntegrationApiServer } from "./integrationApiServer";
import {
ApiKey,
ApiKeyOrg,
RemoteExitNode,
Session,
SiteResource,
User,
UserOrg
} from "@server/db";
import { createIntegrationApiServer } from "./integrationApiServer";
import config from "@server/lib/config";
import { setHostMeta } from "@server/lib/hostMeta";
import { initTelemetryClient } from "./lib/telemetry.js";
import { TraefikConfigManager } from "./lib/traefik/TraefikConfigManager.js";
import { initTelemetryClient } from "@server/lib/telemetry";
import { TraefikConfigManager } from "@server/lib/traefik/TraefikConfigManager";
import { initCleanup } from "#dynamic/cleanup";
import license from "#dynamic/license/license";
import { initLogCleanupInterval } from "@server/lib/cleanupLogs";
import { fetchServerIp } from "@server/lib/serverIpService";
async function startServers() {
await setHostMeta();
@@ -31,14 +34,17 @@ async function startServers() {
await runSetupFunctions();
await fetchServerIp();
initTelemetryClient();
initLogCleanupInterval();
// Start all servers
const apiServer = createApiServer();
const internalServer = createInternalServer();
let nextServer;
nextServer = await createNextServer();
const nextServer = await createNextServer();
if (config.getRawConfig().traefik.file_mode) {
const monitor = new TraefikConfigManager();
await monitor.start();
@@ -72,6 +78,8 @@ declare global {
userOrgId?: string;
userOrgIds?: string[];
remoteExitNode?: RemoteExitNode;
siteResource?: SiteResource;
orgPolicyAllowed?: boolean;
}
}
}

View File

@@ -1,8 +1,8 @@
export async function getOrgTierData(
orgId: string
): Promise<{ tier: string | null; active: boolean }> {
let tier = null;
let active = false;
const tier = null;
const active = false;
return { tier, active };
}

View File

@@ -1,5 +1,4 @@
import { eq, sql, and } from "drizzle-orm";
import NodeCache from "node-cache";
import { v4 as uuidv4 } from "uuid";
import { PutObjectCommand } from "@aws-sdk/client-s3";
import * as fs from "fs/promises";
@@ -20,6 +19,7 @@ import logger from "@server/logger";
import { sendToClient } from "#dynamic/routers/ws";
import { build } from "@server/build";
import { s3Client } from "@server/lib/s3";
import cache from "@server/lib/cache";
interface StripeEvent {
identifier?: string;
@@ -43,7 +43,6 @@ export function noop() {
}
export class UsageService {
private cache: NodeCache;
private bucketName: string | undefined;
private currentEventFile: string | null = null;
private currentFileStartTime: number = 0;
@@ -51,7 +50,6 @@ export class UsageService {
private uploadingFiles: Set<string> = new Set();
constructor() {
this.cache = new NodeCache({ stdTTL: 300 }); // 5 minute TTL
if (noop()) {
return;
}
@@ -399,7 +397,7 @@ export class UsageService {
featureId: FeatureId
): Promise<string | null> {
const cacheKey = `customer_${orgId}_${featureId}`;
const cached = this.cache.get<string>(cacheKey);
const cached = cache.get<string>(cacheKey);
if (cached) {
return cached;
@@ -422,7 +420,7 @@ export class UsageService {
const customerId = customer.customerId;
// Cache the result
this.cache.set(cacheKey, customerId);
cache.set(cacheKey, customerId, 300); // 5 minute TTL
return customerId;
} catch (error) {
@@ -612,7 +610,8 @@ export class UsageService {
public async getUsage(
orgId: string,
featureId: FeatureId
featureId: FeatureId,
trx: Transaction | typeof db = db
): Promise<Usage | null> {
if (noop()) {
return null;
@@ -621,7 +620,7 @@ export class UsageService {
const usageId = `${orgId}-${featureId}`;
try {
const [result] = await db
const [result] = await trx
.select()
.from(usage)
.where(eq(usage.usageId, usageId))
@@ -635,7 +634,7 @@ export class UsageService {
const meterId = getFeatureMeterId(featureId);
try {
const [newUsage] = await db
const [newUsage] = await trx
.insert(usage)
.values({
usageId,
@@ -652,7 +651,7 @@ export class UsageService {
return newUsage;
} else {
// Record was created by another process, fetch it
const [existingUsage] = await db
const [existingUsage] = await trx
.select()
.from(usage)
.where(eq(usage.usageId, usageId))
@@ -665,7 +664,7 @@ export class UsageService {
`Insert failed for ${orgId}/${featureId}, attempting to fetch existing record:`,
insertError
);
const [existingUsage] = await db
const [existingUsage] = await trx
.select()
.from(usage)
.where(eq(usage.usageId, usageId))
@@ -699,10 +698,6 @@ export class UsageService {
await this.uploadFileToS3();
}
public clearCache(): void {
this.cache.flushAll();
}
/**
* Scan the events directory for files older than 1 minute and upload them if not empty.
*/
@@ -812,7 +807,8 @@ export class UsageService {
orgId: string,
kickSites = false,
featureId?: FeatureId,
usage?: Usage
usage?: Usage,
trx: Transaction | typeof db = db
): Promise<boolean> {
if (noop()) {
return false;
@@ -825,7 +821,7 @@ export class UsageService {
let orgLimits: Limit[] = [];
if (featureId) {
// Get all limits set for this organization
orgLimits = await db
orgLimits = await trx
.select()
.from(limits)
.where(
@@ -836,7 +832,7 @@ export class UsageService {
);
} else {
// Get all limits set for this organization
orgLimits = await db
orgLimits = await trx
.select()
.from(limits)
.where(eq(limits.orgId, orgId));
@@ -855,7 +851,8 @@ export class UsageService {
} else {
currentUsage = await this.getUsage(
orgId,
limit.featureId as FeatureId
limit.featureId as FeatureId,
trx
);
}
@@ -890,7 +887,7 @@ export class UsageService {
);
// Get all sites for this organization
const orgSites = await db
const orgSites = await trx
.select()
.from(sites)
.where(eq(sites.orgId, orgId));
@@ -902,7 +899,7 @@ export class UsageService {
// Send termination messages to newt sites
for (const site of orgSites) {
if (site.type === "newt") {
const [newt] = await db
const [newt] = await trx
.select()
.from(newts)
.where(eq(newts.siteId, site.siteId))
@@ -917,7 +914,7 @@ export class UsageService {
};
// Don't await to prevent blocking
sendToClient(newt.newtId, payload).catch(
await sendToClient(newt.newtId, payload).catch(
(error: any) => {
logger.error(
`Failed to send termination message to newt ${newt.newtId}:`,

View File

@@ -1,22 +1,36 @@
import { db, newts, Target } from "@server/db";
import { db, newts, blueprints, Blueprint } from "@server/db";
import { Config, ConfigSchema } from "./types";
import { ProxyResourcesResults, updateProxyResources } from "./proxyResources";
import { fromError } from "zod-validation-error";
import logger from "@server/logger";
import { resources, targets, sites } from "@server/db";
import { eq, and, asc, or, ne, count, isNotNull } from "drizzle-orm";
import { sites } from "@server/db";
import { eq, and, isNotNull } from "drizzle-orm";
import { addTargets as addProxyTargets } from "@server/routers/newt/targets";
import { addTargets as addClientTargets } from "@server/routers/client/targets";
import {
ClientResourcesResults,
updateClientResources
} from "./clientResources";
import { BlueprintSource } from "@server/routers/blueprints/types";
import { stringify as stringifyYaml } from "yaml";
import { faker } from "@faker-js/faker";
import { handleMessagingForUpdatedSiteResource } from "@server/routers/siteResource";
export async function applyBlueprint(
orgId: string,
configData: unknown,
siteId?: number
): Promise<void> {
type ApplyBlueprintArgs = {
orgId: string;
configData: unknown;
name?: string;
siteId?: number;
source?: BlueprintSource;
};
export async function applyBlueprint({
orgId,
configData,
siteId,
name,
source = "API"
}: ApplyBlueprintArgs): Promise<Blueprint> {
// Validate the input data
const validationResult = ConfigSchema.safeParse(configData);
if (!validationResult.success) {
@@ -24,6 +38,9 @@ export async function applyBlueprint(
}
const config: Config = validationResult.data;
let blueprintSucceeded: boolean = false;
let blueprintMessage: string;
let error: any | null = null;
try {
let proxyResourcesResults: ProxyResourcesResults = [];
@@ -41,22 +58,63 @@ export async function applyBlueprint(
trx,
siteId
);
});
logger.debug(
`Successfully updated proxy resources for org ${orgId}: ${JSON.stringify(proxyResourcesResults)}`
);
logger.debug(
`Successfully updated proxy resources for org ${orgId}: ${JSON.stringify(proxyResourcesResults)}`
);
// We need to update the targets on the newts from the successfully updated information
for (const result of proxyResourcesResults) {
for (const target of result.targetsToUpdate) {
const [site] = await db
// We need to update the targets on the newts from the successfully updated information
for (const result of proxyResourcesResults) {
for (const target of result.targetsToUpdate) {
const [site] = await trx
.select()
.from(sites)
.innerJoin(newts, eq(sites.siteId, newts.siteId))
.where(
and(
eq(sites.siteId, target.siteId),
eq(sites.orgId, orgId),
eq(sites.type, "newt"),
isNotNull(sites.pubKey)
)
)
.limit(1);
if (site) {
logger.debug(
`Updating target ${target.targetId} on site ${site.sites.siteId}`
);
// see if you can find a matching target health check from the healthchecksToUpdate array
const matchingHealthcheck =
result.healthchecksToUpdate.find(
(hc) => hc.targetId === target.targetId
);
await addProxyTargets(
site.newt.newtId,
[target],
matchingHealthcheck ? [matchingHealthcheck] : [],
result.proxyResource.protocol,
result.proxyResource.proxyPort
);
}
}
}
logger.debug(
`Successfully updated client resources for org ${orgId}: ${JSON.stringify(clientResourcesResults)}`
);
// We need to update the targets on the newts from the successfully updated information
for (const result of clientResourcesResults) {
const [site] = await trx
.select()
.from(sites)
.innerJoin(newts, eq(sites.siteId, newts.siteId))
.where(
and(
eq(sites.siteId, target.siteId),
eq(sites.siteId, result.newSiteResource.siteId),
eq(sites.orgId, orgId),
eq(sites.type, "newt"),
isNotNull(sites.pubKey)
@@ -64,114 +122,67 @@ export async function applyBlueprint(
)
.limit(1);
if (site) {
if (!site) {
logger.debug(
`Updating target ${target.targetId} on site ${site.sites.siteId}`
);
// see if you can find a matching target health check from the healthchecksToUpdate array
const matchingHealthcheck =
result.healthchecksToUpdate.find(
(hc) => hc.targetId === target.targetId
);
await addProxyTargets(
site.newt.newtId,
[target],
matchingHealthcheck ? [matchingHealthcheck] : [],
result.proxyResource.protocol,
result.proxyResource.proxyPort
`No newt site found for client resource ${result.newSiteResource.siteResourceId}, skipping target update`
);
continue;
}
}
}
logger.debug(
`Successfully updated client resources for org ${orgId}: ${JSON.stringify(clientResourcesResults)}`
);
// We need to update the targets on the newts from the successfully updated information
for (const result of clientResourcesResults) {
const [site] = await db
.select()
.from(sites)
.innerJoin(newts, eq(sites.siteId, newts.siteId))
.where(
and(
eq(sites.siteId, result.resource.siteId),
eq(sites.orgId, orgId),
eq(sites.type, "newt"),
isNotNull(sites.pubKey)
)
)
.limit(1);
if (site) {
logger.debug(
`Updating client resource ${result.resource.siteResourceId} on site ${site.sites.siteId}`
`Updating client resource ${result.newSiteResource.siteResourceId} on site ${site.sites.siteId}`
);
await addClientTargets(
site.newt.newtId,
result.resource.destinationIp,
result.resource.destinationPort,
result.resource.protocol,
result.resource.proxyPort
await handleMessagingForUpdatedSiteResource(
result.oldSiteResource,
result.newSiteResource,
{ siteId: site.sites.siteId, orgId: site.sites.orgId },
trx
);
// await addClientTargets(
// site.newt.newtId,
// result.resource.destination,
// result.resource.destinationPort,
// result.resource.protocol,
// result.resource.proxyPort
// );
}
}
} catch (error) {
logger.error(`Failed to update database from config: ${error}`);
throw error;
}
}
});
// await updateDatabaseFromConfig("org_i21aifypnlyxur2", {
// resources: {
// "resource-nice-id": {
// name: "this is my resource",
// protocol: "http",
// "full-domain": "level1.test.example.com",
// "host-header": "example.com",
// "tls-server-name": "example.com",
// auth: {
// pincode: 123456,
// password: "sadfasdfadsf",
// "sso-enabled": true,
// "sso-roles": ["Member"],
// "sso-users": ["owen@fossorial.io"],
// "whitelist-users": ["owen@fossorial.io"]
// },
// targets: [
// {
// site: "glossy-plains-viscacha-rat",
// hostname: "localhost",
// method: "http",
// port: 8000,
// healthcheck: {
// port: 8000,
// hostname: "localhost"
// }
// },
// {
// site: "glossy-plains-viscacha-rat",
// hostname: "localhost",
// method: "http",
// port: 8001
// }
// ]
// },
// "resource-nice-id2": {
// name: "http server",
// protocol: "tcp",
// "proxy-port": 3000,
// targets: [
// {
// site: "glossy-plains-viscacha-rat",
// hostname: "localhost",
// port: 3000,
// }
// ]
// }
// }
// });
blueprintSucceeded = true;
blueprintMessage = "Blueprint applied successfully";
} catch (err) {
blueprintSucceeded = false;
blueprintMessage = `Blueprint applied with errors: ${err}`;
logger.error(blueprintMessage);
error = err;
}
let blueprint: Blueprint | null = null;
await db.transaction(async (trx) => {
const newBlueprint = await trx
.insert(blueprints)
.values({
orgId,
name:
name ??
`${faker.word.adjective()} ${faker.word.adjective()} ${faker.word.noun()}`,
contents: stringifyYaml(configData),
createdAt: Math.floor(Date.now() / 1000),
succeeded: blueprintSucceeded,
message: blueprintMessage,
source
})
.returning();
blueprint = newBlueprint[0];
});
if (!blueprint || (source !== "UI" && !blueprintSucceeded)) {
// ^^^^^^^^^^^^^^^ The UI considers a failed blueprint as a valid response
throw error ?? "Unknown Server Error";
}
return blueprint;
}

View File

@@ -29,15 +29,29 @@ export async function applyNewtDockerBlueprint(
logger.debug(`Received Docker blueprint: ${JSON.stringify(blueprint)}`);
// make sure this is not an empty object
if (isEmptyObject(blueprint)) {
return;
}
if (isEmptyObject(blueprint["proxy-resources"]) && isEmptyObject(blueprint["client-resources"])) {
return;
}
// Update the blueprint in the database
await applyBlueprint(site.orgId, blueprint, site.siteId);
await applyBlueprint({
orgId: site.orgId,
configData: blueprint,
siteId: site.siteId,
source: "NEWT"
});
} catch (error) {
logger.error(`Failed to update database from config: ${error}`);
await sendToClient(newtId, {
type: "newt/blueprint/results",
data: {
success: false,
message: `Failed to update database from config: ${error}`
message: `Failed to apply blueprint from config: ${error}`
}
});
return;
@@ -51,3 +65,10 @@ export async function applyNewtDockerBlueprint(
}
});
}
function isEmptyObject(obj: any) {
if (obj === null || obj === undefined) {
return true;
}
return Object.keys(obj).length === 0 && obj.constructor === Object;
}

View File

@@ -1,17 +1,23 @@
import {
clients,
clientSiteResources,
roles,
roleSiteResources,
SiteResource,
siteResources,
Transaction,
userOrgs,
users,
userSiteResources
} from "@server/db";
import { sites } from "@server/db";
import { eq, and } from "drizzle-orm";
import {
Config,
} from "./types";
import { eq, and, ne, inArray } from "drizzle-orm";
import { Config } from "./types";
import logger from "@server/logger";
export type ClientResourcesResults = {
resource: SiteResource;
newSiteResource: SiteResource;
oldSiteResource?: SiteResource;
}[];
export async function updateClientResources(
@@ -69,16 +75,22 @@ export async function updateClientResources(
}
if (existingResource) {
if (existingResource.siteId !== site.siteId) {
throw new Error(
`You can not change the site of an existing client resource (${resourceNiceId}). Please delete and recreate it instead.`
);
}
// Update existing resource
const [updatedResource] = await trx
.update(siteResources)
.set({
name: resourceData.name || resourceNiceId,
siteId: site.siteId,
proxyPort: resourceData["proxy-port"]!,
destinationIp: resourceData.hostname,
destinationPort: resourceData["internal-port"],
protocol: resourceData.protocol
mode: resourceData.mode,
destination: resourceData.destination,
enabled: true, // hardcoded for now
// enabled: resourceData.enabled ?? true,
alias: resourceData.alias || null
})
.where(
eq(
@@ -88,7 +100,110 @@ export async function updateClientResources(
)
.returning();
results.push({ resource: updatedResource });
const siteResourceId = existingResource.siteResourceId;
const orgId = existingResource.orgId;
await trx
.delete(clientSiteResources)
.where(eq(clientSiteResources.siteResourceId, siteResourceId));
if (resourceData.machines.length > 0) {
// get clientIds from niceIds
const clientsToUpdate = await trx
.select()
.from(clients)
.where(
and(
inArray(clients.niceId, resourceData.machines),
eq(clients.orgId, orgId)
)
);
const clientIds = clientsToUpdate.map(
(client) => client.clientId
);
await trx.insert(clientSiteResources).values(
clientIds.map((clientId) => ({
clientId,
siteResourceId
}))
);
}
await trx
.delete(userSiteResources)
.where(eq(userSiteResources.siteResourceId, siteResourceId));
if (resourceData.users.length > 0) {
// get userIds from username
const usersToUpdate = await trx
.select()
.from(users)
.innerJoin(userOrgs, eq(users.userId, userOrgs.userId))
.where(
and(
inArray(users.username, resourceData.users),
eq(userOrgs.orgId, orgId)
)
);
const userIds = usersToUpdate.map((user) => user.user.userId);
await trx
.insert(userSiteResources)
.values(
userIds.map((userId) => ({ userId, siteResourceId }))
);
}
// Get all admin role IDs for this org to exclude from deletion
const adminRoles = await trx
.select()
.from(roles)
.where(and(eq(roles.isAdmin, true), eq(roles.orgId, orgId)));
const adminRoleIds = adminRoles.map((role) => role.roleId);
if (adminRoleIds.length > 0) {
await trx.delete(roleSiteResources).where(
and(
eq(roleSiteResources.siteResourceId, siteResourceId),
ne(roleSiteResources.roleId, adminRoleIds[0]) // delete all but the admin role
)
);
} else {
await trx
.delete(roleSiteResources)
.where(
eq(roleSiteResources.siteResourceId, siteResourceId)
);
}
if (resourceData.roles.length > 0) {
// Re-add specified roles but we need to get the roleIds from the role name in the array
const rolesToUpdate = await trx
.select()
.from(roles)
.where(
and(
eq(roles.orgId, orgId),
inArray(roles.name, resourceData.roles)
)
);
const roleIds = rolesToUpdate.map((role) => role.roleId);
await trx
.insert(roleSiteResources)
.values(
roleIds.map((roleId) => ({ roleId, siteResourceId }))
);
}
results.push({
newSiteResource: updatedResource,
oldSiteResource: existingResource
});
} else {
// Create new resource
const [newResource] = await trx
@@ -98,18 +213,103 @@ export async function updateClientResources(
siteId: site.siteId,
niceId: resourceNiceId,
name: resourceData.name || resourceNiceId,
proxyPort: resourceData["proxy-port"]!,
destinationIp: resourceData.hostname,
destinationPort: resourceData["internal-port"],
protocol: resourceData.protocol
mode: resourceData.mode,
destination: resourceData.destination,
enabled: true, // hardcoded for now
// enabled: resourceData.enabled ?? true,
alias: resourceData.alias || null
})
.returning();
const siteResourceId = newResource.siteResourceId;
const [adminRole] = await trx
.select()
.from(roles)
.where(and(eq(roles.isAdmin, true), eq(roles.orgId, orgId)))
.limit(1);
if (!adminRole) {
throw new Error(`Admin role not found for org ${orgId}`);
}
await trx.insert(roleSiteResources).values({
roleId: adminRole.roleId,
siteResourceId: siteResourceId
});
if (resourceData.roles.length > 0) {
// get roleIds from role names
const rolesToUpdate = await trx
.select()
.from(roles)
.where(
and(
eq(roles.orgId, orgId),
inArray(roles.name, resourceData.roles)
)
);
const roleIds = rolesToUpdate.map((role) => role.roleId);
await trx
.insert(roleSiteResources)
.values(
roleIds.map((roleId) => ({ roleId, siteResourceId }))
);
}
if (resourceData.users.length > 0) {
// get userIds from username
const usersToUpdate = await trx
.select()
.from(users)
.innerJoin(userOrgs, eq(users.userId, userOrgs.userId))
.where(
and(
inArray(users.username, resourceData.users),
eq(userOrgs.orgId, orgId)
)
);
const userIds = usersToUpdate.map((user) => user.user.userId);
await trx
.insert(userSiteResources)
.values(
userIds.map((userId) => ({ userId, siteResourceId }))
);
}
if (resourceData.machines.length > 0) {
// get clientIds from niceIds
const clientsToUpdate = await trx
.select()
.from(clients)
.where(
and(
inArray(clients.niceId, resourceData.machines),
eq(clients.orgId, orgId)
)
);
const clientIds = clientsToUpdate.map(
(client) => client.clientId
);
await trx.insert(clientSiteResources).values(
clientIds.map((clientId) => ({
clientId,
siteResourceId
}))
);
}
logger.info(
`Created new client resource ${newResource.name} (${newResource.siteResourceId}) for org ${orgId}`
);
results.push({ resource: newResource });
results.push({ newSiteResource: newResource });
}
}

View File

@@ -87,8 +87,8 @@ export function convertValue(value: string): any {
// "resources.resource-nice-id.auth.password": "sadfasdfadsf",
// "resources.resource-nice-id.auth.sso-enabled": "true",
// "resources.resource-nice-id.auth.sso-roles[0]": "Member",
// "resources.resource-nice-id.auth.sso-users[0]": "owen@fossorial.io",
// "resources.resource-nice-id.auth.whitelist-users[0]": "owen@fossorial.io",
// "resources.resource-nice-id.auth.sso-users[0]": "owen@pangolin.net",
// "resources.resource-nice-id.auth.whitelist-users[0]": "owen@pangolin.net",
// "resources.resource-nice-id.targets[0].hostname": "localhost",
// "resources.resource-nice-id.targets[0].method": "http",
// "resources.resource-nice-id.targets[0].port": "8000",

View File

@@ -30,6 +30,7 @@ import { pickPort } from "@server/routers/target/helpers";
import { resourcePassword } from "@server/db";
import { hashPassword } from "@server/auth/password";
import { isValidCIDR, isValidIP, isValidUrlGlobPattern } from "../validators";
import { get } from "http";
export type ProxyResourcesResults = {
proxyResource: Resource;
@@ -114,7 +115,12 @@ export async function updateProxyResources(
internalPort: internalPortToCreate,
path: targetData.path,
pathMatchType: targetData["path-match"],
rewritePath: targetData.rewritePath,
rewritePath:
targetData.rewritePath ||
targetData["rewrite-path"] ||
(targetData["rewrite-match"] === "stripPrefix"
? "/"
: undefined),
rewritePathType: targetData["rewrite-match"],
priority: targetData.priority
})
@@ -139,10 +145,14 @@ export async function updateProxyResources(
hcHostname: healthcheckData?.hostname,
hcPort: healthcheckData?.port,
hcInterval: healthcheckData?.interval,
hcUnhealthyInterval: healthcheckData?.unhealthyInterval,
hcUnhealthyInterval:
healthcheckData?.unhealthyInterval ||
healthcheckData?.["unhealthy-interval"],
hcTimeout: healthcheckData?.timeout,
hcHeaders: hcHeaders,
hcFollowRedirects: healthcheckData?.followRedirects,
hcFollowRedirects:
healthcheckData?.followRedirects ||
healthcheckData?.["follow-redirects"],
hcMethod: healthcheckData?.method,
hcStatus: healthcheckData?.status,
hcHealth: "unknown"
@@ -211,6 +221,8 @@ export async function updateProxyResources(
domainId: domain ? domain.domainId : null,
enabled: resourceEnabled,
sso: resourceData.auth?.["sso-enabled"] || false,
skipToIdpId:
resourceData.auth?.["auto-login-idp"] || null,
ssl: resourceSsl,
setHostHeader: resourceData["host-header"] || null,
tlsServerName: resourceData["tls-server-name"] || null,
@@ -392,7 +404,12 @@ export async function updateProxyResources(
enabled: targetData.enabled,
path: targetData.path,
pathMatchType: targetData["path-match"],
rewritePath: targetData.rewritePath,
rewritePath:
targetData.rewritePath ||
targetData["rewrite-path"] ||
(targetData["rewrite-match"] === "stripPrefix"
? "/"
: undefined),
rewritePathType: targetData["rewrite-match"],
priority: targetData.priority
})
@@ -452,10 +469,13 @@ export async function updateProxyResources(
hcPort: healthcheckData?.port,
hcInterval: healthcheckData?.interval,
hcUnhealthyInterval:
healthcheckData?.unhealthyInterval,
healthcheckData?.unhealthyInterval ||
healthcheckData?.["unhealthy-interval"],
hcTimeout: healthcheckData?.timeout,
hcHeaders: hcHeaders,
hcFollowRedirects: healthcheckData?.followRedirects,
hcFollowRedirects:
healthcheckData?.followRedirects ||
healthcheckData?.["follow-redirects"],
hcMethod: healthcheckData?.method,
hcStatus: healthcheckData?.status
})
@@ -527,7 +547,8 @@ export async function updateProxyResources(
if (
existingRule.action !== getRuleAction(rule.action) ||
existingRule.match !== rule.match.toUpperCase() ||
existingRule.value !== rule.value
existingRule.value !==
getRuleValue(rule.match.toUpperCase(), rule.value)
) {
validateRule(rule);
await trx
@@ -535,7 +556,10 @@ export async function updateProxyResources(
.set({
action: getRuleAction(rule.action),
match: rule.match.toUpperCase(),
value: rule.value
value: getRuleValue(
rule.match.toUpperCase(),
rule.value
)
})
.where(
eq(resourceRules.ruleId, existingRule.ruleId)
@@ -547,7 +571,10 @@ export async function updateProxyResources(
resourceId: existingResource.resourceId,
action: getRuleAction(rule.action),
match: rule.match.toUpperCase(),
value: rule.value,
value: getRuleValue(
rule.match.toUpperCase(),
rule.value
),
priority: index + 1 // start priorities at 1
});
}
@@ -592,6 +619,7 @@ export async function updateProxyResources(
domainId: domain ? domain.domainId : null,
enabled: resourceEnabled,
sso: resourceData.auth?.["sso-enabled"] || false,
skipToIdpId: resourceData.auth?.["auto-login-idp"] || null,
setHostHeader: resourceData["host-header"] || null,
tlsServerName: resourceData["tls-server-name"] || null,
ssl: resourceSsl,
@@ -705,7 +733,7 @@ export async function updateProxyResources(
resourceId: newResource.resourceId,
action: getRuleAction(rule.action),
match: rule.match.toUpperCase(),
value: rule.value,
value: getRuleValue(rule.match.toUpperCase(), rule.value),
priority: index + 1 // start priorities at 1
});
}
@@ -735,6 +763,14 @@ function getRuleAction(input: string) {
return action;
}
function getRuleValue(match: string, value: string) {
// if the match is a country, uppercase the value
if (match == "COUNTRY") {
return value.toUpperCase();
}
return value;
}
function validateRule(rule: any) {
if (rule.match === "cidr") {
if (!isValidCIDR(rule.value)) {
@@ -763,10 +799,6 @@ async function syncRoleResources(
.where(eq(roleResources.resourceId, resourceId));
for (const roleName of ssoRoles) {
if (roleName === "Admin") {
continue; // never add admin access
}
const [role] = await trx
.select()
.from(roles)
@@ -777,6 +809,10 @@ async function syncRoleResources(
throw new Error(`Role not found: ${roleName} in org ${orgId}`);
}
if (role.isAdmin) {
continue; // never add admin access
}
const existingRoleResource = existingRoleResources.find(
(rr) => rr.roleId === role.roleId
);
@@ -824,16 +860,16 @@ async function syncUserResources(
.from(userResources)
.where(eq(userResources.resourceId, resourceId));
for (const email of ssoUsers) {
for (const username of ssoUsers) {
const [user] = await trx
.select()
.from(users)
.innerJoin(userOrgs, eq(users.userId, userOrgs.userId))
.where(and(eq(users.email, email), eq(userOrgs.orgId, orgId)))
.where(and(eq(users.username, username), eq(userOrgs.orgId, orgId)))
.limit(1);
if (!user) {
throw new Error(`User not found: ${email} in org ${orgId}`);
throw new Error(`User not found: ${username} in org ${orgId}`);
}
const existingUserResource = existingUserResources.find(
@@ -861,7 +897,11 @@ async function syncUserResources(
)
.limit(1);
if (user && user.user.email && !ssoUsers.includes(user.user.email)) {
if (
user &&
user.user.username &&
!ssoUsers.includes(user.user.username)
) {
await trx
.delete(userResources)
.where(
@@ -1046,7 +1086,7 @@ async function getDomainId(
// remove the base domain of the domain
let subdomain = null;
if (domainSelection.type == "ns") {
if (domainSelection.type == "ns" || domainSelection.type == "wildcard") {
if (fullDomain != baseDomain) {
subdomain = fullDomain.replace(`.${baseDomain}`, "");
}

View File

@@ -7,18 +7,24 @@ export const SiteSchema = z.object({
export const TargetHealthCheckSchema = z.object({
hostname: z.string(),
port: z.number().int().min(1).max(65535),
port: z.int().min(1).max(65535),
enabled: z.boolean().optional().default(true),
path: z.string().optional(),
path: z.string().optional().default("/"),
scheme: z.string().optional(),
mode: z.string().default("http"),
interval: z.number().int().default(30),
unhealthyInterval: z.number().int().default(30),
timeout: z.number().int().default(5),
headers: z.array(z.object({ name: z.string(), value: z.string() })).nullable().optional().default(null),
followRedirects: z.boolean().default(true),
interval: z.int().default(30),
"unhealthy-interval": z.int().default(30),
unhealthyInterval: z.int().optional(), // deprecated alias
timeout: z.int().default(5),
headers: z
.array(z.object({ name: z.string(), value: z.string() }))
.nullable()
.optional()
.default(null),
"follow-redirects": z.boolean().default(true),
followRedirects: z.boolean().optional(), // deprecated alias
method: z.string().default("GET"),
status: z.number().int().optional()
status: z.int().optional()
});
// Schema for individual target within a resource
@@ -26,15 +32,19 @@ export const TargetSchema = z.object({
site: z.string().optional(),
method: z.enum(["http", "https", "h2c"]).optional(),
hostname: z.string(),
port: z.number().int().min(1).max(65535),
port: z.int().min(1).max(65535),
enabled: z.boolean().optional().default(true),
"internal-port": z.number().int().min(1).max(65535).optional(),
"internal-port": z.int().min(1).max(65535).optional(),
path: z.string().optional(),
"path-match": z.enum(["exact", "prefix", "regex"]).optional().nullable(),
healthcheck: TargetHealthCheckSchema.optional(),
rewritePath: z.string().optional(),
"rewrite-match": z.enum(["exact", "prefix", "regex", "stripPrefix"]).optional().nullable(),
priority: z.number().int().min(1).max(1000).optional().default(100)
rewritePath: z.string().optional(), // deprecated alias
"rewrite-path": z.string().optional(),
"rewrite-match": z
.enum(["exact", "prefix", "regex", "stripPrefix"])
.optional()
.nullable(),
priority: z.int().min(1).max(1000).optional().default(100)
});
export type TargetData = z.infer<typeof TargetSchema>;
@@ -42,20 +52,23 @@ export const AuthSchema = z.object({
// pincode has to have 6 digits
pincode: z.number().min(100000).max(999999).optional(),
password: z.string().min(1).optional(),
"basic-auth": z.object({
user: z.string().min(1),
password: z.string().min(1)
}).optional(),
"basic-auth": z
.object({
user: z.string().min(1),
password: z.string().min(1)
})
.optional(),
"sso-enabled": z.boolean().optional().default(false),
"sso-roles": z
.array(z.string())
.optional()
.default([])
.refine((roles) => !roles.includes("Admin"), {
message: "Admin role cannot be included in sso-roles"
error: "Admin role cannot be included in sso-roles"
}),
"sso-users": z.array(z.string().email()).optional().default([]),
"whitelist-users": z.array(z.string().email()).optional().default([]),
"sso-users": z.array(z.email()).optional().default([]),
"whitelist-users": z.array(z.email()).optional().default([]),
"auto-login-idp": z.int().positive().optional()
});
export const RuleSchema = z.object({
@@ -76,7 +89,7 @@ export const ResourceSchema = z
protocol: z.enum(["http", "tcp", "udp"]).optional(),
ssl: z.boolean().optional(),
"full-domain": z.string().optional(),
"proxy-port": z.number().int().min(1).max(65535).optional(),
"proxy-port": z.int().min(1).max(65535).optional(),
enabled: z.boolean().optional(),
targets: z.array(TargetSchema.nullable()).optional().default([]),
auth: AuthSchema.optional(),
@@ -97,9 +110,8 @@ export const ResourceSchema = z
);
},
{
message:
"Resource must either be targets-only (only 'targets' field) or have both 'name' and 'protocol' fields at a minimum",
path: ["name", "protocol"]
path: ["name", "protocol"],
error: "Resource must either be targets-only (only 'targets' field) or have both 'name' and 'protocol' fields at a minimum"
}
)
.refine(
@@ -114,6 +126,19 @@ export const ResourceSchema = z
(target) => target == null || target.method !== undefined
);
}
return true;
},
{
path: ["targets"],
error: "When protocol is 'http', all targets must have a 'method' field"
}
)
.refine(
(resource) => {
if (isTargetsOnlyResource(resource)) {
return true;
}
// If protocol is tcp or udp, no target should have method field
if (resource.protocol === "tcp" || resource.protocol === "udp") {
return resource.targets.every(
@@ -122,19 +147,9 @@ export const ResourceSchema = z
}
return true;
},
(resource) => {
if (resource.protocol === "http") {
return {
message:
"When protocol is 'http', all targets must have a 'method' field",
path: ["targets"]
};
}
return {
message:
"When protocol is 'tcp' or 'udp', targets must not have a 'method' field",
path: ["targets"]
};
{
path: ["targets"],
error: "When protocol is 'tcp' or 'udp', targets must not have a 'method' field"
}
)
.refine(
@@ -153,9 +168,8 @@ export const ResourceSchema = z
return true;
},
{
message:
"When protocol is 'http', a 'full-domain' must be provided",
path: ["full-domain"]
path: ["full-domain"],
error: "When protocol is 'http', a 'full-domain' must be provided"
}
)
.refine(
@@ -171,9 +185,8 @@ export const ResourceSchema = z
return true;
},
{
message:
"When protocol is 'tcp' or 'udp', 'proxy-port' must be provided",
path: ["proxy-port", "exit-node"]
path: ["proxy-port", "exit-node"],
error: "When protocol is 'tcp' or 'udp', 'proxy-port' must be provided"
}
)
.refine(
@@ -190,9 +203,8 @@ export const ResourceSchema = z
return true;
},
{
message:
"When protocol is 'tcp' or 'udp', 'auth' must not be provided",
path: ["auth"]
path: ["auth"],
error: "When protocol is 'tcp' or 'udp', 'auth' must not be provided"
}
);
@@ -200,188 +212,219 @@ export function isTargetsOnlyResource(resource: any): boolean {
return Object.keys(resource).length === 1 && resource.targets;
}
export const ClientResourceSchema = z.object({
name: z.string().min(2).max(100),
site: z.string().min(2).max(100).optional(),
protocol: z.enum(["tcp", "udp"]),
"proxy-port": z.number().min(1).max(65535),
"hostname": z.string().min(1).max(255),
"internal-port": z.number().min(1).max(65535),
enabled: z.boolean().optional().default(true)
});
export const ClientResourceSchema = z
.object({
name: z.string().min(1).max(255),
mode: z.enum(["host", "cidr"]),
site: z.string(),
// protocol: z.enum(["tcp", "udp"]).optional(),
// proxyPort: z.int().positive().optional(),
// destinationPort: z.int().positive().optional(),
destination: z.string().min(1),
// enabled: z.boolean().default(true),
alias: z
.string()
.regex(
/^(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$/,
"Alias must be a fully qualified domain name (e.g., example.com)"
)
.optional(),
roles: z
.array(z.string())
.optional()
.default([])
.refine((roles) => !roles.includes("Admin"), {
error: "Admin role cannot be included in roles"
}),
users: z.array(z.email()).optional().default([]),
machines: z.array(z.string()).optional().default([])
})
.refine(
(data) => {
if (data.mode === "host") {
// Check if it's a valid IP address using zod (v4 or v6)
const isValidIP = z
.union([z.ipv4(), z.ipv6()])
.safeParse(data.destination).success;
if (isValidIP) {
return true;
}
// Check if it's a valid domain (hostname pattern, TLD not required)
const domainRegex =
/^(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)*[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$/;
const isValidDomain = domainRegex.test(data.destination);
const isValidAlias = data.alias && domainRegex.test(data.alias);
return isValidDomain && isValidAlias; // require the alias to be set in the case of domain
}
return true;
},
{
message:
"Destination must be a valid IP address or valid domain AND alias is required"
}
)
.refine(
(data) => {
if (data.mode === "cidr") {
// Check if it's a valid CIDR (v4 or v6)
const isValidCIDR = z
.union([z.cidrv4(), z.cidrv6()])
.safeParse(data.destination).success;
return isValidCIDR;
}
return true;
},
{
message: "Destination must be a valid CIDR notation for cidr mode"
}
);
// Schema for the entire configuration object
export const ConfigSchema = z
.object({
"proxy-resources": z.record(z.string(), ResourceSchema).optional().default({}),
"client-resources": z.record(z.string(), ClientResourceSchema).optional().default({}),
sites: z.record(z.string(), SiteSchema).optional().default({})
"proxy-resources": z
.record(z.string(), ResourceSchema)
.optional()
.prefault({}),
"public-resources": z
.record(z.string(), ResourceSchema)
.optional()
.prefault({}),
"client-resources": z
.record(z.string(), ClientResourceSchema)
.optional()
.prefault({}),
"private-resources": z
.record(z.string(), ClientResourceSchema)
.optional()
.prefault({}),
sites: z.record(z.string(), SiteSchema).optional().prefault({})
})
.refine(
.transform((data) => {
// Merge public-resources into proxy-resources
if (data["public-resources"]) {
data["proxy-resources"] = {
...data["proxy-resources"],
...data["public-resources"]
};
delete (data as any)["public-resources"];
}
// Merge private-resources into client-resources
if (data["private-resources"]) {
data["client-resources"] = {
...data["client-resources"],
...data["private-resources"]
};
delete (data as any)["private-resources"];
}
return data as {
"proxy-resources": Record<string, z.infer<typeof ResourceSchema>>;
"client-resources": Record<string, z.infer<typeof ClientResourceSchema>>;
sites: Record<string, z.infer<typeof SiteSchema>>;
};
})
.superRefine((config, ctx) => {
// Enforce the full-domain uniqueness across resources in the same stack
(config) => {
// Extract all full-domain values with their resource keys
const fullDomainMap = new Map<string, string[]>();
const fullDomainMap = new Map<string, string[]>();
Object.entries(config["proxy-resources"]).forEach(
([resourceKey, resource]) => {
const fullDomain = resource["full-domain"];
if (fullDomain) {
// Only process if full-domain is defined
if (!fullDomainMap.has(fullDomain)) {
fullDomainMap.set(fullDomain, []);
}
fullDomainMap.get(fullDomain)!.push(resourceKey);
Object.entries(config["proxy-resources"]).forEach(
([resourceKey, resource]) => {
const fullDomain = resource["full-domain"];
if (fullDomain) {
// Only process if full-domain is defined
if (!fullDomainMap.has(fullDomain)) {
fullDomainMap.set(fullDomain, []);
}
fullDomainMap.get(fullDomain)!.push(resourceKey);
}
);
}
);
// Find duplicates
const duplicates = Array.from(fullDomainMap.entries()).filter(
([_, resourceKeys]) => resourceKeys.length > 1
);
const fullDomainDuplicates = Array.from(fullDomainMap.entries())
.filter(([_, resourceKeys]) => resourceKeys.length > 1)
.map(
([fullDomain, resourceKeys]) =>
`'${fullDomain}' used by resources: ${resourceKeys.join(", ")}`
)
.join("; ");
return duplicates.length === 0;
},
(config) => {
// Extract duplicates for error message
const fullDomainMap = new Map<string, string[]>();
Object.entries(config["proxy-resources"]).forEach(
([resourceKey, resource]) => {
const fullDomain = resource["full-domain"];
if (fullDomain) {
// Only process if full-domain is defined
if (!fullDomainMap.has(fullDomain)) {
fullDomainMap.set(fullDomain, []);
}
fullDomainMap.get(fullDomain)!.push(resourceKey);
}
}
);
const duplicates = Array.from(fullDomainMap.entries())
.filter(([_, resourceKeys]) => resourceKeys.length > 1)
.map(
([fullDomain, resourceKeys]) =>
`'${fullDomain}' used by resources: ${resourceKeys.join(", ")}`
)
.join("; ");
return {
message: `Duplicate 'full-domain' values found: ${duplicates}`,
path: ["resources"]
};
if (fullDomainDuplicates.length !== 0) {
ctx.addIssue({
code: z.ZodIssueCode.custom,
path: ["proxy-resources"],
message: `Duplicate 'full-domain' values found: ${fullDomainDuplicates}`
});
}
)
.refine(
// Enforce proxy-port uniqueness within proxy-resources
(config) => {
const proxyPortMap = new Map<number, string[]>();
Object.entries(config["proxy-resources"]).forEach(
([resourceKey, resource]) => {
const proxyPort = resource["proxy-port"];
if (proxyPort !== undefined) {
if (!proxyPortMap.has(proxyPort)) {
proxyPortMap.set(proxyPort, []);
}
proxyPortMap.get(proxyPort)!.push(resourceKey);
// Enforce proxy-port uniqueness within proxy-resources per protocol
const protocolPortMap = new Map<string, string[]>();
Object.entries(config["proxy-resources"]).forEach(
([resourceKey, resource]) => {
const proxyPort = resource["proxy-port"];
const protocol = resource.protocol;
if (proxyPort !== undefined && protocol !== undefined) {
const key = `${protocol}:${proxyPort}`;
if (!protocolPortMap.has(key)) {
protocolPortMap.set(key, []);
}
protocolPortMap.get(key)!.push(resourceKey);
}
);
}
);
// Find duplicates
const duplicates = Array.from(proxyPortMap.entries()).filter(
([_, resourceKeys]) => resourceKeys.length > 1
);
const portDuplicates = Array.from(protocolPortMap.entries())
.filter(([_, resourceKeys]) => resourceKeys.length > 1)
.map(([protocolPort, resourceKeys]) => {
const [protocol, port] = protocolPort.split(":");
return `${protocol.toUpperCase()} port ${port} used by proxy-resources: ${resourceKeys.join(", ")}`;
})
.join("; ");
return duplicates.length === 0;
},
(config) => {
// Extract duplicates for error message
const proxyPortMap = new Map<number, string[]>();
Object.entries(config["proxy-resources"]).forEach(
([resourceKey, resource]) => {
const proxyPort = resource["proxy-port"];
if (proxyPort !== undefined) {
if (!proxyPortMap.has(proxyPort)) {
proxyPortMap.set(proxyPort, []);
}
proxyPortMap.get(proxyPort)!.push(resourceKey);
}
}
);
const duplicates = Array.from(proxyPortMap.entries())
.filter(([_, resourceKeys]) => resourceKeys.length > 1)
.map(
([proxyPort, resourceKeys]) =>
`port ${proxyPort} used by proxy-resources: ${resourceKeys.join(", ")}`
)
.join("; ");
return {
message: `Duplicate 'proxy-port' values found in proxy-resources: ${duplicates}`,
path: ["proxy-resources"]
};
if (portDuplicates.length !== 0) {
ctx.addIssue({
code: z.ZodIssueCode.custom,
path: ["proxy-resources"],
message: `Duplicate 'proxy-port' values found in proxy-resources: ${portDuplicates}`
});
}
)
.refine(
// Enforce proxy-port uniqueness within client-resources
(config) => {
const proxyPortMap = new Map<number, string[]>();
Object.entries(config["client-resources"]).forEach(
([resourceKey, resource]) => {
const proxyPort = resource["proxy-port"];
if (proxyPort !== undefined) {
if (!proxyPortMap.has(proxyPort)) {
proxyPortMap.set(proxyPort, []);
}
proxyPortMap.get(proxyPort)!.push(resourceKey);
// Enforce alias uniqueness within client-resources
const aliasMap = new Map<string, string[]>();
Object.entries(config["client-resources"]).forEach(
([resourceKey, resource]) => {
const alias = resource.alias;
if (alias !== undefined) {
if (!aliasMap.has(alias)) {
aliasMap.set(alias, []);
}
aliasMap.get(alias)!.push(resourceKey);
}
);
}
);
// Find duplicates
const duplicates = Array.from(proxyPortMap.entries()).filter(
([_, resourceKeys]) => resourceKeys.length > 1
);
const aliasDuplicates = Array.from(aliasMap.entries())
.filter(([_, resourceKeys]) => resourceKeys.length > 1)
.map(
([alias, resourceKeys]) =>
`alias '${alias}' used by client-resources: ${resourceKeys.join(", ")}`
)
.join("; ");
return duplicates.length === 0;
},
(config) => {
// Extract duplicates for error message
const proxyPortMap = new Map<number, string[]>();
Object.entries(config["client-resources"]).forEach(
([resourceKey, resource]) => {
const proxyPort = resource["proxy-port"];
if (proxyPort !== undefined) {
if (!proxyPortMap.has(proxyPort)) {
proxyPortMap.set(proxyPort, []);
}
proxyPortMap.get(proxyPort)!.push(resourceKey);
}
}
);
const duplicates = Array.from(proxyPortMap.entries())
.filter(([_, resourceKeys]) => resourceKeys.length > 1)
.map(
([proxyPort, resourceKeys]) =>
`port ${proxyPort} used by client-resources: ${resourceKeys.join(", ")}`
)
.join("; ");
return {
message: `Duplicate 'proxy-port' values found in client-resources: ${duplicates}`,
path: ["client-resources"]
};
if (aliasDuplicates.length !== 0) {
ctx.addIssue({
code: z.ZodIssueCode.custom,
path: ["client-resources"],
message: `Duplicate 'alias' values found in client-resources: ${aliasDuplicates}`
});
}
);
});
// Type inference from the schema
export type Site = z.infer<typeof SiteSchema>;

5
server/lib/cache.ts Normal file
View File

@@ -0,0 +1,5 @@
import NodeCache from "node-cache";
export const cache = new NodeCache({ stdTTL: 3600, checkperiod: 120 });
export default cache;

View File

@@ -0,0 +1,290 @@
import {
clients,
db,
olms,
orgs,
roleClients,
roles,
userClients,
userOrgs,
Transaction
} from "@server/db";
import { eq, and, notInArray } from "drizzle-orm";
import { listExitNodes } from "#dynamic/lib/exitNodes";
import { getNextAvailableClientSubnet } from "@server/lib/ip";
import logger from "@server/logger";
import { rebuildClientAssociationsFromClient } from "./rebuildClientAssociations";
import { sendTerminateClient } from "@server/routers/client/terminate";
import { getUniqueClientName } from "@server/db/names";
export async function calculateUserClientsForOrgs(
userId: string,
trx?: Transaction
): Promise<void> {
const execute = async (transaction: Transaction) => {
// Get all OLMs for this user
const userOlms = await transaction
.select()
.from(olms)
.where(eq(olms.userId, userId));
if (userOlms.length === 0) {
// No OLMs for this user, but we should still clean up any orphaned clients
await cleanupOrphanedClients(userId, transaction);
return;
}
// Get all user orgs
const allUserOrgs = await transaction
.select()
.from(userOrgs)
.where(eq(userOrgs.userId, userId));
const userOrgIds = allUserOrgs.map((uo) => uo.orgId);
// For each OLM, ensure there's a client in each org the user is in
for (const olm of userOlms) {
for (const userOrg of allUserOrgs) {
const orgId = userOrg.orgId;
const [org] = await transaction
.select()
.from(orgs)
.where(eq(orgs.orgId, orgId));
if (!org) {
logger.warn(
`Skipping org ${orgId} for OLM ${olm.olmId} (user ${userId}): org not found`
);
continue;
}
if (!org.subnet) {
logger.warn(
`Skipping org ${orgId} for OLM ${olm.olmId} (user ${userId}): org has no subnet configured`
);
continue;
}
// Get admin role for this org (needed for access grants)
const [adminRole] = await transaction
.select()
.from(roles)
.where(and(eq(roles.isAdmin, true), eq(roles.orgId, orgId)))
.limit(1);
if (!adminRole) {
logger.warn(
`Skipping org ${orgId} for OLM ${olm.olmId} (user ${userId}): no admin role found`
);
continue;
}
// Check if a client already exists for this OLM+user+org combination
const [existingClient] = await transaction
.select()
.from(clients)
.where(
and(
eq(clients.userId, userId),
eq(clients.orgId, orgId),
eq(clients.olmId, olm.olmId)
)
)
.limit(1);
if (existingClient) {
// Ensure admin role has access to the client
const [existingRoleClient] = await transaction
.select()
.from(roleClients)
.where(
and(
eq(roleClients.roleId, adminRole.roleId),
eq(
roleClients.clientId,
existingClient.clientId
)
)
)
.limit(1);
if (!existingRoleClient) {
await transaction.insert(roleClients).values({
roleId: adminRole.roleId,
clientId: existingClient.clientId
});
logger.debug(
`Granted admin role access to existing client ${existingClient.clientId} for OLM ${olm.olmId} in org ${orgId} (user ${userId})`
);
}
// Ensure user has access to the client
const [existingUserClient] = await transaction
.select()
.from(userClients)
.where(
and(
eq(userClients.userId, userId),
eq(
userClients.clientId,
existingClient.clientId
)
)
)
.limit(1);
if (!existingUserClient) {
await transaction.insert(userClients).values({
userId,
clientId: existingClient.clientId
});
logger.debug(
`Granted user access to existing client ${existingClient.clientId} for OLM ${olm.olmId} in org ${orgId} (user ${userId})`
);
}
logger.debug(
`Client already exists for OLM ${olm.olmId} in org ${orgId} (user ${userId}), skipping creation`
);
continue;
}
// Get exit nodes for this org
const exitNodesList = await listExitNodes(orgId);
if (exitNodesList.length === 0) {
logger.warn(
`Skipping org ${orgId} for OLM ${olm.olmId} (user ${userId}): no exit nodes found`
);
continue;
}
const randomExitNode =
exitNodesList[
Math.floor(Math.random() * exitNodesList.length)
];
// Get next available subnet
const newSubnet = await getNextAvailableClientSubnet(orgId);
if (!newSubnet) {
logger.warn(
`Skipping org ${orgId} for OLM ${olm.olmId} (user ${userId}): no available subnet found`
);
continue;
}
const subnet = newSubnet.split("/")[0];
const updatedSubnet = `${subnet}/${org.subnet.split("/")[1]}`;
const niceId = await getUniqueClientName(orgId);
// Create the client
const [newClient] = await transaction
.insert(clients)
.values({
userId,
orgId: userOrg.orgId,
exitNodeId: randomExitNode.exitNodeId,
name: olm.name || "User Client",
subnet: updatedSubnet,
olmId: olm.olmId,
type: "olm",
niceId
})
.returning();
await rebuildClientAssociationsFromClient(
newClient,
transaction
);
// Grant admin role access to the client
await transaction.insert(roleClients).values({
roleId: adminRole.roleId,
clientId: newClient.clientId
});
// Grant user access to the client
await transaction.insert(userClients).values({
userId,
clientId: newClient.clientId
});
logger.debug(
`Created client for OLM ${olm.olmId} in org ${orgId} (user ${userId}) with access granted to admin role and user`
);
}
}
// Clean up clients in orgs the user is no longer in
await cleanupOrphanedClients(userId, transaction, userOrgIds);
};
if (trx) {
// Use provided transaction
await execute(trx);
} else {
// Create new transaction
await db.transaction(async (transaction) => {
await execute(transaction);
});
}
}
async function cleanupOrphanedClients(
userId: string,
trx: Transaction,
userOrgIds: string[] = []
): Promise<void> {
// Find all OLM clients for this user that should be deleted
// If userOrgIds is empty, delete all OLM clients (user has no orgs)
// If userOrgIds has values, delete clients in orgs they're not in
const clientsToDelete = await trx
.select({ clientId: clients.clientId })
.from(clients)
.where(
userOrgIds.length > 0
? and(
eq(clients.userId, userId),
notInArray(clients.orgId, userOrgIds)
)
: and(eq(clients.userId, userId))
);
if (clientsToDelete.length > 0) {
const deletedClients = await trx
.delete(clients)
.where(
userOrgIds.length > 0
? and(
eq(clients.userId, userId),
notInArray(clients.orgId, userOrgIds)
)
: and(eq(clients.userId, userId))
)
.returning();
// Rebuild associations for each deleted client to clean up related data
for (const deletedClient of deletedClients) {
await rebuildClientAssociationsFromClient(deletedClient, trx);
if (deletedClient.olmId) {
await sendTerminateClient(
deletedClient.clientId,
deletedClient.olmId
);
}
}
if (userOrgIds.length === 0) {
logger.debug(
`Deleted all ${clientsToDelete.length} OLM client(s) for user ${userId} (user has no orgs)`
);
} else {
logger.debug(
`Deleted ${clientsToDelete.length} orphaned OLM client(s) for user ${userId} in orgs they're no longer in`
);
}
}
}

View File

@@ -0,0 +1,41 @@
import { Org, ResourceSession, Session, User } from "@server/db";
export type CheckOrgAccessPolicyProps = {
orgId?: string;
org?: Org;
userId?: string;
user?: User;
sessionId?: string;
session?: Session;
};
export type CheckOrgAccessPolicyResult = {
allowed: boolean;
error?: string;
policies?: {
requiredTwoFactor?: boolean;
maxSessionLength?: {
compliant: boolean;
maxSessionLengthHours: number;
sessionAgeHours: number;
};
passwordAge?: {
compliant: boolean;
maxPasswordAgeDays: number;
passwordAgeDays: number;
};
};
};
export async function enforceResourceSessionLength(
resourceSession: ResourceSession,
org: Org
): Promise<{ valid: boolean; error?: string }> {
return { valid: true };
}
export async function checkOrgAccessPolicy(
props: CheckOrgAccessPolicyProps
): Promise<CheckOrgAccessPolicyResult> {
return { allowed: true };
}

View File

@@ -0,0 +1,201 @@
import { assertEquals } from "@test/assert";
// Helper to create a timestamp from a date string (UTC)
function dateToTimestamp(dateStr: string): number {
return Math.floor(new Date(dateStr).getTime() / 1000);
}
// Testable version of calculateCutoffTimestamp that accepts a "now" timestamp
// This matches the logic in cleanupLogs.ts but allows injecting the current time
function calculateCutoffTimestampWithNow(retentionDays: number, nowTimestamp: number): number {
if (retentionDays === 9001) {
// Special case: data is erased at the end of the year following the year it was generated
// This means we delete logs from 2 years ago or older (logs from year Y are deleted after Dec 31 of year Y+1)
const currentYear = new Date(nowTimestamp * 1000).getUTCFullYear();
// Cutoff is the start of the year before last (Jan 1, currentYear - 1 at 00:00:00)
// Any logs before this date are from 2+ years ago and should be deleted
const cutoffDate = new Date(Date.UTC(currentYear - 1, 0, 1, 0, 0, 0));
return Math.floor(cutoffDate.getTime() / 1000);
} else {
return nowTimestamp - retentionDays * 24 * 60 * 60;
}
}
function testCalculateCutoffTimestamp() {
console.log("Running calculateCutoffTimestamp tests...");
// Test 1: Normal retention days (e.g., 30 days)
{
const now = dateToTimestamp("2025-12-06T12:00:00Z");
const result = calculateCutoffTimestampWithNow(30, now);
const expected = now - (30 * 24 * 60 * 60);
assertEquals(result, expected, "30 days retention calculation failed");
}
// Test 2: Normal retention days (e.g., 90 days)
{
const now = dateToTimestamp("2025-06-15T00:00:00Z");
const result = calculateCutoffTimestampWithNow(90, now);
const expected = now - (90 * 24 * 60 * 60);
assertEquals(result, expected, "90 days retention calculation failed");
}
// Test 3: Special case 9001 - December 2025 (before Dec 31)
// Data from 2024 should NOT be deleted yet (must wait until after Dec 31, 2025)
// Data from 2023 and earlier should be deleted
// Cutoff should be Jan 1, 2024 (start of currentYear - 1)
{
const now = dateToTimestamp("2025-12-06T12:00:00Z");
const result = calculateCutoffTimestampWithNow(9001, now);
const expected = dateToTimestamp("2024-01-01T00:00:00Z");
assertEquals(result, expected, "9001 retention (Dec 2025) - should cutoff at Jan 1, 2024");
}
// Test 4: Special case 9001 - January 2026
// Data from 2024 should now be deleted (Dec 31, 2025 has passed)
// Cutoff should be Jan 1, 2025 (start of currentYear - 1)
{
const now = dateToTimestamp("2026-01-15T12:00:00Z");
const result = calculateCutoffTimestampWithNow(9001, now);
const expected = dateToTimestamp("2025-01-01T00:00:00Z");
assertEquals(result, expected, "9001 retention (Jan 2026) - should cutoff at Jan 1, 2025");
}
// Test 5: Special case 9001 - December 31, 2025 at 23:59:59 UTC
// Still in 2025, so data from 2024 should NOT be deleted yet
// Cutoff should be Jan 1, 2024
{
const now = dateToTimestamp("2025-12-31T23:59:59Z");
const result = calculateCutoffTimestampWithNow(9001, now);
const expected = dateToTimestamp("2024-01-01T00:00:00Z");
assertEquals(result, expected, "9001 retention (Dec 31, 2025 23:59:59) - should cutoff at Jan 1, 2024");
}
// Test 6: Special case 9001 - January 1, 2026 at 00:00:01 UTC
// Now in 2026, so data from 2024 should be deleted
// Cutoff should be Jan 1, 2025
{
const now = dateToTimestamp("2026-01-01T00:00:01Z");
const result = calculateCutoffTimestampWithNow(9001, now);
const expected = dateToTimestamp("2025-01-01T00:00:00Z");
assertEquals(result, expected, "9001 retention (Jan 1, 2026 00:00:01) - should cutoff at Jan 1, 2025");
}
// Test 7: Special case 9001 - Mid year 2025
// Cutoff should still be Jan 1, 2024
{
const now = dateToTimestamp("2025-06-15T12:00:00Z");
const result = calculateCutoffTimestampWithNow(9001, now);
const expected = dateToTimestamp("2024-01-01T00:00:00Z");
assertEquals(result, expected, "9001 retention (mid 2025) - should cutoff at Jan 1, 2024");
}
// Test 8: Special case 9001 - Early 2024
// Cutoff should be Jan 1, 2023
{
const now = dateToTimestamp("2024-02-01T12:00:00Z");
const result = calculateCutoffTimestampWithNow(9001, now);
const expected = dateToTimestamp("2023-01-01T00:00:00Z");
assertEquals(result, expected, "9001 retention (early 2024) - should cutoff at Jan 1, 2023");
}
// Test 9: 1 day retention
{
const now = dateToTimestamp("2025-12-06T12:00:00Z");
const result = calculateCutoffTimestampWithNow(1, now);
const expected = now - (1 * 24 * 60 * 60);
assertEquals(result, expected, "1 day retention calculation failed");
}
// Test 10: 365 days retention (1 year)
{
const now = dateToTimestamp("2025-12-06T12:00:00Z");
const result = calculateCutoffTimestampWithNow(365, now);
const expected = now - (365 * 24 * 60 * 60);
assertEquals(result, expected, "365 days retention calculation failed");
}
// Test 11: Verify 9001 deletes logs correctly across year boundary
// If we're in 2025, logs from Dec 31, 2023 (timestamp) should be DELETED (before cutoff)
// But logs from Jan 1, 2024 (timestamp) should be KEPT (at or after cutoff)
{
const now = dateToTimestamp("2025-12-06T12:00:00Z");
const cutoff = calculateCutoffTimestampWithNow(9001, now);
const logFromDec2023 = dateToTimestamp("2023-12-31T23:59:59Z");
const logFromJan2024 = dateToTimestamp("2024-01-01T00:00:00Z");
// Log from Dec 2023 should be before cutoff (deleted)
assertEquals(logFromDec2023 < cutoff, true, "Log from Dec 2023 should be deleted");
// Log from Jan 2024 should be at or after cutoff (kept)
assertEquals(logFromJan2024 >= cutoff, true, "Log from Jan 2024 should be kept");
}
// Test 12: Verify 9001 in 2026 - logs from 2024 should now be deleted
{
const now = dateToTimestamp("2026-03-15T12:00:00Z");
const cutoff = calculateCutoffTimestampWithNow(9001, now);
const logFromDec2024 = dateToTimestamp("2024-12-31T23:59:59Z");
const logFromJan2025 = dateToTimestamp("2025-01-01T00:00:00Z");
// Log from Dec 2024 should be before cutoff (deleted)
assertEquals(logFromDec2024 < cutoff, true, "Log from Dec 2024 should be deleted in 2026");
// Log from Jan 2025 should be at or after cutoff (kept)
assertEquals(logFromJan2025 >= cutoff, true, "Log from Jan 2025 should be kept in 2026");
}
// Test 13: Edge case - exactly at year boundary for 9001
// On Jan 1, 2025 00:00:00 UTC, cutoff should be Jan 1, 2024
{
const now = dateToTimestamp("2025-01-01T00:00:00Z");
const result = calculateCutoffTimestampWithNow(9001, now);
const expected = dateToTimestamp("2024-01-01T00:00:00Z");
assertEquals(result, expected, "9001 retention (Jan 1, 2025 00:00:00) - should cutoff at Jan 1, 2024");
}
// Test 14: Verify data from 2024 is kept throughout 2025 when using 9001
// Example: Log created on July 15, 2024 should be kept until Dec 31, 2025
{
// Running in June 2025
const nowJune2025 = dateToTimestamp("2025-06-15T12:00:00Z");
const cutoffJune2025 = calculateCutoffTimestampWithNow(9001, nowJune2025);
const logFromJuly2024 = dateToTimestamp("2024-07-15T12:00:00Z");
// Log from July 2024 should be KEPT in June 2025
assertEquals(logFromJuly2024 >= cutoffJune2025, true, "Log from July 2024 should be kept in June 2025");
// Running in January 2026
const nowJan2026 = dateToTimestamp("2026-01-15T12:00:00Z");
const cutoffJan2026 = calculateCutoffTimestampWithNow(9001, nowJan2026);
// Log from July 2024 should be DELETED in January 2026
assertEquals(logFromJuly2024 < cutoffJan2026, true, "Log from July 2024 should be deleted in Jan 2026");
}
// Test 15: Verify the exact requirement - data from 2024 must be purged on December 31, 2025
// On Dec 31, 2025 (still 2025), data from 2024 should still exist
// On Jan 1, 2026 (now 2026), data from 2024 can be deleted
{
const logFromMid2024 = dateToTimestamp("2024-06-15T12:00:00Z");
// Dec 31, 2025 23:59:59 - still 2025, log should be kept
const nowDec31_2025 = dateToTimestamp("2025-12-31T23:59:59Z");
const cutoffDec31 = calculateCutoffTimestampWithNow(9001, nowDec31_2025);
assertEquals(logFromMid2024 >= cutoffDec31, true, "Log from mid-2024 should be kept on Dec 31, 2025");
// Jan 1, 2026 00:00:00 - now 2026, log can be deleted
const nowJan1_2026 = dateToTimestamp("2026-01-01T00:00:00Z");
const cutoffJan1 = calculateCutoffTimestampWithNow(9001, nowJan1_2026);
assertEquals(logFromMid2024 < cutoffJan1, true, "Log from mid-2024 should be deleted on Jan 1, 2026");
}
console.log("All calculateCutoffTimestamp tests passed!");
}
// Run all tests
try {
testCalculateCutoffTimestamp();
console.log("All tests passed successfully!");
} catch (error) {
console.error("Test failed:", error);
process.exit(1);
}

76
server/lib/cleanupLogs.ts Normal file
View File

@@ -0,0 +1,76 @@
import { db, orgs } from "@server/db";
import { cleanUpOldLogs as cleanUpOldAccessLogs } from "#dynamic/lib/logAccessAudit";
import { cleanUpOldLogs as cleanUpOldActionLogs } from "#dynamic/middlewares/logActionAudit";
import { cleanUpOldLogs as cleanUpOldRequestLogs } from "@server/routers/badger/logRequestAudit";
import { gt, or } from "drizzle-orm";
export function initLogCleanupInterval() {
return setInterval(
async () => {
const orgsToClean = await db
.select({
orgId: orgs.orgId,
settingsLogRetentionDaysAction:
orgs.settingsLogRetentionDaysAction,
settingsLogRetentionDaysAccess:
orgs.settingsLogRetentionDaysAccess,
settingsLogRetentionDaysRequest:
orgs.settingsLogRetentionDaysRequest
})
.from(orgs)
.where(
or(
gt(orgs.settingsLogRetentionDaysAction, 0),
gt(orgs.settingsLogRetentionDaysAccess, 0),
gt(orgs.settingsLogRetentionDaysRequest, 0)
)
);
for (const org of orgsToClean) {
const {
orgId,
settingsLogRetentionDaysAction,
settingsLogRetentionDaysAccess,
settingsLogRetentionDaysRequest
} = org;
if (settingsLogRetentionDaysAction > 0) {
await cleanUpOldActionLogs(
orgId,
settingsLogRetentionDaysAction
);
}
if (settingsLogRetentionDaysAccess > 0) {
await cleanUpOldAccessLogs(
orgId,
settingsLogRetentionDaysAccess
);
}
if (settingsLogRetentionDaysRequest > 0) {
await cleanUpOldRequestLogs(
orgId,
settingsLogRetentionDaysRequest
);
}
}
},
3 * 60 * 60 * 1000
); // every 3 hours
}
export function calculateCutoffTimestamp(retentionDays: number): number {
const now = Math.floor(Date.now() / 1000);
if (retentionDays === 9001) {
// Special case: data is erased at the end of the year following the year it was generated
// This means we delete logs from 2 years ago or older (logs from year Y are deleted after Dec 31 of year Y+1)
const currentYear = new Date().getFullYear();
// Cutoff is the start of the year before last (Jan 1, currentYear - 1 at 00:00:00)
// Any logs before this date are from 2+ years ago and should be deleted
const cutoffDate = new Date(Date.UTC(currentYear - 1, 0, 1, 0, 0, 0));
return Math.floor(cutoffDate.getTime() / 1000);
} else {
return now - retentionDays * 24 * 60 * 60;
}
}

View File

@@ -85,7 +85,13 @@ export class Config {
? "true"
: "false";
process.env.FLAGS_ENABLE_CLIENTS = parsedConfig.flags?.enable_clients
process.env.PRODUCT_UPDATES_NOTIFICATION_ENABLED = parsedConfig.app
.notifications.product_updates
? "true"
: "false";
process.env.NEW_RELEASES_NOTIFICATION_ENABLED = parsedConfig.app
.notifications.new_releases
? "true"
: "false";
@@ -158,7 +164,7 @@ export class Config {
try {
const response = await fetch(
"https://api.fossorial.io/api/v1/license/validate",
`https://api.fossorial.io/api/v1/license/validate`,
{
method: "POST",
headers: {

View File

@@ -2,7 +2,7 @@ import path from "path";
import { fileURLToPath } from "url";
// This is a placeholder value replaced by the build process
export const APP_VERSION = "1.11.0";
export const APP_VERSION = "1.13.0-rc.0";
export const __FILENAME = fileURLToPath(import.meta.url);
export const __DIRNAME = path.dirname(__FILENAME);

View File

@@ -18,6 +18,7 @@ import { defaultRoleAllowedActions } from "@server/routers/role";
import { FeatureId, limitsService, sandboxLimitSet } from "@server/lib/billing";
import { createCustomer } from "#dynamic/lib/billing";
import { usageService } from "@server/lib/billing/usageService";
import config from "@server/lib/config";
export async function createUserAccountOrg(
userId: string,
@@ -76,6 +77,8 @@ export async function createUserAccountOrg(
.from(domains)
.where(eq(domains.configManaged, true));
const utilitySubnet = config.getRawConfig().orgs.utility_subnet_group;
const newOrg = await trx
.insert(orgs)
.values({
@@ -83,6 +86,7 @@ export async function createUserAccountOrg(
name,
// subnet
subnet: "100.90.128.0/24", // TODO: this should not be hardcoded - or can it be the same in all orgs?
utilitySubnet: utilitySubnet,
createdAt: new Date().toISOString()
})
.returning();

View File

@@ -1,4 +1,4 @@
import { db, exitNodes } from "@server/db";
import { db, exitNodes, Transaction } from "@server/db";
import logger from "@server/logger";
import { ExitNodePingResult } from "@server/routers/newt";
import { eq } from "drizzle-orm";
@@ -59,7 +59,11 @@ export function selectBestExitNode(
return pingResults[0];
}
export async function checkExitNodeOrg(exitNodeId: number, orgId: string) {
export async function checkExitNodeOrg(
exitNodeId: number,
orgId: string,
trx?: Transaction | typeof db
): Promise<boolean> {
return false;
}

View File

@@ -6,7 +6,7 @@ export async function getCountryCodeForIp(
): Promise<string | undefined> {
try {
if (!maxmindLookup) {
logger.warn(
logger.debug(
"MaxMind DB path not configured, cannot perform GeoIP lookup"
);
return;

View File

@@ -1,7 +1,15 @@
import { db } from "@server/db";
import {
clientSitesAssociationsCache,
db,
SiteResource,
siteResources,
Transaction
} from "@server/db";
import { clients, orgs, sites } from "@server/db";
import { and, eq, isNotNull } from "drizzle-orm";
import config from "@server/lib/config";
import z from "zod";
import logger from "@server/logger";
interface IPRange {
start: bigint;
@@ -279,6 +287,56 @@ export async function getNextAvailableClientSubnet(
return subnet;
}
export async function getNextAvailableAliasAddress(
orgId: string
): Promise<string> {
const [org] = await db.select().from(orgs).where(eq(orgs.orgId, orgId));
if (!org) {
throw new Error(`Organization with ID ${orgId} not found`);
}
if (!org.subnet) {
throw new Error(`Organization with ID ${orgId} has no subnet defined`);
}
if (!org.utilitySubnet) {
throw new Error(
`Organization with ID ${orgId} has no utility subnet defined`
);
}
const existingAddresses = await db
.select({
aliasAddress: siteResources.aliasAddress
})
.from(siteResources)
.where(
and(
isNotNull(siteResources.aliasAddress),
eq(siteResources.orgId, orgId)
)
);
const addresses = [
...existingAddresses.map(
(site) => `${site.aliasAddress?.split("/")[0]}/32`
),
// reserve a /29 for the dns server and other stuff
`${org.utilitySubnet.split("/")[0]}/29`
].filter((address) => address !== null) as string[];
let subnet = findNextAvailableCidr(addresses, 32, org.utilitySubnet);
if (!subnet) {
throw new Error("No available subnets remaining in space");
}
// remove the cidr
subnet = subnet.split("/")[0];
return subnet;
}
export async function getNextAvailableOrgSubnet(): Promise<string> {
const existingAddresses = await db
.select({
@@ -300,3 +358,113 @@ export async function getNextAvailableOrgSubnet(): Promise<string> {
return subnet;
}
export function generateRemoteSubnets(allSiteResources: SiteResource[]): string[] {
const remoteSubnets = allSiteResources
.filter((sr) => {
if (sr.mode === "cidr") return true;
if (sr.mode === "host") {
// check if its a valid IP using zod
const ipSchema = z.union([z.ipv4(), z.ipv6()]);
const parseResult = ipSchema.safeParse(sr.destination);
return parseResult.success;
}
return false;
})
.map((sr) => {
if (sr.mode === "cidr") return sr.destination;
if (sr.mode === "host") {
return `${sr.destination}/32`;
}
return ""; // This should never be reached due to filtering, but satisfies TypeScript
})
.filter((subnet) => subnet !== ""); // Remove empty strings just to be safe
// remove duplicates
return Array.from(new Set(remoteSubnets));
}
export type Alias = { alias: string | null; aliasAddress: string | null };
export function generateAliasConfig(allSiteResources: SiteResource[]): Alias[] {
let aliasConfigs = allSiteResources
.filter((sr) => sr.alias && sr.aliasAddress && sr.mode == "host")
.map((sr) => ({
alias: sr.alias,
aliasAddress: sr.aliasAddress
}));
return aliasConfigs;
}
export type SubnetProxyTarget = {
sourcePrefix: string; // must be a cidr
destPrefix: string; // must be a cidr
rewriteTo?: string; // must be a cidr
portRange?: {
min: number;
max: number;
}[];
};
export function generateSubnetProxyTargets(
siteResource: SiteResource,
clients: {
clientId: number;
pubKey: string | null;
subnet: string | null;
}[]
): SubnetProxyTarget[] {
const targets: SubnetProxyTarget[] = [];
if (clients.length === 0) {
logger.debug(
`No clients have access to site resource ${siteResource.siteResourceId}, skipping target generation.`
);
return [];
}
for (const clientSite of clients) {
if (!clientSite.subnet) {
logger.debug(
`Client ${clientSite.clientId} has no subnet, skipping for site resource ${siteResource.siteResourceId}.`
);
continue;
}
const clientPrefix = `${clientSite.subnet.split("/")[0]}/32`;
if (siteResource.mode == "host") {
let destination = siteResource.destination;
// check if this is a valid ip
const ipSchema = z.union([z.ipv4(), z.ipv6()]);
if (ipSchema.safeParse(destination).success) {
destination = `${destination}/32`;
targets.push({
sourcePrefix: clientPrefix,
destPrefix: destination
});
}
if (siteResource.alias && siteResource.aliasAddress) {
// also push a match for the alias address
targets.push({
sourcePrefix: clientPrefix,
destPrefix: `${siteResource.aliasAddress}/32`,
rewriteTo: destination
});
}
} else if (siteResource.mode == "cidr") {
targets.push({
sourcePrefix: clientPrefix,
destPrefix: siteResource.destination
});
}
}
// print a nice representation of the targets
// logger.debug(
// `Generated subnet proxy targets for: ${JSON.stringify(targets, null, 2)}`
// );
return targets;
}

111
server/lib/lock.ts Normal file
View File

@@ -0,0 +1,111 @@
export class LockManager {
/**
* Acquire a distributed lock using Redis SET with NX and PX options
* @param lockKey - Unique identifier for the lock
* @param ttlMs - Time to live in milliseconds
* @returns Promise<boolean> - true if lock acquired, false otherwise
*/
async acquireLock(
lockKey: string,
ttlMs: number = 30000
): Promise<boolean> {
return true;
}
/**
* Release a lock using Lua script to ensure atomicity
* @param lockKey - Unique identifier for the lock
*/
async releaseLock(lockKey: string): Promise<void> {}
/**
* Force release a lock regardless of owner (use with caution)
* @param lockKey - Unique identifier for the lock
*/
async forceReleaseLock(lockKey: string): Promise<void> {}
/**
* Check if a lock exists and get its info
* @param lockKey - Unique identifier for the lock
* @returns Promise<{exists: boolean, ownedByMe: boolean, ttl: number}>
*/
async getLockInfo(lockKey: string): Promise<{
exists: boolean;
ownedByMe: boolean;
ttl: number;
owner?: string;
}> {
return { exists: true, ownedByMe: true, ttl: 0 };
}
/**
* Extend the TTL of an existing lock owned by this worker
* @param lockKey - Unique identifier for the lock
* @param ttlMs - New TTL in milliseconds
* @returns Promise<boolean> - true if extended successfully
*/
async extendLock(lockKey: string, ttlMs: number): Promise<boolean> {
return true;
}
/**
* Attempt to acquire lock with retries and exponential backoff
* @param lockKey - Unique identifier for the lock
* @param ttlMs - Time to live in milliseconds
* @param maxRetries - Maximum number of retry attempts
* @param baseDelayMs - Base delay between retries in milliseconds
* @returns Promise<boolean> - true if lock acquired
*/
async acquireLockWithRetry(
lockKey: string,
ttlMs: number = 30000,
maxRetries: number = 5,
baseDelayMs: number = 100
): Promise<boolean> {
return true;
}
/**
* Execute a function while holding a lock
* @param lockKey - Unique identifier for the lock
* @param fn - Function to execute while holding the lock
* @param ttlMs - Lock TTL in milliseconds
* @returns Promise<T> - Result of the executed function
*/
async withLock<T>(
lockKey: string,
fn: () => Promise<T>,
ttlMs: number = 30000
): Promise<T> {
const acquired = await this.acquireLock(lockKey, ttlMs);
if (!acquired) {
throw new Error(`Failed to acquire lock: ${lockKey}`);
}
try {
return await fn();
} finally {
await this.releaseLock(lockKey);
}
}
/**
* Clean up expired locks - Redis handles this automatically, but this method
* can be used to get statistics about locks
* @returns Promise<{activeLocksCount: number, locksOwnedByMe: number}>
*/
async getLockStatistics(): Promise<{
activeLocksCount: number;
locksOwnedByMe: number;
}> {
return { activeLocksCount: 0, locksOwnedByMe: 0 };
}
/**
* Close the Redis connection
*/
async disconnect(): Promise<void> {}
}
export const lockManager = new LockManager();

View File

@@ -0,0 +1,17 @@
export async function cleanUpOldLogs(orgId: string, retentionDays: number) {
return;
}
export async function logAccessAudit(data: {
action: boolean;
type: string;
orgId: string;
resourceId?: number;
user?: { username: string; userId: string };
apiKey?: { name: string | null; apiKeyId: string };
metadata?: any;
userAgent?: string;
requestIp?: string;
}) {
return;
}

View File

@@ -14,10 +14,8 @@ export const configSchema = z
.object({
app: z
.object({
dashboard_url: z
.string()
.url()
.pipe(z.string().url())
dashboard_url: z.url()
.pipe(z.url())
.transform((url) => url.toLowerCase())
.optional(),
log_level: z
@@ -31,7 +29,14 @@ export const configSchema = z
anonymous_usage: z.boolean().optional().default(true)
})
.optional()
.default({})
.prefault({}),
notifications: z
.object({
product_updates: z.boolean().optional().default(true),
new_releases: z.boolean().optional().default(true)
})
.optional()
.prefault({})
})
.optional()
.default({
@@ -40,6 +45,10 @@ export const configSchema = z
log_failed_attempts: false,
telemetry: {
anonymous_usage: true
},
notifications: {
product_updates: true,
new_releases: true
}
}),
domains: z
@@ -50,7 +59,7 @@ export const configSchema = z
.string()
.nonempty("base_domain must not be empty")
.transform((url) => url.toLowerCase()),
cert_resolver: z.string().optional().default("letsencrypt"),
cert_resolver: z.string().optional(), // null falls back to traefik.cert_resolver
prefer_wildcard_cert: z.boolean().optional().default(false)
})
)
@@ -96,7 +105,7 @@ export const configSchema = z
token: z.string().optional().default("P-Access-Token")
})
.optional()
.default({}),
.prefault({}),
resource_session_request_param: z
.string()
.optional()
@@ -121,7 +130,7 @@ export const configSchema = z
credentials: z.boolean().optional()
})
.optional(),
trust_proxy: z.number().int().gte(0).optional().default(1),
trust_proxy: z.int().gte(0).optional().default(1),
secret: z.string().pipe(z.string().min(8)).optional(),
maxmind_db_path: z.string().optional()
})
@@ -178,7 +187,7 @@ export const configSchema = z
.default(5000)
})
.optional()
.default({})
.prefault({})
})
.optional(),
traefik: z
@@ -204,10 +213,14 @@ export const configSchema = z
.optional()
.default(["newt", "wireguard", "local"]),
allow_raw_resources: z.boolean().optional().default(true),
file_mode: z.boolean().optional().default(false)
file_mode: z.boolean().optional().default(false),
pp_transport_prefix: z
.string()
.optional()
.default("pp-transport-v")
})
.optional()
.default({}),
.prefault({}),
gerbil: z
.object({
exit_node_name: z.string().optional(),
@@ -216,6 +229,11 @@ export const configSchema = z
.default(51820)
.transform(stoi)
.pipe(portSchema),
clients_start_port: portSchema
.optional()
.default(21820)
.transform(stoi)
.pipe(portSchema),
base_endpoint: z
.string()
.optional()
@@ -232,16 +250,18 @@ export const configSchema = z
.default(30)
})
.optional()
.default({}),
.prefault({}),
orgs: z
.object({
block_size: z.number().positive().gt(0).optional().default(24),
subnet_group: z.string().optional().default("100.90.128.0/24")
subnet_group: z.string().optional().default("100.90.128.0/24"),
utility_subnet_group: z.string().optional().default("100.96.128.0/24") //just hardcode this for now as well
})
.optional()
.default({
block_size: 24,
subnet_group: "100.90.128.0/24"
subnet_group: "100.90.128.0/24",
utility_subnet_group: "100.96.128.0/24"
}),
rate_limits: z
.object({
@@ -261,7 +281,7 @@ export const configSchema = z
.default(500)
})
.optional()
.default({}),
.prefault({}),
auth: z
.object({
window_minutes: z
@@ -278,10 +298,10 @@ export const configSchema = z
.default(500)
})
.optional()
.default({})
.prefault({})
})
.optional()
.default({}),
.prefault({}),
email: z
.object({
smtp_host: z.string().optional(),
@@ -293,7 +313,7 @@ export const configSchema = z
.transform(getEnvOrYaml("EMAIL_SMTP_PASS")),
smtp_secure: z.boolean().optional(),
smtp_tls_reject_unauthorized: z.boolean().optional(),
no_reply: z.string().email().optional()
no_reply: z.email().optional()
})
.optional(),
flags: z
@@ -305,8 +325,7 @@ export const configSchema = z
enable_integration_api: z.boolean().optional(),
disable_local_sites: z.boolean().optional(),
disable_basic_wireguard_sites: z.boolean().optional(),
disable_config_managed_domains: z.boolean().optional(),
enable_clients: z.boolean().optional().default(true)
disable_config_managed_domains: z.boolean().optional()
})
.optional(),
dns: z
@@ -314,14 +333,18 @@ export const configSchema = z
nameservers: z
.array(z.string().optional().optional())
.optional()
.default(["ns1.fossorial.io", "ns2.fossorial.io"]),
cname_extension: z.string().optional().default("fossorial.io")
.default([
"ns1.pangolin.net",
"ns2.pangolin.net",
"ns3.pangolin.net"
]),
cname_extension: z
.string()
.optional()
.default("cname.pangolin.net")
})
.optional()
.default({
nameservers: ["ns1.fossorial.io", "ns2.fossorial.io"],
cname_extension: "fossorial.io"
})
.prefault({})
})
.refine(
(data) => {
@@ -336,7 +359,7 @@ export const configSchema = z
return true;
},
{
message: "At least one domain must be defined"
error: "At least one domain must be defined"
}
)
.refine(
@@ -351,7 +374,7 @@ export const configSchema = z
);
},
{
message: "Server secret must be defined"
error: "Server secret must be defined"
}
)
.refine(
@@ -363,7 +386,7 @@ export const configSchema = z
);
},
{
message: "Dashboard URL must be defined"
error: "Dashboard URL must be defined"
}
);
@@ -392,7 +415,7 @@ export function readConfigFile() {
if (!environment) {
throw new Error(
"No configuration file found. Please create one. https://docs.digpangolin.com/self-host/advanced/config-file"
"No configuration file found. Please create one. https://docs.pangolin.net/self-host/advanced/config-file"
);
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,8 @@
export enum AudienceIds {
General = "",
Subscribed = "",
Churned = ""
SignUps = "",
Subscribed = "",
Churned = "",
Newsletter = ""
}
let resend;
@@ -12,4 +13,4 @@ export async function moveEmailToAudience(
audienceId: AudienceIds
) {
return;
}
}

View File

@@ -0,0 +1,29 @@
import logger from "@server/logger";
import axios from "axios";
let serverIp: string | null = null;
const services = [
"https://checkip.amazonaws.com",
"https://ifconfig.io/ip",
"https://api.ipify.org",
];
export async function fetchServerIp() {
for (const url of services) {
try {
const response = await axios.get(url, { timeout: 5000 });
serverIp = response.data.trim();
logger.debug("Detected public IP: " + serverIp);
return;
} catch (err: any) {
console.warn(`Failed to fetch server IP from ${url}: ${err.message || err.code}`);
}
}
console.error("All attempts to fetch server IP failed.");
}
export function getServerIp() {
return serverIp;
}

View File

@@ -4,7 +4,7 @@ import { getHostMeta } from "./hostMeta";
import logger from "@server/logger";
import { apiKeys, db, roles } from "@server/db";
import { sites, users, orgs, resources, clients, idp } from "@server/db";
import { eq, count, notInArray } from "drizzle-orm";
import { eq, count, notInArray, and } from "drizzle-orm";
import { APP_VERSION } from "./consts";
import crypto from "crypto";
import { UserType } from "@server/types/UserTypes";
@@ -33,7 +33,7 @@ class TelemetryClient {
this.client = new PostHog(
"phc_QYuATSSZt6onzssWcYJbXLzQwnunIpdGGDTYhzK3VjX",
{
host: "https://digpangolin.com/relay-O7yI"
host: "https://pangolin.net/relay-O7yI"
}
);
@@ -48,11 +48,11 @@ class TelemetryClient {
this.startAnalyticsInterval();
logger.info(
"Pangolin now gathers anonymous usage data to help us better understand how the software is used and guide future improvements and feature development. You can find more details, including instructions for opting out of this anonymous data collection, at: https://docs.digpangolin.com/telemetry"
"Pangolin now gathers anonymous usage data to help us better understand how the software is used and guide future improvements and feature development. You can find more details, including instructions for opting out of this anonymous data collection, at: https://docs.pangolin.net/telemetry"
);
} else if (!this.enabled) {
logger.info(
"Analytics usage statistics collection is disabled. If you enable this, you can help us make Pangolin better for everyone. Learn more at: https://docs.digpangolin.com/telemetry"
"Analytics usage statistics collection is disabled. If you enable this, you can help us make Pangolin better for everyone. Learn more at: https://docs.pangolin.net/telemetry"
);
}
}
@@ -113,7 +113,12 @@ class TelemetryClient {
const [customRoles] = await db
.select({ count: count() })
.from(roles)
.where(notInArray(roles.name, ["Admin", "Member"]));
.where(
and(
eq(roles.isAdmin, false),
notInArray(roles.name, ["Member"])
)
);
const adminUsers = await db
.select({ email: users.email })
@@ -188,7 +193,7 @@ class TelemetryClient {
license_tier: licenseStatus.tier || "unknown"
}
};
logger.debug("Sending enterprise startup telemtry payload:", {
logger.debug("Sending enterprise startup telemetry payload:", {
payload
});
// this.client.capture(payload);
@@ -200,10 +205,7 @@ class TelemetryClient {
event: "supporter_status",
properties: {
valid: stats.supporterStatus.valid,
tier: stats.supporterStatus.tier,
github_username: stats.supporterStatus.githubUsername
? this.anon(stats.supporterStatus.githubUsername)
: "None"
tier: stats.supporterStatus.tier
}
});
}
@@ -217,21 +219,6 @@ class TelemetryClient {
install_timestamp: hostMeta.createdAt
}
});
for (const email of stats.adminUsers) {
// There should only be on admin user, but just in case
if (email) {
this.client.capture({
distinctId: this.anon(email),
event: "admin_user",
properties: {
host_id: hostMeta.hostMetaId,
app_version: stats.appVersion,
hashed_email: this.anon(email)
}
});
}
}
}
private async collectAndSendAnalytics() {
@@ -262,19 +249,38 @@ class TelemetryClient {
num_clients: stats.numClients,
num_identity_providers: stats.numIdentityProviders,
num_sites_online: stats.numSitesOnline,
resources: stats.resources.map((r) => ({
name: this.anon(r.name),
sso_enabled: r.sso,
protocol: r.protocol,
http_enabled: r.http
})),
sites: stats.sites.map((s) => ({
site_name: this.anon(s.siteName),
megabytes_in: s.megabytesIn,
megabytes_out: s.megabytesOut,
type: s.type,
online: s.online
})),
num_resources_sso_enabled: stats.resources.filter(
(r) => r.sso
).length,
num_resources_non_http: stats.resources.filter(
(r) => !r.http
).length,
num_newt_sites: stats.sites.filter((s) => s.type === "newt")
.length,
num_local_sites: stats.sites.filter(
(s) => s.type === "local"
).length,
num_wg_sites: stats.sites.filter(
(s) => s.type === "wireguard"
).length,
avg_megabytes_in:
stats.sites.length > 0
? Math.round(
stats.sites.reduce(
(sum, s) => sum + (s.megabytesIn ?? 0),
0
) / stats.sites.length
)
: 0,
avg_megabytes_out:
stats.sites.length > 0
? Math.round(
stats.sites.reduce(
(sum, s) => sum + (s.megabytesOut ?? 0),
0
) / stats.sites.length
)
: 0,
num_api_keys: stats.numApiKeys,
num_custom_roles: stats.numCustomRoles
}

View File

@@ -142,8 +142,24 @@ export class TraefikConfigManager {
const wildcardExists = await this.fileExists(wildcardPath);
let lastModified: Date | null = null;
const expiresAt: Date | null = null;
let expiresAt: number | null = null;
let wildcard = false;
const expiresAtPath = path.join(domainDir, ".expires_at");
const expiresAtExists = await this.fileExists(expiresAtPath);
if (expiresAtExists) {
try {
const expiresAtStr = fs
.readFileSync(expiresAtPath, "utf8")
.trim();
expiresAt = parseInt(expiresAtStr, 10);
if (isNaN(expiresAt)) {
expiresAt = null;
}
} catch {
expiresAt = null;
}
}
if (lastUpdateExists) {
try {
@@ -179,7 +195,7 @@ export class TraefikConfigManager {
state.set(domain, {
exists: certExists && keyExists,
lastModified,
lastModified: lastModified ? Math.floor(lastModified.getTime() / 1000) : null,
expiresAt,
wildcard
});
@@ -259,9 +275,9 @@ export class TraefikConfigManager {
// Check if certificate is expiring soon (within 30 days)
if (localState.expiresAt) {
const daysUntilExpiry =
(localState.expiresAt - Math.floor(Date.now() / 1000)) /
(1000 * 60 * 60 * 24);
const nowInSeconds = Math.floor(Date.now() / 1000);
const secondsUntilExpiry = localState.expiresAt - nowInSeconds;
const daysUntilExpiry = secondsUntilExpiry / (60 * 60 * 24);
if (daysUntilExpiry < 30) {
logger.info(
`Fetching certificates due to upcoming expiry for ${domain} (${Math.round(daysUntilExpiry)} days remaining)`
@@ -309,10 +325,7 @@ export class TraefikConfigManager {
this.lastActiveDomains = new Set(domains);
}
if (
process.env.USE_PANGOLIN_DNS === "true" &&
build != "oss"
) {
if (process.env.USE_PANGOLIN_DNS === "true" && build != "oss") {
// Scan current local certificate state
this.lastLocalCertificateState =
await this.scanLocalCertificateState();
@@ -450,7 +463,8 @@ export class TraefikConfigManager {
currentExitNode,
config.getRawConfig().traefik.site_types,
build == "oss", // filter out the namespace domains in open source
build != "oss" // generate the login pages on the cloud and hybrid
build != "oss", // generate the login pages on the cloud and hybrid,
build == "saas" ? false : config.getRawConfig().traefik.allow_raw_resources // dont allow raw resources on saas otherwise use config
);
const domains = new Set<string>();
@@ -502,6 +516,25 @@ export class TraefikConfigManager {
};
}
// tcp:
// serversTransports:
// pp-transport-v1:
// proxyProtocol:
// version: 1
// pp-transport-v2:
// proxyProtocol:
// version: 2
if (build != "saas") {
// add the serversTransports section if not present
if (traefikConfig.tcp && !traefikConfig.tcp.serversTransports) {
traefikConfig.tcp.serversTransports = {
"pp-transport-v1": { proxyProtocol: { version: 1 } },
"pp-transport-v2": { proxyProtocol: { version: 2 } }
};
}
}
return { domains, traefikConfig };
} catch (error) {
// pull data out of the axios error to log
@@ -753,6 +786,16 @@ export class TraefikConfigManager {
"utf8"
);
// Store the certificate expiry time
if (cert.expiresAt) {
const expiresAtPath = path.join(domainDir, ".expires_at");
fs.writeFileSync(
expiresAtPath,
cert.expiresAt.toString(),
"utf8"
);
}
logger.info(
`Certificate updated for domain: ${cert.domain}${cert.wildcard ? " (wildcard)" : ""}`
);

View File

@@ -1,4 +1,4 @@
import { db, targetHealthCheck } from "@server/db";
import { db, targetHealthCheck, domains } from "@server/db";
import {
and,
eq,
@@ -23,7 +23,8 @@ export async function getTraefikConfig(
exitNodeId: number,
siteTypes: string[],
filterOutNamespaceDomains = false,
generateLoginPageRouters = false
generateLoginPageRouters = false,
allowRawResources = true
): Promise<any> {
// Define extended target type with site information
type TargetWithSite = Target & {
@@ -56,6 +57,8 @@ export async function getTraefikConfig(
setHostHeader: resources.setHostHeader,
enableProxy: resources.enableProxy,
headers: resources.headers,
proxyProtocol: resources.proxyProtocol,
proxyProtocolVersion: resources.proxyProtocolVersion,
// Target fields
targetId: targets.targetId,
targetEnabled: targets.enabled,
@@ -75,11 +78,15 @@ export async function getTraefikConfig(
siteType: sites.type,
siteOnline: sites.online,
subnet: sites.subnet,
exitNodeId: sites.exitNodeId
exitNodeId: sites.exitNodeId,
// Domain cert resolver fields
domainCertResolver: domains.certResolver,
preferWildcardCert: domains.preferWildcardCert
})
.from(sites)
.innerJoin(targets, eq(targets.siteId, sites.siteId))
.innerJoin(resources, eq(resources.resourceId, targets.resourceId))
.leftJoin(domains, eq(domains.domainId, resources.domainId))
.leftJoin(
targetHealthCheck,
eq(targetHealthCheck.targetId, targets.targetId)
@@ -92,7 +99,8 @@ export async function getTraefikConfig(
eq(sites.exitNodeId, exitNodeId),
and(
isNull(sites.exitNodeId),
sql`(${siteTypes.includes("local") ? 1 : 0} = 1)` // only allow local sites if "local" is in siteTypes
sql`(${siteTypes.includes("local") ? 1 : 0} = 1)`, // only allow local sites if "local" is in siteTypes
eq(sites.type, "local")
)
),
or(
@@ -100,7 +108,7 @@ export async function getTraefikConfig(
isNull(targetHealthCheck.hcHealth) // Include targets with no health check record
),
inArray(sites.type, siteTypes),
config.getRawConfig().traefik.allow_raw_resources
allowRawResources
? isNotNull(resources.http) // ignore the http check if allow_raw_resources is true
: eq(resources.http, true)
)
@@ -163,11 +171,16 @@ export async function getTraefikConfig(
enableProxy: row.enableProxy,
targets: [],
headers: row.headers,
proxyProtocol: row.proxyProtocol,
proxyProtocolVersion: row.proxyProtocolVersion ?? 1,
path: row.path, // the targets will all have the same path
pathMatchType: row.pathMatchType, // the targets will all have the same pathMatchType
rewritePath: row.rewritePath,
rewritePathType: row.rewritePathType,
priority: priority // may be null, we fallback later
priority: priority,
// Store domain cert resolver fields
domainCertResolver: row.domainCertResolver,
preferWildcardCert: row.preferWildcardCert
});
}
@@ -246,21 +259,35 @@ export async function getTraefikConfig(
wildCard = resource.fullDomain;
}
const configDomain = config.getDomain(resource.domainId);
const globalDefaultResolver =
config.getRawConfig().traefik.cert_resolver;
const globalDefaultPreferWildcard =
config.getRawConfig().traefik.prefer_wildcard_cert;
let certResolver: string, preferWildcardCert: boolean;
if (!configDomain) {
certResolver = config.getRawConfig().traefik.cert_resolver;
preferWildcardCert =
config.getRawConfig().traefik.prefer_wildcard_cert;
const domainCertResolver = resource.domainCertResolver;
const preferWildcardCert = resource.preferWildcardCert;
let resolverName: string | undefined;
let preferWildcard: boolean | undefined;
// Handle both letsencrypt & custom cases
if (domainCertResolver) {
resolverName = domainCertResolver.trim();
} else {
certResolver = configDomain.cert_resolver;
preferWildcardCert = configDomain.prefer_wildcard_cert;
resolverName = globalDefaultResolver;
}
if (
preferWildcardCert !== undefined &&
preferWildcardCert !== null
) {
preferWildcard = preferWildcardCert;
} else {
preferWildcard = globalDefaultPreferWildcard;
}
const tls = {
certResolver: certResolver,
...(preferWildcardCert
certResolver: resolverName,
...(preferWildcard
? {
domains: [
{
@@ -318,9 +345,9 @@ export async function getTraefikConfig(
routerMiddlewares.push(rewriteMiddlewareName);
}
logger.debug(
`Created path rewrite middleware ${rewriteMiddlewareName}: ${resource.pathMatchType}(${resource.path}) -> ${resource.rewritePathType}(${resource.rewritePath})`
);
// logger.debug(
// `Created path rewrite middleware ${rewriteMiddlewareName}: ${resource.pathMatchType}(${resource.path}) -> ${resource.rewritePathType}(${resource.rewritePath})`
// );
} catch (error) {
logger.error(
`Failed to create path rewrite middleware for resource ${resource.resourceId}: ${error}`
@@ -561,6 +588,8 @@ export async function getTraefikConfig(
...(protocol === "tcp" ? { rule: "HostSNI(`*`)" } : {})
};
const ppPrefix = config.getRawConfig().traefik.pp_transport_prefix;
config_output[protocol].services[serviceName] = {
loadBalancer: {
servers: (() => {
@@ -614,6 +643,11 @@ export async function getTraefikConfig(
}
});
})(),
...(resource.proxyProtocol && protocol == "tcp"
? {
serversTransport: `${ppPrefix}${resource.proxyProtocolVersion || 1}@file` // TODO: does @file here cause issues?
}
: {}),
...(resource.stickySession
? {
sticky: {

Some files were not shown because too many files have changed in this diff Show More