dns-worker 1.2.2-alpha.20cfce0 → 1.2.2-canary.1ad026f
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -11
- package/dist/serverfull.mjs +1 -1
- package/dist/serverfull.mjs.map +2 -2
- package/package.json +4 -4
- package/static/assets/{AccountView-CqywJPAC.js → AccountView-DqmzOqCf.js} +3 -3
- package/static/assets/{AnalyticsView-D1LY_X2f.js → AnalyticsView-lVf_v8GI.js} +2 -2
- package/static/assets/{DestinationMap-CEtw2aBM.js → DestinationMap-OH8NtwVj.js} +1 -1
- package/static/assets/{FilteringView-BaOVBg9x.js → FilteringView-u7TdKEiT.js} +1 -1
- package/static/assets/{LogsView-DMaq2SQ4.js → LogsView-YxX8G0Wi.js} +3 -3
- package/static/assets/{RulesView-1w0Gsfmf.js → RulesView-ZqYmezXe.js} +1 -1
- package/static/assets/{SettingsView-BjAq5oi0.js → SettingsView-vtJmLlfO.js} +1 -1
- package/static/assets/{SetupView-Bl8r4gHO.js → SetupView-3BLHqrH6.js} +1 -1
- package/static/assets/{SystemView-g6-diSqy.js → SystemView-CmwSuOeG.js} +1 -1
- package/static/assets/{TrendChart-8stYkr8m.js → TrendChart-EOpY-_2r.js} +1 -1
- package/static/assets/date-hnLgP_Kw.js +1 -0
- package/static/assets/{index-Bw8TL1xo.js → index-DIabb6jb.js} +4 -4
- package/static/assets/{services-DFTZgwAw.js → services-CRpoFRB-.js} +1 -1
- package/static/assets/{useLogsE2ee-3yU9j9w3.js → useLogsE2ee-D6FVZTCQ.js} +1 -1
- package/static/index.html +1 -1
- package/static/assets/date-BRZZxWiW.js +0 -1
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<div align="center">
|
|
2
|
-
<img src="https://raw.githubusercontent.com/
|
|
2
|
+
<img src="https://raw.githubusercontent.com/Oppidi/DNS-Worker/main/web/src/assets/obex_cat_eye_logo-256.webp" alt="DNS Worker Logo" width="128">
|
|
3
3
|
<h1>DNS Worker</h1>
|
|
4
4
|
<p>Privacy-First Protective DNS Resolver & DoH / DoT Server & AD Blocker</p>
|
|
5
5
|
<p>Protect your first hop on the internet</p>
|
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
[](https://hub.docker.com/r/hugokoo/dns-worker)
|
|
13
13
|
[](https://workers.cloudflare.com/)
|
|
14
14
|
[](https://nodejs.org/)
|
|
15
|
-
[](https://
|
|
15
|
+
[](https://oppidi.github.io/DNS-Worker/deployment/database/)
|
|
16
16
|
[](https://csrc.nist.gov/pubs/fips/203/final)
|
|
17
|
-
[](https://
|
|
18
|
-
[-brightgreen.svg)](https://
|
|
17
|
+
[](https://oppidi.github.io/DNS-Worker/)
|
|
18
|
+
[-brightgreen.svg)](https://oppidi.github.io/DNS-Worker/deployment/matrix/)
|
|
19
19
|
|
|
20
20
|
</div>
|
|
21
21
|
|
|
@@ -29,12 +29,12 @@
|
|
|
29
29
|
- **🖥️ Standalone Server Mode (Serverfull)**: Run completely free of Cloudflare on your own VPS, Linux home server, or Windows machine, with native **UDP 53**, **DoT 853** (DoQ compatible with TLS SNI routing for Android Private DNS), and local SQLite.
|
|
30
30
|
|
|
31
31
|
> 📚 **User Documentation**
|
|
32
|
-
> 👉 [**https://
|
|
32
|
+
> 👉 [**https://oppidi.github.io/DNS-Worker/**](https://oppidi.github.io/DNS-Worker/)
|
|
33
33
|
|
|
34
34
|
### Quick Start
|
|
35
35
|
|
|
36
36
|
#### Deploy to Cloudflare Workers
|
|
37
|
-
[](https://deploy.workers.cloudflare.com/?url=https://github.com/
|
|
37
|
+
[](https://deploy.workers.cloudflare.com/?url=https://github.com/Oppidi/DNS-Worker)
|
|
38
38
|
|
|
39
39
|
#### Standalone Server via npm
|
|
40
40
|
```bash
|
|
@@ -77,21 +77,21 @@ docker run -d \
|
|
|
77
77
|
|
|
78
78
|
| Analytics & Insights | Destinations Map |
|
|
79
79
|
|:---:|:---:|
|
|
80
|
-
|  |  |
|
|
81
81
|
|
|
82
82
|
| Multi-Access Points & Endpoints | Rules Configuration |
|
|
83
83
|
|:---:|:---:|
|
|
84
|
-
|  |  |
|
|
85
85
|
|
|
86
86
|
| Filter Subscriptions | Query Logs |
|
|
87
87
|
|:---:|:---:|
|
|
88
|
-
|  |  |
|
|
89
89
|
|
|
90
90
|
| Mobile Responsive | Mobile Logs |
|
|
91
91
|
|:---:|:---:|
|
|
92
|
-
|  |  |
|
|
93
93
|
|
|
94
|
-
> 💡 For live demonstrations and endpoints setup, visit your Web Dashboard after launch or refer to the [Official Documentation](https://
|
|
94
|
+
> 💡 For live demonstrations and endpoints setup, visit your Web Dashboard after launch or refer to the [Official Documentation](https://oppidi.github.io/DNS-Worker/).
|
|
95
95
|
|
|
96
96
|
---
|
|
97
97
|
|
package/dist/serverfull.mjs
CHANGED
|
@@ -1282,7 +1282,7 @@ HAVING sub_key != '';
|
|
|
1282
1282
|
DROP INDEX IF EXISTS idx_logs_domain;
|
|
1283
1283
|
DROP INDEX IF EXISTS idx_logs_access_point;
|
|
1284
1284
|
`};var Ur=null,Si=null;async function Nd(){if(!Ur&&typeof process<"u"&&process.versions?.node)try{Ur=await import("node:fs"),Si=await import("node:path")}catch{Ur=null,Si=null}return{fs:Ur,path:Si}}async function tc(s){await s.prepare("CREATE TABLE IF NOT EXISTS d1_migrations (id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT UNIQUE NOT NULL, applied_at INTEGER NOT NULL)").run();try{(await s.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='_cf_d1_migrations'").first())?.name&&await s.prepare("INSERT OR IGNORE INTO d1_migrations (name, applied_at) SELECT name, applied_at FROM _cf_d1_migrations").run()}catch{}}async function Ad(s,e){let t=Ir(e);if(t.length!==0)for(let n=0;n<t.length;n++){let r=t[n].trim();if(r)try{if("executePipeline"in s&&typeof s.executePipeline=="function"){let i=(await s.executePipeline([{type:"execute",stmt:{sql:r}},{type:"close"}],6e4))[0];if(i&&(i.type==="error"||i.error)){let a=(i.error?.message||"").toLowerCase(),c=r.toUpperCase(),l=a.includes("duplicate column name")&&c.startsWith("ALTER TABLE"),u=a.includes("already exists")&&(c.startsWith("CREATE")||c.startsWith("ALTER"));if(l||u){console.warn(`[Migrations] Tolerating idempotent schema state on statement ${n+1}: ${i.error?.message}`);continue}throw new Error(`[Database D1] Exec error on statement ${n+1}: ${i.error?.message||"Error"}
|
|
1285
|
-
SQL: ${r}`)}}else await s.prepare(r).run()}catch(o){let i=(o?.message||"").toLowerCase(),a=r.toUpperCase(),c=i.includes("duplicate column name")&&a.startsWith("ALTER TABLE"),l=i.includes("already exists")&&(a.startsWith("CREATE")||a.startsWith("ALTER"));if(c||l){console.warn(`[Migrations] Tolerating idempotent schema state on statement ${n+1}: ${o.message}`);continue}throw o}}}async function sc(s){if(typeof s=="object"&&s!==null)return s;let{fs:e,path:t}=await Nd();if(typeof s=="string"&&e&&t&&e.existsSync(s)){let n=e.readdirSync(s).filter(o=>o.endsWith(".sql")).sort(),r={};for(let o of n)r[o]=e.readFileSync(t.join(s,o),"utf-8");return r}if(e&&t)try{let n=t.join(process.cwd(),"migrations");if(e.existsSync(n)){let r=e.readdirSync(n).filter(o=>o.endsWith(".sql")).sort();if(r.length>0){let o={};for(let i of r)o[i]=e.readFileSync(t.join(n,i),"utf-8");return o}}}catch{}return ec}async function Ln(s,e){let t=await sc(e),n=Object.keys(t).sort();try{await tc(s);let r=await s.prepare("SELECT name FROM d1_migrations").all(),o=new Set((r.results||[]).map(l=>l.name)),i=n.filter(l=>!o.has(l)),a=o.size,c=(r.results||[]).length>0&&(r.results||[]).map(l=>l.name).sort().pop()||null;return{count:a,completed:i.length===0,totalAvailable:n.length,appliedCount:a,pendingCount:i.length,lastApplied:c,pendingFiles:i}}catch(r){return console.warn("[Turso Migrations] Failed to retrieve migration stats:",r.message||r),{count:0,completed:!1,totalAvailable:n.length,appliedCount:0,pendingCount:n.length,lastApplied:null,pendingFiles:n}}}async function Dn(s,e){await tc(s);let t=await sc(e),n=Object.keys(t).sort(),r=await s.prepare("SELECT name FROM d1_migrations").all(),o=new Set((r.results||[]).map(a=>a.name)),i=0;for(let a of n){if(o.has(a))continue;let c=t[a];if(!(!c||!c.trim())){console.log(`[Database Migrations] Applying ${a}...`);try{await Ad(s,c);let l=Math.floor(Date.now()/1e3);await s.prepare("INSERT OR REPLACE INTO d1_migrations (name, applied_at) VALUES (?, ?)").bind(a,l).run(),i++}catch(l){throw console.error(`[Database Migrations] Failed to apply ${a}:`,l.message||l),l}}}return i>0?console.log(`[Database Migrations] Successfully applied ${i} migration(s).`):console.log("[Database Migrations] Database schema is up-to-date."),i}var Mr=null;async function nc(s){return Mr||(Mr=Dn(s).finally(()=>{Mr=null})),Mr}import _e from"node:fs";import ne from"node:path";import{fileURLToPath as Od}from"node:url";import{execSync as rc}from"node:child_process";var On="1.2.0";function Br(){return typeof process<"u"&&process.env?.npm_package_version?process.env.npm_package_version:On}function es(){return`DNS-Worker/${Br()}`}function wi(){return`DNS-Worker/${Br()} (+https://github.com/
|
|
1285
|
+
SQL: ${r}`)}}else await s.prepare(r).run()}catch(o){let i=(o?.message||"").toLowerCase(),a=r.toUpperCase(),c=i.includes("duplicate column name")&&a.startsWith("ALTER TABLE"),l=i.includes("already exists")&&(a.startsWith("CREATE")||a.startsWith("ALTER"));if(c||l){console.warn(`[Migrations] Tolerating idempotent schema state on statement ${n+1}: ${o.message}`);continue}throw o}}}async function sc(s){if(typeof s=="object"&&s!==null)return s;let{fs:e,path:t}=await Nd();if(typeof s=="string"&&e&&t&&e.existsSync(s)){let n=e.readdirSync(s).filter(o=>o.endsWith(".sql")).sort(),r={};for(let o of n)r[o]=e.readFileSync(t.join(s,o),"utf-8");return r}if(e&&t)try{let n=t.join(process.cwd(),"migrations");if(e.existsSync(n)){let r=e.readdirSync(n).filter(o=>o.endsWith(".sql")).sort();if(r.length>0){let o={};for(let i of r)o[i]=e.readFileSync(t.join(n,i),"utf-8");return o}}}catch{}return ec}async function Ln(s,e){let t=await sc(e),n=Object.keys(t).sort();try{await tc(s);let r=await s.prepare("SELECT name FROM d1_migrations").all(),o=new Set((r.results||[]).map(l=>l.name)),i=n.filter(l=>!o.has(l)),a=o.size,c=(r.results||[]).length>0&&(r.results||[]).map(l=>l.name).sort().pop()||null;return{count:a,completed:i.length===0,totalAvailable:n.length,appliedCount:a,pendingCount:i.length,lastApplied:c,pendingFiles:i}}catch(r){return console.warn("[Turso Migrations] Failed to retrieve migration stats:",r.message||r),{count:0,completed:!1,totalAvailable:n.length,appliedCount:0,pendingCount:n.length,lastApplied:null,pendingFiles:n}}}async function Dn(s,e){await tc(s);let t=await sc(e),n=Object.keys(t).sort(),r=await s.prepare("SELECT name FROM d1_migrations").all(),o=new Set((r.results||[]).map(a=>a.name)),i=0;for(let a of n){if(o.has(a))continue;let c=t[a];if(!(!c||!c.trim())){console.log(`[Database Migrations] Applying ${a}...`);try{await Ad(s,c);let l=Math.floor(Date.now()/1e3);await s.prepare("INSERT OR REPLACE INTO d1_migrations (name, applied_at) VALUES (?, ?)").bind(a,l).run(),i++}catch(l){throw console.error(`[Database Migrations] Failed to apply ${a}:`,l.message||l),l}}}return i>0?console.log(`[Database Migrations] Successfully applied ${i} migration(s).`):console.log("[Database Migrations] Database schema is up-to-date."),i}var Mr=null;async function nc(s){return Mr||(Mr=Dn(s).finally(()=>{Mr=null})),Mr}import _e from"node:fs";import ne from"node:path";import{fileURLToPath as Od}from"node:url";import{execSync as rc}from"node:child_process";var On="1.2.0";function Br(){return typeof process<"u"&&process.env?.npm_package_version?process.env.npm_package_version:On}function es(){return`DNS-Worker/${Br()}`}function wi(){return`DNS-Worker/${Br()} (+https://github.com/Oppidi/DNS-Worker)`}var Gm=`DNS-Worker/${On}`,jm=`DNS-Worker/${On} (+https://github.com/Oppidi/DNS-Worker)`;import Fr from"node:fs";import Ld from"node:path";import{execFileSync as Dd}from"node:child_process";var Ri=`# ==============================================================================
|
|
1286
1286
|
# DNS Worker - Serverfull Mode Environment Configuration (.env.serverfull)
|
|
1287
1287
|
# ==============================================================================
|
|
1288
1288
|
# You can edit this file directly, or copy it to .env:
|