mirror of
https://github.com/Alvin-Zilverstand/nginx-proxy-manager.git
synced 2026-11-22 06:03:10 +01:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8cd8b57a3c | ||
|
|
2cfd3395cf | ||
|
|
c41ec008bb | ||
|
|
900bb1e480 | ||
|
|
633b653f79 | ||
|
|
58566c9d75 | ||
|
|
c53f52ab51 | ||
|
|
9445038b36 | ||
|
|
b1e0473a19 | ||
|
|
95f1b74757 | ||
|
|
8509e1b378 | ||
|
|
5f35e4916f | ||
|
|
da12ee5b0c | ||
|
|
f47d85da9e | ||
|
|
4282d6c6e9 | ||
|
|
210366cca0 | ||
|
|
918728fcac | ||
|
|
0453ddca35 | ||
|
|
35ad8227d7 | ||
|
|
4a0f212289 | ||
|
|
9aa7fd5722 | ||
|
|
76f09db610 |
No files matched your search
@@ -1,7 +1,7 @@
|
||||
<p align="center">
|
||||
<img src="https://nginxproxymanager.com/github.png">
|
||||
<br><br>
|
||||
<img src="https://img.shields.io/badge/version-2.15.1-green.svg?style=for-the-badge">
|
||||
<img src="https://img.shields.io/badge/version-2.16.0-green.svg?style=for-the-badge">
|
||||
<a href="https://hub.docker.com/repository/docker/jc21/nginx-proxy-manager">
|
||||
<img src="https://img.shields.io/docker/stars/jc21/nginx-proxy-manager.svg?style=for-the-badge">
|
||||
</a>
|
||||
|
||||
+2
-2
@@ -7,8 +7,8 @@ Older versions are not actively maintained.
|
||||
|
||||
| Version | Supported |
|
||||
| ------- | --------- |
|
||||
| 2.15.x (latest) | :white_check_mark: |
|
||||
| < 2.15.0 | :x: |
|
||||
| 2.16.x (latest) | :white_check_mark: |
|
||||
| < 2.16.0 | :x: |
|
||||
|
||||
Docker images: `jc21/nginx-proxy-manager:latest`, `jc21/nginx-proxy-manager:2`
|
||||
|
||||
|
||||
@@ -2,7 +2,9 @@ import fs from "node:fs";
|
||||
import batchflow from "batchflow";
|
||||
import _ from "lodash";
|
||||
import errs from "../lib/error.js";
|
||||
import { isMysql, isPostgres } from "../lib/config.js";
|
||||
import utils from "../lib/utils.js";
|
||||
import db from "../db.js";
|
||||
import { access as logger } from "../logger.js";
|
||||
import accessListModel from "../models/access_list.js";
|
||||
import accessListAuthModel from "../models/access_list_auth.js";
|
||||
@@ -15,6 +17,38 @@ const omissions = () => {
|
||||
return ["is_deleted"];
|
||||
};
|
||||
|
||||
/**
|
||||
* Find proxy hosts that reference an access list in their locations JSON.
|
||||
*
|
||||
* @param {Integer} accessListId
|
||||
* @returns {Promise<Array>}
|
||||
*/
|
||||
const getProxyHostsUsingAccessListInLocations = async (accessListId) => {
|
||||
let result;
|
||||
if (isMysql()) {
|
||||
const searchObj = JSON.stringify([{ access_list_id: accessListId }]);
|
||||
result = await db().raw(
|
||||
"SELECT id FROM proxy_host WHERE is_deleted = 0 AND JSON_CONTAINS(locations, ?, ?)",
|
||||
[searchObj, "$"],
|
||||
);
|
||||
} else if (isPostgres()) {
|
||||
result = await db().raw(
|
||||
"SELECT id FROM proxy_host WHERE is_deleted = 0 AND locations::jsonb @> ?::jsonb",
|
||||
[JSON.stringify([{ access_list_id: accessListId }])],
|
||||
);
|
||||
} else {
|
||||
result = await db().raw(
|
||||
"SELECT id FROM proxy_host WHERE is_deleted = 0 AND locations LIKE ?",
|
||||
[`%"access_list_id":${accessListId}%`],
|
||||
);
|
||||
}
|
||||
// knex raw() returns [rows, metadata] for MySQL, { rows } for Postgres and rows for SQLite
|
||||
if (!Array.isArray(result)) {
|
||||
return result?.rows || [];
|
||||
}
|
||||
return (Array.isArray(result[0]) ? result[0] : result) || [];
|
||||
};
|
||||
|
||||
const internalAccessList = {
|
||||
/**
|
||||
* @param {Access} access
|
||||
@@ -187,6 +221,24 @@ const internalAccessList = {
|
||||
if (Number.parseInt(freshRow.proxy_host_count, 10)) {
|
||||
await internalNginx.bulkGenerateConfigs("proxy_host", freshRow.proxy_hosts);
|
||||
}
|
||||
|
||||
// Also regenerate configs for proxy hosts that reference this access list in their locations
|
||||
const locationHostRows = await getProxyHostsUsingAccessListInLocations(data.id);
|
||||
if (locationHostRows?.length) {
|
||||
const locationHostIds = locationHostRows.map((r) => r.id).filter((id) => {
|
||||
// Exclude hosts already regenerated above
|
||||
return !freshRow.proxy_hosts?.find((h) => h.id === id);
|
||||
});
|
||||
if (locationHostIds.length) {
|
||||
const locationHosts = await proxyHostModel.query()
|
||||
.where("is_deleted", 0)
|
||||
.whereIn("id", locationHostIds)
|
||||
.allowGraph(proxyHostModel.defaultAllowGraph)
|
||||
.withGraphFetched("[owner, certificate, access_list.[clients,items]]");
|
||||
await internalNginx.bulkGenerateConfigs("proxy_host", locationHosts);
|
||||
}
|
||||
}
|
||||
|
||||
await internalNginx.reload();
|
||||
return internalAccessList.maskItems(freshRow);
|
||||
},
|
||||
@@ -268,17 +320,36 @@ const internalAccessList = {
|
||||
});
|
||||
|
||||
// 2. update any proxy hosts that were using it (ignoring permissions)
|
||||
if (row.proxy_hosts) {
|
||||
const affectedHostIds = new Set((row.proxy_hosts || []).map((h) => h.id));
|
||||
if (affectedHostIds.size) {
|
||||
await proxyHostModel.query().where("access_list_id", "=", row.id).patch({ access_list_id: 0 });
|
||||
}
|
||||
|
||||
// 3. reconfigure those hosts, then reload nginx
|
||||
// set the access_list_id to zero for these items
|
||||
row.proxy_hosts.map((_val, idx) => {
|
||||
row.proxy_hosts[idx].access_list_id = 0;
|
||||
return true;
|
||||
});
|
||||
// Also clear it from any proxy host locations using it, these will then inherit the host's access list
|
||||
const locationHostRows = await getProxyHostsUsingAccessListInLocations(row.id);
|
||||
for (const { id: hostId } of locationHostRows) {
|
||||
const host = await proxyHostModel.query().where("id", hostId).first();
|
||||
if (host?.locations?.some((loc) => loc.access_list_id === row.id)) {
|
||||
const updatedLocations = host.locations.map((loc) => {
|
||||
if (loc.access_list_id === row.id) {
|
||||
return { ...loc, access_list_id: 0 };
|
||||
}
|
||||
return loc;
|
||||
});
|
||||
await proxyHostModel.query().where("id", hostId).patch({ locations: updatedLocations });
|
||||
affectedHostIds.add(hostId);
|
||||
}
|
||||
}
|
||||
|
||||
await internalNginx.bulkGenerateConfigs("proxy_host", row.proxy_hosts);
|
||||
// 3. reconfigure those hosts from fresh rows, then reload nginx
|
||||
if (affectedHostIds.size) {
|
||||
const affectedHosts = await proxyHostModel
|
||||
.query()
|
||||
.where("is_deleted", 0)
|
||||
.whereIn("id", [...affectedHostIds])
|
||||
.allowGraph(proxyHostModel.defaultAllowGraph)
|
||||
.withGraphFetched("[owner, certificate, access_list.[clients,items]]");
|
||||
await internalNginx.bulkGenerateConfigs("proxy_host", affectedHosts);
|
||||
}
|
||||
|
||||
await internalNginx.reload();
|
||||
|
||||
@@ -881,10 +881,20 @@ const internalCertificate = {
|
||||
const result = await utils.execFile(certbotCommand, args, adds.opts);
|
||||
logger.info(result);
|
||||
return result;
|
||||
} catch (err) {
|
||||
// Don't fail if file does not exist, so no need for action in the callback
|
||||
} finally {
|
||||
// Remove the credentials file whether certbot succeeded or failed.
|
||||
//
|
||||
// This cleanup used to sit in a catch block, so it only ran when issuance FAILED.
|
||||
// A certificate that issued successfully left its DNS provider API credentials in
|
||||
// /etc/letsencrypt/credentials for the entire life of that certificate. Nothing
|
||||
// reads the file between certbot runs, so there is no reason to keep it:
|
||||
// renewLetsEncryptSslWithDnsChallenge() writes it again immediately before each
|
||||
// renewal.
|
||||
//
|
||||
// unlink is fire-and-forget with an empty callback. If the file is already gone
|
||||
// that is the end state we wanted anyway, and a missing file must never turn a
|
||||
// successful issuance into a failure.
|
||||
fs.unlink(credentialsLocation, () => {});
|
||||
throw err;
|
||||
}
|
||||
},
|
||||
|
||||
@@ -981,6 +991,43 @@ const internalCertificate = {
|
||||
`Renewing LetsEncrypt certificates via ${dnsPlugin.name} for Cert #${certificate.id}: ${certificate.domain_names.join(", ")}`,
|
||||
);
|
||||
|
||||
// certbot reads the DNS credentials back from the path recorded in the renewal config
|
||||
// it wrote at issuance time, for example:
|
||||
//
|
||||
// authenticator = dns-cloudflare
|
||||
// dns_cloudflare_credentials = /etc/letsencrypt/credentials/credentials-27
|
||||
//
|
||||
// so the file has to be present for the duration of this run. Write it here and remove
|
||||
// it again below rather than leaving it on disk between renewals.
|
||||
//
|
||||
// Leaving it is an avoidable exposure. Anything running as root - a compromised
|
||||
// process, a script, malware - can read the token and use it to issue valid Let's
|
||||
// Encrypt certificates for the domain. Those certificates are genuinely trusted, so
|
||||
// traffic presented with them passes TLS inspection, IDS/IPS and DLP that would
|
||||
// otherwise flag it, and an exfiltration path built on them looks like ordinary
|
||||
// HTTPS. The exposure window should be one certbot run, not the life of the
|
||||
// certificate.
|
||||
//
|
||||
// The value is not on the certificate object we were handed: renew() sources that from
|
||||
// internalCertificate.get(), which pipes the row through utils.omitRow(omissions()) so
|
||||
// meta.dns_provider_credentials can never travel out over the API. Read the row from
|
||||
// the model directly to get at it.
|
||||
const row = await certificateModel.query().where("id", certificate.id).first();
|
||||
const credentials = row?.meta?.dns_provider_credentials;
|
||||
const credentialsLocation = `/etc/letsencrypt/credentials/credentials-${certificate.id}`;
|
||||
|
||||
if (credentials) {
|
||||
fs.mkdirSync("/etc/letsencrypt/credentials", { recursive: true });
|
||||
fs.writeFileSync(credentialsLocation, credentials, { mode: 0o600 });
|
||||
} else {
|
||||
// Nothing stored to write. A certificate issued under the previous behaviour may
|
||||
// still have its file on disk; leave it be and let certbot decide. Throwing here
|
||||
// would break a renewal that would otherwise have succeeded.
|
||||
logger.warn(
|
||||
`No stored DNS credentials for Cert #${certificate.id}; relying on any existing ${credentialsLocation}`,
|
||||
);
|
||||
}
|
||||
|
||||
const args = [
|
||||
"renew",
|
||||
"--force-renewal",
|
||||
@@ -1008,9 +1055,19 @@ const internalCertificate = {
|
||||
|
||||
logger.info(`Command: ${certbotCommand} ${args ? args.join(" ") : ""}`);
|
||||
|
||||
const result = await utils.execFile(certbotCommand, args, adds.opts);
|
||||
logger.info(result);
|
||||
return result;
|
||||
try {
|
||||
const result = await utils.execFile(certbotCommand, args, adds.opts);
|
||||
logger.info(result);
|
||||
return result;
|
||||
} finally {
|
||||
// Only clean up a file we put there ourselves. If `credentials` came back empty we
|
||||
// wrote nothing, and an older file left on disk by the previous behaviour is the
|
||||
// only thing keeping that certificate renewable - deleting it would break the next
|
||||
// run for no gain.
|
||||
if (credentials) {
|
||||
fs.unlink(credentialsLocation, () => {});
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,229 @@
|
||||
import fs from "node:fs";
|
||||
import errs from "../lib/error.js";
|
||||
import internalDeadHost from "./dead-host.js";
|
||||
import internalProxyHost from "./proxy-host.js";
|
||||
import internalRedirectionHost from "./redirection-host.js";
|
||||
import internalStream from "./stream.js";
|
||||
|
||||
const SYSTEM_LOG_FILE = "/data/logs/backend.log";
|
||||
const LETSENCRYPT_LOG_FILE = "/data/logs/letsencrypt.log";
|
||||
|
||||
// Matches the access_log/error_log paths written by the nginx templates
|
||||
// (see backend/templates/{proxy_host,redirection_host,dead_host,stream}.conf).
|
||||
// This is a fixed, server-side lookup table - a host log path is always derived
|
||||
// from a validated `host_type` enum + numeric `host_id`, never from a client-supplied
|
||||
// path or filename, so there is no path-traversal surface here.
|
||||
const HOST_FILE_PREFIX = {
|
||||
proxy: "proxy-host",
|
||||
redirection: "redirection-host",
|
||||
dead: "dead-host",
|
||||
stream: "stream",
|
||||
};
|
||||
|
||||
const DEFAULT_LINES = 200;
|
||||
const MAX_LINES = 1000;
|
||||
const CHUNK_SIZE = 64 * 1024;
|
||||
// Never scan further back than this, regardless of how many lines were requested,
|
||||
// so a huge or pathological log file can't turn a single request into unbounded I/O.
|
||||
const MAX_SCAN_BYTES = 5 * 1024 * 1024;
|
||||
|
||||
/**
|
||||
* Reads at most `maxLines` lines from the end of a file, without loading the
|
||||
* whole file into memory. Reads backwards in fixed-size chunks until enough
|
||||
* newlines have been seen, the start of the file is reached, or the hard
|
||||
* MAX_SCAN_BYTES ceiling is hit.
|
||||
*
|
||||
* @param {String} filePath
|
||||
* @param {Number} maxLines
|
||||
* @returns {Promise<{lines: String[], size: Number, truncated: Boolean}>}
|
||||
*/
|
||||
const readLastLines = async (filePath, maxLines) => {
|
||||
let handle;
|
||||
try {
|
||||
handle = await fs.promises.open(filePath, "r");
|
||||
const stat = await handle.stat();
|
||||
const { size } = stat;
|
||||
|
||||
if (size === 0) {
|
||||
return { lines: [], size: 0, truncated: false };
|
||||
}
|
||||
|
||||
let position = size;
|
||||
let scanned = 0;
|
||||
let newlineCount = 0;
|
||||
const chunks = [];
|
||||
|
||||
while (position > 0 && newlineCount <= maxLines && scanned < MAX_SCAN_BYTES) {
|
||||
const readSize = Math.min(CHUNK_SIZE, position);
|
||||
position -= readSize;
|
||||
const buffer = Buffer.alloc(readSize);
|
||||
await handle.read(buffer, 0, readSize, position);
|
||||
scanned += readSize;
|
||||
for (let i = buffer.length - 1; i >= 0; i--) {
|
||||
if (buffer[i] === 0x0a) newlineCount++;
|
||||
}
|
||||
chunks.unshift(buffer);
|
||||
}
|
||||
|
||||
const truncated = position > 0 && scanned >= MAX_SCAN_BYTES;
|
||||
|
||||
// If we didn't start reading from byte 0, the first line in our buffer is only
|
||||
// partial *unless* it happens that `position` landed exactly on a line boundary
|
||||
// (the byte right before it is a newline) - check that one byte to avoid
|
||||
// silently dropping a perfectly valid line.
|
||||
let startsOnLineBoundary = position === 0;
|
||||
if (position > 0) {
|
||||
const boundaryByte = Buffer.alloc(1);
|
||||
await handle.read(boundaryByte, 0, 1, position - 1);
|
||||
startsOnLineBoundary = boundaryByte[0] === 0x0a;
|
||||
}
|
||||
|
||||
const text = Buffer.concat(chunks).toString("utf8");
|
||||
const allLines = text.split("\n");
|
||||
|
||||
if (!startsOnLineBoundary && allLines.length > 0) {
|
||||
allLines.shift();
|
||||
}
|
||||
// Drop the trailing empty element caused by a final trailing newline.
|
||||
if (allLines.length > 0 && allLines[allLines.length - 1] === "") {
|
||||
allLines.pop();
|
||||
}
|
||||
|
||||
return { lines: allLines.slice(-maxLines), size, truncated };
|
||||
} finally {
|
||||
if (handle) {
|
||||
await handle.close();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Resolves a validated {type, host_type, host_id, channel} selection to the
|
||||
* fixed, absolute path of the log file on disk. Throws if the combination
|
||||
* isn't a recognised source.
|
||||
*
|
||||
* `channel` ("access" | "error") picks which of the two log files nginx writes
|
||||
* per host - it's deliberately not named "stream" to avoid confusion with the
|
||||
* "stream" host_type (TCP/UDP stream hosts).
|
||||
*
|
||||
* @param {Object} data
|
||||
* @returns {String}
|
||||
*/
|
||||
const resolveFilePath = (data) => {
|
||||
switch (data.type) {
|
||||
case "system":
|
||||
return SYSTEM_LOG_FILE;
|
||||
case "letsencrypt":
|
||||
return LETSENCRYPT_LOG_FILE;
|
||||
case "host": {
|
||||
const prefix = HOST_FILE_PREFIX[data.host_type];
|
||||
if (!prefix || !data.host_id || !["access", "error"].includes(data.channel)) {
|
||||
throw new errs.ValidationError("Invalid host log source");
|
||||
}
|
||||
return `/data/logs/${prefix}-${data.host_id}_${data.channel}.log`;
|
||||
}
|
||||
default:
|
||||
throw new errs.ItemNotFoundError(data.type);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {Array} rows
|
||||
* @returns {Array}
|
||||
*/
|
||||
const toHostOptions = (rows) =>
|
||||
rows.map((row) => ({
|
||||
id: row.id,
|
||||
label: Array.isArray(row.domain_names) ? row.domain_names.join(", ") : `Host #${row.id}`,
|
||||
}));
|
||||
|
||||
const internalLogViewer = {
|
||||
/**
|
||||
* Lists the log sources available for the log viewer: the system (backend)
|
||||
* log, the Let's Encrypt (certbot) log, and one entry per host the caller
|
||||
* can see, for each host type.
|
||||
*
|
||||
* @param {Access} access
|
||||
* @returns {Promise}
|
||||
*/
|
||||
listSources: async (access) => {
|
||||
await access.can("logs:list");
|
||||
|
||||
const [proxyHosts, redirectionHosts, deadHosts, streams] = await Promise.all([
|
||||
internalProxyHost.getAll(access),
|
||||
internalRedirectionHost.getAll(access),
|
||||
internalDeadHost.getAll(access),
|
||||
internalStream.getAll(access),
|
||||
]);
|
||||
|
||||
return {
|
||||
system: { label: "System" },
|
||||
letsencrypt: { label: "Let's Encrypt" },
|
||||
hosts: {
|
||||
proxy: toHostOptions(proxyHosts),
|
||||
redirection: toHostOptions(redirectionHosts),
|
||||
dead: toHostOptions(deadHosts),
|
||||
stream: streams.map((row) => ({
|
||||
id: row.id,
|
||||
label: `Port ${row.incoming_port} → ${row.forwarding_host}:${row.forwarding_port}`,
|
||||
})),
|
||||
},
|
||||
};
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns the last N lines of the requested log source, optionally
|
||||
* filtered by level and/or a plain-text search term.
|
||||
*
|
||||
* @param {Access} access
|
||||
* @param {Object} data
|
||||
* @param {String} data.type "system" | "letsencrypt" | "host"
|
||||
* @param {String} [data.host_type] "proxy" | "redirection" | "dead" | "stream"
|
||||
* @param {Number} [data.host_id]
|
||||
* @param {String} [data.channel] "access" | "error"
|
||||
* @param {Number} [data.lines]
|
||||
* @param {String} [data.level]
|
||||
* @param {String} [data.search]
|
||||
* @returns {Promise}
|
||||
*/
|
||||
tail: async (access, data) => {
|
||||
await access.can("logs:list");
|
||||
|
||||
const filePath = resolveFilePath(data);
|
||||
const lines = Math.min(Math.max(data.lines || DEFAULT_LINES, 1), MAX_LINES);
|
||||
|
||||
let result;
|
||||
try {
|
||||
result = await readLastLines(filePath, lines);
|
||||
} catch (err) {
|
||||
if (err.code === "ENOENT") {
|
||||
return { lines: [], size: 0, truncated: false, exists: false };
|
||||
}
|
||||
throw err;
|
||||
}
|
||||
|
||||
let outputLines = result.lines;
|
||||
|
||||
// Only the system log is written in our own "LEVEL [scope]" format - level
|
||||
// filtering on nginx/certbot lines would just match nothing and look like an
|
||||
// empty log, so the filter is a no-op for any other source.
|
||||
if (data.type === "system" && data.level) {
|
||||
const needle = ` ${data.level.toUpperCase().padEnd(7)} `;
|
||||
outputLines = outputLines.filter((line) => line.includes(needle));
|
||||
}
|
||||
|
||||
if (data.search) {
|
||||
const needle = data.search.toLowerCase();
|
||||
outputLines = outputLines.filter((line) => line.toLowerCase().includes(needle));
|
||||
}
|
||||
|
||||
return {
|
||||
lines: outputLines,
|
||||
size: result.size,
|
||||
truncated: result.truncated,
|
||||
exists: true,
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
export default internalLogViewer;
|
||||
@@ -1,10 +1,12 @@
|
||||
import fs from "node:fs";
|
||||
import net from "node:net";
|
||||
import { dirname } from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import _ from "lodash";
|
||||
import errs from "../lib/error.js";
|
||||
import utils from "../lib/utils.js";
|
||||
import { debug, nginx as logger } from "../logger.js";
|
||||
import accessListModel from "../models/access_list.js";
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
@@ -167,6 +169,24 @@ const internalNginx = {
|
||||
host.locations[i],
|
||||
);
|
||||
|
||||
// A location with its own access list overrides the host's,
|
||||
// otherwise it inherits the host's access list
|
||||
let locationAccessList = null;
|
||||
if (locationCopy.access_list_id > 0 && locationCopy.access_list_id !== host.access_list?.id) {
|
||||
locationAccessList = await accessListModel
|
||||
.query()
|
||||
.where("is_deleted", 0)
|
||||
.andWhere("id", locationCopy.access_list_id)
|
||||
.withGraphFetched("[clients,items]")
|
||||
.first();
|
||||
}
|
||||
if (locationAccessList) {
|
||||
locationCopy.access_list = locationAccessList;
|
||||
} else {
|
||||
locationCopy.access_list_id = host.access_list_id;
|
||||
locationCopy.access_list = host.access_list;
|
||||
}
|
||||
|
||||
if (locationCopy.forward_host.indexOf("/") > -1) {
|
||||
const splitted = locationCopy.forward_host.split("/");
|
||||
|
||||
@@ -178,7 +198,9 @@ const internalNginx = {
|
||||
}
|
||||
};
|
||||
|
||||
locationRendering().then(() => resolve(renderedLocations));
|
||||
locationRendering()
|
||||
.then(() => resolve(renderedLocations))
|
||||
.catch(reject);
|
||||
});
|
||||
},
|
||||
|
||||
@@ -226,6 +248,14 @@ const internalNginx = {
|
||||
host.forward_scheme = "$scheme";
|
||||
}
|
||||
|
||||
// A stream forwarding to an IPv6 literal must have the address wrapped in
|
||||
// square brackets before nginx appends ":<port>". Without the brackets nginx
|
||||
// reads the trailing ":<port>" as part of the address and rejects the upstream
|
||||
// ("invalid port in upstream"), so the stream saves but never activates (#5740).
|
||||
if (nice_host_type === "stream" && net.isIPv6(host.forwarding_host)) {
|
||||
host.forwarding_host = `[${host.forwarding_host}]`;
|
||||
}
|
||||
|
||||
if (host.locations) {
|
||||
//logger.info ('host.locations = ' + JSON.stringify(host.locations, null, 2));
|
||||
origLocations = [].concat(host.locations);
|
||||
@@ -262,6 +292,9 @@ const internalNginx = {
|
||||
debug(logger, `Could not write ${filename}:`, err.message);
|
||||
reject(new errs.ConfigurationError(err.message));
|
||||
});
|
||||
}).catch((err) => {
|
||||
debug(logger, `Could not render locations for ${filename}:`, err.message);
|
||||
reject(new errs.ConfigurationError(err.message));
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
@@ -83,28 +83,28 @@ const internalProxyHost = {
|
||||
expand: ["certificate", "owner", "access_list.[clients,items]"],
|
||||
});
|
||||
})
|
||||
.then((row) => {
|
||||
// Configure nginx
|
||||
return internalNginx.configure(proxyHostModel, "proxy_host", row).then(() => {
|
||||
.then(async (row) => {
|
||||
// Configure nginx
|
||||
return internalNginx.configure(proxyHostModel, "proxy_host", row).then(() => {
|
||||
return row;
|
||||
});
|
||||
})
|
||||
.then((row) => {
|
||||
// Audit log
|
||||
thisData.meta = _.assign({}, thisData.meta || {}, row.meta);
|
||||
|
||||
// Add to audit log
|
||||
return internalAuditLog
|
||||
.add(access, {
|
||||
action: "created",
|
||||
object_type: "proxy-host",
|
||||
object_id: row.id,
|
||||
meta: thisData,
|
||||
})
|
||||
.then(() => {
|
||||
return row;
|
||||
});
|
||||
})
|
||||
.then((row) => {
|
||||
// Audit log
|
||||
thisData.meta = _.assign({}, thisData.meta || {}, row.meta);
|
||||
|
||||
// Add to audit log
|
||||
return internalAuditLog
|
||||
.add(access, {
|
||||
action: "created",
|
||||
object_type: "proxy-host",
|
||||
object_id: row.id,
|
||||
meta: thisData,
|
||||
})
|
||||
.then(() => {
|
||||
return row;
|
||||
});
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -202,24 +202,24 @@ const internalProxyHost = {
|
||||
});
|
||||
});
|
||||
})
|
||||
.then(() => {
|
||||
return internalProxyHost
|
||||
.get(access, {
|
||||
id: thisData.id,
|
||||
expand: ["owner", "certificate", "access_list.[clients,items]"],
|
||||
})
|
||||
.then((row) => {
|
||||
if (!row.enabled) {
|
||||
// No need to add nginx config if host is disabled
|
||||
return row;
|
||||
}
|
||||
// Configure nginx
|
||||
return internalNginx.configure(proxyHostModel, "proxy_host", row).then((new_meta) => {
|
||||
row.meta = new_meta;
|
||||
return _.omit(internalHost.cleanRowCertificateMeta(row), omissions());
|
||||
});
|
||||
.then(() => {
|
||||
return internalProxyHost
|
||||
.get(access, {
|
||||
id: thisData.id,
|
||||
expand: ["owner", "certificate", "access_list.[clients,items]"],
|
||||
})
|
||||
.then(async (row) => {
|
||||
if (!row.enabled) {
|
||||
// No need to add nginx config if host is disabled
|
||||
return row;
|
||||
}
|
||||
// Configure nginx
|
||||
return internalNginx.configure(proxyHostModel, "proxy_host", row).then((new_meta) => {
|
||||
row.meta = new_meta;
|
||||
return _.omit(internalHost.cleanRowCertificateMeta(row), omissions());
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -326,39 +326,36 @@ const internalProxyHost = {
|
||||
expand: ["certificate", "owner", "access_list"],
|
||||
});
|
||||
})
|
||||
.then((row) => {
|
||||
if (!row?.id) {
|
||||
throw new errs.ItemNotFoundError(data.id);
|
||||
}
|
||||
if (row.enabled) {
|
||||
throw new errs.ValidationError("Host is already enabled");
|
||||
}
|
||||
.then(async (row) => {
|
||||
if (!row?.id) {
|
||||
throw new errs.ItemNotFoundError(data.id);
|
||||
}
|
||||
if (row.enabled) {
|
||||
throw new errs.ValidationError("Host is already enabled");
|
||||
}
|
||||
|
||||
row.enabled = 1;
|
||||
row.enabled = 1;
|
||||
|
||||
return proxyHostModel
|
||||
.query()
|
||||
.where("id", row.id)
|
||||
.patch({
|
||||
enabled: 1,
|
||||
})
|
||||
.then(() => {
|
||||
// Configure nginx
|
||||
return internalNginx.configure(proxyHostModel, "proxy_host", row);
|
||||
})
|
||||
.then(() => {
|
||||
// Add to audit log
|
||||
return internalAuditLog.add(access, {
|
||||
action: "enabled",
|
||||
object_type: "proxy-host",
|
||||
object_id: row.id,
|
||||
meta: _.omit(row, omissions()),
|
||||
});
|
||||
});
|
||||
})
|
||||
.then(() => {
|
||||
return true;
|
||||
await proxyHostModel
|
||||
.query()
|
||||
.where("id", row.id)
|
||||
.patch({
|
||||
enabled: 1,
|
||||
});
|
||||
|
||||
// Configure nginx
|
||||
await internalNginx.configure(proxyHostModel, "proxy_host", row);
|
||||
|
||||
// Add to audit log
|
||||
await internalAuditLog.add(access, {
|
||||
action: "enabled",
|
||||
object_type: "proxy-host",
|
||||
object_id: row.id,
|
||||
meta: _.omit(row, omissions()),
|
||||
});
|
||||
|
||||
return true;
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "roles#/definitions/admin"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
import net from "node:net";
|
||||
import Ajv from "ajv/dist/2020.js";
|
||||
import errs from "../error.js";
|
||||
|
||||
@@ -9,6 +10,8 @@ const ajv = new Ajv({
|
||||
coerceTypes: true,
|
||||
});
|
||||
|
||||
ajv.addFormat("ipv6", { type: "string", validate: (value) => net.isIPv6(value) });
|
||||
|
||||
/**
|
||||
* @param {Object} schema
|
||||
* @param {Object} payload
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import net from "node:net";
|
||||
import Ajv from "ajv/dist/2020.js";
|
||||
import _ from "lodash";
|
||||
import commonDefinitions from "../../schema/common.json" with { type: "json" };
|
||||
@@ -14,6 +15,8 @@ const ajv = new Ajv({
|
||||
schemas: [commonDefinitions],
|
||||
});
|
||||
|
||||
ajv.addFormat("ipv6", { type: "string", validate: (value) => net.isIPv6(value) });
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {Object} schema
|
||||
|
||||
+111
-11
@@ -1,3 +1,5 @@
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
import signale from "signale";
|
||||
import { isDebugMode } from "./lib/config.js";
|
||||
|
||||
@@ -5,17 +7,115 @@ const opts = {
|
||||
logLevel: "info",
|
||||
};
|
||||
|
||||
const global = new signale.Signale({ scope: "Global ", ...opts });
|
||||
const migrate = new signale.Signale({ scope: "Migrate ", ...opts });
|
||||
const express = new signale.Signale({ scope: "Express ", ...opts });
|
||||
const access = new signale.Signale({ scope: "Access ", ...opts });
|
||||
const nginx = new signale.Signale({ scope: "Nginx ", ...opts });
|
||||
const ssl = new signale.Signale({ scope: "SSL ", ...opts });
|
||||
const certbot = new signale.Signale({ scope: "Certbot ", ...opts });
|
||||
const importer = new signale.Signale({ scope: "Importer ", ...opts });
|
||||
const setup = new signale.Signale({ scope: "Setup ", ...opts });
|
||||
const ipRanges = new signale.Signale({ scope: "IP Ranges", ...opts });
|
||||
const remoteVersion = new signale.Signale({ scope: "Remote Version", ...opts });
|
||||
// Methods that are actually used across the codebase (see grep of `.info(`, `.warn(`, etc).
|
||||
// Only these are mirrored to the log file - decorative signale methods (star, note, watch, ...)
|
||||
// are left console-only since they carry no diagnostic value worth persisting.
|
||||
const PERSISTED_METHODS = ["info", "warn", "error", "debug", "success", "fatal", "complete"];
|
||||
|
||||
const LOG_FILE = "/data/logs/backend.log";
|
||||
// biome-ignore lint/suspicious/noControlCharactersInRegex: stripping ANSI colour codes before writing to disk
|
||||
const ANSI_PATTERN = /\x1b\[[0-9;]*m/g;
|
||||
|
||||
let fileStream = null;
|
||||
let lastOpenAttempt = 0;
|
||||
// If the file can't be opened (eg. running outside the standard Docker image, or in
|
||||
// CI without /data), don't retry on every single log call - but do retry periodically
|
||||
// so a transient issue (disk full, permissions fixed later) recovers without a restart.
|
||||
const REOPEN_COOLDOWN_MS = 30 * 1000;
|
||||
|
||||
/**
|
||||
* Lazily opens the backend log file for appending. If the directory isn't writable,
|
||||
* file logging is silently disabled and console logging continues unaffected.
|
||||
*
|
||||
* @returns {import('node:fs').WriteStream|null}
|
||||
*/
|
||||
const getFileStream = () => {
|
||||
if (fileStream) {
|
||||
return fileStream;
|
||||
}
|
||||
|
||||
const now = Date.now();
|
||||
if (now - lastOpenAttempt < REOPEN_COOLDOWN_MS) {
|
||||
return null;
|
||||
}
|
||||
lastOpenAttempt = now;
|
||||
|
||||
try {
|
||||
fs.mkdirSync(path.dirname(LOG_FILE), { recursive: true });
|
||||
const stream = fs.createWriteStream(LOG_FILE, { flags: "a" });
|
||||
stream.on("error", () => {
|
||||
fileStream = null;
|
||||
});
|
||||
fileStream = stream;
|
||||
} catch (_err) {
|
||||
fileStream = null;
|
||||
}
|
||||
return fileStream;
|
||||
};
|
||||
|
||||
/**
|
||||
* Formats and appends a single log line to the backend log file.
|
||||
* Never throws - a failure here must never take down the application.
|
||||
*
|
||||
* @param {String} level
|
||||
* @param {String} scope
|
||||
* @param {Array} args
|
||||
*/
|
||||
const writeToFile = (level, scope, args) => {
|
||||
const stream = getFileStream();
|
||||
if (!stream) {
|
||||
return;
|
||||
}
|
||||
|
||||
const message = args
|
||||
.map((arg) => {
|
||||
if (typeof arg === "string") return arg;
|
||||
if (arg instanceof Error) return arg.stack || arg.message;
|
||||
try {
|
||||
return JSON.stringify(arg);
|
||||
} catch (_err) {
|
||||
return String(arg);
|
||||
}
|
||||
})
|
||||
.join(" ")
|
||||
.replace(ANSI_PATTERN, "");
|
||||
|
||||
const line = `${new Date().toISOString()} ${level.toUpperCase().padEnd(7)} [${scope.trim()}] ${message}\n`;
|
||||
stream.write(line);
|
||||
};
|
||||
|
||||
/**
|
||||
* Wraps a Signale instance so that every call to one of PERSISTED_METHODS is also
|
||||
* appended to the backend log file, in addition to its normal console output.
|
||||
*
|
||||
* @param {Signale} instance
|
||||
* @param {String} scope
|
||||
* @returns {Signale}
|
||||
*/
|
||||
const withFileSink = (instance, scope) => {
|
||||
for (const method of PERSISTED_METHODS) {
|
||||
const original = instance[method].bind(instance);
|
||||
instance[method] = (...args) => {
|
||||
writeToFile(method, scope, args);
|
||||
return original(...args);
|
||||
};
|
||||
}
|
||||
return instance;
|
||||
};
|
||||
|
||||
const createLogger = (scope) => withFileSink(new signale.Signale({ scope, ...opts }), scope);
|
||||
|
||||
const global = createLogger("Global ");
|
||||
const migrate = createLogger("Migrate ");
|
||||
const express = createLogger("Express ");
|
||||
const access = createLogger("Access ");
|
||||
const nginx = createLogger("Nginx ");
|
||||
const ssl = createLogger("SSL ");
|
||||
const certbot = createLogger("Certbot ");
|
||||
const importer = createLogger("Importer ");
|
||||
const setup = createLogger("Setup ");
|
||||
const ipRanges = createLogger("IP Ranges");
|
||||
const remoteVersion = createLogger("Remote Version");
|
||||
|
||||
const debug = (logger, ...args) => {
|
||||
if (isDebugMode()) {
|
||||
|
||||
@@ -31,6 +31,10 @@ class AccessList extends Model {
|
||||
|
||||
$parseDatabaseJson(json) {
|
||||
const thisJson = super.$parseDatabaseJson(json);
|
||||
// Postgres returns COUNT() as a string
|
||||
if (typeof thisJson.proxy_host_count === "string") {
|
||||
thisJson.proxy_host_count = Number.parseInt(thisJson.proxy_host_count, 10);
|
||||
}
|
||||
return convertIntFieldsToBool(thisJson, boolFields);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
import express from "express";
|
||||
import internalLogViewer from "../internal/log-viewer.js";
|
||||
import jwtdecode from "../lib/express/jwt-decode.js";
|
||||
import validator from "../lib/validator/index.js";
|
||||
import { debug, express as logger } from "../logger.js";
|
||||
|
||||
const router = express.Router({
|
||||
caseSensitive: true,
|
||||
strict: true,
|
||||
mergeParams: true,
|
||||
});
|
||||
|
||||
/**
|
||||
* /api/logs/sources
|
||||
*/
|
||||
router
|
||||
.route("/sources")
|
||||
.options((_, res) => {
|
||||
res.sendStatus(204);
|
||||
})
|
||||
.all(jwtdecode())
|
||||
|
||||
/**
|
||||
* GET /api/logs/sources
|
||||
*
|
||||
* Lists the log sources available for the log viewer
|
||||
*/
|
||||
.get(async (req, res, next) => {
|
||||
try {
|
||||
const data = await internalLogViewer.listSources(res.locals.access);
|
||||
res.status(200).send(data);
|
||||
} catch (err) {
|
||||
debug(logger, `${req.method.toUpperCase()} ${req.path}: ${err}`);
|
||||
next(err);
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* /api/logs/tail
|
||||
*/
|
||||
router
|
||||
.route("/tail")
|
||||
.options((_, res) => {
|
||||
res.sendStatus(204);
|
||||
})
|
||||
.all(jwtdecode())
|
||||
|
||||
/**
|
||||
* GET /api/logs/tail
|
||||
*
|
||||
* Retrieve the last N lines of a log source
|
||||
*/
|
||||
.get(async (req, res, next) => {
|
||||
try {
|
||||
const data = await validator(
|
||||
{
|
||||
required: ["type"],
|
||||
additionalProperties: false,
|
||||
properties: {
|
||||
type: {
|
||||
type: "string",
|
||||
enum: ["system", "letsencrypt", "host"],
|
||||
},
|
||||
host_type: {
|
||||
anyOf: [{ type: "null" }, { type: "string", enum: ["proxy", "redirection", "dead", "stream"] }],
|
||||
},
|
||||
host_id: {
|
||||
anyOf: [{ type: "null" }, { type: "integer", minimum: 1 }],
|
||||
},
|
||||
channel: {
|
||||
anyOf: [{ type: "null" }, { type: "string", enum: ["access", "error"] }],
|
||||
},
|
||||
lines: {
|
||||
anyOf: [{ type: "null" }, { type: "integer", minimum: 1, maximum: 1000 }],
|
||||
},
|
||||
level: {
|
||||
anyOf: [
|
||||
{ type: "null" },
|
||||
{ type: "string", enum: ["INFO", "WARN", "ERROR", "DEBUG", "SUCCESS", "FATAL", "COMPLETE"] },
|
||||
],
|
||||
},
|
||||
search: {
|
||||
anyOf: [{ type: "null" }, { type: "string", minLength: 1, maxLength: 200 }],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
type: req.query.type,
|
||||
host_type: typeof req.query.host_type === "string" ? req.query.host_type : null,
|
||||
host_id: typeof req.query.host_id !== "undefined" ? req.query.host_id : null,
|
||||
channel: typeof req.query.channel === "string" ? req.query.channel : null,
|
||||
lines: typeof req.query.lines !== "undefined" ? req.query.lines : null,
|
||||
level: typeof req.query.level === "string" ? req.query.level : null,
|
||||
search: typeof req.query.search === "string" ? req.query.search : null,
|
||||
},
|
||||
);
|
||||
|
||||
const result = await internalLogViewer.tail(res.locals.access, data);
|
||||
res.status(200).send(result);
|
||||
} catch (err) {
|
||||
debug(logger, `${req.method.toUpperCase()} ${req.path}: ${err}`);
|
||||
next(err);
|
||||
}
|
||||
});
|
||||
|
||||
export default router;
|
||||
@@ -6,6 +6,7 @@ import pjson from "../package.json" with { type: "json" };
|
||||
import { isSetup } from "../setup.js";
|
||||
import auditLogRoutes from "./audit-log.js";
|
||||
import ciRoutes from "./ci.js";
|
||||
import logsRoutes from "./logs.js";
|
||||
import accessListsRoutes from "./nginx/access_lists.js";
|
||||
import certificatesHostsRoutes from "./nginx/certificates.js";
|
||||
import deadHostsRoutes from "./nginx/dead_hosts.js";
|
||||
@@ -50,6 +51,7 @@ router.use("/schema", schemaRoutes);
|
||||
router.use("/tokens", tokensRoutes);
|
||||
router.use("/users", usersRoutes);
|
||||
router.use("/audit-log", auditLogRoutes);
|
||||
router.use("/logs", logsRoutes);
|
||||
router.use("/reports", reportsRoutes);
|
||||
router.use("/settings", settingsRoutes);
|
||||
router.use("/version", versionRoutes);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import express from "express";
|
||||
import fs from "node:fs";
|
||||
import internalProxyHost from "../../internal/proxy-host.js";
|
||||
import jwtdecode from "../../lib/express/jwt-decode.js";
|
||||
import apiValidator from "../../lib/validator/api.js";
|
||||
@@ -206,4 +207,70 @@ router
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Proxy-host logs
|
||||
*
|
||||
* /api/nginx/proxy-hosts/123/logs
|
||||
*/
|
||||
router
|
||||
.route("/:host_id/logs")
|
||||
.options((_, res) => {
|
||||
res.sendStatus(204);
|
||||
})
|
||||
.all(jwtdecode())
|
||||
|
||||
/**
|
||||
* GET /api/nginx/proxy-hosts/123/logs
|
||||
*
|
||||
* Retrieve logs for a specific proxy-host
|
||||
*/
|
||||
.get(async (req, res, next) => {
|
||||
try {
|
||||
const data = await validator(
|
||||
{
|
||||
required: ["host_id"],
|
||||
additionalProperties: false,
|
||||
properties: {
|
||||
host_id: {
|
||||
$ref: "common#/properties/id",
|
||||
},
|
||||
type: {
|
||||
type: "string",
|
||||
enum: ["access", "error"],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
host_id: req.params.host_id,
|
||||
type: req.query.type || "access",
|
||||
},
|
||||
);
|
||||
|
||||
const hostId = Number.parseInt(data.host_id, 10);
|
||||
const logType = data.type === "error" ? "error" : "access";
|
||||
const logFile = `/data/logs/proxy-host-${hostId}_${logType}.log`;
|
||||
|
||||
// Check access permission
|
||||
await res.locals.access.can("proxy_hosts:get", hostId);
|
||||
|
||||
let logs = "";
|
||||
if (fs.existsSync(logFile)) {
|
||||
const content = fs.readFileSync(logFile, { encoding: "utf8" });
|
||||
const lines = content.split("\n");
|
||||
// Return last 1000 lines to avoid huge payloads
|
||||
const maxLines = 1000;
|
||||
if (lines.length > maxLines) {
|
||||
logs = lines.slice(-maxLines).join("\n");
|
||||
} else {
|
||||
logs = content;
|
||||
}
|
||||
}
|
||||
|
||||
res.status(200).send({ logs });
|
||||
} catch (err) {
|
||||
debug(logger, `${req.method.toUpperCase()} ${req.path}: ${err}`);
|
||||
next(err);
|
||||
}
|
||||
});
|
||||
|
||||
export default router;
|
||||
@@ -0,0 +1,69 @@
|
||||
{
|
||||
"type": "object",
|
||||
"description": "Available log sources for the log viewer",
|
||||
"required": ["system", "letsencrypt", "hosts"],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"system": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"label": {
|
||||
"type": "string",
|
||||
"example": "System"
|
||||
}
|
||||
}
|
||||
},
|
||||
"letsencrypt": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"label": {
|
||||
"type": "string",
|
||||
"example": "Let's Encrypt"
|
||||
}
|
||||
}
|
||||
},
|
||||
"hosts": {
|
||||
"type": "object",
|
||||
"required": ["proxy", "redirection", "dead", "stream"],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"proxy": {
|
||||
"$ref": "#/$defs/host-option-list"
|
||||
},
|
||||
"redirection": {
|
||||
"$ref": "#/$defs/host-option-list"
|
||||
},
|
||||
"dead": {
|
||||
"$ref": "#/$defs/host-option-list"
|
||||
},
|
||||
"stream": {
|
||||
"$ref": "#/$defs/host-option-list"
|
||||
}
|
||||
},
|
||||
"example": {
|
||||
"proxy": [{ "id": 1, "label": "example.com" }],
|
||||
"redirection": [],
|
||||
"dead": [],
|
||||
"stream": [{ "id": 1, "label": "Port 5432 → 10.0.0.5:5432" }]
|
||||
}
|
||||
}
|
||||
},
|
||||
"$defs": {
|
||||
"host-option-list": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": ["id", "label"],
|
||||
"properties": {
|
||||
"id": {
|
||||
"$ref": "../common.json#/properties/id"
|
||||
},
|
||||
"label": {
|
||||
"type": "string",
|
||||
"example": "example.com"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"type": "object",
|
||||
"description": "The last N lines of a log source",
|
||||
"required": ["lines", "size", "truncated", "exists"],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"lines": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"example": ["2026-01-01T00:00:00.000Z INFO [Global ] Backend PID 1 listening on port 3000 ..."]
|
||||
},
|
||||
"size": {
|
||||
"type": "integer",
|
||||
"description": "Size in bytes of the underlying log file",
|
||||
"example": 4096
|
||||
},
|
||||
"truncated": {
|
||||
"type": "boolean",
|
||||
"description": "True when the file is larger than the maximum amount of data scanned per request",
|
||||
"example": false
|
||||
},
|
||||
"exists": {
|
||||
"type": "boolean",
|
||||
"description": "False when the underlying log file does not exist yet",
|
||||
"example": true
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -124,6 +124,9 @@
|
||||
},
|
||||
"advanced_config": {
|
||||
"type": "string"
|
||||
},
|
||||
"access_list_id": {
|
||||
"$ref": "../common.json#/properties/access_list_id"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -132,7 +135,8 @@
|
||||
"path": "/app",
|
||||
"forward_scheme": "http",
|
||||
"forward_host": "example.com",
|
||||
"forward_port": 80
|
||||
"forward_port": 80,
|
||||
"access_list_id": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"format": "^[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}$"
|
||||
"pattern": "^[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}$"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"operationId": "getLogSources",
|
||||
"summary": "Get available log sources",
|
||||
"tags": ["logs"],
|
||||
"security": [
|
||||
{
|
||||
"bearerAuth": ["admin"]
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "200 response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"examples": {
|
||||
"default": {
|
||||
"value": {
|
||||
"system": { "label": "System" },
|
||||
"letsencrypt": { "label": "Let's Encrypt" },
|
||||
"hosts": {
|
||||
"proxy": [{ "id": 1, "label": "example.com" }],
|
||||
"redirection": [],
|
||||
"dead": [],
|
||||
"stream": [{ "id": 1, "label": "Port 5432 → 10.0.0.5:5432" }]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"schema": {
|
||||
"$ref": "../../../components/log-sources-object.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
{
|
||||
"operationId": "getLogTail",
|
||||
"summary": "Get the last N lines of a log source",
|
||||
"tags": ["logs"],
|
||||
"security": [
|
||||
{
|
||||
"bearerAuth": ["admin"]
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"in": "query",
|
||||
"name": "type",
|
||||
"required": true,
|
||||
"description": "Which log source to read",
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"enum": ["system", "letsencrypt", "host"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"in": "query",
|
||||
"name": "host_type",
|
||||
"description": "Required when type=host",
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"enum": ["proxy", "redirection", "dead", "stream"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"in": "query",
|
||||
"name": "host_id",
|
||||
"description": "Required when type=host",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"in": "query",
|
||||
"name": "channel",
|
||||
"description": "Required when type=host - which log file to read (not to be confused with host_type=stream)",
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"enum": ["access", "error"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"in": "query",
|
||||
"name": "lines",
|
||||
"description": "Number of lines to return from the end of the file",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 1000,
|
||||
"default": 200
|
||||
}
|
||||
},
|
||||
{
|
||||
"in": "query",
|
||||
"name": "level",
|
||||
"description": "Only applicable to type=system",
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"enum": ["INFO", "WARN", "ERROR", "DEBUG", "SUCCESS", "FATAL", "COMPLETE"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"in": "query",
|
||||
"name": "search",
|
||||
"description": "Case-insensitive plain-text search",
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"maxLength": 200
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "200 response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"examples": {
|
||||
"default": {
|
||||
"value": {
|
||||
"lines": ["2026-01-01T00:00:00.000Z INFO [Global ] Backend PID 1 listening on port 3000 ..."],
|
||||
"size": 4096,
|
||||
"truncated": false,
|
||||
"exists": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"schema": {
|
||||
"$ref": "../../../components/log-tail-object.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -24,6 +24,10 @@
|
||||
"name": "audit-log",
|
||||
"description": "Endpoints related to Audit Logs"
|
||||
},
|
||||
{
|
||||
"name": "logs",
|
||||
"description": "Endpoints for viewing system, Let's Encrypt and per-host logs"
|
||||
},
|
||||
{
|
||||
"name": "access-lists",
|
||||
"description": "Endpoints related to Access Lists"
|
||||
@@ -81,6 +85,16 @@
|
||||
"$ref": "./paths/audit-log/id/get.json"
|
||||
}
|
||||
},
|
||||
"/logs/sources": {
|
||||
"get": {
|
||||
"$ref": "./paths/logs/sources/get.json"
|
||||
}
|
||||
},
|
||||
"/logs/tail": {
|
||||
"get": {
|
||||
"$ref": "./paths/logs/tail/get.json"
|
||||
}
|
||||
},
|
||||
"/nginx/access-lists": {
|
||||
"get": {
|
||||
"$ref": "./paths/nginx/access-lists/get.json"
|
||||
|
||||
@@ -46,7 +46,7 @@ const logIt = (msg, type = "info") => logger[type](
|
||||
|
||||
// Let's do it.
|
||||
|
||||
const processItems = async (model, type) => {
|
||||
const processItems = async (model, type, hostType) => {
|
||||
const rows = await model
|
||||
.query()
|
||||
.where("is_deleted", 0)
|
||||
@@ -60,17 +60,17 @@ const processItems = async (model, type) => {
|
||||
for (const row of rows) {
|
||||
if (!DRY_RUN) {
|
||||
logIt(`[${type}] Regenerating config #${row.id}: ${row.domain_names ? row.domain_names.join(", ") : 'port ' + row.incoming_port}`);
|
||||
await internalNginx.configure(proxyHostModel, "proxy_host", row);
|
||||
await internalNginx.configure(model, hostType, row);
|
||||
} else {
|
||||
logIt(`[${type}] Skipping generation of config #${row.id}: ${row.domain_names ? row.domain_names.join(", ") : 'port ' + row.incoming_port}`);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
await processItems(proxyHostModel, "Proxy Host");
|
||||
await processItems(redirectionHostModel, "Redirection Host");
|
||||
await processItems(deadHostModel, "404 Host");
|
||||
await processItems(streamModel, "Stream");
|
||||
await processItems(proxyHostModel, "Proxy Host", "proxy_host");
|
||||
await processItems(redirectionHostModel, "Redirection Host", "redirection_host");
|
||||
await processItems(deadHostModel, "404 Host", "dead_host");
|
||||
await processItems(streamModel, "Stream", "stream");
|
||||
|
||||
logIt("Completed", "success");
|
||||
process.exit(0);
|
||||
+12
-21
@@ -1,4 +1,3 @@
|
||||
import fs from "node:fs/promises";
|
||||
import { installPlugins } from "./lib/certbot.js";
|
||||
import utils from "./lib/utils.js";
|
||||
import { setup as logger } from "./logger.js";
|
||||
@@ -7,6 +6,7 @@ import certificateModel from "./models/certificate.js";
|
||||
import settingModel from "./models/setting.js";
|
||||
import userModel from "./models/user.js";
|
||||
import userPermissionModel from "./models/user_permission.js";
|
||||
import fs from "node:fs/promises";
|
||||
|
||||
export const isSetup = async () => {
|
||||
const row = await userModel.query().select("id").where("is_deleted", 0).first();
|
||||
@@ -98,7 +98,6 @@ const setupCertbotPlugins = async () => {
|
||||
|
||||
if (certificates?.length) {
|
||||
const plugins = [];
|
||||
const promises = [];
|
||||
|
||||
certificates.map((certificate) => {
|
||||
if (certificate.meta && certificate.meta.dns_challenge === true) {
|
||||
@@ -106,31 +105,23 @@ const setupCertbotPlugins = async () => {
|
||||
plugins.push(certificate.meta.dns_provider);
|
||||
}
|
||||
|
||||
// Make sure credentials file exists
|
||||
const credentials_loc = `/etc/letsencrypt/credentials/credentials-${certificate.id}`;
|
||||
if (typeof certificate.meta.dns_provider_credentials === "string") {
|
||||
promises.push(
|
||||
fs
|
||||
.mkdir("/etc/letsencrypt/credentials", { recursive: true })
|
||||
.then(() =>
|
||||
fs.writeFile(credentials_loc, certificate.meta.dns_provider_credentials, {
|
||||
mode: 0o600,
|
||||
flag: "wx",
|
||||
}),
|
||||
)
|
||||
.catch((err) => {
|
||||
if (err.code !== "EEXIST") throw err;
|
||||
}),
|
||||
);
|
||||
}
|
||||
// Deliberately does NOT write the DNS credentials file here any more.
|
||||
//
|
||||
// It used to, so that a later `certbot renew` would find the path recorded in its
|
||||
// renewal config. The effect was that every backend restart rewrote a plaintext
|
||||
// DNS provider API token for every DNS-01 certificate, and left it there.
|
||||
//
|
||||
// internalCertificate now writes that file immediately before it runs certbot and
|
||||
// removes it again afterwards, so there is exactly one writer and the credential
|
||||
// is on disk only for the length of a certbot run. Recreating the files at boot
|
||||
// would put every one of them straight back.
|
||||
}
|
||||
return true;
|
||||
});
|
||||
|
||||
await installPlugins(plugins);
|
||||
|
||||
if (promises.length) {
|
||||
await Promise.all(promises);
|
||||
if (plugins.length) {
|
||||
logger.info(`Added Certbot plugins ${plugins.join(", ")}`);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,6 +38,16 @@ services:
|
||||
- website2.example.com
|
||||
- website3.example.com
|
||||
|
||||
examplesite:
|
||||
image: "${IMAGE}-examplesite:ci-${BUILD_NUMBER}"
|
||||
build:
|
||||
context: ../test/docker
|
||||
dockerfile: Dockerfile.website
|
||||
expose:
|
||||
- "80/tcp"
|
||||
networks:
|
||||
- fulltest
|
||||
|
||||
stepca:
|
||||
image: nginxproxymanager/testca
|
||||
volumes:
|
||||
|
||||
@@ -25,3 +25,13 @@
|
||||
kill -USR1 `cat /run/nginx/nginx.pid 2>/dev/null` 2>/dev/null || true
|
||||
endscript
|
||||
}
|
||||
|
||||
/data/logs/backend.log {
|
||||
su npm npm
|
||||
size 10M
|
||||
rotate 5
|
||||
missingok
|
||||
notifempty
|
||||
compress
|
||||
copytruncate
|
||||
}
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
src/locale/lang
|
||||
|
||||
# Logs
|
||||
logs
|
||||
/logs/
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
|
||||
@@ -43,24 +43,24 @@
|
||||
"devDependencies": {
|
||||
"@biomejs/biome": "^2.5.10",
|
||||
"@formatjs/cli": "^6.16.30",
|
||||
"@tanstack/react-query-devtools": "^5.101.4",
|
||||
"@tanstack/react-query-devtools": "^5.103.1",
|
||||
"@testing-library/dom": "^10.4.2",
|
||||
"@testing-library/jest-dom": "^7.0.1",
|
||||
"@testing-library/react": "^16.3.3",
|
||||
"@types/country-flag-icons": "^1.2.2",
|
||||
"@types/humps": "^2.0.6",
|
||||
"@types/node": "^26.2.0",
|
||||
"@types/node": "^26.6.2",
|
||||
"@types/react": "^19.3.0",
|
||||
"@types/react-dom": "^19.3.0",
|
||||
"@types/react-table": "^7.7.20",
|
||||
"@vitejs/plugin-react": "^6.1.1",
|
||||
"happy-dom": "^20.11.6",
|
||||
"happy-dom": "^20.14.5",
|
||||
"postcss": "^8.5.28",
|
||||
"postcss-simple-vars": "^7.0.1",
|
||||
"sass": "^1.103.1",
|
||||
"sass": "^1.104.1",
|
||||
"tmp": "^0.2.7",
|
||||
"typescript": "7.0.2",
|
||||
"vite": "^8.2.2",
|
||||
"vite": "^8.3.0",
|
||||
"vite-plugin-checker": "^0.14.5",
|
||||
"vitest": "^4.1.11"
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ const Settings = lazy(() => import("src/pages/Settings"));
|
||||
const Certificates = lazy(() => import("src/pages/Certificates"));
|
||||
const Access = lazy(() => import("src/pages/Access"));
|
||||
const AuditLog = lazy(() => import("src/pages/AuditLog"));
|
||||
const Logs = lazy(() => import("src/pages/Logs"));
|
||||
const Users = lazy(() => import("src/pages/Users"));
|
||||
const ProxyHosts = lazy(() => import("src/pages/Nginx/ProxyHosts"));
|
||||
const RedirectionHosts = lazy(() => import("src/pages/Nginx/RedirectionHosts"));
|
||||
@@ -65,6 +66,7 @@ function Router() {
|
||||
<Route path="/certificates" element={<Certificates />} />
|
||||
<Route path="/access" element={<Access />} />
|
||||
<Route path="/audit-log" element={<AuditLog />} />
|
||||
<Route path="/logs" element={<Logs />} />
|
||||
<Route path="/settings" element={<Settings />} />
|
||||
<Route path="/users" element={<Users />} />
|
||||
<Route path="/nginx/proxy" element={<ProxyHosts />} />
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
import * as api from "./base";
|
||||
import type { LogSources } from "./models";
|
||||
|
||||
export async function getLogSources(): Promise<LogSources> {
|
||||
return await api.get({
|
||||
url: "/logs/sources",
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
import * as api from "./base";
|
||||
import type { LogChannel, LogHostType, LogSourceType, LogTail } from "./models";
|
||||
|
||||
export interface GetLogTailParams {
|
||||
type: LogSourceType;
|
||||
hostType?: LogHostType;
|
||||
hostId?: number;
|
||||
channel?: LogChannel;
|
||||
lines?: number;
|
||||
level?: string;
|
||||
search?: string;
|
||||
}
|
||||
|
||||
export async function getLogTail(params: GetLogTailParams): Promise<LogTail> {
|
||||
return await api.get({
|
||||
url: "/logs/tail",
|
||||
params: { ...params },
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
import * as api from "./base";
|
||||
|
||||
export async function getProxyHostLogs(id: number, type: "access" | "error" = "access"): Promise<{ logs: string }> {
|
||||
return await api.get({
|
||||
url: `/nginx/proxy-hosts/${id}/logs`,
|
||||
params: { type },
|
||||
});
|
||||
}
|
||||
@@ -26,7 +26,10 @@ export * from "./getDeadHost";
|
||||
export * from "./getDeadHosts";
|
||||
export * from "./getHealth";
|
||||
export * from "./getHostsReport";
|
||||
export * from "./getLogSources";
|
||||
export * from "./getLogTail";
|
||||
export * from "./getProxyHost";
|
||||
export * from "./getProxyHostLogs";
|
||||
export * from "./getProxyHosts";
|
||||
export * from "./getRedirectionHost";
|
||||
export * from "./getRedirectionHosts";
|
||||
|
||||
@@ -44,6 +44,30 @@ export interface AuditLog {
|
||||
user?: User;
|
||||
}
|
||||
|
||||
export type LogSourceType = "system" | "letsencrypt" | "host";
|
||||
export type LogHostType = "proxy" | "redirection" | "dead" | "stream";
|
||||
// Which of the two files nginx writes per host - named "channel", not "stream",
|
||||
// to avoid confusion with the "stream" LogHostType (TCP/UDP stream hosts).
|
||||
export type LogChannel = "access" | "error";
|
||||
|
||||
export interface LogHostOption {
|
||||
id: number;
|
||||
label: string;
|
||||
}
|
||||
|
||||
export interface LogSources {
|
||||
system: { label: string };
|
||||
letsencrypt: { label: string };
|
||||
hosts: Record<LogHostType, LogHostOption[]>;
|
||||
}
|
||||
|
||||
export interface LogTail {
|
||||
lines: string[];
|
||||
size: number;
|
||||
truncated: boolean;
|
||||
exists: boolean;
|
||||
}
|
||||
|
||||
export interface AccessList {
|
||||
id?: number;
|
||||
createdOn?: string;
|
||||
@@ -103,6 +127,8 @@ export interface ProxyLocation {
|
||||
forwardScheme: string;
|
||||
forwardHost: string;
|
||||
forwardPort: number;
|
||||
accessListId?: number;
|
||||
accessList?: AccessList;
|
||||
}
|
||||
|
||||
export interface ProxyHost {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { IconLock, IconLockOpen2 } from "@tabler/icons-react";
|
||||
import { IconArrowBackUp, IconLock, IconLockOpen2 } from "@tabler/icons-react";
|
||||
import { Field, useFormikContext } from "formik";
|
||||
import type { ReactNode } from "react";
|
||||
import Select, { type ActionMeta, components, type OptionProps } from "react-select";
|
||||
@@ -31,14 +31,26 @@ interface Props {
|
||||
id?: string;
|
||||
name?: string;
|
||||
label?: string;
|
||||
onFormChange?: (value: number) => void;
|
||||
// When set, the 0 option inherits the host's access list instead of being public
|
||||
inheritHost?: boolean;
|
||||
}
|
||||
export function AccessField({ name = "accessListId", label = "access-list", id = "accessListId" }: Props) {
|
||||
export function AccessField({
|
||||
name = "accessListId",
|
||||
label = "access-list",
|
||||
id = "accessListId",
|
||||
onFormChange,
|
||||
inheritHost = false,
|
||||
}: Props) {
|
||||
const { locale } = useLocaleState();
|
||||
const { isLoading, isError, error, data } = useAccessLists(["owner", "items", "clients"]);
|
||||
const { setFieldValue } = useFormikContext();
|
||||
|
||||
const handleChange = (newValue: any, _actionMeta: ActionMeta<AccessOption>) => {
|
||||
setFieldValue(name, newValue?.value);
|
||||
if (onFormChange) {
|
||||
onFormChange(newValue?.value ?? 0);
|
||||
}
|
||||
};
|
||||
|
||||
const options: AccessOption[] =
|
||||
@@ -56,13 +68,22 @@ export function AccessField({ name = "accessListId", label = "access-list", id =
|
||||
icon: <IconLock size={14} className="text-lime" />,
|
||||
})) || [];
|
||||
|
||||
// Public option
|
||||
options?.unshift({
|
||||
value: 0,
|
||||
label: intl.formatMessage({ id: "access-list.public" }),
|
||||
subLabel: intl.formatMessage({ id: "access-list.public.subtitle" }),
|
||||
icon: <IconLockOpen2 size={14} className="text-red" />,
|
||||
});
|
||||
// Public or inherit option
|
||||
options?.unshift(
|
||||
inheritHost
|
||||
? {
|
||||
value: 0,
|
||||
label: intl.formatMessage({ id: "access-list.inherit" }),
|
||||
subLabel: intl.formatMessage({ id: "access-list.inherit.subtitle" }),
|
||||
icon: <IconArrowBackUp size={14} className="text-secondary" />,
|
||||
}
|
||||
: {
|
||||
value: 0,
|
||||
label: intl.formatMessage({ id: "access-list.public" }),
|
||||
subLabel: intl.formatMessage({ id: "access-list.public.subtitle" }),
|
||||
icon: <IconLockOpen2 size={14} className="text-red" />,
|
||||
},
|
||||
);
|
||||
|
||||
return (
|
||||
<Field name={name}>
|
||||
|
||||
@@ -13,6 +13,7 @@ import { useFormikContext } from "formik";
|
||||
import { useRef, useState } from "react";
|
||||
import type { ProxyLocation } from "src/api/backend";
|
||||
import { intl, T } from "src/locale";
|
||||
import { AccessField } from "./AccessField";
|
||||
import styles from "./LocationsFields.module.css";
|
||||
|
||||
// Below this many locations the list is short enough to scan by eye, and the
|
||||
@@ -45,6 +46,7 @@ export function LocationsFields({ initialValues, name = "locations" }: Props) {
|
||||
forwardScheme: "http",
|
||||
forwardHost: "",
|
||||
forwardPort: 80,
|
||||
accessListId: 0,
|
||||
};
|
||||
|
||||
const toggleExpanded = (id: number) => {
|
||||
@@ -79,6 +81,12 @@ export function LocationsFields({ initialValues, name = "locations" }: Props) {
|
||||
setFormField(newRows);
|
||||
};
|
||||
|
||||
const handleAccessListChange = (id: number, accessListId: number) => {
|
||||
const newRows = rows.map((r: Row) => (r.id === id ? { ...r, value: { ...r.value, accessListId } } : r));
|
||||
setRows(newRows);
|
||||
setFormField(newRows);
|
||||
};
|
||||
|
||||
const setFormField = (newRows: Row[]) => {
|
||||
const filtered = newRows.map((r: Row) => r.value).filter((v: ProxyLocation) => v?.path?.trim() !== "");
|
||||
setFieldValue(name, filtered);
|
||||
@@ -299,6 +307,13 @@ export function LocationsFields({ initialValues, name = "locations" }: Props) {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<AccessField
|
||||
name={`locations[${row.id}].accessListId`}
|
||||
label="access-list"
|
||||
id={`locations-access-list-${row.id}`}
|
||||
onFormChange={(value) => handleAccessListChange(row.id, value)}
|
||||
inheritHost
|
||||
/>
|
||||
{advVisible.includes(row.id) && (
|
||||
<div className="">
|
||||
<CodeEditor
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import {
|
||||
IconBook,
|
||||
IconDeviceDesktop,
|
||||
IconFileText,
|
||||
IconHome,
|
||||
IconLock,
|
||||
IconSettings,
|
||||
@@ -95,6 +96,12 @@ const menuItems: MenuItem[] = [
|
||||
label: "auditlogs",
|
||||
permissionSection: ADMIN,
|
||||
},
|
||||
{
|
||||
to: "/logs",
|
||||
icon: IconFileText,
|
||||
label: "logs",
|
||||
permissionSection: ADMIN,
|
||||
},
|
||||
{
|
||||
to: "/settings",
|
||||
icon: IconSettings,
|
||||
|
||||
@@ -10,7 +10,10 @@ export * from "./useDeadHosts";
|
||||
export * from "./useDnsProviders";
|
||||
export * from "./useHealth";
|
||||
export * from "./useHostReport";
|
||||
export * from "./useLogSources";
|
||||
export * from "./useLogTail";
|
||||
export * from "./useProxyHost";
|
||||
export * from "./useProxyHostLogs";
|
||||
export * from "./useProxyHosts";
|
||||
export * from "./useRedirectionHost";
|
||||
export * from "./useRedirectionHosts";
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import { getLogSources, type LogSources } from "src/api/backend";
|
||||
|
||||
const fetchLogSources = () => getLogSources();
|
||||
|
||||
const useLogSources = (options = {}) => {
|
||||
return useQuery<LogSources, Error>({
|
||||
queryKey: ["log-sources"],
|
||||
queryFn: fetchLogSources,
|
||||
staleTime: 30 * 1000,
|
||||
...options,
|
||||
});
|
||||
};
|
||||
|
||||
export { fetchLogSources, useLogSources };
|
||||
@@ -0,0 +1,25 @@
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import { type GetLogTailParams, getLogTail, type LogTail } from "src/api/backend";
|
||||
|
||||
const POLL_INTERVAL_MS = 5000;
|
||||
|
||||
interface UseLogTailOptions extends GetLogTailParams {
|
||||
live?: boolean;
|
||||
}
|
||||
|
||||
// Polls for new log lines while `live` is true. React Query only runs the interval
|
||||
// while the tab is focused (refetchIntervalInBackground defaults to false), so an
|
||||
// idle/backgrounded browser tab never generates load.
|
||||
const useLogTail = ({ live = true, ...params }: UseLogTailOptions) => {
|
||||
const enabled = params.type === "host" ? Boolean(params.hostType && params.hostId && params.channel) : true;
|
||||
|
||||
return useQuery<LogTail, Error>({
|
||||
queryKey: ["log-tail", params],
|
||||
queryFn: () => getLogTail(params),
|
||||
enabled,
|
||||
refetchInterval: live ? POLL_INTERVAL_MS : false,
|
||||
placeholderData: (previousData) => previousData,
|
||||
});
|
||||
};
|
||||
|
||||
export { useLogTail };
|
||||
@@ -0,0 +1,12 @@
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import { getProxyHostLogs } from "src/api/backend";
|
||||
|
||||
const useProxyHostLogs = (id: number, type: "access" | "error" = "access") => {
|
||||
return useQuery<{ logs: string }, Error>({
|
||||
queryKey: ["proxy-host-logs", id, type],
|
||||
queryFn: () => getProxyHostLogs(id, type),
|
||||
staleTime: 10_000,
|
||||
});
|
||||
};
|
||||
|
||||
export { useProxyHostLogs };
|
||||
@@ -71,6 +71,12 @@
|
||||
"access-list.help.rules-order": {
|
||||
"defaultMessage": "Note that the allow and deny directives will be applied in the order they are defined."
|
||||
},
|
||||
"access-list.inherit": {
|
||||
"defaultMessage": "Inherit from Proxy Host"
|
||||
},
|
||||
"access-list.inherit.subtitle": {
|
||||
"defaultMessage": "Uses the proxy host's access list"
|
||||
},
|
||||
"access-list.pass-auth": {
|
||||
"defaultMessage": "Pass Auth to Upstream"
|
||||
},
|
||||
@@ -125,6 +131,9 @@
|
||||
"action.enable": {
|
||||
"defaultMessage": "Enable"
|
||||
},
|
||||
"action.logs": {
|
||||
"defaultMessage": "Logs"
|
||||
},
|
||||
"action.permissions": {
|
||||
"defaultMessage": "Permissions"
|
||||
},
|
||||
@@ -269,6 +278,9 @@
|
||||
"column.email": {
|
||||
"defaultMessage": "Email"
|
||||
},
|
||||
"column.error": {
|
||||
"defaultMessage": "Error"
|
||||
},
|
||||
"column.event": {
|
||||
"defaultMessage": "Event"
|
||||
},
|
||||
@@ -488,6 +500,51 @@
|
||||
"login.title": {
|
||||
"defaultMessage": "Login to your account"
|
||||
},
|
||||
"logs": {
|
||||
"defaultMessage": "Logs"
|
||||
},
|
||||
"logs.channel.access": {
|
||||
"defaultMessage": "Access"
|
||||
},
|
||||
"logs.channel.error": {
|
||||
"defaultMessage": "Error"
|
||||
},
|
||||
"logs.download": {
|
||||
"defaultMessage": "Download"
|
||||
},
|
||||
"logs.empty": {
|
||||
"defaultMessage": "No log entries yet."
|
||||
},
|
||||
"logs.level": {
|
||||
"defaultMessage": "Level"
|
||||
},
|
||||
"logs.level.all": {
|
||||
"defaultMessage": "All Levels"
|
||||
},
|
||||
"logs.lines": {
|
||||
"defaultMessage": "Lines"
|
||||
},
|
||||
"logs.live": {
|
||||
"defaultMessage": "Live"
|
||||
},
|
||||
"logs.paused": {
|
||||
"defaultMessage": "Paused"
|
||||
},
|
||||
"logs.refresh": {
|
||||
"defaultMessage": "Refresh"
|
||||
},
|
||||
"logs.search-placeholder": {
|
||||
"defaultMessage": "Search log…"
|
||||
},
|
||||
"logs.source": {
|
||||
"defaultMessage": "Source"
|
||||
},
|
||||
"logs.source.system": {
|
||||
"defaultMessage": "System"
|
||||
},
|
||||
"logs.truncated-warning": {
|
||||
"defaultMessage": "Only the most recent portion of this file is shown."
|
||||
},
|
||||
"nginx-config.label": {
|
||||
"defaultMessage": "Custom Nginx Configuration"
|
||||
},
|
||||
|
||||
@@ -71,6 +71,12 @@
|
||||
"access-list.help.rules-order": {
|
||||
"defaultMessage": "Luba ja keela reeglid rakenduvad selles järjekorras, milles need on kirjas."
|
||||
},
|
||||
"access-list.inherit": {
|
||||
"defaultMessage": "Päri puhverserverilt"
|
||||
},
|
||||
"access-list.inherit.subtitle": {
|
||||
"defaultMessage": "Kasutab puhverserveri juurdepääsuloendit"
|
||||
},
|
||||
"access-list.pass-auth": {
|
||||
"defaultMessage": "Edasta autentimine sihtserverile"
|
||||
},
|
||||
@@ -125,6 +131,9 @@
|
||||
"action.enable": {
|
||||
"defaultMessage": "Lülita sisse"
|
||||
},
|
||||
"action.logs": {
|
||||
"defaultMessage": "Logid"
|
||||
},
|
||||
"action.permissions": {
|
||||
"defaultMessage": "Õigused"
|
||||
},
|
||||
@@ -269,6 +278,9 @@
|
||||
"column.email": {
|
||||
"defaultMessage": "E-post"
|
||||
},
|
||||
"column.error": {
|
||||
"defaultMessage": "Viga"
|
||||
},
|
||||
"column.event": {
|
||||
"defaultMessage": "Sündmus"
|
||||
},
|
||||
@@ -488,6 +500,51 @@
|
||||
"login.title": {
|
||||
"defaultMessage": "Logi kontole sisse"
|
||||
},
|
||||
"logs": {
|
||||
"defaultMessage": "Logid"
|
||||
},
|
||||
"logs.channel.access": {
|
||||
"defaultMessage": "Juurdepääs"
|
||||
},
|
||||
"logs.channel.error": {
|
||||
"defaultMessage": "Viga"
|
||||
},
|
||||
"logs.download": {
|
||||
"defaultMessage": "Laadi alla"
|
||||
},
|
||||
"logs.empty": {
|
||||
"defaultMessage": "Logikirjeid pole veel."
|
||||
},
|
||||
"logs.level": {
|
||||
"defaultMessage": "Tase"
|
||||
},
|
||||
"logs.level.all": {
|
||||
"defaultMessage": "Kõik tasemed"
|
||||
},
|
||||
"logs.lines": {
|
||||
"defaultMessage": "Read"
|
||||
},
|
||||
"logs.live": {
|
||||
"defaultMessage": "Reaalajas"
|
||||
},
|
||||
"logs.paused": {
|
||||
"defaultMessage": "Peatatud"
|
||||
},
|
||||
"logs.refresh": {
|
||||
"defaultMessage": "Värskenda"
|
||||
},
|
||||
"logs.search-placeholder": {
|
||||
"defaultMessage": "Otsi logist…"
|
||||
},
|
||||
"logs.source": {
|
||||
"defaultMessage": "Allikas"
|
||||
},
|
||||
"logs.source.system": {
|
||||
"defaultMessage": "Süsteem"
|
||||
},
|
||||
"logs.truncated-warning": {
|
||||
"defaultMessage": "Kuvatakse ainult faili kõige uuem osa."
|
||||
},
|
||||
"nginx-config.label": {
|
||||
"defaultMessage": "Kohandatud Nginx seadistus"
|
||||
},
|
||||
|
||||
@@ -57,20 +57,23 @@
|
||||
"defaultMessage": "Български"
|
||||
},
|
||||
"locale-tr-TR": {
|
||||
"defaultMessage": "Türkçe"
|
||||
},
|
||||
"locale-hu-HU": {
|
||||
"defaultMessage": "Magyar"
|
||||
},
|
||||
"locale-no-NO": {
|
||||
"defaultMessage": "Norsk"
|
||||
},
|
||||
"locale-uk-UA": {
|
||||
"defaultMessage": "Українська"
|
||||
},
|
||||
"locale-az-AZ": {
|
||||
"defaultMessage": "Azərbaycanca"
|
||||
},
|
||||
"defaultMessage": "Türkçe"
|
||||
},
|
||||
"locale-hu-HU": {
|
||||
"defaultMessage": "Magyar"
|
||||
},
|
||||
"locale-no-NO": {
|
||||
"defaultMessage": "Norsk"
|
||||
},
|
||||
"locale-uk-UA": {
|
||||
"defaultMessage": "Українська"
|
||||
},
|
||||
"locale-sv-SE": {
|
||||
"defaultMessage": "Svenska"
|
||||
},
|
||||
"locale-az-AZ": {
|
||||
"defaultMessage": "Azərbaycanca"
|
||||
},
|
||||
"locale-fa-IR": {
|
||||
"defaultMessage": "فارسی"
|
||||
}
|
||||
|
||||
@@ -0,0 +1,776 @@
|
||||
{
|
||||
"2fa.backup-codes-remaining": {
|
||||
"defaultMessage": "Kvarvarande backup-koder: {count}"
|
||||
},
|
||||
"2fa.backup-warning": {
|
||||
"defaultMessage": "Spara dessa backup-koder på en säker plats. Varje kod kan bara användas en gång."
|
||||
},
|
||||
"2fa.disable": {
|
||||
"defaultMessage": "Inaktivera tvåfaktorsautentisering"
|
||||
},
|
||||
"2fa.disable-confirm": {
|
||||
"defaultMessage": "Inaktivera 2FA"
|
||||
},
|
||||
"2fa.disable-warning": {
|
||||
"defaultMessage": "Att inaktivera tvåfaktorsautentisering gör ditt konto mindre säkert."
|
||||
},
|
||||
"2fa.disabled": {
|
||||
"defaultMessage": "Inaktiverad"
|
||||
},
|
||||
"2fa.done": {
|
||||
"defaultMessage": "Jag har sparat mina backup-koder"
|
||||
},
|
||||
"2fa.enable": {
|
||||
"defaultMessage": "Aktivera tvåfaktorsautentisering"
|
||||
},
|
||||
"2fa.enabled": {
|
||||
"defaultMessage": "Aktiverad"
|
||||
},
|
||||
"2fa.enter-code": {
|
||||
"defaultMessage": "Ange verifieringskod"
|
||||
},
|
||||
"2fa.enter-code-disable": {
|
||||
"defaultMessage": "Ange verifieringskod för att inaktivera"
|
||||
},
|
||||
"2fa.regenerate": {
|
||||
"defaultMessage": "Förnya"
|
||||
},
|
||||
"2fa.regenerate-backup": {
|
||||
"defaultMessage": "Generera nya backup-koder"
|
||||
},
|
||||
"2fa.regenerate-instructions": {
|
||||
"defaultMessage": "Ange en verifieringskod för att generera nya backup-koder. Dina gamla koder blir ogiltiga."
|
||||
},
|
||||
"2fa.secret-key": {
|
||||
"defaultMessage": "Hemlig nyckel"
|
||||
},
|
||||
"2fa.setup-instructions": {
|
||||
"defaultMessage": "Scanna den här QR-koden med din autenticator-app, eller skriv in nyckeln manuellt."
|
||||
},
|
||||
"2fa.status": {
|
||||
"defaultMessage": "Status"
|
||||
},
|
||||
"2fa.title": {
|
||||
"defaultMessage": "Tvåfaktorsautentisering"
|
||||
},
|
||||
"2fa.verify-enable": {
|
||||
"defaultMessage": "Verifiera och aktivera"
|
||||
},
|
||||
"access-list": {
|
||||
"defaultMessage": "Tillgangslista"
|
||||
},
|
||||
"access-list.access-count": {
|
||||
"defaultMessage": "{count} {count, plural, one {regel} other {regler}}"
|
||||
},
|
||||
"access-list.auth-count": {
|
||||
"defaultMessage": "{count} {count, plural, one {användare} other {användare}}"
|
||||
},
|
||||
"access-list.help-rules-last": {
|
||||
"defaultMessage": "När minst en regel finns läggs den \"deny all\"-regeln till sist"
|
||||
},
|
||||
"access-list.help.rules-order": {
|
||||
"defaultMessage": "Var tillåt- och nek-direktiv används i den ordning de är definierade."
|
||||
},
|
||||
"access-list.pass-auth": {
|
||||
"defaultMessage": "Skicka autentisering till upstream"
|
||||
},
|
||||
"access-list.public": {
|
||||
"defaultMessage": "Offentlig tillgänglig"
|
||||
},
|
||||
"access-list.public.subtitle": {
|
||||
"defaultMessage": "Ingen grundläggande autentisering krävs"
|
||||
},
|
||||
"access-list.rule-source.placeholder": {
|
||||
"defaultMessage": "192.168.1.100 eller 192.168.1.0/24 eller 2001:db8::/32"
|
||||
},
|
||||
"access-list.satisfy-any": {
|
||||
"defaultMessage": "Uppfyll ett krav"
|
||||
},
|
||||
"access-list.subtitle": {
|
||||
"defaultMessage": "{users} {users, plural, one {användare} other {användare}}, {rules} {rules, plural, one {regel} other {regler}} - Skapad: {date}"
|
||||
},
|
||||
"access-lists": {
|
||||
"defaultMessage": "Tillgångslister"
|
||||
},
|
||||
"action.add": {
|
||||
"defaultMessage": "Lägg till"
|
||||
},
|
||||
"action.add-location": {
|
||||
"defaultMessage": "Lägg till plats"
|
||||
},
|
||||
"action.allow": {
|
||||
"defaultMessage": "Tillåt"
|
||||
},
|
||||
"action.close": {
|
||||
"defaultMessage": "Stäng"
|
||||
},
|
||||
"action.delete": {
|
||||
"defaultMessage": "Ta bort"
|
||||
},
|
||||
"action.deny": {
|
||||
"defaultMessage": "Neka"
|
||||
},
|
||||
"action.disable": {
|
||||
"defaultMessage": "Inaktivera"
|
||||
},
|
||||
"action.download": {
|
||||
"defaultMessage": "Ladda ner"
|
||||
},
|
||||
"action.edit": {
|
||||
"defaultMessage": "Redigera"
|
||||
},
|
||||
"action.enable": {
|
||||
"defaultMessage": "Aktivera"
|
||||
},
|
||||
"action.permissions": {
|
||||
"defaultMessage": "Tillstånd"
|
||||
},
|
||||
"action.renew": {
|
||||
"defaultMessage": "Förnya"
|
||||
},
|
||||
"action.view-details": {
|
||||
"defaultMessage": "Visa detaljer"
|
||||
},
|
||||
"auditlogs": {
|
||||
"defaultMessage": "Granskningslogg"
|
||||
},
|
||||
"auto": {
|
||||
"defaultMessage": "Auto"
|
||||
},
|
||||
"cancel": {
|
||||
"defaultMessage": "Avbryt"
|
||||
},
|
||||
"certificate": {
|
||||
"defaultMessage": "Certifikat"
|
||||
},
|
||||
"certificate.custom-certificate": {
|
||||
"defaultMessage": "Anpassat certifikat"
|
||||
},
|
||||
"certificate.custom-certificate-key": {
|
||||
"defaultMessage": "Anpassad certifikatnyckel"
|
||||
},
|
||||
"certificate.custom-intermediate": {
|
||||
"defaultMessage": "Anstandscertifikat"
|
||||
},
|
||||
"certificate.in-use": {
|
||||
"defaultMessage": "Används"
|
||||
},
|
||||
"certificate.none.subtitle": {
|
||||
"defaultMessage": "Ingt certifikat tilldelat"
|
||||
},
|
||||
"certificate.none.subtitle.for-http": {
|
||||
"defaultMessage": "Denna värd kommer inte att använda HTTPS"
|
||||
},
|
||||
"certificate.none.title": {
|
||||
"defaultMessage": "Ingen"
|
||||
},
|
||||
"certificate.not-in-use": {
|
||||
"defaultMessage": "Inte i användning"
|
||||
},
|
||||
"certificate.renew": {
|
||||
"defaultMessage": "Förnya certifikat"
|
||||
},
|
||||
"certificates": {
|
||||
"defaultMessage": "Certifikat"
|
||||
},
|
||||
"certificates.custom": {
|
||||
"defaultMessage": "Anpassat certifikat"
|
||||
},
|
||||
"certificates.custom.warning": {
|
||||
"defaultMessage": "Nyckelfiler med lösenfras stöds inte."
|
||||
},
|
||||
"certificates.dns.credentials": {
|
||||
"defaultMessage": "Innehåll i autentiseringsfil"
|
||||
},
|
||||
"certificates.dns.credentials-note": {
|
||||
"defaultMessage": "Den här pluginen kräver en konfigurationsfil som innehåller en API-token eller andra äktestegenskaper för din leverantör"
|
||||
},
|
||||
"certificates.dns.credentials-warning": {
|
||||
"defaultMessage": "Denna data kommer att lagras som ren text i databasen och i en fil!"
|
||||
},
|
||||
"certificates.dns.propagation-seconds": {
|
||||
"defaultMessage": "DNS-propageringssekunder"
|
||||
},
|
||||
"certificates.dns.propagation-seconds-note": {
|
||||
"defaultMessage": "Lämna tomt för att använda plugins standardvärde. Antal sekunder att vänta på DNS-propagering."
|
||||
},
|
||||
"certificates.dns.provider": {
|
||||
"defaultMessage": "DNS-leverantör"
|
||||
},
|
||||
"certificates.dns.provider.placeholder": {
|
||||
"defaultMessage": "Välj en leverantör..."
|
||||
},
|
||||
"certificates.dns.warning": {
|
||||
"defaultMessage": "Denna sektion kräver kunskap om Certbot och dess DNS-plugin. Vänligen konsultera dokumentationen för respektive plugin."
|
||||
},
|
||||
"certificates.http.reachability-404": {
|
||||
"defaultMessage": "Det finns en server på detta domän, men det ser inte ut att vara Nginx Proxy Manager. Se till att ditt domän pekar på IP-adressen där NPM-instansen körs."
|
||||
},
|
||||
"certificates.http.reachability-failed-to-check": {
|
||||
"defaultMessage": "Kunde inte kontrollera tillgänglighet på grund av kommunikationsfel med site24x7.com."
|
||||
},
|
||||
"certificates.http.reachability-not-resolved": {
|
||||
"defaultMessage": "Det finns ingen server tillgänglig på detta domän. Se till att ditt domän finns och pekar på IP-adressen där NPM-instansen körs, och om nödvändigt att port 80 är forwarding i din router."
|
||||
},
|
||||
"certificates.http.reachability-ok": {
|
||||
"defaultMessage": "Din server är tillgänglig, och det bör vara möjligt att skapa certifikat."
|
||||
},
|
||||
"certificates.http.reachability-other": {
|
||||
"defaultMessage": "Det finns en server på detta domän, men den returnerade en oväntad kod {code}. Är det NPM-servern? Se till att ditt domän pekar på IP-adressen där NPM-instansen körs."
|
||||
},
|
||||
"certificates.http.reachability-wrong-data": {
|
||||
"defaultMessage": "Det finns en server på detta domän, men den returnerade oväntade data. Är det NPM-servern? Se till att ditt domän pekar på IP-adressen där NPM-instansen körs."
|
||||
},
|
||||
"certificates.http.test-results": {
|
||||
"defaultMessage": "Testresultat"
|
||||
},
|
||||
"certificates.http.warning": {
|
||||
"defaultMessage": " Dessa domänerna måste redan konfigureras att peka mot den här installationen."
|
||||
},
|
||||
"certificates.key-type": {
|
||||
"defaultMessage": "Nyckeltyp"
|
||||
},
|
||||
"certificates.key-type-description": {
|
||||
"defaultMessage": "RSA är bredt kompatibel, ECDSA är snabbare och mer säker, men kanske inte stöds av äldre system"
|
||||
},
|
||||
"certificates.key-type-ecdsa": {
|
||||
"defaultMessage": "ECDSA 256"
|
||||
},
|
||||
"certificates.key-type-rsa": {
|
||||
"defaultMessage": "RSA 2048"
|
||||
},
|
||||
"certificates.request.subtitle": {
|
||||
"defaultMessage": "med Let's Encrypt"
|
||||
},
|
||||
"certificates.request.title": {
|
||||
"defaultMessage": "Begär ett nytt certifikat"
|
||||
},
|
||||
"column.access": {
|
||||
"defaultMessage": "Åtkomst"
|
||||
},
|
||||
"column.authorization": {
|
||||
"defaultMessage": "Autorisering"
|
||||
},
|
||||
"column.authorizations": {
|
||||
"defaultMessage": "Autoriseringar"
|
||||
},
|
||||
"column.custom-locations": {
|
||||
"defaultMessage": "Anpassade platser"
|
||||
},
|
||||
"column.destination": {
|
||||
"defaultMessage": "Destination"
|
||||
},
|
||||
"column.details": {
|
||||
"defaultMessage": "Detaljer"
|
||||
},
|
||||
"column.email": {
|
||||
"defaultMessage": "E-post"
|
||||
},
|
||||
"column.event": {
|
||||
"defaultMessage": "Händelse"
|
||||
},
|
||||
"column.expires": {
|
||||
"defaultMessage": "Utgår"
|
||||
},
|
||||
"column.http-code": {
|
||||
"defaultMessage": "HTTP-kod"
|
||||
},
|
||||
"column.incoming-port": {
|
||||
"defaultMessage": "Inkommande port"
|
||||
},
|
||||
"column.name": {
|
||||
"defaultMessage": "Namn"
|
||||
},
|
||||
"column.protocol": {
|
||||
"defaultMessage": "Protokoll"
|
||||
},
|
||||
"column.provider": {
|
||||
"defaultMessage": "Leverantör"
|
||||
},
|
||||
"column.roles": {
|
||||
"defaultMessage": "Roller"
|
||||
},
|
||||
"column.rules": {
|
||||
"defaultMessage": "Regler"
|
||||
},
|
||||
"column.satisfy": {
|
||||
"defaultMessage": "Uppfyll"
|
||||
},
|
||||
"column.satisfy-all": {
|
||||
"defaultMessage": "Alla"
|
||||
},
|
||||
"column.satisfy-any": {
|
||||
"defaultMessage": "Någon"
|
||||
},
|
||||
"column.scheme": {
|
||||
"defaultMessage": "Schema"
|
||||
},
|
||||
"column.source": {
|
||||
"defaultMessage": "Källa"
|
||||
},
|
||||
"column.ssl": {
|
||||
"defaultMessage": "SSL"
|
||||
},
|
||||
"column.status": {
|
||||
"defaultMessage": "Status"
|
||||
},
|
||||
"created-on": {
|
||||
"defaultMessage": "Skapad: {date}"
|
||||
},
|
||||
"dashboard": {
|
||||
"defaultMessage": "Instrumentpanel"
|
||||
},
|
||||
"dead-host": {
|
||||
"defaultMessage": "404-tjänst inte funnen"
|
||||
},
|
||||
"dead-hosts": {
|
||||
"defaultMessage": "404-tjänster inte funna"
|
||||
},
|
||||
"dead-hosts.count": {
|
||||
"defaultMessage": "{count} {count, plural, one {404-tjänst} other {404-tjänster}}"
|
||||
},
|
||||
"disabled": {
|
||||
"defaultMessage": "Inaktiverad"
|
||||
},
|
||||
"domain-names": {
|
||||
"defaultMessage": "Domännamn"
|
||||
},
|
||||
"domain-names.max": {
|
||||
"defaultMessage": "{count} domännamn maximalt"
|
||||
},
|
||||
"domain-names.placeholder": {
|
||||
"defaultMessage": "Börja skriva för att lägga till domän..."
|
||||
},
|
||||
"domain-names.wildcards-not-permitted": {
|
||||
"defaultMessage": "Wildcards tillåts inte för den här typen"
|
||||
},
|
||||
"domain-names.wildcards-not-supported": {
|
||||
"defaultMessage": "Wildcards stöds inte för den här CA:n"
|
||||
},
|
||||
"domains.advanced": {
|
||||
"defaultMessage": "Avancerad"
|
||||
},
|
||||
"domains.force-ssl": {
|
||||
"defaultMessage": "Zwång SSL"
|
||||
},
|
||||
"domains.hsts-enabled": {
|
||||
"defaultMessage": "HSTS aktiverat"
|
||||
},
|
||||
"domains.hsts-subdomains": {
|
||||
"defaultMessage": "HSTS underdomäner"
|
||||
},
|
||||
"domains.http2-support": {
|
||||
"defaultMessage": "HTTP/2-stöd"
|
||||
},
|
||||
"domains.trust-forwarded-proto": {
|
||||
"defaultMessage": "Förtroende för upstream forwarded proto-huvuden"
|
||||
},
|
||||
"domains.use-dns": {
|
||||
"defaultMessage": "Använd DNS-utmaning"
|
||||
},
|
||||
"email-address": {
|
||||
"defaultMessage": "E-postadress"
|
||||
},
|
||||
"empty-search": {
|
||||
"defaultMessage": "Inga resultat hittade"
|
||||
},
|
||||
"empty-subtitle": {
|
||||
"defaultMessage": "Varför inte skapa en?"
|
||||
},
|
||||
"enabled": {
|
||||
"defaultMessage": "Aktiv"
|
||||
},
|
||||
"error.access.at-least-one": {
|
||||
"defaultMessage": "Antingen en autorisering eller en tillgångsregel krävs"
|
||||
},
|
||||
"error.access.duplicate-usernames": {
|
||||
"defaultMessage": "Autentiseringsanvändarnamnen måste vara unika"
|
||||
},
|
||||
"error.invalid-auth": {
|
||||
"defaultMessage": "Ogiltig e-post eller lösenord"
|
||||
},
|
||||
"error.invalid-domain": {
|
||||
"defaultMessage": "Ogiltigt domän: {domain}"
|
||||
},
|
||||
"error.invalid-email": {
|
||||
"defaultMessage": "Ogiltig e-postadress"
|
||||
},
|
||||
"error.max-character-length": {
|
||||
"defaultMessage": "Maximal längd är {max} tecken"
|
||||
},
|
||||
"error.max-domains": {
|
||||
"defaultMessage": "För många domännamn, max är {max}"
|
||||
},
|
||||
"error.maximum": {
|
||||
"defaultMessage": "Maximum är {max}"
|
||||
},
|
||||
"error.min-character-length": {
|
||||
"defaultMessage": "Minsta längd är {min} tecken"
|
||||
},
|
||||
"error.minimum": {
|
||||
"defaultMessage": "Minimum är {min}"
|
||||
},
|
||||
"error.passwords-must-match": {
|
||||
"defaultMessage": "Lösenorden måste matcha"
|
||||
},
|
||||
"error.required": {
|
||||
"defaultMessage": "Detta krävs"
|
||||
},
|
||||
"expires.on": {
|
||||
"defaultMessage": "Utgår: {date}"
|
||||
},
|
||||
"footer.github-fork": {
|
||||
"defaultMessage": "Fork mig på GitHub"
|
||||
},
|
||||
"host.flags.block-exploits": {
|
||||
"defaultMessage": "Blockera vanliga utnyttjanden"
|
||||
},
|
||||
"host.flags.cache-assets": {
|
||||
"defaultMessage": "Cacha resurser"
|
||||
},
|
||||
"host.flags.preserve-path": {
|
||||
"defaultMessage": "Bevara sökväg"
|
||||
},
|
||||
"host.flags.protocols": {
|
||||
"defaultMessage": "Protokoll"
|
||||
},
|
||||
"host.flags.websockets-upgrade": {
|
||||
"defaultMessage": "Websocket-stöd"
|
||||
},
|
||||
"host.forward-port": {
|
||||
"defaultMessage": "Vidarekoppla port"
|
||||
},
|
||||
"host.forward-scheme": {
|
||||
"defaultMessage": "Schema"
|
||||
},
|
||||
"hosts": {
|
||||
"defaultMessage": "Värdar"
|
||||
},
|
||||
"http-only": {
|
||||
"defaultMessage": "Endast HTTP"
|
||||
},
|
||||
"lets-encrypt": {
|
||||
"defaultMessage": "Let's Encrypt"
|
||||
},
|
||||
"lets-encrypt-via-dns": {
|
||||
"defaultMessage": "Let's Encrypt via DNS"
|
||||
},
|
||||
"lets-encrypt-via-http": {
|
||||
"defaultMessage": "Let's Encrypt via HTTP"
|
||||
},
|
||||
"loading": {
|
||||
"defaultMessage": "Laddar..."
|
||||
},
|
||||
"login.2fa-code": {
|
||||
"defaultMessage": "Verifieringskod"
|
||||
},
|
||||
"login.2fa-code-placeholder": {
|
||||
"defaultMessage": "Skriv in kod"
|
||||
},
|
||||
"login.2fa-description": {
|
||||
"defaultMessage": "Skriv in koden från din autenticator-app"
|
||||
},
|
||||
"login.2fa-title": {
|
||||
"defaultMessage": "Tvåfaktorsautentisering"
|
||||
},
|
||||
"login.2fa-verify": {
|
||||
"defaultMessage": "Verifiera"
|
||||
},
|
||||
"login.title": {
|
||||
"defaultMessage": "Logga in på ditt konto"
|
||||
},
|
||||
"nginx-config.label": {
|
||||
"defaultMessage": "Anpassad Nginx-konfiguration"
|
||||
},
|
||||
"nginx-config.placeholder": {
|
||||
"defaultMessage": "# Skriv in din anpassade Nginx-konfiguration här på egen risk!"
|
||||
},
|
||||
"no-permission-error": {
|
||||
"defaultMessage": "Du har inte tillgång att se detta"
|
||||
},
|
||||
"notfound.action": {
|
||||
"defaultMessage": "Tag mig hem"
|
||||
},
|
||||
"notfound.content": {
|
||||
"defaultMessage": "Beklagar, sidan du sökte efter hittades inte"
|
||||
},
|
||||
"notfound.title": {
|
||||
"defaultMessage": "Oops... du har precis hittat en fel-sida"
|
||||
},
|
||||
"notification.error": {
|
||||
"defaultMessage": "Fel"
|
||||
},
|
||||
"notification.object-deleted": {
|
||||
"defaultMessage": "{object} har tagits bort"
|
||||
},
|
||||
"notification.object-disabled": {
|
||||
"defaultMessage": "{object} har inaktiverats"
|
||||
},
|
||||
"notification.object-enabled": {
|
||||
"defaultMessage": "{object} har aktiverats"
|
||||
},
|
||||
"notification.object-renewed": {
|
||||
"defaultMessage": "{object} har förnyats"
|
||||
},
|
||||
"notification.object-saved": {
|
||||
"defaultMessage": "{object} har sparats"
|
||||
},
|
||||
"notification.success": {
|
||||
"defaultMessage": "Lyckades"
|
||||
},
|
||||
"object.actions-title": {
|
||||
"defaultMessage": "{object} #{id}"
|
||||
},
|
||||
"object.add": {
|
||||
"defaultMessage": "Lägg till {object}"
|
||||
},
|
||||
"object.delete": {
|
||||
"defaultMessage": "Ta bort {object}"
|
||||
},
|
||||
"object.delete.content": {
|
||||
"defaultMessage": "Är du säker på att du vill ta bort den här {object}?"
|
||||
},
|
||||
"object.edit": {
|
||||
"defaultMessage": "Redigera {object}"
|
||||
},
|
||||
"object.empty": {
|
||||
"defaultMessage": "Ingen {objects}"
|
||||
},
|
||||
"object.event.created": {
|
||||
"defaultMessage": "Skapad {object}"
|
||||
},
|
||||
"object.event.deleted": {
|
||||
"defaultMessage": "Raderad {object}"
|
||||
},
|
||||
"object.event.disabled": {
|
||||
"defaultMessage": "Inaktiverad {object}"
|
||||
},
|
||||
"object.event.enabled": {
|
||||
"defaultMessage": "Aktiviterad {object}"
|
||||
},
|
||||
"object.event.renewed": {
|
||||
"defaultMessage": "Förnyad {object}"
|
||||
},
|
||||
"object.event.updated": {
|
||||
"defaultMessage": "Uppdaterad {object}"
|
||||
},
|
||||
"offline": {
|
||||
"defaultMessage": "Offline"
|
||||
},
|
||||
"online": {
|
||||
"defaultMessage": "Online"
|
||||
},
|
||||
"options": {
|
||||
"defaultMessage": "Alternativ"
|
||||
},
|
||||
"password": {
|
||||
"defaultMessage": "Lösenord"
|
||||
},
|
||||
"password.generate": {
|
||||
"defaultMessage": "Generera slumpmässigt lösenord"
|
||||
},
|
||||
"password.hide": {
|
||||
"defaultMessage": "Göm lösenord"
|
||||
},
|
||||
"password.show": {
|
||||
"defaultMessage": "Visa lösenord"
|
||||
},
|
||||
"permissions.hidden": {
|
||||
"defaultMessage": "Gölggt"
|
||||
},
|
||||
"permissions.manage": {
|
||||
"defaultMessage": "Hantera"
|
||||
},
|
||||
"permissions.view": {
|
||||
"defaultMessage": "Endast visa"
|
||||
},
|
||||
"permissions.visibility.all": {
|
||||
"defaultMessage": "Alla poster"
|
||||
},
|
||||
"permissions.visibility.title": {
|
||||
"defaultMessage": "Synlighet för poster"
|
||||
},
|
||||
"permissions.visibility.user": {
|
||||
"defaultMessage": "Endast skapade poster"
|
||||
},
|
||||
"proxy-host": {
|
||||
"defaultMessage": "Proxy-värd"
|
||||
},
|
||||
"proxy-host.forward-host": {
|
||||
"defaultMessage": "Forward Hostname / IP"
|
||||
},
|
||||
"proxy-hosts": {
|
||||
"defaultMessage": "Proxy-värdar"
|
||||
},
|
||||
"proxy-hosts.count": {
|
||||
"defaultMessage": "{count} {count, plural, one {Proxy-värd} other {Proxy-värdar}}"
|
||||
},
|
||||
"public": {
|
||||
"defaultMessage": "Offentlig"
|
||||
},
|
||||
"redirection-host": {
|
||||
"defaultMessage": "Omdirigeringsvärd"
|
||||
},
|
||||
"redirection-host.forward-domain": {
|
||||
"defaultMessage": "Forward domain"
|
||||
},
|
||||
"redirection-host.forward-http-code": {
|
||||
"defaultMessage": "HTTP-kod"
|
||||
},
|
||||
"redirection-hosts": {
|
||||
"defaultMessage": "Omdirigeringsvärdar"
|
||||
},
|
||||
"redirection-hosts.count": {
|
||||
"defaultMessage": "{count} {count, plural, one {Omdirigeringsvärd} other {Omdirigeringsvärdar}}"
|
||||
},
|
||||
"redirection-hosts.http-code.300": {
|
||||
"defaultMessage": "300 Flera val"
|
||||
},
|
||||
"redirection-hosts.http-code.301": {
|
||||
"defaultMessage": "301 Permanent omdirigering"
|
||||
},
|
||||
"redirection-hosts.http-code.302": {
|
||||
"defaultMessage": "302 Tillfällig omdirigering"
|
||||
},
|
||||
"redirection-hosts.http-code.303": {
|
||||
"defaultMessage": "303 Se annan"
|
||||
},
|
||||
"redirection-hosts.http-code.307": {
|
||||
"defaultMessage": "307 Tillfällig omdirigering"
|
||||
},
|
||||
"redirection-hosts.http-code.308": {
|
||||
"defaultMessage": "308 Permanent omdirigering"
|
||||
},
|
||||
"role.admin": {
|
||||
"defaultMessage": "Administratör"
|
||||
},
|
||||
"role.standard-user": {
|
||||
"defaultMessage": "Standardanvändare"
|
||||
},
|
||||
"save": {
|
||||
"defaultMessage": "Spara"
|
||||
},
|
||||
"setting": {
|
||||
"defaultMessage": "Inställning"
|
||||
},
|
||||
"settings": {
|
||||
"defaultMessage": "Inställningar"
|
||||
},
|
||||
"settings.default-site": {
|
||||
"defaultMessage": "Standardplats"
|
||||
},
|
||||
"settings.default-site.404": {
|
||||
"defaultMessage": "404-sida"
|
||||
},
|
||||
"settings.default-site.444": {
|
||||
"defaultMessage": "Ingen respons (444)"
|
||||
},
|
||||
"settings.default-site.congratulations": {
|
||||
"defaultMessage": "Grattis-sida"
|
||||
},
|
||||
"settings.default-site.description": {
|
||||
"defaultMessage": "Vad som ska visas när Nginx träffar en okänd värd"
|
||||
},
|
||||
"settings.default-site.html": {
|
||||
"defaultMessage": "Anpassad HTML"
|
||||
},
|
||||
"settings.default-site.html.placeholder": {
|
||||
"defaultMessage": "<!-- Skriv in ditt anpassade HTML-innehåll här -->"
|
||||
},
|
||||
"settings.default-site.redirect": {
|
||||
"defaultMessage": "Omdirigering"
|
||||
},
|
||||
"setup.preamble": {
|
||||
"defaultMessage": "Kom igång genom att skapa din administratörskonto."
|
||||
},
|
||||
"setup.title": {
|
||||
"defaultMessage": "Välkommen!"
|
||||
},
|
||||
"sign-in": {
|
||||
"defaultMessage": "Logga in"
|
||||
},
|
||||
"ssl-certificate": {
|
||||
"defaultMessage": "SSL-certifikat"
|
||||
},
|
||||
"stream": {
|
||||
"defaultMessage": "Ström"
|
||||
},
|
||||
"stream.forward-host": {
|
||||
"defaultMessage": "Forward värd"
|
||||
},
|
||||
"stream.forward-host.placeholder": {
|
||||
"defaultMessage": "example.com eller 10.0.0.1 eller 2001:db8:3333:4444:5555:6666:7777:8888"
|
||||
},
|
||||
"stream.incoming-port": {
|
||||
"defaultMessage": "Inkommande port"
|
||||
},
|
||||
"streams": {
|
||||
"defaultMessage": "Strömmar"
|
||||
},
|
||||
"streams.count": {
|
||||
"defaultMessage": "{count} {count, plural, one {Ström} other {Strömmar}}"
|
||||
},
|
||||
"streams.tcp": {
|
||||
"defaultMessage": "TCP"
|
||||
},
|
||||
"streams.udp": {
|
||||
"defaultMessage": "UDP"
|
||||
},
|
||||
"test": {
|
||||
"defaultMessage": "Test"
|
||||
},
|
||||
"update-available": {
|
||||
"defaultMessage": "Uppdatering tillgänglig: {latestVersion}"
|
||||
},
|
||||
"user": {
|
||||
"defaultMessage": "Användare"
|
||||
},
|
||||
"user.change-password": {
|
||||
"defaultMessage": "Ändra lösenord"
|
||||
},
|
||||
"user.confirm-password": {
|
||||
"defaultMessage": "Bekräfta lösenord"
|
||||
},
|
||||
"user.current-password": {
|
||||
"defaultMessage": "Nuvarande lösenord"
|
||||
},
|
||||
"user.edit-profile": {
|
||||
"defaultMessage": "Redigera profil"
|
||||
},
|
||||
"user.full-name": {
|
||||
"defaultMessage": "Fullständigt namn"
|
||||
},
|
||||
"user.login-as": {
|
||||
"defaultMessage": "Logga in som {name}"
|
||||
},
|
||||
"user.logout": {
|
||||
"defaultMessage": "Logga ut"
|
||||
},
|
||||
"user.new-password": {
|
||||
"defaultMessage": "Nytt lösenord"
|
||||
},
|
||||
"user.nickname": {
|
||||
"defaultMessage": "Nickname"
|
||||
},
|
||||
"user.set-password": {
|
||||
"defaultMessage": "Ange lösenord"
|
||||
},
|
||||
"user.set-permissions": {
|
||||
"defaultMessage": "Ange behörigheter för {name}"
|
||||
},
|
||||
"user.switch-dark": {
|
||||
"defaultMessage": "Vänd till mörk läge"
|
||||
},
|
||||
"user.switch-light": {
|
||||
"defaultMessage": "Vänd till ljust läge"
|
||||
},
|
||||
"user.two-factor": {
|
||||
"defaultMessage": "Tvåfaktorsautentisering"
|
||||
},
|
||||
"username": {
|
||||
"defaultMessage": "Användarnamn"
|
||||
},
|
||||
"users": {
|
||||
"defaultMessage": "Användare"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
import CodeEditor from "@uiw/react-textarea-code-editor";
|
||||
import EasyModal, { type InnerModalProps } from "ez-modal-react";
|
||||
import { useState } from "react";
|
||||
import { Alert } from "react-bootstrap";
|
||||
import Modal from "react-bootstrap/Modal";
|
||||
import { Button, Loading } from "src/components";
|
||||
import { useProxyHostLogs } from "src/hooks";
|
||||
import { T } from "src/locale";
|
||||
|
||||
const showHostLogsModal = (id: number) => {
|
||||
EasyModal.show(HostLogsModal, { id });
|
||||
};
|
||||
|
||||
interface Props extends InnerModalProps {
|
||||
id: number;
|
||||
}
|
||||
const HostLogsModal = EasyModal.create(({ id, visible, remove }: Props) => {
|
||||
const [logType, setLogType] = useState<"access" | "error">("access");
|
||||
const { data, isLoading, error } = useProxyHostLogs(id, logType);
|
||||
|
||||
return (
|
||||
<Modal show={visible} onHide={remove} size="lg" scrollable>
|
||||
{!isLoading && error && (
|
||||
<Alert variant="danger" className="m-3">
|
||||
{error?.message || "Unknown error"}
|
||||
</Alert>
|
||||
)}
|
||||
<Modal.Header closeButton>
|
||||
<Modal.Title>
|
||||
<T id="action.logs" />
|
||||
</Modal.Title>
|
||||
</Modal.Header>
|
||||
<Modal.Body>
|
||||
<div className="mb-3">
|
||||
<ul className="nav nav-tabs">
|
||||
<li className="nav-item">
|
||||
<a
|
||||
href="#"
|
||||
className={`nav-link ${logType === "access" ? "active" : ""}`}
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
setLogType("access");
|
||||
}}
|
||||
>
|
||||
<T id="column.access" />
|
||||
</a>
|
||||
</li>
|
||||
<li className="nav-item">
|
||||
<a
|
||||
href="#"
|
||||
className={`nav-link ${logType === "error" ? "active" : ""}`}
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
setLogType("error");
|
||||
}}
|
||||
>
|
||||
<T id="column.error" />
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
{isLoading ? (
|
||||
<Loading noLogo />
|
||||
) : (
|
||||
<div style={{ maxHeight: "60vh", overflow: "auto" }}>
|
||||
<CodeEditor
|
||||
language="text"
|
||||
padding={15}
|
||||
data-color-mode="dark"
|
||||
indentWidth={2}
|
||||
style={{
|
||||
fontFamily:
|
||||
"ui-monospace,SFMono-Regular,SF Mono,Consolas,Liberation Mono,Menlo,monospace",
|
||||
borderRadius: "0.3rem",
|
||||
backgroundColor: "var(--tblr-bg-surface-dark)",
|
||||
fontSize: "12px",
|
||||
}}
|
||||
readOnly
|
||||
value={data?.logs || ""}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
</Modal.Body>
|
||||
<Modal.Footer>
|
||||
<Button data-bs-dismiss="modal" onClick={remove}>
|
||||
<T id="action.close" />
|
||||
</Button>
|
||||
</Modal.Footer>
|
||||
</Modal>
|
||||
);
|
||||
});
|
||||
|
||||
export { showHostLogsModal };
|
||||
@@ -6,6 +6,7 @@ export * from "./DeleteConfirmModal";
|
||||
export * from "./DNSCertificateModal";
|
||||
export * from "./EventDetailsModal";
|
||||
export * from "./HelpModal";
|
||||
export * from "./HostLogsModal";
|
||||
export * from "./HTTPCertificateModal";
|
||||
export * from "./PermissionsModal";
|
||||
export * from "./ProxyHostModal";
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
import cn from "classnames";
|
||||
import { useEffect, useRef } from "react";
|
||||
import { T } from "src/locale";
|
||||
import styles from "./LogViewer.module.css";
|
||||
|
||||
const LEVEL_PATTERN = /\b(ERROR|FATAL|WARN|SUCCESS|COMPLETE|DEBUG|INFO)\b/;
|
||||
|
||||
const levelClassName = (line: string): string | undefined => {
|
||||
const match = line.match(LEVEL_PATTERN);
|
||||
if (!match) {
|
||||
return undefined;
|
||||
}
|
||||
switch (match[1]) {
|
||||
case "ERROR":
|
||||
case "FATAL":
|
||||
return "text-danger";
|
||||
case "WARN":
|
||||
return "text-warning";
|
||||
case "SUCCESS":
|
||||
case "COMPLETE":
|
||||
return "text-success";
|
||||
case "DEBUG":
|
||||
return "text-secondary";
|
||||
default:
|
||||
return undefined;
|
||||
}
|
||||
};
|
||||
|
||||
// How close to the bottom (in pixels) the user has to be for auto-scroll to keep
|
||||
// following new lines. Scrolling further up than this to read history disables it,
|
||||
// so newly polled lines never yank the viewport away from what's being read.
|
||||
const AUTO_SCROLL_THRESHOLD_PX = 40;
|
||||
|
||||
interface Props {
|
||||
lines: string[];
|
||||
}
|
||||
|
||||
export default function LogLines({ lines }: Props) {
|
||||
const containerRef = useRef<HTMLPreElement>(null);
|
||||
const stickToBottomRef = useRef(true);
|
||||
|
||||
const handleScroll = () => {
|
||||
const el = containerRef.current;
|
||||
if (!el) {
|
||||
return;
|
||||
}
|
||||
const distanceFromBottom = el.scrollHeight - el.scrollTop - el.clientHeight;
|
||||
stickToBottomRef.current = distanceFromBottom < AUTO_SCROLL_THRESHOLD_PX;
|
||||
};
|
||||
|
||||
// biome-ignore lint/correctness/useExhaustiveDependencies: lines is a re-scroll trigger, not read in the body
|
||||
useEffect(() => {
|
||||
const el = containerRef.current;
|
||||
if (el && stickToBottomRef.current) {
|
||||
el.scrollTop = el.scrollHeight;
|
||||
}
|
||||
}, [lines]);
|
||||
|
||||
if (!lines.length) {
|
||||
return (
|
||||
<div className={cn(styles.logBox, "text-secondary")}>
|
||||
<T id="logs.empty" />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<pre ref={containerRef} onScroll={handleScroll} className={styles.logBox}>
|
||||
{lines.map((line, idx) => (
|
||||
<span key={idx} className={cn(styles.logLine, levelClassName(line))}>
|
||||
{line}
|
||||
</span>
|
||||
))}
|
||||
</pre>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
.logBox {
|
||||
height: 65vh;
|
||||
overflow-y: auto;
|
||||
padding: 0.75rem 1rem;
|
||||
margin: 0;
|
||||
font-family: var(--tblr-font-monospace, ui-monospace, monospace);
|
||||
font-size: 0.8125rem;
|
||||
line-height: 1.5;
|
||||
white-space: pre-wrap;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.logLine {
|
||||
display: block;
|
||||
}
|
||||
@@ -0,0 +1,249 @@
|
||||
import { useEffect, useMemo, useState } from "react";
|
||||
import Alert from "react-bootstrap/Alert";
|
||||
import type { LogChannel, LogHostType, LogSourceType } from "src/api/backend";
|
||||
import { Loading } from "src/components";
|
||||
import { useLogSources, useLogTail } from "src/hooks";
|
||||
import { T, intl } from "src/locale";
|
||||
import LogLines from "./LogLines";
|
||||
|
||||
const LINES_OPTIONS = [100, 200, 500, 1000];
|
||||
const LEVEL_OPTIONS = ["INFO", "WARN", "ERROR", "DEBUG", "SUCCESS", "FATAL", "COMPLETE"];
|
||||
const SEARCH_DEBOUNCE_MS = 300;
|
||||
|
||||
const HOST_TYPES: { type: LogHostType; labelId: string }[] = [
|
||||
{ type: "proxy", labelId: "proxy-hosts" },
|
||||
{ type: "redirection", labelId: "redirection-hosts" },
|
||||
{ type: "dead", labelId: "dead-hosts" },
|
||||
{ type: "stream", labelId: "streams" },
|
||||
];
|
||||
|
||||
interface Selection {
|
||||
type: LogSourceType;
|
||||
hostType?: LogHostType;
|
||||
hostId?: number;
|
||||
}
|
||||
|
||||
const encodeSelection = (selection: Selection): string => {
|
||||
if (selection.type === "host") {
|
||||
return `host:${selection.hostType}:${selection.hostId}`;
|
||||
}
|
||||
return selection.type;
|
||||
};
|
||||
|
||||
const decodeSelection = (value: string): Selection => {
|
||||
if (value === "system" || value === "letsencrypt") {
|
||||
return { type: value };
|
||||
}
|
||||
const [, hostType, hostId] = value.split(":");
|
||||
return { type: "host", hostType: hostType as LogHostType, hostId: Number(hostId) };
|
||||
};
|
||||
|
||||
const formatBytes = (bytes: number): string => {
|
||||
if (bytes < 1024) {
|
||||
return `${bytes} B`;
|
||||
}
|
||||
const units = ["KB", "MB", "GB"];
|
||||
let value = bytes / 1024;
|
||||
let unitIndex = 0;
|
||||
while (value >= 1024 && unitIndex < units.length - 1) {
|
||||
value /= 1024;
|
||||
unitIndex++;
|
||||
}
|
||||
return `${value.toFixed(1)} ${units[unitIndex]}`;
|
||||
};
|
||||
|
||||
export default function LogViewer() {
|
||||
const sourcesQuery = useLogSources();
|
||||
|
||||
const [selection, setSelection] = useState<Selection>({ type: "system" });
|
||||
const [channel, setChannel] = useState<LogChannel>("access");
|
||||
const [level, setLevel] = useState("");
|
||||
const [lines, setLines] = useState(LINES_OPTIONS[1]);
|
||||
const [live, setLive] = useState(true);
|
||||
const [searchInput, setSearchInput] = useState("");
|
||||
const [search, setSearch] = useState("");
|
||||
|
||||
useEffect(() => {
|
||||
const handle = setTimeout(() => setSearch(searchInput.trim()), SEARCH_DEBOUNCE_MS);
|
||||
return () => clearTimeout(handle);
|
||||
}, [searchInput]);
|
||||
|
||||
const tailQuery = useLogTail({
|
||||
type: selection.type,
|
||||
hostType: selection.hostType,
|
||||
hostId: selection.hostId,
|
||||
channel: selection.type === "host" ? channel : undefined,
|
||||
lines,
|
||||
level: selection.type === "system" && level ? level : undefined,
|
||||
search: search || undefined,
|
||||
live,
|
||||
});
|
||||
|
||||
const hostGroups = useMemo(() => {
|
||||
if (!sourcesQuery.data) {
|
||||
return [];
|
||||
}
|
||||
return HOST_TYPES.map(({ type, labelId }) => ({
|
||||
type,
|
||||
labelId,
|
||||
options: sourcesQuery.data.hosts[type] || [],
|
||||
})).filter((group) => group.options.length > 0);
|
||||
}, [sourcesQuery.data]);
|
||||
|
||||
const handleDownload = () => {
|
||||
const content = (tailQuery.data?.lines || []).join("\n");
|
||||
const blob = new Blob([content], { type: "text/plain" });
|
||||
const url = window.URL.createObjectURL(blob);
|
||||
const a = document.createElement("a");
|
||||
a.href = url;
|
||||
a.download = `${encodeSelection(selection).replace(/:/g, "-")}.log`;
|
||||
a.click();
|
||||
window.URL.revokeObjectURL(url);
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="card mt-4">
|
||||
<div className="card-status-top bg-purple" />
|
||||
<div className="card-header">
|
||||
<div className="row w-full g-2 align-items-center">
|
||||
<div className="col-auto">
|
||||
<h2 className="mt-1 mb-0">
|
||||
<T id="logs" />
|
||||
</h2>
|
||||
</div>
|
||||
{typeof tailQuery.data?.size === "number" && (
|
||||
<div className="col-auto">
|
||||
<span className="text-secondary small">{formatBytes(tailQuery.data.size)}</span>
|
||||
</div>
|
||||
)}
|
||||
<div className="col-auto">
|
||||
<select
|
||||
className="form-select form-select-sm"
|
||||
value={encodeSelection(selection)}
|
||||
onChange={(e) => {
|
||||
setSelection(decodeSelection(e.target.value));
|
||||
setChannel("access");
|
||||
}}
|
||||
>
|
||||
<option value="system">{intl.formatMessage({ id: "logs.source.system" })}</option>
|
||||
<option value="letsencrypt">{intl.formatMessage({ id: "lets-encrypt" })}</option>
|
||||
{hostGroups.map((group) => (
|
||||
<optgroup key={group.type} label={intl.formatMessage({ id: group.labelId })}>
|
||||
{group.options.map((option) => (
|
||||
<option key={option.id} value={`host:${group.type}:${option.id}`}>
|
||||
{option.label}
|
||||
</option>
|
||||
))}
|
||||
</optgroup>
|
||||
))}
|
||||
</select>
|
||||
</div>
|
||||
{selection.type === "host" && (
|
||||
<div className="col-auto">
|
||||
<div className="btn-group" role="group">
|
||||
<button
|
||||
type="button"
|
||||
className={`btn btn-sm ${channel === "access" ? "btn-primary" : "btn-outline-primary"}`}
|
||||
onClick={() => setChannel("access")}
|
||||
>
|
||||
<T id="logs.channel.access" />
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
className={`btn btn-sm ${channel === "error" ? "btn-primary" : "btn-outline-primary"}`}
|
||||
onClick={() => setChannel("error")}
|
||||
>
|
||||
<T id="logs.channel.error" />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
{selection.type === "system" && (
|
||||
<div className="col-auto">
|
||||
<select
|
||||
className="form-select form-select-sm"
|
||||
value={level}
|
||||
onChange={(e) => setLevel(e.target.value)}
|
||||
>
|
||||
<option value="">{intl.formatMessage({ id: "logs.level.all" })}</option>
|
||||
{LEVEL_OPTIONS.map((lvl) => (
|
||||
<option key={lvl} value={lvl}>
|
||||
{lvl}
|
||||
</option>
|
||||
))}
|
||||
</select>
|
||||
</div>
|
||||
)}
|
||||
<div className="col-auto">
|
||||
<input
|
||||
type="search"
|
||||
className="form-control form-control-sm"
|
||||
placeholder={intl.formatMessage({ id: "logs.search-placeholder" })}
|
||||
value={searchInput}
|
||||
onChange={(e) => setSearchInput(e.target.value)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-auto">
|
||||
<select
|
||||
className="form-select form-select-sm"
|
||||
value={lines}
|
||||
onChange={(e) => setLines(Number(e.target.value))}
|
||||
>
|
||||
{LINES_OPTIONS.map((n) => (
|
||||
<option key={n} value={n}>
|
||||
{n}
|
||||
</option>
|
||||
))}
|
||||
</select>
|
||||
</div>
|
||||
<div className="col-auto ms-auto d-flex gap-2">
|
||||
<button
|
||||
type="button"
|
||||
className={`btn btn-sm ${live ? "btn-success" : "btn-outline-secondary"}`}
|
||||
onClick={() => setLive((v) => !v)}
|
||||
>
|
||||
<T id={live ? "logs.live" : "logs.paused"} />
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
className="btn btn-sm btn-outline-secondary"
|
||||
onClick={() => tailQuery.refetch()}
|
||||
>
|
||||
<T id="logs.refresh" />
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
className="btn btn-sm btn-outline-secondary"
|
||||
disabled={!tailQuery.data?.lines.length}
|
||||
onClick={handleDownload}
|
||||
>
|
||||
<T id="logs.download" />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{tailQuery.isError && (
|
||||
<div className="card-body">
|
||||
<Alert variant="danger">{tailQuery.error?.message || "Unknown error"}</Alert>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{tailQuery.data?.truncated && (
|
||||
<div className="card-body pb-0">
|
||||
<Alert variant="warning">
|
||||
<T id="logs.truncated-warning" />
|
||||
</Alert>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{sourcesQuery.isLoading || (tailQuery.isLoading && !tailQuery.data) ? (
|
||||
<div className="card-body">
|
||||
<Loading noLogo />
|
||||
</div>
|
||||
) : (
|
||||
<LogLines lines={tailQuery.data?.lines || []} />
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
import { HasPermission } from "src/components";
|
||||
import { ADMIN, VIEW } from "src/modules/Permissions";
|
||||
import LogViewer from "./LogViewer";
|
||||
|
||||
const Logs = () => {
|
||||
return (
|
||||
<HasPermission section={ADMIN} permission={VIEW} pageLoading loadingNoLogo>
|
||||
<LogViewer />
|
||||
</HasPermission>
|
||||
);
|
||||
};
|
||||
|
||||
export default Logs;
|
||||
@@ -1,4 +1,4 @@
|
||||
import { IconDotsVertical, IconEdit, IconPower, IconTrash } from "@tabler/icons-react";
|
||||
import { IconDotsVertical, IconEdit, IconFileText, IconPower, IconTrash } from "@tabler/icons-react";
|
||||
import { createColumnHelper, type SortingState, useTable } from "@tanstack/react-table";
|
||||
import { useMemo, useState } from "react";
|
||||
import type { ProxyHost } from "src/api/backend";
|
||||
@@ -23,9 +23,19 @@ interface Props {
|
||||
onEdit?: (id: number) => void;
|
||||
onDelete?: (id: number) => void;
|
||||
onDisableToggle?: (id: number, enabled: boolean) => void;
|
||||
onLogs?: (id: number) => void;
|
||||
onNew?: () => void;
|
||||
}
|
||||
export default function Table({ data, isFetching, onEdit, onDelete, onDisableToggle, onNew, isFiltered }: Props) {
|
||||
export default function Table({
|
||||
data,
|
||||
isFetching,
|
||||
onEdit,
|
||||
onDelete,
|
||||
onDisableToggle,
|
||||
onLogs,
|
||||
onNew,
|
||||
isFiltered,
|
||||
}: Props) {
|
||||
const columnHelper = createColumnHelper<Features, ProxyHost>();
|
||||
const columns = useMemo(
|
||||
() => [
|
||||
@@ -122,6 +132,17 @@ export default function Table({ data, isFetching, onEdit, onDelete, onDisableTog
|
||||
<T id="action.edit" />
|
||||
</a>
|
||||
<HasPermission section={PROXY_HOSTS} permission={MANAGE} hideError>
|
||||
<a
|
||||
className="dropdown-item"
|
||||
href="#"
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
onLogs?.(info.row.original.id);
|
||||
}}
|
||||
>
|
||||
<IconFileText size={16} />
|
||||
<T id="action.logs" />
|
||||
</a>
|
||||
<a
|
||||
className="dropdown-item"
|
||||
href="#"
|
||||
@@ -155,7 +176,7 @@ export default function Table({ data, isFetching, onEdit, onDelete, onDisableTog
|
||||
},
|
||||
}),
|
||||
],
|
||||
[columnHelper, onEdit, onDisableToggle, onDelete],
|
||||
[columnHelper, onEdit, onDisableToggle, onDelete, onLogs],
|
||||
);
|
||||
|
||||
const [sorting, setSorting] = useState<SortingState>([]);
|
||||
|
||||
@@ -6,7 +6,7 @@ import { deleteProxyHost, toggleProxyHost } from "src/api/backend";
|
||||
import { Button, HasPermission, LoadingPage } from "src/components";
|
||||
import { useProxyHosts } from "src/hooks";
|
||||
import { T } from "src/locale";
|
||||
import { showDeleteConfirmModal, showHelpModal, showProxyHostModal } from "src/modals";
|
||||
import { showDeleteConfirmModal, showHelpModal, showHostLogsModal, showProxyHostModal } from "src/modals";
|
||||
import { MANAGE, PROXY_HOSTS } from "src/modules/Permissions";
|
||||
import { showObjectSuccess } from "src/notifications";
|
||||
import Table from "./Table";
|
||||
@@ -99,6 +99,7 @@ export default function TableWrapper() {
|
||||
isFiltered={!!search}
|
||||
isFetching={isFetching}
|
||||
onEdit={(id: number) => showProxyHostModal(id)}
|
||||
onLogs={(id: number) => showHostLogsModal(id)}
|
||||
onDelete={(id: number) => {
|
||||
const host = data?.find((h) => h.id === id);
|
||||
showDeleteConfirmModal({
|
||||
|
||||
+342
-124
@@ -146,6 +146,13 @@
|
||||
resolved "https://registry.yarnpkg.com/@biomejs/cli-win32-x64/-/cli-win32-x64-2.5.10.tgz#3bdeaf5856f21aec6b6c50a7bca5464b9cda5623"
|
||||
integrity sha512-M+2dgBsl3lXRiTfgPVc2p3anS4Tocojke4rzFLScZ2Y/wmF+36dRb1iHCLiyGqOzQGyTplZH1HnEYviiAqi3nA==
|
||||
|
||||
"@corvu/utils@~0.4.2":
|
||||
version "0.4.2"
|
||||
resolved "https://registry.yarnpkg.com/@corvu/utils/-/utils-0.4.2.tgz#ae867221297fd1e362efe41f081c42d7c746ff61"
|
||||
integrity sha512-Ox2kYyxy7NoXdKWdHeDEjZxClwzO4SKM8plAaVwmAJPxHMqA0rLOoAsa+hBDwRLpctf+ZRnAd/ykguuJidnaTA==
|
||||
dependencies:
|
||||
"@floating-ui/dom" "^1.6.11"
|
||||
|
||||
"@emotion/babel-plugin@^11.13.5":
|
||||
version "11.13.5"
|
||||
resolved "https://registry.yarnpkg.com/@emotion/babel-plugin/-/babel-plugin-11.13.5.tgz#eab8d65dbded74e0ecfd28dc218e75607c4e7bc0"
|
||||
@@ -241,7 +248,7 @@
|
||||
dependencies:
|
||||
"@floating-ui/utils" "^0.2.12"
|
||||
|
||||
"@floating-ui/dom@^1.0.1":
|
||||
"@floating-ui/dom@^1.0.1", "@floating-ui/dom@^1.5.1", "@floating-ui/dom@^1.6.11":
|
||||
version "1.8.0"
|
||||
resolved "https://registry.yarnpkg.com/@floating-ui/dom/-/dom-1.8.0.tgz#8a20e6facbe2456afdbeb6c8b968a72df689cf63"
|
||||
integrity sha512-yXSrzeHZBTZadLOlfyhCkJHNeLJnHRnRInwdZ40L7ZiaAtrBwoYlsDrX3v5zB1Utk7CLfzcOVnVVWoXEky7Ceg==
|
||||
@@ -329,6 +336,13 @@
|
||||
dependencies:
|
||||
"@swc/helpers" "^0.5.0"
|
||||
|
||||
"@internationalized/number@^3.2.1":
|
||||
version "3.6.8"
|
||||
resolved "https://registry.yarnpkg.com/@internationalized/number/-/number-3.6.8.tgz#aaa3e16fb9d64a8d7f130ccf848c626914dfdf9e"
|
||||
integrity sha512-8UmMFia46DUt+k97zKd9fKWXcWHR+k8ae3eYzILETuT2KbIvLyOfac7zesw+sJdRAAZ7Q9pM1Mk22aXp2LD0Ig==
|
||||
dependencies:
|
||||
"@swc/helpers" "^0.5.0"
|
||||
|
||||
"@internationalized/number@^3.6.7":
|
||||
version "3.6.7"
|
||||
resolved "https://registry.yarnpkg.com/@internationalized/number/-/number-3.6.7.tgz#5a0a8fa413b5f8679a59dcf37e2a74dc508b8371"
|
||||
@@ -376,10 +390,36 @@
|
||||
dependencies:
|
||||
jsbi "^4.3.0"
|
||||
|
||||
"@oxc-project/types@=0.146.0":
|
||||
version "0.146.0"
|
||||
resolved "https://registry.yarnpkg.com/@oxc-project/types/-/types-0.146.0.tgz#d57a2591abbf1f6e50981b07ee24ab269530d87a"
|
||||
integrity sha512-XC0QsnnhVe7sLIWmYmdPw7x5P0h4W8vUU3Nv1ySgWXtvCz8NizoAEpGXA0sOYoJQV2Rl13LgURAHQ5cI5ILCSA==
|
||||
"@kobalte/core@^0.13.4":
|
||||
version "0.13.14"
|
||||
resolved "https://registry.yarnpkg.com/@kobalte/core/-/core-0.13.14.tgz#6d46ada9a427e07f73fb61123a03220277a793d7"
|
||||
integrity sha512-SBVB1lnvYbYt2x3t7fG0lo5fGLEbHQ6PII3NDPva8vD5e2v53On84ZVQiuIk0XI/55R4GQhden7Yem+R/XR8uQ==
|
||||
dependencies:
|
||||
"@floating-ui/dom" "^1.5.1"
|
||||
"@internationalized/number" "^3.2.1"
|
||||
"@kobalte/utils" "^0.9.2"
|
||||
"@solid-primitives/props" "^3.1.8"
|
||||
"@solid-primitives/resize-observer" "^2.0.26"
|
||||
solid-presence "^0.2.0"
|
||||
solid-prevent-scroll "^0.1.11"
|
||||
|
||||
"@kobalte/utils@^0.9.2":
|
||||
version "0.9.2"
|
||||
resolved "https://registry.yarnpkg.com/@kobalte/utils/-/utils-0.9.2.tgz#cb4ccbbd93efda1f2e3602ffeec7fd8b58b69e7b"
|
||||
integrity sha512-jRVXr+zsVHxzDXRoh+CDeXzvCsFJ6uiHhqqNQ26Cw9ZsZ3D6nqPUBt1gGVtj2ZPmRL3a9Uk1v8D1aJ8/I12Dow==
|
||||
dependencies:
|
||||
"@solid-primitives/event-listener" "^2.2.14"
|
||||
"@solid-primitives/keyed" "^1.2.0"
|
||||
"@solid-primitives/map" "^0.4.7"
|
||||
"@solid-primitives/media" "^2.2.4"
|
||||
"@solid-primitives/props" "^3.1.8"
|
||||
"@solid-primitives/refs" "^1.0.5"
|
||||
"@solid-primitives/utils" "^6.2.1"
|
||||
|
||||
"@oxc-project/types@=0.150.0":
|
||||
version "0.150.0"
|
||||
resolved "https://registry.yarnpkg.com/@oxc-project/types/-/types-0.150.0.tgz#e9be0840114655016b16f1c05ddaaa01df5b8853"
|
||||
integrity sha512-rDS5/31E9HfPl/CIzGrn0DOlvBbXFseQ5URJ9sYMfstbKLD/c6Gm9vmRzRGDdAXyOIL4zmO37lc9RIwYqVruZw==
|
||||
|
||||
"@parcel/watcher-android-arm64@2.6.0":
|
||||
version "2.6.0"
|
||||
@@ -511,86 +551,177 @@
|
||||
uncontrollable "^8.0.4"
|
||||
warning "^4.0.3"
|
||||
|
||||
"@rolldown/binding-android-arm-eabi@1.2.5":
|
||||
version "1.2.5"
|
||||
resolved "https://registry.yarnpkg.com/@rolldown/binding-android-arm-eabi/-/binding-android-arm-eabi-1.2.5.tgz#165b80910de7cd33f772d5b7b045b259acb7420c"
|
||||
integrity sha512-DLe/i+l8ynIBY7XEQ191TeZvCoowIGa18R+dIV30GW7DiOtp74i/xX8hs8GUjW5ARV7VZuie3d6AumSmCwbeRA==
|
||||
"@rolldown/binding-android-arm-eabi@1.2.9":
|
||||
version "1.2.9"
|
||||
resolved "https://registry.yarnpkg.com/@rolldown/binding-android-arm-eabi/-/binding-android-arm-eabi-1.2.9.tgz#b38df5a6997454696207ac16b322a3ac1ff79e16"
|
||||
integrity sha512-tNISae1QEf/vkb3xkRcjV5SEdzPE97We5IVaa2Z8jSszQPZ8U60B/YCYpw4QI7VidYsBtKavczXf+DyDs9WGxw==
|
||||
|
||||
"@rolldown/binding-android-arm64@1.2.5":
|
||||
version "1.2.5"
|
||||
resolved "https://registry.yarnpkg.com/@rolldown/binding-android-arm64/-/binding-android-arm64-1.2.5.tgz#5ed74d4b8fa56c68eb1aeb81d0d207a85b6de05c"
|
||||
integrity sha512-zXcwKlQApYAOELHd8PwKDFkagYF9Wy4e0RJ+0qnzl9Pjnpj75TEG8ufv40p2J7kCEfwZAsNiuzRIyNNMWT38ig==
|
||||
"@rolldown/binding-android-arm64@1.2.9":
|
||||
version "1.2.9"
|
||||
resolved "https://registry.yarnpkg.com/@rolldown/binding-android-arm64/-/binding-android-arm64-1.2.9.tgz#bc2bf135c1e787f94b29bc321c1db0bd2884b5a7"
|
||||
integrity sha512-YC8YsI30o606GTZi0VyzYlsDKFP8W61i/QzayHDkLbNEz/IShqAmTa+hsJRj13xTHA0H+6fk4b2UmGn+Q/cMlg==
|
||||
|
||||
"@rolldown/binding-darwin-arm64@1.2.5":
|
||||
version "1.2.5"
|
||||
resolved "https://registry.yarnpkg.com/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.2.5.tgz#6f27c7060e58ca03061fa7d50f9dc409bc377fe1"
|
||||
integrity sha512-dK4QakI42nzWgJT5sm4y4y/O//D4OxM75/cH28RLV+nzIN9AY+YsbuUVrUTjlLjXR6vpyxFbSsbmNuJ6BP9sww==
|
||||
"@rolldown/binding-darwin-arm64@1.2.9":
|
||||
version "1.2.9"
|
||||
resolved "https://registry.yarnpkg.com/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.2.9.tgz#052049707ccc4cfe0b035aa8c37c4e55523eecbb"
|
||||
integrity sha512-IwhlH3qK5urrY8hZiEgGkHKEFN901p/p2bjxCxJlr4GyNnF7wYpUvK+Y43uaRYuC4hpfjzbR3SJC3arX1jGvmw==
|
||||
|
||||
"@rolldown/binding-darwin-x64@1.2.5":
|
||||
version "1.2.5"
|
||||
resolved "https://registry.yarnpkg.com/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.2.5.tgz#74ab897d134ede4072fdc6108f00193e6167ee28"
|
||||
integrity sha512-fqSALaUu1Wjd1nK2uW2kJDWdLCc8lx1IcY+MTY26Aurfdx19anlzhqXOgCFbBFQnlFDTn4TC1/7Nz4Bl2mLP3A==
|
||||
"@rolldown/binding-darwin-x64@1.2.9":
|
||||
version "1.2.9"
|
||||
resolved "https://registry.yarnpkg.com/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.2.9.tgz#ea67496811e4e1c2f76d5647f248073e204f5462"
|
||||
integrity sha512-XxpJfVzFh+jilRxIXUqcfYAYcunIc/XEzIizsOL1fcJee5Sf7H3mH8WlLmfHfluz5amqR88QQo9izKtmMlavAw==
|
||||
|
||||
"@rolldown/binding-freebsd-x64@1.2.5":
|
||||
version "1.2.5"
|
||||
resolved "https://registry.yarnpkg.com/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.2.5.tgz#7d337f9ae4b739674e1938747118ab0676c8ef8a"
|
||||
integrity sha512-/vCnNxlkxs9tKxNDcyWUePpJ/PgTzxIaVhoM5SmG8UV+GR/IcPam4VYxi7GIMo7PSDuNqlJqvprqii9NqqVCMw==
|
||||
"@rolldown/binding-freebsd-x64@1.2.9":
|
||||
version "1.2.9"
|
||||
resolved "https://registry.yarnpkg.com/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.2.9.tgz#4b4a605f8c24a7235afb5da9b4b8bc8974446bb5"
|
||||
integrity sha512-kSfvhmgeWyfkbT3p/1s5vSgboogoah2zkm9fX2zjg2hHxSV7T4KhMWRUUaRk4OXNqoD3QAUeRqLcs1aZOK4U1g==
|
||||
|
||||
"@rolldown/binding-linux-arm-gnueabihf@1.2.5":
|
||||
version "1.2.5"
|
||||
resolved "https://registry.yarnpkg.com/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.2.5.tgz#a8195dc1091ade0f912b0613ef6500941e5615f4"
|
||||
integrity sha512-abk0NLA519LxRCszmbE0jYKuQ9YPocOXTiOXOo6Yr+YAT95VH+PtqYAjOJvGKt3viEd/x4qzabAlwd5bHOOARg==
|
||||
"@rolldown/binding-linux-arm-gnueabihf@1.2.9":
|
||||
version "1.2.9"
|
||||
resolved "https://registry.yarnpkg.com/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.2.9.tgz#a36c6961fb24b86176463559dcd0edbe48ea74f1"
|
||||
integrity sha512-1RVzG17pxqbTfYLC352JlLt6kKLG+6Hr30n8DlIJqsnV5luUDd2Qdx9Ayw1Cabfyb1K9k0jXEZ7evxkRoT+uiw==
|
||||
|
||||
"@rolldown/binding-linux-arm64-gnu@1.2.5":
|
||||
version "1.2.5"
|
||||
resolved "https://registry.yarnpkg.com/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.2.5.tgz#40fbbb97072b1acaa3e0e8fe9774fe524e860bba"
|
||||
integrity sha512-Y7eALiJ8lr0M2HH103Js+g7V34wf6snlpZLAsHI90uLhr3PVlNsbFVAXJC9d/V6BnPyKtpSwI+NcB/RLxsQxuA==
|
||||
"@rolldown/binding-linux-arm64-gnu@1.2.9":
|
||||
version "1.2.9"
|
||||
resolved "https://registry.yarnpkg.com/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.2.9.tgz#7b43488618dd6f9d392e9adaaffd4d7f4bb785ce"
|
||||
integrity sha512-BXqPvZ2drqVD+/Z8UpKwcs4Mp7grM+eGFku4CAEKrEtcbAsUpzREphK1sogCRZGreVPiMkiiBtw0n3TPteuqvw==
|
||||
|
||||
"@rolldown/binding-linux-arm64-musl@1.2.5":
|
||||
version "1.2.5"
|
||||
resolved "https://registry.yarnpkg.com/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.2.5.tgz#3cfe8b0f7c13de29dace9a9fc6c03081164176ab"
|
||||
integrity sha512-xMvZgnbZg4YVnR/AX2b3oOPDTFYJvUVaJg5FedA/LuvexAtXibZQej4cnTkw3rjsJ/ggUROB64TdtETiim+FYA==
|
||||
"@rolldown/binding-linux-arm64-musl@1.2.9":
|
||||
version "1.2.9"
|
||||
resolved "https://registry.yarnpkg.com/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.2.9.tgz#8168a2e2ce7d9e28847f3019c98abf76c0ec5fe2"
|
||||
integrity sha512-11vWvo8YDwLzukt27J3aYDWU+gg2P7J+ZOmiJ0hkF5BXZDW7pVya7r40MXDy6ya0i9KamoENSVKIugvJNgFXIA==
|
||||
|
||||
"@rolldown/binding-linux-ppc64-gnu@1.2.5":
|
||||
version "1.2.5"
|
||||
resolved "https://registry.yarnpkg.com/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.2.5.tgz#3bd890d96ae29f93718aa142ed0982f2ee2978ad"
|
||||
integrity sha512-GRjeqTUDHTo5GwntsLaAMcBahG3nlpjftXWZLN73HiYQlhwEowvarFgQnRnQZtIp4keXX7quXFbG38uPZBa2EA==
|
||||
"@rolldown/binding-linux-ppc64-gnu@1.2.9":
|
||||
version "1.2.9"
|
||||
resolved "https://registry.yarnpkg.com/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.2.9.tgz#8f52aac40788feac33056f111176a7bf8fbc297a"
|
||||
integrity sha512-a1tijMkdwsIARtc0F39ApURROkf3NwqinI6TOiSSWCTR7dT96dffNvMUtDHnq64wKNTIZOIlzKrFvvFUznJiyw==
|
||||
|
||||
"@rolldown/binding-linux-s390x-gnu@1.2.5":
|
||||
version "1.2.5"
|
||||
resolved "https://registry.yarnpkg.com/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.2.5.tgz#0959a0d5af22741d5787918e27aef70dc8602804"
|
||||
integrity sha512-vLNTR45F2Uwc8AufkNXPmB4VliaXs+FvcheEogIzOXzO4l+LzieXF5A/TWxLy5HtqpsRCHUfd0lPVrrdgXdLHQ==
|
||||
"@rolldown/binding-linux-s390x-gnu@1.2.9":
|
||||
version "1.2.9"
|
||||
resolved "https://registry.yarnpkg.com/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.2.9.tgz#80cdfa507fd87bc37c47c5a16ca578f619ee3a69"
|
||||
integrity sha512-x6SQNdAvv4c3hWqTMaWuawzMX9myaCs/yEmlGsxJzkdClnHW7FbrjQuSiRDhuSYzEYoEMhsaJy9qHG/XNemJPQ==
|
||||
|
||||
"@rolldown/binding-linux-x64-gnu@1.2.5":
|
||||
version "1.2.5"
|
||||
resolved "https://registry.yarnpkg.com/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.2.5.tgz#7baa94e826328ac6f457d9e1abacffa0353e8d22"
|
||||
integrity sha512-Mgj59/HTuYeK9Gz2MA+mBWKnHsAgkBSec15ZMb1st3oIfFbX7gCjOae7GydHhzcyQi9Z/7M1QuN9bR3oFqF0jQ==
|
||||
"@rolldown/binding-linux-x64-gnu@1.2.9":
|
||||
version "1.2.9"
|
||||
resolved "https://registry.yarnpkg.com/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.2.9.tgz#c2f89cdf3b223b2ba3cd4c0fdc760b360c02edf5"
|
||||
integrity sha512-9s0AZ8BFK5/n7B/TBoa2yJE3gI3KURrbXcPBlsAsvjU4VeJKgE90y1YtNxyEUIcHPQkg6/yfF3qihUrcM/Kf0Q==
|
||||
|
||||
"@rolldown/binding-linux-x64-musl@1.2.5":
|
||||
version "1.2.5"
|
||||
resolved "https://registry.yarnpkg.com/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.2.5.tgz#5f37597eaf0e22313d1e3d4be7d1be1fd332904e"
|
||||
integrity sha512-mY8AP0/ichsbhAxGnLa3d3+MwV0EfgrPND2bplI3Ym8T6R2pJ0N87bvrKVwNXmdy3jnr6eQBecdqx/HMknBmpA==
|
||||
"@rolldown/binding-linux-x64-musl@1.2.9":
|
||||
version "1.2.9"
|
||||
resolved "https://registry.yarnpkg.com/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.2.9.tgz#3fbb6bce4c8a8260cb63fc2dba182c8649930c6c"
|
||||
integrity sha512-P7VWAmV+WdJluH7ovnRGoiv2i8To7GAZ+kGzfGup635cyL7SyYl3lSUaA3Gp5THf0n/Co5EyEqb2zbqq+nMOHQ==
|
||||
|
||||
"@rolldown/binding-openharmony-arm64@1.2.5":
|
||||
version "1.2.5"
|
||||
resolved "https://registry.yarnpkg.com/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.2.5.tgz#d096567af3f738cbe6aa858ab0a01aae9f357ef4"
|
||||
integrity sha512-8SLssA2oweAxyRgDp789ACfRb/3P+zNRJpzZxSizxF9m8NUDQ4+3xjo8ttjhVGGw6Qxb70oZiEtIjaKikCO7Yw==
|
||||
"@rolldown/binding-openharmony-arm64@1.2.9":
|
||||
version "1.2.9"
|
||||
resolved "https://registry.yarnpkg.com/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.2.9.tgz#c8cd18d7fd14222e2068cd0640bba88d2cd710f8"
|
||||
integrity sha512-1qixtsE4BK8h+yS3BfmZ09UhA7O/N4IACva6YBr7EBvCJraByTuRcgOTaiA62Tm0vey3UcKXLOaoGHtYmNGEVg==
|
||||
|
||||
"@rolldown/binding-win32-arm64-msvc@1.2.5":
|
||||
version "1.2.5"
|
||||
resolved "https://registry.yarnpkg.com/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.2.5.tgz#d53b911aa4e6b547b789c07747fabab2ac8c237d"
|
||||
integrity sha512-vGbruD5zquhoc8D9SViXgN2FBJtNdTyQ4DtG+SWiEGlJiAzoKcZ2xp+xuXCffhubVdt0NJlTZqkeRuERy7g8Cw==
|
||||
"@rolldown/binding-win32-arm64-msvc@1.2.9":
|
||||
version "1.2.9"
|
||||
resolved "https://registry.yarnpkg.com/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.2.9.tgz#cff9ed3be36979d7d77306bf9dca1a27ed17c1f0"
|
||||
integrity sha512-ok8IQjcEPs1AKZfuEUznVBrJw+gK4soq+bx8b1X2XoMqVClarc1q5JDmVtWXY1xfr6ZuHTAsPXHTgTrqKTZeww==
|
||||
|
||||
"@rolldown/binding-win32-x64-msvc@1.2.5":
|
||||
version "1.2.5"
|
||||
resolved "https://registry.yarnpkg.com/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.2.5.tgz#7bbd08cfda6a98de9b756472c772a36ebb7229bc"
|
||||
integrity sha512-e/SXpgISz+IoqVcSSI0rx/d/he8zqLex+/rCWpnHpmVfmPIUjag9H6P7zotf0gJHwPUhQxZ/mF8tr6acebT9yw==
|
||||
"@rolldown/binding-win32-x64-msvc@1.2.9":
|
||||
version "1.2.9"
|
||||
resolved "https://registry.yarnpkg.com/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.2.9.tgz#6e6a3a7ac86eb46bed61e685a9e7cccfacc21b7a"
|
||||
integrity sha512-Ip2mXoU0hM0boq3Rf+ekuT653OROSo6aSYcPT1VHE4q52KvyxgFkQgrgb/IEsxOuvQ2fZZbs8khJAyCEPM24/g==
|
||||
|
||||
"@rolldown/pluginutils@^1.0.0", "@rolldown/pluginutils@^1.0.1":
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/@rolldown/pluginutils/-/pluginutils-1.0.1.tgz#e3fcee093fbb5ce765e1ad088ff4de2889f6f9be"
|
||||
integrity sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==
|
||||
|
||||
"@solid-primitives/event-listener@^2.2.14", "@solid-primitives/event-listener@^2.4.6":
|
||||
version "2.4.6"
|
||||
resolved "https://registry.yarnpkg.com/@solid-primitives/event-listener/-/event-listener-2.4.6.tgz#95704ae633b92551334e48399ad8785aa7f9f426"
|
||||
integrity sha512-5I0YJcTVYIWoMmgBSROBZGcz+ymhew/pGTg2dHW74BUjFKsV8Li4bOZYl0YAGP4mHw5o4UBd9/BEesqBci3wxw==
|
||||
dependencies:
|
||||
"@solid-primitives/utils" "^6.4.1"
|
||||
|
||||
"@solid-primitives/keyed@^1.2.0", "@solid-primitives/keyed@^1.2.2":
|
||||
version "1.5.3"
|
||||
resolved "https://registry.yarnpkg.com/@solid-primitives/keyed/-/keyed-1.5.3.tgz#df60e7a079cc99ef80d22e4c03bb80eabc106392"
|
||||
integrity sha512-zNadtyYBhJSOjXtogkGHmRxjGdz9KHc8sGGVAGlUABkE8BED2tbIZoxkwSqzOwde8OcUEH0bb5DLZUWIMvyBSA==
|
||||
|
||||
"@solid-primitives/map@^0.4.7":
|
||||
version "0.4.13"
|
||||
resolved "https://registry.yarnpkg.com/@solid-primitives/map/-/map-0.4.13.tgz#f0096c53ad3405fde444a738f4b1adb0f402ea16"
|
||||
integrity sha512-B1zyFbsiTQvqPr+cuPCXO72sRuczG9Swncqk5P74NCGw1VE8qa/Ry9GlfI1e/VdeQYHjan+XkbE3rO2GW/qKew==
|
||||
dependencies:
|
||||
"@solid-primitives/trigger" "^1.1.0"
|
||||
|
||||
"@solid-primitives/media@^2.2.4":
|
||||
version "2.3.6"
|
||||
resolved "https://registry.yarnpkg.com/@solid-primitives/media/-/media-2.3.6.tgz#9c4c64410ab8a066871d6a45ad69529289f57b3e"
|
||||
integrity sha512-pk49gPOq/UMRUJ+pTSrOfBiR8xJjRYHXIf1iR/jSnyQ/KroU+ZXhkZzavC7hvfp2vJeOTW5k2/HN0r3Q1VJ7Pw==
|
||||
dependencies:
|
||||
"@solid-primitives/event-listener" "^2.4.6"
|
||||
"@solid-primitives/rootless" "^1.5.4"
|
||||
"@solid-primitives/static-store" "^0.1.4"
|
||||
"@solid-primitives/utils" "^6.4.1"
|
||||
|
||||
"@solid-primitives/props@^3.1.8":
|
||||
version "3.2.4"
|
||||
resolved "https://registry.yarnpkg.com/@solid-primitives/props/-/props-3.2.4.tgz#517b387fde97e85d701f8d72866f5480a23ec4cc"
|
||||
integrity sha512-MXXdvi2TSB6d+0N6ueA/HP1j/Kh9SEc4WdF1ZDMLwPagxW6pIHHSS9xbRO0RjqSVpNP4j0nxCWT1hx3CkJNhNA==
|
||||
dependencies:
|
||||
"@solid-primitives/utils" "^6.4.1"
|
||||
|
||||
"@solid-primitives/refs@^1.0.5":
|
||||
version "1.1.4"
|
||||
resolved "https://registry.yarnpkg.com/@solid-primitives/refs/-/refs-1.1.4.tgz#d8aef55a51d5141527b6ad151f7c98a207d3b644"
|
||||
integrity sha512-bLjwIs6ZPu8NQnuw04sU3Zc8qKSpbc0umUU/O4SHf6oWOdO4+dHY8vb1T7C4b/Tg103+9WGr6sEE0+NFlbaB/A==
|
||||
dependencies:
|
||||
"@solid-primitives/utils" "^6.4.1"
|
||||
|
||||
"@solid-primitives/resize-observer@^2.0.26":
|
||||
version "2.2.0"
|
||||
resolved "https://registry.yarnpkg.com/@solid-primitives/resize-observer/-/resize-observer-2.2.0.tgz#f6d76c0f765bb2008117c2e7504eb1707ef1268c"
|
||||
integrity sha512-9Fuu/EWBeGj+atGHRJp70HKhdfalmpjwxY8a32NZixdLNmfCJ45AfhLQNr6uOzETbbiMx4iCKlTrJ8KZCHC2Ww==
|
||||
dependencies:
|
||||
"@solid-primitives/event-listener" "^2.4.6"
|
||||
"@solid-primitives/rootless" "^1.5.4"
|
||||
"@solid-primitives/static-store" "^0.1.4"
|
||||
"@solid-primitives/utils" "^6.4.1"
|
||||
|
||||
"@solid-primitives/rootless@^1.5.4":
|
||||
version "1.5.4"
|
||||
resolved "https://registry.yarnpkg.com/@solid-primitives/rootless/-/rootless-1.5.4.tgz#10ee4112bcadf51a57c67f0bf728e1651a077233"
|
||||
integrity sha512-TOIZa1VUfVJ+9nkCcRajw3U4t9vBOP1HxX1WHNTbXq32mXwlqTvUnC4CRIilohcryBkT9u2ZkhUDSHRTaGp55g==
|
||||
dependencies:
|
||||
"@solid-primitives/utils" "^6.4.1"
|
||||
|
||||
"@solid-primitives/static-store@^0.1.4":
|
||||
version "0.1.4"
|
||||
resolved "https://registry.yarnpkg.com/@solid-primitives/static-store/-/static-store-0.1.4.tgz#fe6792b4268dd9b06374b28b1d9fc6dfb8da364d"
|
||||
integrity sha512-LgtVaVBtB7EbmS4+M0b8xY5Iq6pUWXBsIC4VgtrFKDGDdyCaDt88sHk0fUlx1Enxm/XZnZyLXJABRoa39RjJqA==
|
||||
dependencies:
|
||||
"@solid-primitives/utils" "^6.4.1"
|
||||
|
||||
"@solid-primitives/storage@^1.3.11":
|
||||
version "1.3.11"
|
||||
resolved "https://registry.yarnpkg.com/@solid-primitives/storage/-/storage-1.3.11.tgz#2d273f3ab9e76e8819459fd9f0fccce8b09ebedb"
|
||||
integrity sha512-PpQWR3TaTxHIJFbI9ZssYTM4Aa67g1vJIgps4TPhcXzHqqomrPAIveFC2FG7SDQoi9YQia8FVBjigELziJpfIg==
|
||||
dependencies:
|
||||
"@solid-primitives/utils" "^6.2.0"
|
||||
|
||||
"@solid-primitives/transition-group@^1.0.2":
|
||||
version "1.1.2"
|
||||
resolved "https://registry.yarnpkg.com/@solid-primitives/transition-group/-/transition-group-1.1.2.tgz#be9af05871a7ca6323277f9782f4aeb20cb7f73f"
|
||||
integrity sha512-gnHS0OmcdjeoHN9n7Khu8KNrOlRc8a2weETDt2YT6o1zeW/XtUC6Db3Q9pkMU/9cCKdEmN4b0a/41MKAHRhzWA==
|
||||
|
||||
"@solid-primitives/trigger@^1.1.0":
|
||||
version "1.2.4"
|
||||
resolved "https://registry.yarnpkg.com/@solid-primitives/trigger/-/trigger-1.2.4.tgz#5811053de6c650eb1aed504f77086433beefe208"
|
||||
integrity sha512-Ju0e+ZOD7hpOp7nptJimvDSZHWFvIvF9iBWMvuwt30smX7c5wmB8Kmc0AdDuv0wOTi06PQ1J5IrP1WJbH2yUBQ==
|
||||
dependencies:
|
||||
"@solid-primitives/utils" "^6.4.1"
|
||||
|
||||
"@solid-primitives/utils@^6.2.0", "@solid-primitives/utils@^6.2.1", "@solid-primitives/utils@^6.4.1":
|
||||
version "6.4.1"
|
||||
resolved "https://registry.yarnpkg.com/@solid-primitives/utils/-/utils-6.4.1.tgz#aaa9006ac9dfa7b99b1060ab78669a8723ab2962"
|
||||
integrity sha512-ISSB5QX1qP2ynrheIpYwc4oKR5Ny4siNuUyf1qZniy+Il+p/PtDB0QK1Dnle8noiHpwRD3gpPdubOC3qI/Zamg==
|
||||
|
||||
"@standard-schema/spec@^1.1.0":
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@standard-schema/spec/-/spec-1.1.0.tgz#a79b55dbaf8604812f52d140b2c9ab41bc150bb8"
|
||||
@@ -622,22 +753,46 @@
|
||||
resolved "https://registry.yarnpkg.com/@tabler/icons/-/icons-3.46.0.tgz#28ba3f4895715863fdd78b49a5617764c9557fe5"
|
||||
integrity sha512-f2RYFl3fzPwj5WO82x6en0dmkjefxEfOm16D1ByM6cj/McNiwOkL4VaPUoP9VVIrXAD9WnTSVFr70px703b//A==
|
||||
|
||||
"@tanstack/match-sorter-utils@^8.19.4":
|
||||
version "8.19.4"
|
||||
resolved "https://registry.yarnpkg.com/@tanstack/match-sorter-utils/-/match-sorter-utils-8.19.4.tgz#dacf772b5d94f4684f10dbeb2518cf72dccab8a5"
|
||||
integrity sha512-Wo1iKt2b9OT7d+YGhvEPD3DXvPv2etTusIMhMUoG7fbhmxcXCtIjJDEygy91Y2JFlwGyjqiBPRozme7UD8hoqg==
|
||||
dependencies:
|
||||
remove-accents "0.5.0"
|
||||
|
||||
"@tanstack/query-core@5.102.8":
|
||||
version "5.102.8"
|
||||
resolved "https://registry.yarnpkg.com/@tanstack/query-core/-/query-core-5.102.8.tgz#c55c31b4f99124054805ce8ec8137c84108f3252"
|
||||
integrity sha512-ZNjkJ33CqvPNec/6lZBnHqLc3EVGPZ9ySLhYahU9TcuRFdmwXewuj0c4hwSWcGHqEUwcSrKeZ+oGcvPBqXcQcg==
|
||||
|
||||
"@tanstack/query-devtools@5.101.4":
|
||||
version "5.101.4"
|
||||
resolved "https://registry.yarnpkg.com/@tanstack/query-devtools/-/query-devtools-5.101.4.tgz#4fa86fd8f8a1e974923faf1987d93cf543b8305a"
|
||||
integrity sha512-z5IPHnDX3aUWeTWlRKLyooBQekaCAw4xRpZqPQ390RiWTDBcTynjpPT221BArw0u2+pnQMdGvPQI9YNNubBcmA==
|
||||
"@tanstack/query-core@5.103.1":
|
||||
version "5.103.1"
|
||||
resolved "https://registry.yarnpkg.com/@tanstack/query-core/-/query-core-5.103.1.tgz#57c1db20679b98e793a1fe8e4a55a0619d2d681f"
|
||||
integrity sha512-rms8HqTGp6zA00dM+cUQ2eBcgzNJefuu5CAMB37i/6MiGT1zulPOytCFu2a0qjLqVR2n1jENPj9woqFQNuCzWA==
|
||||
|
||||
"@tanstack/react-query-devtools@^5.101.4":
|
||||
version "5.101.4"
|
||||
resolved "https://registry.yarnpkg.com/@tanstack/react-query-devtools/-/react-query-devtools-5.101.4.tgz#adbac799a9b70d67c52e4a483450005d68c9a127"
|
||||
integrity sha512-VeK2gtmfj7kvRBjtxS7TKxt/6qKhn8VzabY4UiYMr7NV9CddjSRYRgeYyld+NpjAkgMV9dd+2Qdr8ah5I03NeA==
|
||||
"@tanstack/query-devtools@5.103.1":
|
||||
version "5.103.1"
|
||||
resolved "https://registry.yarnpkg.com/@tanstack/query-devtools/-/query-devtools-5.103.1.tgz#4691fc78c33e98304e6b3597d8ac67f3cd2b5ef8"
|
||||
integrity sha512-xMOcnULRPEjww0A/0RnweNmcZ5hesLjTekqf8SHxf+BJH729qz6sUu5TsOWFo7J4fu3OR50MeuJUsM3BN78Kfw==
|
||||
dependencies:
|
||||
"@tanstack/query-devtools" "5.101.4"
|
||||
"@kobalte/core" "^0.13.4"
|
||||
"@solid-primitives/keyed" "^1.2.2"
|
||||
"@solid-primitives/resize-observer" "^2.0.26"
|
||||
"@solid-primitives/storage" "^1.3.11"
|
||||
"@tanstack/match-sorter-utils" "^8.19.4"
|
||||
"@tanstack/query-core" "5.103.1"
|
||||
clsx "^2.1.1"
|
||||
goober "^2.1.16"
|
||||
solid-js "^1.9.7"
|
||||
solid-transition-group "^0.2.3"
|
||||
superjson "^2.2.2"
|
||||
|
||||
"@tanstack/react-query-devtools@^5.103.1":
|
||||
version "5.103.1"
|
||||
resolved "https://registry.yarnpkg.com/@tanstack/react-query-devtools/-/react-query-devtools-5.103.1.tgz#b3548301405de0b1205bb259f12aba6cbf3266ef"
|
||||
integrity sha512-l6OzwPbDCnuim8w9McFs3dC/rdXTMZBIBFMVrXzNuhUEzWheldubOu+nKRDtPf+1nLRuwavb3We+nNJq/0vV6w==
|
||||
dependencies:
|
||||
"@tanstack/query-devtools" "5.103.1"
|
||||
|
||||
"@tanstack/react-query@^5.102.8":
|
||||
version "5.102.8"
|
||||
@@ -787,12 +942,12 @@
|
||||
resolved "https://registry.yarnpkg.com/@types/ms/-/ms-2.1.0.tgz#052aa67a48eccc4309d7f0191b7e41434b90bb78"
|
||||
integrity sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==
|
||||
|
||||
"@types/node@*", "@types/node@>=20.0.0", "@types/node@^26.2.0":
|
||||
version "26.2.0"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-26.2.0.tgz#5a4875a862fda8fdc57de8faa579bb81ecba1685"
|
||||
integrity sha512-5IviulTZeRNp2vAJ514cc/HUlY5nZ9fCbq9DMyC52BrhFZACo3nI0R7qBxhQmo/d27NFe96ur/b7Wwxklda+kg==
|
||||
"@types/node@*", "@types/node@>=20.0.0", "@types/node@^26.6.2":
|
||||
version "26.6.2"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-26.6.2.tgz#11bfb8e00bafe728d2113e474a7637becc9ab279"
|
||||
integrity sha512-X1P21scMv4zGKLYqjdGjaKa7COa0RKVYYZZN/NfvLQ1JegxFhdhpZG/Lyn8AXx6CDUavKAd11v6BvfpkDByK8g==
|
||||
dependencies:
|
||||
undici-types "~8.3.0"
|
||||
undici-types "~8.9.0"
|
||||
|
||||
"@types/parse-json@^4.0.0":
|
||||
version "4.0.2"
|
||||
@@ -1188,6 +1343,11 @@ cookie@^1.0.1:
|
||||
resolved "https://registry.yarnpkg.com/cookie/-/cookie-1.1.1.tgz#3bb9bdfc82369db9c2f69c93c9c3ceb310c88b3c"
|
||||
integrity sha512-ei8Aos7ja0weRpFzJnEA9UHJ/7XQmqglbRwnf2ATjcB9Wq874VKH9kfjjirM6UhU2/E5fFYadylyhFldcqSidQ==
|
||||
|
||||
copy-anything@^4:
|
||||
version "4.1.1"
|
||||
resolved "https://registry.yarnpkg.com/copy-anything/-/copy-anything-4.1.1.tgz#2734bcffa1f01f8e2afb2232f1ee31cd5fcc6834"
|
||||
integrity sha512-AoT6Imdr98feSpFfmFwTFN73ccdr7uFPf27cBCgYvyyRyn1BzLRxMvrHNmwXO5LJMddRy4Rdhw2b1h7vSMKsEw==
|
||||
|
||||
cosmiconfig@^7.0.0:
|
||||
version "7.1.0"
|
||||
resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-7.1.0.tgz#1443b9afa596b670082ea46cbd8f6a62b84635f6"
|
||||
@@ -1209,7 +1369,7 @@ css.escape@^1.5.1:
|
||||
resolved "https://registry.yarnpkg.com/css.escape/-/css.escape-1.5.1.tgz#42e27d4fa04ae32f931a4b4d4191fa9cddee97cb"
|
||||
integrity sha512-YUifsXXuknHlUsmlgyY0PKzgPOr7/FjCePfHNt0jxm83wHZi44VDMQ7/fGNkjY3/jV1MC+1CmZbaHzugyeRtpg==
|
||||
|
||||
csstype@^3.0.2, csstype@^3.2.2:
|
||||
csstype@^3.0.2, csstype@^3.1.0, csstype@^3.2.2:
|
||||
version "3.2.3"
|
||||
resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.2.3.tgz#ec48c0f3e993e50648c86da559e2610995cf989a"
|
||||
integrity sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==
|
||||
@@ -1389,15 +1549,20 @@ generate-password-browser@^1.1.0:
|
||||
buffer "^6.0.3"
|
||||
randombytes "^2.0.5"
|
||||
|
||||
goober@^2.1.16:
|
||||
version "2.1.19"
|
||||
resolved "https://registry.yarnpkg.com/goober/-/goober-2.1.19.tgz#a4b4dcdbba9325b8c4d7380099f9f281f27c6a6f"
|
||||
integrity sha512-U7veizMqxyKlM58+Z5j2ngJBH/r9siDmxpvNxSw0PylF6WQvrASJEZrxh1hidRBJc2jqoBVSyOban5u8m+6Rxg==
|
||||
|
||||
graceful-fs@^4.2.4:
|
||||
version "4.2.11"
|
||||
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3"
|
||||
integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==
|
||||
|
||||
happy-dom@^20.11.6:
|
||||
version "20.11.6"
|
||||
resolved "https://registry.yarnpkg.com/happy-dom/-/happy-dom-20.11.6.tgz#82e505cc1acf3e8bba99bf0f047761c756477682"
|
||||
integrity sha512-Hldbg8AdAa5a5oDcZpjqnGitp7JB0hqWmfv/8qr+kft4vzSD8BHsbdRfzYvL/0QcbKcURC/yyoygbeDQarPvYg==
|
||||
happy-dom@^20.14.5:
|
||||
version "20.14.5"
|
||||
resolved "https://registry.yarnpkg.com/happy-dom/-/happy-dom-20.14.5.tgz#d76cfbb926ebde0575deb3bf92cb3e6bb88b8176"
|
||||
integrity sha512-x/RzkpWO40bTjIoT30iQtt64FLLmH/iRcUCN2X//bLx7H3ifkdfPXyqsro/OYtqzIAhiLMMA7mmiOR9C3NOKjQ==
|
||||
dependencies:
|
||||
"@types/node" ">=20.0.0"
|
||||
"@types/whatwg-mimetype" "^3.0.2"
|
||||
@@ -2197,17 +2362,17 @@ picocolors@1.1.1, picocolors@^1.1.1:
|
||||
resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.1.tgz#3d321af3eab939b083c8f929a1d12cda81c26b6b"
|
||||
integrity sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==
|
||||
|
||||
picomatch@^4.0.3, picomatch@^4.0.4, picomatch@^4.0.5:
|
||||
version "4.0.5"
|
||||
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-4.0.5.tgz#51ea57a17d86f605f81039595fbc40ed06a55fab"
|
||||
integrity sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==
|
||||
picomatch@^4.0.3, picomatch@^4.0.4, picomatch@^4.0.7:
|
||||
version "4.0.7"
|
||||
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-4.0.7.tgz#6313360034ccb36b3dc61ecbdff78121f90fe21f"
|
||||
integrity sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==
|
||||
|
||||
postcss-simple-vars@^7.0.1:
|
||||
version "7.0.1"
|
||||
resolved "https://registry.yarnpkg.com/postcss-simple-vars/-/postcss-simple-vars-7.0.1.tgz#836b3097a54dcd13dbd3c36a5dbdd512fad2954c"
|
||||
integrity sha512-5GLLXaS8qmzHMOjVxqkk1TZPf1jMqesiI7qLhnlyERalG0sMbHIbJqrcnrpmZdKCLglHnRHoEBB61RtGTsj++A==
|
||||
|
||||
postcss@^8.5.26, postcss@^8.5.28:
|
||||
postcss@^8.5.28:
|
||||
version "8.5.28"
|
||||
resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.5.28.tgz#da4563a99a06e62d6c1cd1acae363224bcaed6e9"
|
||||
integrity sha512-RRuzqDtt5Y9h3quz5hWhK+TPnsmVs6WwSU6LkJMeY4HstUEDuYTG8UJSdawMRzmzAtV+KEoG8N3Qg2qLy5vM/A==
|
||||
@@ -2532,6 +2697,11 @@ remark-rehype@^11.0.0:
|
||||
unified "^11.0.0"
|
||||
vfile "^6.0.0"
|
||||
|
||||
remove-accents@0.5.0:
|
||||
version "0.5.0"
|
||||
resolved "https://registry.yarnpkg.com/remove-accents/-/remove-accents-0.5.0.tgz#77991f37ba212afba162e375b627631315bed687"
|
||||
integrity sha512-8g3/Otx1eJaVD12e31UbJj1YzdtVvzH85HV7t+9MJYk/u3XmkOUJ5Ys9wQrf9PCPK8+xn4ymzqYCiZl6QWKn+A==
|
||||
|
||||
resolve-from@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6"
|
||||
@@ -2552,29 +2722,29 @@ retry@^0.12.0:
|
||||
resolved "https://registry.yarnpkg.com/retry/-/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b"
|
||||
integrity sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==
|
||||
|
||||
rolldown@~1.2.4:
|
||||
version "1.2.5"
|
||||
resolved "https://registry.yarnpkg.com/rolldown/-/rolldown-1.2.5.tgz#1f504a7d05260a769e617d950410bbb051498c50"
|
||||
integrity sha512-VD2IE5PUG4Oj8zz2VGykiYd5wbnjdIiSsNQb8Qu5B+noEp+A78mu2iVvpp27g8es14Tk9rofNs5Tku9iQCS4fA==
|
||||
rolldown@~1.2.6:
|
||||
version "1.2.9"
|
||||
resolved "https://registry.yarnpkg.com/rolldown/-/rolldown-1.2.9.tgz#b449d73b7aeaf0097adfc25967a76fa1bf304c56"
|
||||
integrity sha512-hx/Pv0N1haXRb11qkfnK5MXB/iqr7i0yjWQqmO9uHqZpBgQSqzc8UsSnEpalsh+j1I8qQ2CkXAkJC8Br3dKSlg==
|
||||
dependencies:
|
||||
"@oxc-project/types" "=0.146.0"
|
||||
"@oxc-project/types" "=0.150.0"
|
||||
"@rolldown/pluginutils" "^1.0.0"
|
||||
optionalDependencies:
|
||||
"@rolldown/binding-android-arm-eabi" "1.2.5"
|
||||
"@rolldown/binding-android-arm64" "1.2.5"
|
||||
"@rolldown/binding-darwin-arm64" "1.2.5"
|
||||
"@rolldown/binding-darwin-x64" "1.2.5"
|
||||
"@rolldown/binding-freebsd-x64" "1.2.5"
|
||||
"@rolldown/binding-linux-arm-gnueabihf" "1.2.5"
|
||||
"@rolldown/binding-linux-arm64-gnu" "1.2.5"
|
||||
"@rolldown/binding-linux-arm64-musl" "1.2.5"
|
||||
"@rolldown/binding-linux-ppc64-gnu" "1.2.5"
|
||||
"@rolldown/binding-linux-s390x-gnu" "1.2.5"
|
||||
"@rolldown/binding-linux-x64-gnu" "1.2.5"
|
||||
"@rolldown/binding-linux-x64-musl" "1.2.5"
|
||||
"@rolldown/binding-openharmony-arm64" "1.2.5"
|
||||
"@rolldown/binding-win32-arm64-msvc" "1.2.5"
|
||||
"@rolldown/binding-win32-x64-msvc" "1.2.5"
|
||||
"@rolldown/binding-android-arm-eabi" "1.2.9"
|
||||
"@rolldown/binding-android-arm64" "1.2.9"
|
||||
"@rolldown/binding-darwin-arm64" "1.2.9"
|
||||
"@rolldown/binding-darwin-x64" "1.2.9"
|
||||
"@rolldown/binding-freebsd-x64" "1.2.9"
|
||||
"@rolldown/binding-linux-arm-gnueabihf" "1.2.9"
|
||||
"@rolldown/binding-linux-arm64-gnu" "1.2.9"
|
||||
"@rolldown/binding-linux-arm64-musl" "1.2.9"
|
||||
"@rolldown/binding-linux-ppc64-gnu" "1.2.9"
|
||||
"@rolldown/binding-linux-s390x-gnu" "1.2.9"
|
||||
"@rolldown/binding-linux-x64-gnu" "1.2.9"
|
||||
"@rolldown/binding-linux-x64-musl" "1.2.9"
|
||||
"@rolldown/binding-openharmony-arm64" "1.2.9"
|
||||
"@rolldown/binding-win32-arm64-msvc" "1.2.9"
|
||||
"@rolldown/binding-win32-x64-msvc" "1.2.9"
|
||||
|
||||
rooks@^9.9.0:
|
||||
version "9.9.0"
|
||||
@@ -2593,10 +2763,10 @@ safe-buffer@^5.1.0:
|
||||
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6"
|
||||
integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==
|
||||
|
||||
sass@^1.103.1:
|
||||
version "1.103.1"
|
||||
resolved "https://registry.yarnpkg.com/sass/-/sass-1.103.1.tgz#13b70f5ff69288db956dc27d27c8fb79f3a27c61"
|
||||
integrity sha512-9icZURbP51S6S0QGoyaeqk9uB06GNWxsFYWfH5RgpFgqK5FA8tJcM3AdVxrZEVJ7dz+L87nG95gBKf4VuaMHGw==
|
||||
sass@^1.104.1:
|
||||
version "1.104.1"
|
||||
resolved "https://registry.yarnpkg.com/sass/-/sass-1.104.1.tgz#29a4bdb33c48a8bb656e300a33afcafbfcbc8491"
|
||||
integrity sha512-yDA+1aIG3EHgN4V/BvuhCvu61FF6hEd4e+9DxikUm9U0CAGuvdIZ/UYy7qbOxjhbbWQraoyLlMuzdRGOSV5Bmw==
|
||||
dependencies:
|
||||
chokidar "^5.0.0"
|
||||
immutable "^5.1.5"
|
||||
@@ -2609,6 +2779,16 @@ scheduler@^0.28.0:
|
||||
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.28.0.tgz#03d3ca348aeaf8b7502f64468f217b27523f9695"
|
||||
integrity sha512-juorfCmIkIw8tT+p5BXSm6PJjQF/ycEYmKyzURCIt/RaZIhL+PulbQ9Yu2z1HdOJDdqDTlxA1+xKBmHXJsczAw==
|
||||
|
||||
seroval-plugins@~1.5.4:
|
||||
version "1.5.6"
|
||||
resolved "https://registry.yarnpkg.com/seroval-plugins/-/seroval-plugins-1.5.6.tgz#7bca495aceb5b2428b9cb44b4b09e67c2de1c948"
|
||||
integrity sha512-HXuLAX2pu/UByPpaeo/TaMfvMIi+1QqIoPJYCcAtU8QkVNwgR6MPlGuCQTErV1JwraaMbYaWVIBX7mppzGLATQ==
|
||||
|
||||
seroval@~1.5.4:
|
||||
version "1.5.6"
|
||||
resolved "https://registry.yarnpkg.com/seroval/-/seroval-1.5.6.tgz#68d4f6a05c3bde25daaaea6b7220146ff42353ca"
|
||||
integrity sha512-rVQVWjjSvlINzaQPZH5JFqsqEsIWdTxY3iJZCnTL/5gQbXIRooVZKI60tVCkOVfzcRPejboxO2t0P89dg5mQaA==
|
||||
|
||||
set-cookie-parser@^2.6.0:
|
||||
version "2.7.2"
|
||||
resolved "https://registry.yarnpkg.com/set-cookie-parser/-/set-cookie-parser-2.7.2.tgz#ccd08673a9ae5d2e44ea2a2de25089e67c7edf68"
|
||||
@@ -2624,6 +2804,37 @@ signal-exit@^3.0.2:
|
||||
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9"
|
||||
integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==
|
||||
|
||||
solid-js@^1.9.7:
|
||||
version "1.9.15"
|
||||
resolved "https://registry.yarnpkg.com/solid-js/-/solid-js-1.9.15.tgz#209cbd4e0c7108d1e9bd1537ea7f91e03277a763"
|
||||
integrity sha512-EeiY2xfpZJqPLjXspVEKjAII4yv8NyG//NxZ3IpOFHdUNnnTyL0uJOeS9LWGvA7cFCz5y94cjFwYlmw5Luncsg==
|
||||
dependencies:
|
||||
csstype "^3.1.0"
|
||||
seroval "~1.5.4"
|
||||
seroval-plugins "~1.5.4"
|
||||
|
||||
solid-presence@^0.2.0:
|
||||
version "0.2.0"
|
||||
resolved "https://registry.yarnpkg.com/solid-presence/-/solid-presence-0.2.0.tgz#1f92958d549fba5ebc5905b33d02ba854132c68d"
|
||||
integrity sha512-YM92o+jvpzX3XGaD4rLYmq/Kc2ZVh47GSCLEufHBFQQIurvZTs8SoGJxO8BJGNDxBKdcS8F3dYhW1SDXp4BNjA==
|
||||
dependencies:
|
||||
"@corvu/utils" "~0.4.2"
|
||||
|
||||
solid-prevent-scroll@^0.1.11:
|
||||
version "0.1.11"
|
||||
resolved "https://registry.yarnpkg.com/solid-prevent-scroll/-/solid-prevent-scroll-0.1.11.tgz#4d92aeff067ec3c10e3461b850e09b5c9f9ab4a6"
|
||||
integrity sha512-2PComVCDHaQN/5t7ogEqUYeHasritZKXZ8Sb/VLkl0Web8o9YhEwOo8LSujJEahvMlYCNyKt0zRJeHldOAeWZg==
|
||||
dependencies:
|
||||
"@corvu/utils" "~0.4.2"
|
||||
|
||||
solid-transition-group@^0.2.3:
|
||||
version "0.2.3"
|
||||
resolved "https://registry.yarnpkg.com/solid-transition-group/-/solid-transition-group-0.2.3.tgz#ef441d9e4620cddc4d29cdbc958b09f94db515c4"
|
||||
integrity sha512-iB72c9N5Kz9ykRqIXl0lQohOau4t0dhel9kjwFvx81UZJbVwaChMuBuyhiZmK24b8aKEK0w3uFM96ZxzcyZGdg==
|
||||
dependencies:
|
||||
"@solid-primitives/refs" "^1.0.5"
|
||||
"@solid-primitives/transition-group" "^1.0.2"
|
||||
|
||||
"source-map-js@>=0.6.2 <2.0.0", source-map-js@^1.2.1:
|
||||
version "1.2.1"
|
||||
resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.2.1.tgz#1ce5650fddd87abc099eda37dcff024c2667ae46"
|
||||
@@ -2688,6 +2899,13 @@ stylis@4.2.0:
|
||||
resolved "https://registry.yarnpkg.com/stylis/-/stylis-4.2.0.tgz#79daee0208964c8fe695a42fcffcac633a211a51"
|
||||
integrity sha512-Orov6g6BB1sDfYgzWfTHDOxamtX1bE/zo104Dh9e6fqJ3PooipYyfJ0pUmrZO2wAvO8YbEyeFrkV91XTsGMSrw==
|
||||
|
||||
superjson@^2.2.2:
|
||||
version "2.2.6"
|
||||
resolved "https://registry.yarnpkg.com/superjson/-/superjson-2.2.6.tgz#a223a3a988172a5f9656e2063fe5f733af40d099"
|
||||
integrity sha512-H+ue8Zo4vJmV2nRjpx86P35lzwDT3nItnIsocgumgr0hHMQ+ZGq5vrERg9kJBo5AWGmxZDhzDo+WVIJqkB0cGA==
|
||||
dependencies:
|
||||
copy-anything "^4"
|
||||
|
||||
supports-preserve-symlinks-flag@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09"
|
||||
@@ -2787,10 +3005,10 @@ uncontrollable@^8.0.4:
|
||||
resolved "https://registry.yarnpkg.com/uncontrollable/-/uncontrollable-8.0.4.tgz#a0a8307f638795162fafd0550f4a1efa0f8c5eb6"
|
||||
integrity sha512-ulRWYWHvscPFc0QQXvyJjY6LIXU56f0h8pQFvhxiKk5V1fcI8gp9Ht9leVAhrVjzqMw0BgjspBINx9r6oyJUvQ==
|
||||
|
||||
undici-types@~8.3.0:
|
||||
version "8.3.0"
|
||||
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-8.3.0.tgz#44e9fc9f3244648cdea35e4f9bb2d681e9410809"
|
||||
integrity sha512-j375ScV60dom+YkPFIfTLcOiPxkN/buHz5GobjLhixFuANaNs3C9l4GmrWqejgXWJ7BbJcFYpTEUkS1Ge8bpZQ==
|
||||
undici-types@~8.9.0:
|
||||
version "8.9.0"
|
||||
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-8.9.0.tgz#e240d97c8b5d85e5347ce73d25865c7906c1ec9f"
|
||||
integrity sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg==
|
||||
|
||||
unicorn-magic@^0.3.0:
|
||||
version "0.3.0"
|
||||
@@ -2904,15 +3122,15 @@ vite-plugin-checker@^0.14.5:
|
||||
proper-lockfile "^4.1.2"
|
||||
tiny-invariant "^1.3.3"
|
||||
|
||||
"vite@^6.0.0 || ^7.0.0 || ^8.0.0", vite@^8.2.2:
|
||||
version "8.2.2"
|
||||
resolved "https://registry.yarnpkg.com/vite/-/vite-8.2.2.tgz#399aefad3656145145be110d137a07ea5bb55014"
|
||||
integrity sha512-cFKLV/PRgAUlIRm5WjMjJ86jrftzpqcgH+Us+DS8mI3CDNiH30Whrz8uHL3+MOLPAgqbMBAqWdAHAphOAM+z/Q==
|
||||
"vite@^6.0.0 || ^7.0.0 || ^8.0.0", vite@^8.3.0:
|
||||
version "8.3.0"
|
||||
resolved "https://registry.yarnpkg.com/vite/-/vite-8.3.0.tgz#f9565cfd4879d58d28fa64d3c7aff3b372d2ccc8"
|
||||
integrity sha512-lhZBVvEHefgE+HQZC9O7EBJgCU/nVzFNl7vkS4RE0APtWLP02/8QVIkQtzBxPquh7lq5/78NHipTj7ODQ6XuyQ==
|
||||
dependencies:
|
||||
lightningcss "^1.33.0"
|
||||
picomatch "^4.0.5"
|
||||
postcss "^8.5.26"
|
||||
rolldown "~1.2.4"
|
||||
picomatch "^4.0.7"
|
||||
postcss "^8.5.28"
|
||||
rolldown "~1.2.6"
|
||||
tinyglobby "^0.2.17"
|
||||
optionalDependencies:
|
||||
fsevents "~2.3.3"
|
||||
|
||||
@@ -65,7 +65,8 @@ rm -rf "${LOCAL_RESOLVE}"
|
||||
printf "nameserver %s\noptions ndots:0" "${DNSROUTER_IP}" > "${LOCAL_RESOLVE}"
|
||||
|
||||
# bring up all remaining containers, except cypress!
|
||||
docker compose up -d --remove-orphans stepca squid
|
||||
docker compose build examplesite
|
||||
docker compose up -d --remove-orphans --no-build stepca squid examplesite
|
||||
docker compose pull db-mysql || true # ok to fail
|
||||
docker compose pull db-postgres || true # ok to fail
|
||||
docker compose pull authentik authentik-redis authentik-ldap || true # ok to fail
|
||||
|
||||
@@ -0,0 +1,301 @@
|
||||
/// <reference types="cypress" />
|
||||
|
||||
describe('Per-path Access Lists', () => {
|
||||
const domain = 'website3.example.com';
|
||||
|
||||
const alpha = {
|
||||
name: 'Path Alpha',
|
||||
username: 'alpha-user',
|
||||
password: 'alpha-pass',
|
||||
};
|
||||
|
||||
const beta = {
|
||||
name: 'Path Beta',
|
||||
username: 'beta-user',
|
||||
password: 'beta-pass',
|
||||
};
|
||||
|
||||
let token;
|
||||
let alphaListId;
|
||||
let betaListId;
|
||||
let hostId;
|
||||
|
||||
/**
|
||||
* Requests a path on the proxy host directly (bypassing squid)
|
||||
* and yields the HTTP status code and response body
|
||||
*
|
||||
* @param {string} path
|
||||
* @param {object} [creds]
|
||||
* @param {string} creds.username
|
||||
* @param {string} creds.password
|
||||
*/
|
||||
const request = (path, creds) => {
|
||||
const auth = creds ? `-u '${creds.username}:${creds.password}'` : '';
|
||||
return cy.exec(`curl --noproxy '*' -s -w '\n%{http_code}' ${auth} http://${domain}${path}`)
|
||||
.then((result) => {
|
||||
expect(result.exitCode).to.eq(0);
|
||||
const lines = result.stdout.trim().split('\n');
|
||||
const status = lines.pop();
|
||||
return { status: status, body: lines.join('\n') };
|
||||
});
|
||||
};
|
||||
|
||||
// nginx reloads are signalled and return immediately, so the old
|
||||
// config can still be served for a moment after an API change.
|
||||
// Retry until the expected response is seen.
|
||||
const waitForResponse = (path, creds, check, description) => {
|
||||
// Copy now, the callback runs later and creds may have been changed by then
|
||||
const credsCopy = creds ? { ...creds } : null;
|
||||
let last = null;
|
||||
cy.waitUntil(() => request(path, credsCopy).then((res) => {
|
||||
last = res;
|
||||
return check(res);
|
||||
}), {
|
||||
timeout: 15000,
|
||||
interval: 500,
|
||||
errorMsg: () => `${path} did not return ${description}, last status: ${last?.status}`,
|
||||
});
|
||||
};
|
||||
|
||||
const expectStatus = (path, creds, status) => {
|
||||
waitForResponse(path, creds, (res) => res.status === status, status);
|
||||
};
|
||||
|
||||
// Also checks the body so we know the page came from examplesite
|
||||
// and not the NPM default site
|
||||
const expectPage = (path, creds, text) => {
|
||||
waitForResponse(path, creds, (res) => res.status === '200' && res.body.includes(text), `200 with "${text}"`);
|
||||
};
|
||||
|
||||
const createAccessList = (list) => {
|
||||
return cy.task('backendApiPost', {
|
||||
token: token,
|
||||
path: '/api/nginx/access-lists',
|
||||
data: {
|
||||
name: list.name,
|
||||
satisfy_any: false,
|
||||
pass_auth: false,
|
||||
items: [
|
||||
{
|
||||
username: list.username,
|
||||
password: list.password,
|
||||
}
|
||||
],
|
||||
clients: [],
|
||||
}
|
||||
}).then((data) => {
|
||||
cy.validateSwaggerSchema('post', 201, '/nginx/access-lists', data);
|
||||
expect(data).to.have.property('id');
|
||||
expect(data.id).to.be.greaterThan(0);
|
||||
return cy.wrap(data.id);
|
||||
});
|
||||
};
|
||||
|
||||
const location = (path, accessListId) => {
|
||||
return {
|
||||
path: path,
|
||||
forward_scheme: 'http',
|
||||
forward_host: 'examplesite',
|
||||
forward_port: 80,
|
||||
access_list_id: accessListId,
|
||||
};
|
||||
};
|
||||
|
||||
before(() => {
|
||||
cy.resetUsers();
|
||||
cy.getToken().then((tok) => {
|
||||
token = tok;
|
||||
});
|
||||
});
|
||||
|
||||
it('Should be able to create multiple access lists with credentials', () => {
|
||||
createAccessList(alpha).then((id) => {
|
||||
alphaListId = id;
|
||||
});
|
||||
createAccessList(beta).then((id) => {
|
||||
betaListId = id;
|
||||
expect(betaListId).to.not.equal(alphaListId);
|
||||
});
|
||||
});
|
||||
|
||||
it('Should be able to create a proxy host with a different access list per location', () => {
|
||||
cy.task('backendApiPost', {
|
||||
token: token,
|
||||
path: '/api/nginx/proxy-hosts',
|
||||
data: {
|
||||
domain_names: [domain],
|
||||
forward_scheme: 'http',
|
||||
forward_host: 'examplesite',
|
||||
forward_port: 80,
|
||||
access_list_id: 0,
|
||||
certificate_id: 0,
|
||||
meta: {
|
||||
dns_challenge: false
|
||||
},
|
||||
advanced_config: '',
|
||||
locations: [
|
||||
location('/dashboard', alphaListId),
|
||||
location('/profile', betaListId),
|
||||
],
|
||||
block_exploits: false,
|
||||
caching_enabled: false,
|
||||
allow_websocket_upgrade: false,
|
||||
http2_support: false,
|
||||
hsts_enabled: false,
|
||||
hsts_subdomains: false,
|
||||
ssl_forced: false
|
||||
}
|
||||
}).then((data) => {
|
||||
cy.validateSwaggerSchema('post', 201, '/nginx/proxy-hosts', data);
|
||||
expect(data).to.have.property('id');
|
||||
expect(data.id).to.be.greaterThan(0);
|
||||
hostId = data.id;
|
||||
expect(data).to.have.property('enabled', true);
|
||||
expect(data).to.have.property('access_list_id', 0);
|
||||
expect(data.locations).to.have.length(2);
|
||||
expect(data.locations[0]).to.have.property('access_list_id', alphaListId);
|
||||
expect(data.locations[1]).to.have.property('access_list_id', betaListId);
|
||||
});
|
||||
});
|
||||
|
||||
it('Should persist the location access lists on the proxy host', () => {
|
||||
cy.task('backendApiGet', {
|
||||
token: token,
|
||||
path: `/api/nginx/proxy-hosts/${hostId}`,
|
||||
}).then((data) => {
|
||||
cy.validateSwaggerSchema('get', 200, '/nginx/proxy-hosts/{hostID}', data);
|
||||
expect(data.locations[0]).to.have.property('path', '/dashboard');
|
||||
expect(data.locations[0]).to.have.property('access_list_id', alphaListId);
|
||||
expect(data.locations[1]).to.have.property('path', '/profile');
|
||||
expect(data.locations[1]).to.have.property('access_list_id', betaListId);
|
||||
});
|
||||
});
|
||||
|
||||
it('Should not require auth for the host root', () => {
|
||||
expectPage('/', null, 'this is the index page');
|
||||
});
|
||||
|
||||
it('Should only accept the alpha credentials on /dashboard', () => {
|
||||
expectStatus('/dashboard', null, '401');
|
||||
expectStatus('/dashboard', beta, '401');
|
||||
expectPage('/dashboard', alpha, 'this is the dashboard page');
|
||||
});
|
||||
|
||||
it('Should only accept the beta credentials on /profile', () => {
|
||||
expectStatus('/profile', null, '401');
|
||||
expectStatus('/profile', alpha, '401');
|
||||
expectPage('/profile', beta, 'this is the profile page');
|
||||
});
|
||||
|
||||
it('Should apply access list credential changes to locations using it', () => {
|
||||
const newPassword = 'alpha-pass-changed';
|
||||
|
||||
cy.task('backendApiPut', {
|
||||
token: token,
|
||||
path: `/api/nginx/access-lists/${alphaListId}`,
|
||||
data: {
|
||||
name: alpha.name,
|
||||
satisfy_any: false,
|
||||
pass_auth: false,
|
||||
items: [
|
||||
{
|
||||
username: alpha.username,
|
||||
password: newPassword,
|
||||
}
|
||||
],
|
||||
clients: [],
|
||||
}
|
||||
}).then((data) => {
|
||||
cy.validateSwaggerSchema('put', 200, '/nginx/access-lists/{listID}', data);
|
||||
expect(data).to.have.property('id', alphaListId);
|
||||
});
|
||||
|
||||
expectStatus('/dashboard', alpha, '401');
|
||||
expectPage('/dashboard', { username: alpha.username, password: newPassword }, 'this is the dashboard page');
|
||||
alpha.password = newPassword;
|
||||
|
||||
// Other locations are unaffected
|
||||
expectStatus('/profile', null, '401');
|
||||
expectPage('/profile', beta, 'this is the profile page');
|
||||
});
|
||||
|
||||
it('Should inherit the host access list on locations without their own', () => {
|
||||
// Host uses beta, /dashboard overrides with alpha, /missing has none and should inherit beta
|
||||
cy.task('backendApiPut', {
|
||||
token: token,
|
||||
path: `/api/nginx/proxy-hosts/${hostId}`,
|
||||
data: {
|
||||
access_list_id: betaListId,
|
||||
locations: [
|
||||
location('/dashboard', alphaListId),
|
||||
location('/profile', betaListId),
|
||||
location('/missing', 0),
|
||||
],
|
||||
}
|
||||
}).then((data) => {
|
||||
// No swagger validation here: with a host access list set, the expanded
|
||||
// access_list in the response has no proxy_host_count, which the schema requires
|
||||
expect(data).to.have.property('access_list_id', betaListId);
|
||||
expect(data.locations[2]).to.have.property('access_list_id', 0);
|
||||
});
|
||||
|
||||
expectStatus('/', null, '401');
|
||||
expectStatus('/', alpha, '401');
|
||||
expectPage('/', beta, 'this is the index page');
|
||||
|
||||
// examplesite returns 404 for this path, once past the access list
|
||||
expectStatus('/missing', null, '401');
|
||||
expectStatus('/missing', alpha, '401');
|
||||
expectStatus('/missing', beta, '404');
|
||||
|
||||
expectStatus('/dashboard', beta, '401');
|
||||
expectPage('/dashboard', alpha, 'this is the dashboard page');
|
||||
});
|
||||
|
||||
it('Should remove a deleted access list from the host and locations using it', () => {
|
||||
cy.task('backendApiDelete', {
|
||||
token: token,
|
||||
path: `/api/nginx/access-lists/${betaListId}`,
|
||||
}).then((data) => {
|
||||
cy.validateSwaggerSchema('delete', 200, '/nginx/access-lists/{listID}', data);
|
||||
expect(data).to.be.equal(true);
|
||||
});
|
||||
|
||||
cy.task('backendApiGet', {
|
||||
token: token,
|
||||
path: `/api/nginx/proxy-hosts/${hostId}`,
|
||||
}).then((data) => {
|
||||
expect(data).to.have.property('access_list_id', 0);
|
||||
expect(data.locations[0]).to.have.property('access_list_id', alphaListId);
|
||||
expect(data.locations[1]).to.have.property('access_list_id', 0);
|
||||
expect(data.locations[2]).to.have.property('access_list_id', 0);
|
||||
});
|
||||
|
||||
expectPage('/', null, 'this is the index page');
|
||||
expectPage('/profile', null, 'this is the profile page');
|
||||
expectStatus('/missing', null, '404');
|
||||
|
||||
// Remaining location access list must still be enforced
|
||||
expectStatus('/dashboard', null, '401');
|
||||
expectPage('/dashboard', alpha, 'this is the dashboard page');
|
||||
});
|
||||
|
||||
it('Should be able to delete the proxy host and remaining access list', () => {
|
||||
cy.task('backendApiDelete', {
|
||||
token: token,
|
||||
path: `/api/nginx/proxy-hosts/${hostId}`,
|
||||
}).then((data) => {
|
||||
cy.validateSwaggerSchema('delete', 200, '/nginx/proxy-hosts/{hostID}', data);
|
||||
expect(data).to.be.equal(true);
|
||||
});
|
||||
|
||||
cy.task('backendApiDelete', {
|
||||
token: token,
|
||||
path: `/api/nginx/access-lists/${alphaListId}`,
|
||||
}).then((data) => {
|
||||
cy.validateSwaggerSchema('delete', 200, '/nginx/access-lists/{listID}', data);
|
||||
expect(data).to.be.equal(true);
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
@@ -0,0 +1,6 @@
|
||||
FROM nginx:stable
|
||||
|
||||
RUN rm -rf /etc/nginx/conf.d
|
||||
COPY nginx /etc/nginx
|
||||
COPY www /www
|
||||
RUN chown -R nginx:nginx /www
|
||||
@@ -0,0 +1,29 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name website1.example.com website2.example.com website3.example.com;
|
||||
root /www;
|
||||
index index.html;
|
||||
|
||||
# redirect requests for .html URLs to their extensionless form
|
||||
if ($request_uri ~ ^/index\.html(\?.*)?$) {
|
||||
return 301 /$1;
|
||||
}
|
||||
if ($request_uri ~ ^/(.+)\.html(\?.*)?$) {
|
||||
return 301 /$1$2;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri.html $uri/ =404;
|
||||
}
|
||||
|
||||
error_page 404 /404.html;
|
||||
location = /404.html {
|
||||
internal;
|
||||
}
|
||||
|
||||
# deny access to .htaccess files, if Apache's document root
|
||||
# concurs with nginx's one
|
||||
location ~ /\.ht {
|
||||
deny all;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
user nginx;
|
||||
worker_processes auto;
|
||||
error_log /var/log/nginx/error.log notice;
|
||||
pid /run/nginx.pid;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
server_tokens off;
|
||||
|
||||
log_format custom_combined '$remote_addr - $remote_user [$time_local] "$host" "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent"';
|
||||
|
||||
access_log /var/log/nginx/access.log custom_combined;
|
||||
sendfile on;
|
||||
tcp_nopush on;
|
||||
keepalive_timeout 65;
|
||||
gzip on;
|
||||
|
||||
set_real_ip_from 10.0.0.0/8;
|
||||
set_real_ip_from 172.16.0.0/12; # Includes Docker subnet
|
||||
set_real_ip_from 192.168.0.0/16;
|
||||
|
||||
include include/*.conf;
|
||||
include conf.d/*.conf;
|
||||
include /sites/*/nginx.conf;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>404</title>
|
||||
</head>
|
||||
<body>
|
||||
404 not found
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Dashboard</title>
|
||||
</head>
|
||||
<body>
|
||||
this is the dashboard page
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Index</title>
|
||||
</head>
|
||||
<body>
|
||||
this is the index page
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Profile</title>
|
||||
</head>
|
||||
<body>
|
||||
this is the profile page
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in new issue
Block a user