Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,7 @@ A valid report is answered on the advisory. The fix lands as a normal commit on

- Leave the bind at `127.0.0.1` unless you mean to share the port. On any other bind, set `TLS_CERT_FILE` and `TLS_KEY_FILE` so the login import and the Authorization header are not clear text. Loopback does not need TLS.
- Keep `deepseek-auth.json` and `accounts/*.json` out of git. `npm run auth` writes them mode `600`.
- Set `PROXY_API_KEY` before the port is reachable past your own user.
- Set `PROXY_API_KEY` before the port is reachable past your own user. Without it, connections from outside this machine are closed before any HTTP is read.
- With a key, one outside address gets 600 requests a minute and 64 open connections, and 10 wrong keys lock it out for 15 minutes. Loopback is not limited. Behind a reverse proxy, set `TRUST_PROXY=1`, or every client counts as the proxy itself. See [HTTP API](docs/api.md) for the settings.
- These limits slow abuse. They do not hide the port: on a public bind, a firewall or VPN is what keeps scanners away.
- One DeepSeek login serves one chat at a time. A second client on that same login waits.
3 changes: 3 additions & 0 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,9 @@ The full field list (`AgentSummary`, `FileMeta`) is in [`public/dashboard/API.md
| `TLS_CERT_FILE` / `TLS_KEY_FILE` | off | PEM certificate and key. Both set and readable serves HTTPS; otherwise HTTP. Not required on loopback. A non-loopback bind without them warns that the login import and Authorization header are clear text |
| `PROXY_API_KEY` / `REQUIRE_PROXY_API_KEY` | off | Protects `/v1/*` and `/admin/*` |
| `PROXY_ADMIN_ALLOW_REMOTE` | off | If `1`, `/admin/*` answers non-loopback clients without `PROXY_API_KEY` |
| `PROXY_RATE_LIMIT_PER_MIN` | `600` | Requests per minute from one address outside this machine, then 429. `0` turns it off. Loopback is never limited |
| `PROXY_AUTH_FAIL_LIMIT` / `PROXY_AUTH_LOCK_MS` | `10` / `900000` | That many wrong keys from one address lock it out for this long. `0` turns the lock off |
| `PROXY_MAX_CONNECTIONS_PER_IP` / `PROXY_MAX_CONNECTIONS` | `64` / `1024` | Open connections from one outside address, and in total |
| `DEEPSEEK_AUTH_PATH` | `./deepseek-auth.json` | One file, or comma-separated list |
| `DEEPSEEK_AUTH_DIR` | `./accounts` if present | All `*.json` in that directory |
| `DEEPSEEK_MAX_CONCURRENT` | `24` | Process-wide cap. Real parallelism is **number of idle logins** |
Expand Down
6 changes: 4 additions & 2 deletions lib/updater.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,10 @@ function createUpdater({ root, exec = runGit(root), env = process.env } = {}) {
const tab = line.indexOf('\t');
return { commit: line.slice(0, tab), subject: line.slice(tab + 1) };
});
// Up to date: already on this channel and nothing on it that HEAD lacks.
const upToDate = current.channel === channel && await ok('merge-base', '--is-ancestor', remote, 'HEAD');
// Up to date: nothing on the channel that HEAD lacks. The same commit on another branch is
// not: that copy can still move onto the channel. A branch ahead of it has nothing to install.
const hasChannel = await ok('merge-base', '--is-ancestor', remote, 'HEAD');
const upToDate = hasChannel && (current.channel === channel || remoteCommit !== headCommit);

let blockedReason = null;
if ((await git('status', '--porcelain', '--untracked-files=no')).trim()) blockedReason = 'local_changes';
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "free-deepseek-api",
"version": "0.6.1",
"version": "0.7.0",
"description": "DeepSeek for free — private, powerful and ready for your favorite apps and coding agents",
"main": "server.js",
"bin": {
Expand All @@ -15,7 +15,7 @@
"deepseek:auth": "node scripts/deepseek_chrome_auth.js",
"setup:agents": "node scripts/setup-agents.js",
"test:syntax": "node --check server.js && node --check lib/pow.js && node --check lib/updater.js && node --check scripts/start.js && node --check scripts/auth.js && node --check scripts/lib/tui-menu.js && node --check scripts/lib/chrome-setup.js && node --check scripts/auth_import.js && node --check scripts/doctor.js && node --check scripts/deepseek_chrome_auth.js && node --check scripts/probe_deepseek_models.js && node --check scripts/setup-agents.js && node --check scripts/render-stars-chart.js && node --check scripts/live_agentic_smoke_tests.mjs && node --check public/dashboard/i18n.js && node --check public/dashboard/core.js && node --check public/dashboard/charts.js && node --check public/dashboard/markdown.js && node --check public/dashboard/status.js && node --check public/dashboard/accounts.js && node --check public/dashboard/usage.js && node --check public/dashboard/requests.js && node --check public/dashboard/settings.js && node --check public/dashboard/glyphfield.js && node --check public/dashboard/chat.js && node --check public/dashboard/agents.js && node --check public/dashboard/app.js",
"test:unit": "node --test tests/unit.test.js tests/account-failover.test.js tests/no_tools_regression.test.js tests/parser_delimiter_repair.test.js tests/parser_recovery_boundary.test.js tests/parser_fullwidth_tool_call.test.js tests/parser_bare_call.test.js tests/parser_garbled_dsml.test.js tests/glyph-field.test.js tests/chrome-setup.test.js tests/updater.test.js tests/update-api.test.js tests/agents-api.test.js tests/audit-auth.test.js tests/audit-tooling.test.js tests/audit-dashboard.test.js tests/ipv6-image-guard.test.js tests/wasm-host.test.js",
"test:unit": "node --test tests/unit.test.js tests/account-failover.test.js tests/no_tools_regression.test.js tests/parser_delimiter_repair.test.js tests/parser_recovery_boundary.test.js tests/parser_fullwidth_tool_call.test.js tests/parser_bare_call.test.js tests/remote-guard.test.js tests/parser_garbled_dsml.test.js tests/glyph-field.test.js tests/chrome-setup.test.js tests/updater.test.js tests/update-api.test.js tests/agents-api.test.js tests/audit-auth.test.js tests/audit-tooling.test.js tests/audit-dashboard.test.js tests/ipv6-image-guard.test.js tests/wasm-host.test.js",



Expand Down
7 changes: 0 additions & 7 deletions public/dashboard/MEDIA.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@ not recorded; the photo page names them.

| File | Source | Credit | Processing |
|---|---|---|---|
| `media-manta.jpg` | Unsplash `-iwAeDwvbDw`, spotted eagle ray in a shaft of light (Status) | Rémi METIN, Unsplash License | 1920 px, JPEG q72 |
| `media-surface.jpg` | Unsplash `ZwcCisqoAv4`, the surface from below (Accounts) | Digital Reach, Unsplash License | 1920 px, JPEG q72 |
| `media-bubbles.jpg` | Unsplash `QURU8IY-RaI`, divers' bubbles rising to the light (Usage) | Unsplash License | 1920 px, JPEG q60 |
| `media-caustics.jpg` | Unsplash `3o5oUjrD90w`, light on a dark sea floor (Requests) | Jonathan Borba, Unsplash License | 1920 px, JPEG q60 |
| `media-ripples.jpg` | Unsplash `iBPj9fCIftg`, dark water with light on its ripples (Agents) | Francesco Ungaro, Unsplash License | 1920 px, JPEG q60 |
| `media-whale-sharks.jpg` | Unsplash `bZc2GI4LR2Q`, whale sharks at the surface (Add account) | Kevin Charit, Unsplash License | 1200 px, JPEG q72 |
| `media-breach.jpg` | Unsplash `foA4hrxXRxE`, a humpback breaking the surface (Updates) | Unsplash License | 1920 px, JPEG q60 |
| `media-sea-glint.jpg` | Unsplash `-06smVJ7ppg`, sunlight on deep blue water (access key screen) | Tadeusz Zachwieja, Unsplash License | 1920 px, JPEG q72 |
| `logo.png` | `docs/assets/logo.png` (project logo) | FreeDeepseekAPI | cropped to the whale, 128×128 PNG with alpha |

Expand Down
5 changes: 2 additions & 3 deletions public/dashboard/accounts.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@
const empty = h('div', { class: 'empty-host' });
const note = h('p', { class: 'meta table-note', text: 'Usage is since the server started. Tokens are estimates (characters ÷ 4). Pause is runtime only; Disable in file survives a restart.' });

const hero = F.pageHero({ image: '/dashboard/media-surface.jpg', label: F.t('Account pool'), position: '50% 40%' });
const hero = F.pageHero({ label: F.t('Account pool') });
root.append(hero, h('div', { class: 'view-pad' },
h('div', { class: 'filter-row' }, h('label', { class: 'search-field search-field-inline' }, F.icon('search'), filterInput), chips, count),
banner,
Expand Down Expand Up @@ -677,9 +677,8 @@
h('span', { class: 'add-step-n', 'aria-hidden': 'true', text: String(n) }),
h('span', { class: 'add-step-body' }, h('span', { class: 'add-step-title', text: title }), h('span', { class: 'add-step-detail' }, detail)));
const code = (text) => h('code', { text });
// Where the file comes from, over whale sharks rising to the surface (MEDIA.md); the form on the right.
// Where the file comes from; the form on the right.
const visual = h('aside', { class: 'add-visual' },
h('img', { class: 'add-visual-media', src: '/dashboard/media-whale-sharks.jpg', alt: '', decoding: 'async', 'aria-hidden': 'true' }),
h('div', { class: 'add-visual-inner' },
h('h2', { class: 'add-title', id: 'add-title', text: F.t('Add a DeepSeek account') }),
h('ol', { class: 'add-steps', 'aria-label': 'Where the file comes from' },
Expand Down
5 changes: 2 additions & 3 deletions public/dashboard/agents.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
const SHOW_LABEL = { disk: 'on disk', after: 'after apply', diff: 'changes' };
const BACKUPS_SHOWN = 8;
const PLAN_DEBOUNCE_MS = 250;
const HERO_IMAGE = '/dashboard/media-ripples.jpg';

const st = {
root: null,
Expand Down Expand Up @@ -756,7 +755,7 @@
function mount(root) {
st.root = root;
// Overview
const heroO = F.pageHero({ image: HERO_IMAGE, label: 'Coding agents' });
const heroO = F.pageHero({ label: 'Coding agents' });
const ovBanner = h('div', { class: 'view-banner' });
const roster = h('ul', { class: 'agents-roster set-group', role: 'list', 'aria-label': 'Agents' });
// The j/k cursor follows Tab focus, so Enter and j/k always agree on the row.
Expand All @@ -781,7 +780,7 @@
h('div', { class: 'view-pad agents' }, ovBanner, rosterSection, backupSection));

// Detail
const heroD = F.pageHero({ image: HERO_IMAGE, label: 'Agent', position: '50% 60%' });
const heroD = F.pageHero({ label: 'Agent' });
heroD.classList.add('hero-agent');
const pathHost = h('div', { class: 'agent-path-host' });
const dBanner = h('div', { class: 'view-banner' });
Expand Down
Loading
Loading