Skip to content

ServerKit is a lightweight, modern server control panel for managing web applications, databases, and services on your VPS or dedicated server. Built with Python/Flask backend and React frontend.

docs(readme): accept crypto donations

Juan Denisf8ff93a4bd18
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
new file mode 100644
index 00000000..73d2aabb
--- /dev/null
+++ b/.github/CODEOWNERS
@@ -0,0 +1,30 @@
+# Code owners for ServerKit.
+#
+# GitHub automatically requests a review from the listed owner on any PR that
+# touches a matching path. Enable "Require review from Code Owners" in branch
+# protection to make that review mandatory.
+
+# ---------------------------------------------------------------------------
+# Funding and donation addresses — SECURITY SENSITIVE
+# ---------------------------------------------------------------------------
+# A swapped crypto address is a well-known open-source supply-chain attack:
+# a drive-by PR edits one character in a donation address, it reads as a
+# harmless docs tweak, and every subsequent donation goes to the attacker.
+# These paths must never be merged without the maintainer reading the diff
+# character by character against the wallet.
+/.github/FUNDING.yml @jhd3197
+/scripts/generate-funding-qr.mjs @jhd3197
+/docs/images/funding/ @jhd3197
+
+# The donation addresses live in the Support section of every README, so any
+# change to these files needs the same scrutiny.
+/README.md @jhd3197
+/docs/README.es.md @jhd3197
+/docs/README.pt.md @jhd3197
+/docs/README.zh-CN.md @jhd3197
+
+# ---------------------------------------------------------------------------
+# Security policy and licensing
+# ---------------------------------------------------------------------------
+/SECURITY.md @jhd3197
+/LICENSE @jhd3197
diff --git a/README.md b/README.md
index 09ab29bd..5d6c4b8d 100644
--- a/README.md
+++ b/README.md
@@ -349,6 +349,20 @@ ServerKit is free and open source. If it saves you time, you can help keep it go
- 💖 [GitHub Sponsors](https://github.com/sponsors/jhd3197)
- ☕ [Buy Me a Coffee](https://buymeacoffee.com/jhd3197)
+### 💎 Crypto
+
+| | Asset | Network | Address |
+|:---:|---|---|---|
+| <img src="docs/images/funding/usdt-trc20.png" width="110" alt="QR code for the USDT TRC-20 donation address" /> | **USDT** | **TRC-20** · Tron | `TTiCtqLauF1iSW2YGB3b78KmRxRqoLCgeL` |
+| <img src="docs/images/funding/usdt-erc20.png" width="110" alt="QR code for the USDT and ETH ERC-20 donation address" /> | **USDT / ETH** | **ERC-20** · Ethereum | `0xD13D5355Fa214e8317fea2ff192a065BaeC13527` |
+| <img src="docs/images/funding/btc.png" width="110" alt="QR code for the Bitcoin donation address" /> | **BTC** | **Bitcoin** | `bc1qatx67n3qxdvuv3arc9j8aytk34f22g02k9c7vr` |
+| <img src="docs/images/funding/sol.png" width="110" alt="QR code for the Solana donation address" /> | **SOL** | **Solana** | `AWXzqtBEgUfteHPQtDegsZ6D5y57M3GGdKPD8rR7h6xu` |
+
+TRC-20 has the lowest fees — usually under a dollar — so it's the friendliest
+option for a small donation. ERC-20 gas can cost more than the donation itself.
+
+<sub>QR codes are generated locally by [`scripts/generate-funding-qr.mjs`](scripts/generate-funding-qr.mjs), which checksum-validates every address before encoding.</sub>
+
---
## 🔭 Related Projects
diff --git a/docs/README.es.md b/docs/README.es.md
index c4b701ae..ad0089a1 100644
--- a/docs/README.es.md
+++ b/docs/README.es.md
@@ -349,6 +349,21 @@ ServerKit es libre y de código abierto. Si te ahorra tiempo, puedes ayudar a ma
- 💖 [GitHub Sponsors](https://github.com/sponsors/jhd3197)
- ☕ [Buy Me a Coffee](https://buymeacoffee.com/jhd3197)
+### 💎 Criptomonedas
+
+| | Activo | Red | Dirección |
+|:---:|---|---|---|
+| <img src="images/funding/usdt-trc20.png" width="110" alt="Código QR de la dirección de donación USDT TRC-20" /> | **USDT** | **TRC-20** · Tron | `TTiCtqLauF1iSW2YGB3b78KmRxRqoLCgeL` |
+| <img src="images/funding/usdt-erc20.png" width="110" alt="Código QR de la dirección de donación USDT y ETH ERC-20" /> | **USDT / ETH** | **ERC-20** · Ethereum | `0xD13D5355Fa214e8317fea2ff192a065BaeC13527` |
+| <img src="images/funding/btc.png" width="110" alt="Código QR de la dirección de donación de Bitcoin" /> | **BTC** | **Bitcoin** | `bc1qatx67n3qxdvuv3arc9j8aytk34f22g02k9c7vr` |
+| <img src="images/funding/sol.png" width="110" alt="Código QR de la dirección de donación de Solana" /> | **SOL** | **Solana** | `AWXzqtBEgUfteHPQtDegsZ6D5y57M3GGdKPD8rR7h6xu` |
+
+TRC-20 tiene las comisiones más bajas — normalmente menos de un dólar — así que es
+la opción más cómoda para una donación pequeña. El gas de ERC-20 puede costar más
+que la propia donación.
+
+<sub>Los códigos QR se generan localmente con [`scripts/generate-funding-qr.mjs`](../scripts/generate-funding-qr.mjs), que valida la suma de verificación de cada dirección antes de codificarla.</sub>
+
---
## 🔭 Proyectos Relacionados
diff --git a/docs/README.pt.md b/docs/README.pt.md
index 3ddf2de6..672c78a6 100644
--- a/docs/README.pt.md
+++ b/docs/README.pt.md
@@ -349,6 +349,21 @@ O ServerKit é gratuito e de código aberto. Se ele economiza o seu tempo, você
- 💖 [GitHub Sponsors](https://github.com/sponsors/jhd3197)
- ☕ [Buy Me a Coffee](https://buymeacoffee.com/jhd3197)
+### 💎 Criptomoedas
+
+| | Ativo | Rede | Endereço |
+|:---:|---|---|---|
+| <img src="images/funding/usdt-trc20.png" width="110" alt="Código QR do endereço de doação USDT TRC-20" /> | **USDT** | **TRC-20** · Tron | `TTiCtqLauF1iSW2YGB3b78KmRxRqoLCgeL` |
+| <img src="images/funding/usdt-erc20.png" width="110" alt="Código QR do endereço de doação USDT e ETH ERC-20" /> | **USDT / ETH** | **ERC-20** · Ethereum | `0xD13D5355Fa214e8317fea2ff192a065BaeC13527` |
+| <img src="images/funding/btc.png" width="110" alt="Código QR do endereço de doação de Bitcoin" /> | **BTC** | **Bitcoin** | `bc1qatx67n3qxdvuv3arc9j8aytk34f22g02k9c7vr` |
+| <img src="images/funding/sol.png" width="110" alt="Código QR do endereço de doação de Solana" /> | **SOL** | **Solana** | `AWXzqtBEgUfteHPQtDegsZ6D5y57M3GGdKPD8rR7h6xu` |
+
+A TRC-20 tem as taxas mais baixas — normalmente menos de um dólar — e por isso é a
+opção mais prática para uma doação pequena. O gas da ERC-20 pode custar mais do que
+a própria doação.
+
+<sub>Os códigos QR são gerados localmente por [`scripts/generate-funding-qr.mjs`](../scripts/generate-funding-qr.mjs), que valida o checksum de cada endereço antes de codificá-lo.</sub>
+
---
## 🔭 Projetos Relacionados
diff --git a/docs/README.zh-CN.md b/docs/README.zh-CN.md
index 5f8dc4fc..b2e8eb44 100644
--- a/docs/README.zh-CN.md
+++ b/docs/README.zh-CN.md
@@ -349,6 +349,20 @@ ServerKit 是免费且开源的。如果它为你节省了时间,你可以这
- 💖 [GitHub Sponsors](https://github.com/sponsors/jhd3197)
- ☕ [Buy Me a Coffee](https://buymeacoffee.com/jhd3197)
+### 💎 加密货币
+
+| | 币种 | 网络 | 地址 |
+|:---:|---|---|---|
+| <img src="images/funding/usdt-trc20.png" width="110" alt="USDT TRC-20 捐赠地址二维码" /> | **USDT** | **TRC-20** · 波场 Tron | `TTiCtqLauF1iSW2YGB3b78KmRxRqoLCgeL` |
+| <img src="images/funding/usdt-erc20.png" width="110" alt="USDT 与 ETH ERC-20 捐赠地址二维码" /> | **USDT / ETH** | **ERC-20** · 以太坊 | `0xD13D5355Fa214e8317fea2ff192a065BaeC13527` |
+| <img src="images/funding/btc.png" width="110" alt="比特币捐赠地址二维码" /> | **BTC** | **比特币 Bitcoin** | `bc1qatx67n3qxdvuv3arc9j8aytk34f22g02k9c7vr` |
+| <img src="images/funding/sol.png" width="110" alt="Solana 捐赠地址二维码" /> | **SOL** | **Solana** | `AWXzqtBEgUfteHPQtDegsZ6D5y57M3GGdKPD8rR7h6xu` |
+
+TRC-20 手续费最低——通常不到 1 美元——因此最适合小额捐赠。ERC-20 的 gas 费有时会
+超过捐赠金额本身。
+
+<sub>二维码由 [`scripts/generate-funding-qr.mjs`](../scripts/generate-funding-qr.mjs) 在本地生成,编码前会对每个地址做校验和验证。</sub>
+
---
## 🔭 相关项目
diff --git a/docs/images/funding/btc.png b/docs/images/funding/btc.png
new file mode 100644
index 00000000..dad998f2
Binary files /dev/null and b/docs/images/funding/btc.png differ
diff --git a/docs/images/funding/sol.png b/docs/images/funding/sol.png
new file mode 100644
index 00000000..7b905a4d
Binary files /dev/null and b/docs/images/funding/sol.png differ
diff --git a/docs/images/funding/usdt-erc20.png b/docs/images/funding/usdt-erc20.png
new file mode 100644
index 00000000..9f28980f
Binary files /dev/null and b/docs/images/funding/usdt-erc20.png differ
diff --git a/docs/images/funding/usdt-trc20.png b/docs/images/funding/usdt-trc20.png
new file mode 100644
index 00000000..34fda3e9
Binary files /dev/null and b/docs/images/funding/usdt-trc20.png differ
diff --git a/scripts/generate-funding-qr.mjs b/scripts/generate-funding-qr.mjs
new file mode 100644
index 00000000..008dba19
--- /dev/null
+++ b/scripts/generate-funding-qr.mjs
@@ -0,0 +1,188 @@
+#!/usr/bin/env node
+/**
+ * Generate QR codes for the donation addresses in the README.
+ *
+ * Why this script exists instead of a web QR generator:
+ *
+ * Online QR generators are a known attack surface for payment addresses —
+ * a compromised or malicious one can encode a *different* address than the
+ * one you typed, and the resulting PNG looks completely normal. Donations
+ * then go to the attacker. Generating locally removes that entirely.
+ *
+ * The addresses below are the single source of truth. They are checksum-
+ * validated on every run (base58check for Tron, EIP-55 for Ethereum, bech32
+ * for Bitcoin, 32-byte base58 for Solana), so a typo fails loudly instead of
+ * silently producing a QR that sends money nowhere.
+ *
+ * Usage:
+ * npm i qrcode js-sha3 # not repo deps; install ad hoc when regenerating
+ * node scripts/generate-funding-qr.mjs
+ * node scripts/generate-funding-qr.mjs --check # verify committed PNGs match
+ *
+ * Output: docs/images/funding/<slug>.png
+ *
+ * If you change an address here you MUST re-run this script, and the diff
+ * should be reviewed by a human — see .github/CODEOWNERS.
+ */
+import { createHash } from 'node:crypto';
+import { mkdirSync, existsSync, readFileSync } from 'node:fs';
+import { dirname, join, resolve } from 'node:path';
+import { fileURLToPath } from 'node:url';
+
+const __dirname = dirname(fileURLToPath(import.meta.url));
+const REPO = resolve(__dirname, '..');
+const OUT_DIR = join(REPO, 'docs', 'images', 'funding');
+
+/** Single source of truth. Keep in sync with the README Support section. */
+export const ADDRESSES = [
+ { slug: 'usdt-trc20', label: 'USDT (TRC-20 / Tron)', kind: 'tron',
+ address: 'TTiCtqLauF1iSW2YGB3b78KmRxRqoLCgeL' },
+ { slug: 'usdt-erc20', label: 'USDT / ETH (ERC-20 / Ethereum)', kind: 'eth',
+ address: '0xD13D5355Fa214e8317fea2ff192a065BaeC13527' },
+ { slug: 'btc', label: 'Bitcoin', kind: 'btc',
+ address: 'bc1qatx67n3qxdvuv3arc9j8aytk34f22g02k9c7vr' },
+ { slug: 'sol', label: 'Solana', kind: 'sol',
+ address: 'AWXzqtBEgUfteHPQtDegsZ6D5y57M3GGdKPD8rR7h6xu' },
+];
+
+// ---------------------------------------------------------------- validation
+
+const B58 = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
+const sha256 = (b) => createHash('sha256').update(b).digest();
+
+function b58decode(s) {
+ let num = 0n;
+ for (const ch of s) {
+ const i = B58.indexOf(ch);
+ if (i < 0) throw new Error(`invalid base58 char '${ch}'`);
+ num = num * 58n + BigInt(i);
+ }
+ let hex = num.toString(16);
+ if (hex.length % 2) hex = '0' + hex;
+ let zeros = 0;
+ for (const ch of s) { if (ch === '1') zeros++; else break; }
+ return Buffer.concat([Buffer.alloc(zeros), Buffer.from(hex, 'hex')]);
+}
+
+const B32 = 'qpzry9x8gf2tvdw0s3jn54khce6mua7l';
+function bech32Polymod(values) {
+ const GEN = [0x3b6a57b2, 0x26508e6d, 0x1ea119fa, 0x3d4233dd, 0x2a1462b3];
+ let chk = 1;
+ for (const v of values) {
+ const b = chk >> 25;
+ chk = ((chk & 0x1ffffff) << 5) ^ v;
+ for (let i = 0; i < 5; i++) if ((b >> i) & 1) chk ^= GEN[i];
+ }
+ return chk;
+}
+function bech32HrpExpand(hrp) {
+ const a = [], b = [];
+ for (const c of hrp) { a.push(c.charCodeAt(0) >> 5); b.push(c.charCodeAt(0) & 31); }
+ return [...a, 0, ...b];
+}
+
+function validate({ kind, address }) {
+ if (kind === 'tron' || kind === 'btc-legacy') {
+ const raw = b58decode(address);
+ if (raw.length !== 25) throw new Error(`base58check: ${raw.length} bytes, expected 25`);
+ const want = sha256(sha256(raw.subarray(0, 21))).subarray(0, 4);
+ if (!raw.subarray(21).equals(want)) throw new Error('base58check checksum mismatch');
+ if (kind === 'tron' && raw[0] !== 0x41) throw new Error(`tron version byte 0x${raw[0].toString(16)}`);
+ return 'base58check ok';
+ }
+ if (kind === 'eth') {
+ if (!/^0x[0-9a-fA-F]{40}$/.test(address)) throw new Error('not 0x + 40 hex');
+ // EIP-55 casing check, only if js-sha3 is available.
+ try {
+ const { keccak_256 } = require('js-sha3');
+ const raw = address.slice(2);
+ const h = keccak_256(raw.toLowerCase());
+ let out = '0x';
+ for (let i = 0; i < raw.length; i++)
+ out += parseInt(h[i], 16) >= 8 ? raw[i].toUpperCase() : raw[i].toLowerCase();
+ if (out !== address) throw new Error('EIP-55 checksum casing mismatch');
+ return 'EIP-55 ok';
+ } catch (e) {
+ if (String(e.message).includes('EIP-55')) throw e;
+ return 'format ok (install js-sha3 for EIP-55 check)';
+ }
+ }
+ if (kind === 'btc') {
+ const lower = address.toLowerCase();
+ if (address !== lower && address !== address.toUpperCase()) throw new Error('bech32 mixed case');
+ const pos = lower.lastIndexOf('1');
+ if (pos < 1) throw new Error('bech32 no separator');
+ const data = [];
+ for (const ch of lower.slice(pos + 1)) {
+ const i = B32.indexOf(ch);
+ if (i < 0) throw new Error(`invalid bech32 char '${ch}'`);
+ data.push(i);
+ }
+ const pm = bech32Polymod([...bech32HrpExpand(lower.slice(0, pos)), ...data]);
+ if (pm !== 1 && pm !== 0x2bc830a3) throw new Error('bech32 checksum mismatch');
+ return 'bech32 ok';
+ }
+ if (kind === 'sol') {
+ const raw = b58decode(address);
+ if (raw.length !== 32) throw new Error(`solana: ${raw.length} bytes, expected 32`);
+ return 'base58/32-byte ok';
+ }
+ throw new Error(`unknown kind '${kind}'`);
+}
+
+// ---------------------------------------------------------------------- main
+
+const createRequire = (await import('node:module')).createRequire;
+const require = createRequire(import.meta.url);
+
+const checkOnly = process.argv.includes('--check');
+let failed = 0;
+
+console.log('Validating addresses...\n');
+for (const entry of ADDRESSES) {
+ try {
+ console.log(` PASS ${entry.label.padEnd(32)} ${validate(entry)}`);
+ } catch (e) {
+ console.error(` FAIL ${entry.label.padEnd(32)} ${e.message}`);
+ failed++;
+ }
+}
+if (failed) {
+ console.error(`\n${failed} address(es) failed validation — refusing to generate QR codes.`);
+ process.exit(1);
+}
+
+let QRCode;
+try {
+ QRCode = require('qrcode');
+} catch {
+ console.error('\nMissing dep. Run: npm i qrcode js-sha3');
+ process.exit(1);
+}
+
+if (!existsSync(OUT_DIR)) mkdirSync(OUT_DIR, { recursive: true });
+
+console.log(`\n${checkOnly ? 'Checking' : 'Writing'} QR codes...\n`);
+for (const { slug, address, label } of ADDRESSES) {
+ const file = join(OUT_DIR, `${slug}.png`);
+ const buf = await QRCode.toBuffer(address, {
+ errorCorrectionLevel: 'H', margin: 2, width: 512,
+ color: { dark: '#000000ff', light: '#ffffffff' },
+ });
+ if (checkOnly) {
+ if (!existsSync(file)) { console.error(` MISSING ${slug}.png`); failed++; continue; }
+ const same = readFileSync(file).equals(buf);
+ console.log(` ${same ? 'OK ' : 'STALE '}${slug}.png`);
+ if (!same) failed++;
+ } else {
+ const { writeFileSync } = await import('node:fs');
+ writeFileSync(file, buf);
+ console.log(` wrote docs/images/funding/${slug}.png (${label})`);
+ }
+}
+
+if (checkOnly && failed) {
+ console.error('\nQR codes are out of date. Run without --check to regenerate.');
+ process.exit(1);
+}
+console.log('\nDone.');