Skip to content

Latest commit

History

161 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

npm versionTestsLicense: MITNode.js

Stress-test every node on the Sentinel dVPN chain. Admin-gated testing, public-read results.


What it does

Sentinel Node Tester discovers every active dVPN node on the Sentinel blockchain, opens real VPN sessions, measures actual throughput and protocol compliance, and records pass/fail results in a local SQLite database. A built-in Express dashboard lets an operator run audits and publish results. Public visitors can search and filter results — but only the operator can start or stop tests.


Core flow

Admin logs in at /admin, optionally flips the Broadcast Live toggle (controls whether public surfaces show the live in-flight audit or the last-completed snapshot), and starts an audit via POST /api/start. The continuous loop cycles through every online node; public visitors at / browse the node directory and at /live watch the real-time iteration feed via SSE — both are read-only. The operator stops the loop with POST /api/stop. No public user can trigger any test.


Routes

RouteWhoDescription
/PublicNode directory — search, filter, sort, detail drawer.
/livePublicReal-time audit progress + results feed via SSE.
/node/:addrPublicSingle-node result detail page.
/admin (configurable)AdminFull control panel — start/stop audits, broadcast toggle, logs.
/api/public/*PublicRead-only JSON API: nodes, stats, countries, run summaries, SSE events.
/api/start, /api/stop, /api/broadcastAdminAudit lifecycle + broadcast-live toggle. Admin session required.

Quick start (local dev)

# 1. Clone
git clone https://github.com/Sentinel-Bluebuilder/sentinel-node-tester.git
cd sentinel-node-tester
# 2. Install dependencies (downloads V2Ray binary for your platform)
npm install
# 3. Create .env and set MNEMONIC to your 12-word Cosmos phrase
cp .env.example .env
# 4. Start# Windows: cscript //nologo SentinelAudit.vbs (auto-elevates to Admin)# macOS: sudo -E node server.js (root for WireGuard)# Linux: sudo -E node server.js# Any OS: npm start (V2Ray-only, ~70% nodes)

Open http://localhost:3001 in your browser. No ADMIN_TOKEN needed for local dev — the admin surface defaults to unauthenticated (safe on localhost only).

WireGuard requires admin/root. Without elevation, V2Ray-only audits still run (~70% of nodes). Full setup walkthrough for all three platforms: SETUP.md.


CLI for scripting and AI agents

The sentinel-audit binary emits JSON on stdout for every command.

sentinel-audit serve # Start dashboard (same as npm start)
sentinel-audit nodes --pretty # List all active dVPN nodes as JSON
sentinel-audit balance # Check wallet P2P balance
sentinel-audit test<sentnode1...># Test a single node end-to-end
sentinel-audit audit # Full network audit across all nodes
sentinel-audit list # Enumerate all subcommands
sentinel-audit functions --json # Enumerate every exported SDK function

Full reference: docs/CLI.md


Audit modes

P2P (default)

Scans every active node on the Sentinel chain and opens a paid session on each. The tester wallet pays gas and bandwidth costs directly from its P2P balance. Suitable for full network audits. This is what POST /api/start does with no plan/subscription params.

Subscription / fee-granted

Pass subscriptionId + subscriptionGranter (or planId) to POST /api/start. Only nodes attached to that plan are scanned. Each session transaction is broadcast via broadcastWithFeeGrant using the plan operator's on-chain fee-grant allowance — the tester pays zero gas. This mirrors the flow used by commercial Sentinel apps where end users hold no P2P tokens.

TEST RUN

Pass testRun: true in the body or ?testRun=1 to POST /api/start. The pipeline skips chain operations and payments and writes a mode='test' run row. Used for demos and UI smoke checks. See CLAUDE.md — TEST RUN code paths are immutable.


Public deployment

Set ADMIN_TOKEN in .env to enable the admin login page. Generate a token:

node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"

Optionally change the admin path to something unguessable:

ADMIN_PATH=/my-secret-ops-panel

Put the application behind a reverse proxy (nginx, Caddy) that terminates HTTPS. The admin surface should not be reachable over plain HTTP in production. The Broadcast Live toggle (POST /api/broadcast) controls whether the public / and /live pages stream the in-flight audit or only the last-completed snapshot.

See docs/OPERATOR-RUNBOOK.md for the full deployment checklist.


Environment variables

VariableRequiredDefaultDescription
MNEMONICYes12-word Cosmos mnemonic. Signs session and gas transactions. Never commit to git.
RPCNohttps://rpc-sentinel.busurnode.comPrimary RPC endpoint for chain queries and broadcasts. (rpc.sentinel.co was the old default but stalled behind tip while reporting catching_up=false, returning stale balances — kept last in core/constants.js as a fallback only.)
DENOMNoudvpnToken denomination. Do not change.
GAS_PRICENo0.2udvpnGas price for transactions.
PORTNo3001HTTP port the server listens on.
LISTEN_HOSTNo127.0.0.1Bind address. Set 0.0.0.0 to expose on the network (with ADMIN_TOKEN).
ADMIN_TOKENRecommendedAdmin login password. If unset, admin surface is unauthenticated (localhost dev only).
ADMIN_PATHNo/adminURL prefix for the admin panel. Change to an unguessable path in production.
PUBLIC_MODENofalseWhen true, root path serves the public dashboard; admin moves to ADMIN_PATH. Requires ADMIN_TOKEN.
INSECURE_COOKIENofalseAllow admin session cookies over HTTP (local dev only — production must use HTTPS).
ENABLE_HSTSNofalseSend Strict-Transport-Security header (set behind HTTPS proxy in production).
LCD_ENDPOINTSNoBuilt-in fallbackComma-separated LCD URLs used only if RPC fails.
DNS_SERVERSNounsetComma-separated DNS IPs to use inside tunnels.
NODE_DELAY_MSNo5000Milliseconds between node tests. Keep ≥ 5000 to avoid chain rate limits.
MAX_NODESNo0 (all)Cap on nodes tested per run. 0 = no limit.
TEST_MBNo10Megabytes transferred per speed test.
GIGABYTES_PER_NODENo1Gigabytes allocated per opened session.
ALLOW_PUBLIC_TESTNofalseIf true, public visitors can trigger a pre-configured test against PUBLIC_TEST_PLAN_ID / PUBLIC_TEST_SUB_ID / PUBLIC_TEST_SUB_GRANTER. Off by default — leave off unless you intend to spend your wallet on visitor traffic.
WIREGUARD_PATHNoauto-detectedOverride the wg/wg-quick binary path on Linux/macOS.

Architecture

Single Express process on port 3001. Two audit paths: audit/pipeline.js is the single-pass engine called by the admin "New Test" and "Retest Failed" buttons; audit/continuous.js wraps pipeline in a recursive loop with configurable inter-pass delay, emitting loop:* and iteration:* SSE events consumed by the public /live page. All results persist to audit.db (SQLite via better-sqlite3); raw per-run JSON lands in results/. The public SSE stream (/api/public/events) only forwards events while the broadcastLive toggle is on, and the redaction path strips wallet addresses, plan IDs, and fee-grant internals before fan-out.

For module dependency graph + per-stage flow, see ARCH.md. For decisions and "why we did X", see DECISIONS.md. For all reference docs, see docs/INDEX.md.


Testing this tool

npm test

License

MIT. Part of the Sentinel dVPN ecosystem.

About

Network audit dashboard for Sentinel dVPN — built on blue-js-sdk. Tests every node on the blockchain for real VPN throughput, speed, and protocol compliance

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Add copy buttons to all
 blocks
(function() {
function addCopyButtons() {
document.querySelectorAll('pre code').forEach(function(codeBlock) {
if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;
codeBlock.parentElement.setAttribute('data-copy-added', 'true');
var btn = document.createElement('button');
btn.textContent = 'Copy';
btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';
btn.onmouseover = function() { this.style.opacity = '1'; };
btn.onmouseout = function() { this.style.opacity = '0.7'; };
btn.onclick = function() {
navigator.clipboard.writeText(codeBlock.textContent).then(function() {
btn.textContent = 'Copied!';
setTimeout(function() { btn.textContent = 'Copy'; }, 1500);
});
};
codeBlock.parentElement.style.position = 'relative';
codeBlock.parentElement.appendChild(btn);
});
}
addCopyButtons();
// Re-run on dynamic content
var observer = new MutationObserver(addCopyButtons);
observer.observe(document.body, { childList: true, subtree: true });
})();
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
GitHub - Sentinel-Bluebuilder/sentinel-node-tester: Network audit dashboard for Sentinel dVPN — built on blue-js-sdk. Tests every node on the blockchain for real VPN throughput, speed, and protocol compliance · GitHub
Skip to content

Latest commit

History

161 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

npm versionTestsLicense: MITNode.js

Stress-test every node on the Sentinel dVPN chain. Admin-gated testing, public-read results.


What it does

Sentinel Node Tester discovers every active dVPN node on the Sentinel blockchain, opens real VPN sessions, measures actual throughput and protocol compliance, and records pass/fail results in a local SQLite database. A built-in Express dashboard lets an operator run audits and publish results. Public visitors can search and filter results — but only the operator can start or stop tests.


Core flow

Admin logs in at /admin, optionally flips the Broadcast Live toggle (controls whether public surfaces show the live in-flight audit or the last-completed snapshot), and starts an audit via POST /api/start. The continuous loop cycles through every online node; public visitors at / browse the node directory and at /live watch the real-time iteration feed via SSE — both are read-only. The operator stops the loop with POST /api/stop. No public user can trigger any test.


Routes

RouteWhoDescription
/PublicNode directory — search, filter, sort, detail drawer.
/livePublicReal-time audit progress + results feed via SSE.
/node/:addrPublicSingle-node result detail page.
/admin (configurable)AdminFull control panel — start/stop audits, broadcast toggle, logs.
/api/public/*PublicRead-only JSON API: nodes, stats, countries, run summaries, SSE events.
/api/start, /api/stop, /api/broadcastAdminAudit lifecycle + broadcast-live toggle. Admin session required.

Quick start (local dev)

# 1. Clone
git clone https://github.com/Sentinel-Bluebuilder/sentinel-node-tester.git
cd sentinel-node-tester
# 2. Install dependencies (downloads V2Ray binary for your platform)
npm install
# 3. Create .env and set MNEMONIC to your 12-word Cosmos phrase
cp .env.example .env
# 4. Start# Windows: cscript //nologo SentinelAudit.vbs (auto-elevates to Admin)# macOS: sudo -E node server.js (root for WireGuard)# Linux: sudo -E node server.js# Any OS: npm start (V2Ray-only, ~70% nodes)

Open http://localhost:3001 in your browser. No ADMIN_TOKEN needed for local dev — the admin surface defaults to unauthenticated (safe on localhost only).

WireGuard requires admin/root. Without elevation, V2Ray-only audits still run (~70% of nodes). Full setup walkthrough for all three platforms: SETUP.md.


CLI for scripting and AI agents

The sentinel-audit binary emits JSON on stdout for every command.

sentinel-audit serve # Start dashboard (same as npm start)
sentinel-audit nodes --pretty # List all active dVPN nodes as JSON
sentinel-audit balance # Check wallet P2P balance
sentinel-audit test<sentnode1...># Test a single node end-to-end
sentinel-audit audit # Full network audit across all nodes
sentinel-audit list # Enumerate all subcommands
sentinel-audit functions --json # Enumerate every exported SDK function

Full reference: docs/CLI.md


Audit modes

P2P (default)

Scans every active node on the Sentinel chain and opens a paid session on each. The tester wallet pays gas and bandwidth costs directly from its P2P balance. Suitable for full network audits. This is what POST /api/start does with no plan/subscription params.

Subscription / fee-granted

Pass subscriptionId + subscriptionGranter (or planId) to POST /api/start. Only nodes attached to that plan are scanned. Each session transaction is broadcast via broadcastWithFeeGrant using the plan operator's on-chain fee-grant allowance — the tester pays zero gas. This mirrors the flow used by commercial Sentinel apps where end users hold no P2P tokens.

TEST RUN

Pass testRun: true in the body or ?testRun=1 to POST /api/start. The pipeline skips chain operations and payments and writes a mode='test' run row. Used for demos and UI smoke checks. See CLAUDE.md — TEST RUN code paths are immutable.


Public deployment

Set ADMIN_TOKEN in .env to enable the admin login page. Generate a token:

node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"

Optionally change the admin path to something unguessable:

ADMIN_PATH=/my-secret-ops-panel

Put the application behind a reverse proxy (nginx, Caddy) that terminates HTTPS. The admin surface should not be reachable over plain HTTP in production. The Broadcast Live toggle (POST /api/broadcast) controls whether the public / and /live pages stream the in-flight audit or only the last-completed snapshot.

See docs/OPERATOR-RUNBOOK.md for the full deployment checklist.


Environment variables

VariableRequiredDefaultDescription
MNEMONICYes12-word Cosmos mnemonic. Signs session and gas transactions. Never commit to git.
RPCNohttps://rpc-sentinel.busurnode.comPrimary RPC endpoint for chain queries and broadcasts. (rpc.sentinel.co was the old default but stalled behind tip while reporting catching_up=false, returning stale balances — kept last in core/constants.js as a fallback only.)
DENOMNoudvpnToken denomination. Do not change.
GAS_PRICENo0.2udvpnGas price for transactions.
PORTNo3001HTTP port the server listens on.
LISTEN_HOSTNo127.0.0.1Bind address. Set 0.0.0.0 to expose on the network (with ADMIN_TOKEN).
ADMIN_TOKENRecommendedAdmin login password. If unset, admin surface is unauthenticated (localhost dev only).
ADMIN_PATHNo/adminURL prefix for the admin panel. Change to an unguessable path in production.
PUBLIC_MODENofalseWhen true, root path serves the public dashboard; admin moves to ADMIN_PATH. Requires ADMIN_TOKEN.
INSECURE_COOKIENofalseAllow admin session cookies over HTTP (local dev only — production must use HTTPS).
ENABLE_HSTSNofalseSend Strict-Transport-Security header (set behind HTTPS proxy in production).
LCD_ENDPOINTSNoBuilt-in fallbackComma-separated LCD URLs used only if RPC fails.
DNS_SERVERSNounsetComma-separated DNS IPs to use inside tunnels.
NODE_DELAY_MSNo5000Milliseconds between node tests. Keep ≥ 5000 to avoid chain rate limits.
MAX_NODESNo0 (all)Cap on nodes tested per run. 0 = no limit.
TEST_MBNo10Megabytes transferred per speed test.
GIGABYTES_PER_NODENo1Gigabytes allocated per opened session.
ALLOW_PUBLIC_TESTNofalseIf true, public visitors can trigger a pre-configured test against PUBLIC_TEST_PLAN_ID / PUBLIC_TEST_SUB_ID / PUBLIC_TEST_SUB_GRANTER. Off by default — leave off unless you intend to spend your wallet on visitor traffic.
WIREGUARD_PATHNoauto-detectedOverride the wg/wg-quick binary path on Linux/macOS.

Architecture

Single Express process on port 3001. Two audit paths: audit/pipeline.js is the single-pass engine called by the admin "New Test" and "Retest Failed" buttons; audit/continuous.js wraps pipeline in a recursive loop with configurable inter-pass delay, emitting loop:* and iteration:* SSE events consumed by the public /live page. All results persist to audit.db (SQLite via better-sqlite3); raw per-run JSON lands in results/. The public SSE stream (/api/public/events) only forwards events while the broadcastLive toggle is on, and the redaction path strips wallet addresses, plan IDs, and fee-grant internals before fan-out.

For module dependency graph + per-stage flow, see ARCH.md. For decisions and "why we did X", see DECISIONS.md. For all reference docs, see docs/INDEX.md.


Testing this tool

npm test

License

MIT. Part of the Sentinel dVPN ecosystem.

About

Network audit dashboard for Sentinel dVPN — built on blue-js-sdk. Tests every node on the blockchain for real VPN throughput, speed, and protocol compliance

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Force GitHub README to respect dark mode (function() { var style = document.createElement('style'); style.textContent = ' .markdown-body { color-scheme: dark light; } .markdown-body pre { background: #161b22 !important; } .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; } .markdown-body table th, .markdown-body table td { border-color: #30363d !important; } .markdown-body img { background: #0d1117; } .markdown-body blockquote { border-left-color: #8b949e; } .markdown-body hr { border-color: #30363d; } '; document.head.appendChild(style); })(); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' GitHub - Sentinel-Bluebuilder/sentinel-node-tester: Network audit dashboard for Sentinel dVPN — built on blue-js-sdk. Tests every node on the blockchain for real VPN throughput, speed, and protocol compliance · GitHub
Skip to content

Latest commit

History

161 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

npm versionTestsLicense: MITNode.js

Stress-test every node on the Sentinel dVPN chain. Admin-gated testing, public-read results.


What it does

Sentinel Node Tester discovers every active dVPN node on the Sentinel blockchain, opens real VPN sessions, measures actual throughput and protocol compliance, and records pass/fail results in a local SQLite database. A built-in Express dashboard lets an operator run audits and publish results. Public visitors can search and filter results — but only the operator can start or stop tests.


Core flow

Admin logs in at /admin, optionally flips the Broadcast Live toggle (controls whether public surfaces show the live in-flight audit or the last-completed snapshot), and starts an audit via POST /api/start. The continuous loop cycles through every online node; public visitors at / browse the node directory and at /live watch the real-time iteration feed via SSE — both are read-only. The operator stops the loop with POST /api/stop. No public user can trigger any test.


Routes

RouteWhoDescription
/PublicNode directory — search, filter, sort, detail drawer.
/livePublicReal-time audit progress + results feed via SSE.
/node/:addrPublicSingle-node result detail page.
/admin (configurable)AdminFull control panel — start/stop audits, broadcast toggle, logs.
/api/public/*PublicRead-only JSON API: nodes, stats, countries, run summaries, SSE events.
/api/start, /api/stop, /api/broadcastAdminAudit lifecycle + broadcast-live toggle. Admin session required.

Quick start (local dev)

# 1. Clone
git clone https://github.com/Sentinel-Bluebuilder/sentinel-node-tester.git
cd sentinel-node-tester
# 2. Install dependencies (downloads V2Ray binary for your platform)
npm install
# 3. Create .env and set MNEMONIC to your 12-word Cosmos phrase
cp .env.example .env
# 4. Start# Windows: cscript //nologo SentinelAudit.vbs (auto-elevates to Admin)# macOS: sudo -E node server.js (root for WireGuard)# Linux: sudo -E node server.js# Any OS: npm start (V2Ray-only, ~70% nodes)

Open http://localhost:3001 in your browser. No ADMIN_TOKEN needed for local dev — the admin surface defaults to unauthenticated (safe on localhost only).

WireGuard requires admin/root. Without elevation, V2Ray-only audits still run (~70% of nodes). Full setup walkthrough for all three platforms: SETUP.md.


CLI for scripting and AI agents

The sentinel-audit binary emits JSON on stdout for every command.

sentinel-audit serve # Start dashboard (same as npm start)
sentinel-audit nodes --pretty # List all active dVPN nodes as JSON
sentinel-audit balance # Check wallet P2P balance
sentinel-audit test<sentnode1...># Test a single node end-to-end
sentinel-audit audit # Full network audit across all nodes
sentinel-audit list # Enumerate all subcommands
sentinel-audit functions --json # Enumerate every exported SDK function

Full reference: docs/CLI.md


Audit modes

P2P (default)

Scans every active node on the Sentinel chain and opens a paid session on each. The tester wallet pays gas and bandwidth costs directly from its P2P balance. Suitable for full network audits. This is what POST /api/start does with no plan/subscription params.

Subscription / fee-granted

Pass subscriptionId + subscriptionGranter (or planId) to POST /api/start. Only nodes attached to that plan are scanned. Each session transaction is broadcast via broadcastWithFeeGrant using the plan operator's on-chain fee-grant allowance — the tester pays zero gas. This mirrors the flow used by commercial Sentinel apps where end users hold no P2P tokens.

TEST RUN

Pass testRun: true in the body or ?testRun=1 to POST /api/start. The pipeline skips chain operations and payments and writes a mode='test' run row. Used for demos and UI smoke checks. See CLAUDE.md — TEST RUN code paths are immutable.


Public deployment

Set ADMIN_TOKEN in .env to enable the admin login page. Generate a token:

node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"

Optionally change the admin path to something unguessable:

ADMIN_PATH=/my-secret-ops-panel

Put the application behind a reverse proxy (nginx, Caddy) that terminates HTTPS. The admin surface should not be reachable over plain HTTP in production. The Broadcast Live toggle (POST /api/broadcast) controls whether the public / and /live pages stream the in-flight audit or only the last-completed snapshot.

See docs/OPERATOR-RUNBOOK.md for the full deployment checklist.


Environment variables

VariableRequiredDefaultDescription
MNEMONICYes12-word Cosmos mnemonic. Signs session and gas transactions. Never commit to git.
RPCNohttps://rpc-sentinel.busurnode.comPrimary RPC endpoint for chain queries and broadcasts. (rpc.sentinel.co was the old default but stalled behind tip while reporting catching_up=false, returning stale balances — kept last in core/constants.js as a fallback only.)
DENOMNoudvpnToken denomination. Do not change.
GAS_PRICENo0.2udvpnGas price for transactions.
PORTNo3001HTTP port the server listens on.
LISTEN_HOSTNo127.0.0.1Bind address. Set 0.0.0.0 to expose on the network (with ADMIN_TOKEN).
ADMIN_TOKENRecommendedAdmin login password. If unset, admin surface is unauthenticated (localhost dev only).
ADMIN_PATHNo/adminURL prefix for the admin panel. Change to an unguessable path in production.
PUBLIC_MODENofalseWhen true, root path serves the public dashboard; admin moves to ADMIN_PATH. Requires ADMIN_TOKEN.
INSECURE_COOKIENofalseAllow admin session cookies over HTTP (local dev only — production must use HTTPS).
ENABLE_HSTSNofalseSend Strict-Transport-Security header (set behind HTTPS proxy in production).
LCD_ENDPOINTSNoBuilt-in fallbackComma-separated LCD URLs used only if RPC fails.
DNS_SERVERSNounsetComma-separated DNS IPs to use inside tunnels.
NODE_DELAY_MSNo5000Milliseconds between node tests. Keep ≥ 5000 to avoid chain rate limits.
MAX_NODESNo0 (all)Cap on nodes tested per run. 0 = no limit.
TEST_MBNo10Megabytes transferred per speed test.
GIGABYTES_PER_NODENo1Gigabytes allocated per opened session.
ALLOW_PUBLIC_TESTNofalseIf true, public visitors can trigger a pre-configured test against PUBLIC_TEST_PLAN_ID / PUBLIC_TEST_SUB_ID / PUBLIC_TEST_SUB_GRANTER. Off by default — leave off unless you intend to spend your wallet on visitor traffic.
WIREGUARD_PATHNoauto-detectedOverride the wg/wg-quick binary path on Linux/macOS.

Architecture

Single Express process on port 3001. Two audit paths: audit/pipeline.js is the single-pass engine called by the admin "New Test" and "Retest Failed" buttons; audit/continuous.js wraps pipeline in a recursive loop with configurable inter-pass delay, emitting loop:* and iteration:* SSE events consumed by the public /live page. All results persist to audit.db (SQLite via better-sqlite3); raw per-run JSON lands in results/. The public SSE stream (/api/public/events) only forwards events while the broadcastLive toggle is on, and the redaction path strips wallet addresses, plan IDs, and fee-grant internals before fan-out.

For module dependency graph + per-stage flow, see ARCH.md. For decisions and "why we did X", see DECISIONS.md. For all reference docs, see docs/INDEX.md.


Testing this tool

npm test

License

MIT. Part of the Sentinel dVPN ecosystem.

About

Network audit dashboard for Sentinel dVPN — built on blue-js-sdk. Tests every node on the blockchain for real VPN throughput, speed, and protocol compliance

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Highlight search terms from Google/DuckDuckGo/Bing referrer (function() { var ref = document.referrer; var terms = []; if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) { var url = new URL(ref); var q = url.searchParams.get('q') || url.searchParams.get('p'); if (q) { terms = q.split(/\s+/).filter(function(t) { return t.length > 2; }); } } if (terms.length === 0) return; var style = document.createElement('style'); style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }'; document.head.appendChild(style); function highlight(node) { if (node.nodeType === 3) { // text node var text = node.textContent; var found = false; terms.forEach(function(term) { var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\]\\]/g, '\\') + ')', 'gi'); if (regex.test(text)) { found = true; var frag = document.createDocumentFragment(); var parts = text.split(regex); parts.forEach(function(part, i) { if (i % 2 === 0) { frag.appendChild(document.createTextNode(part)); } else { var span = document.createElement('span'); span.className = 'userscript-highlight'; span.textContent = part; frag.appendChild(span); } }); node.parentNode.replaceChild(frag, node); } }); } else if (node.nodeType === 1 && node.childNodes) { // element var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT']; if (!skipTags.includes(node.tagName)) { Array.from(node.childNodes).forEach(highlight); } } } highlight(document.body); // Re-highlight on dynamic content var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1 || node.nodeType === 3) highlight(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' GitHub - Sentinel-Bluebuilder/sentinel-node-tester: Network audit dashboard for Sentinel dVPN — built on blue-js-sdk. Tests every node on the blockchain for real VPN throughput, speed, and protocol compliance · GitHub
Skip to content

Latest commit

History

161 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

npm versionTestsLicense: MITNode.js

Stress-test every node on the Sentinel dVPN chain. Admin-gated testing, public-read results.


What it does

Sentinel Node Tester discovers every active dVPN node on the Sentinel blockchain, opens real VPN sessions, measures actual throughput and protocol compliance, and records pass/fail results in a local SQLite database. A built-in Express dashboard lets an operator run audits and publish results. Public visitors can search and filter results — but only the operator can start or stop tests.


Core flow

Admin logs in at /admin, optionally flips the Broadcast Live toggle (controls whether public surfaces show the live in-flight audit or the last-completed snapshot), and starts an audit via POST /api/start. The continuous loop cycles through every online node; public visitors at / browse the node directory and at /live watch the real-time iteration feed via SSE — both are read-only. The operator stops the loop with POST /api/stop. No public user can trigger any test.


Routes

RouteWhoDescription
/PublicNode directory — search, filter, sort, detail drawer.
/livePublicReal-time audit progress + results feed via SSE.
/node/:addrPublicSingle-node result detail page.
/admin (configurable)AdminFull control panel — start/stop audits, broadcast toggle, logs.
/api/public/*PublicRead-only JSON API: nodes, stats, countries, run summaries, SSE events.
/api/start, /api/stop, /api/broadcastAdminAudit lifecycle + broadcast-live toggle. Admin session required.

Quick start (local dev)

# 1. Clone
git clone https://github.com/Sentinel-Bluebuilder/sentinel-node-tester.git
cd sentinel-node-tester
# 2. Install dependencies (downloads V2Ray binary for your platform)
npm install
# 3. Create .env and set MNEMONIC to your 12-word Cosmos phrase
cp .env.example .env
# 4. Start# Windows: cscript //nologo SentinelAudit.vbs (auto-elevates to Admin)# macOS: sudo -E node server.js (root for WireGuard)# Linux: sudo -E node server.js# Any OS: npm start (V2Ray-only, ~70% nodes)

Open http://localhost:3001 in your browser. No ADMIN_TOKEN needed for local dev — the admin surface defaults to unauthenticated (safe on localhost only).

WireGuard requires admin/root. Without elevation, V2Ray-only audits still run (~70% of nodes). Full setup walkthrough for all three platforms: SETUP.md.


CLI for scripting and AI agents

The sentinel-audit binary emits JSON on stdout for every command.

sentinel-audit serve # Start dashboard (same as npm start)
sentinel-audit nodes --pretty # List all active dVPN nodes as JSON
sentinel-audit balance # Check wallet P2P balance
sentinel-audit test<sentnode1...># Test a single node end-to-end
sentinel-audit audit # Full network audit across all nodes
sentinel-audit list # Enumerate all subcommands
sentinel-audit functions --json # Enumerate every exported SDK function

Full reference: docs/CLI.md


Audit modes

P2P (default)

Scans every active node on the Sentinel chain and opens a paid session on each. The tester wallet pays gas and bandwidth costs directly from its P2P balance. Suitable for full network audits. This is what POST /api/start does with no plan/subscription params.

Subscription / fee-granted

Pass subscriptionId + subscriptionGranter (or planId) to POST /api/start. Only nodes attached to that plan are scanned. Each session transaction is broadcast via broadcastWithFeeGrant using the plan operator's on-chain fee-grant allowance — the tester pays zero gas. This mirrors the flow used by commercial Sentinel apps where end users hold no P2P tokens.

TEST RUN

Pass testRun: true in the body or ?testRun=1 to POST /api/start. The pipeline skips chain operations and payments and writes a mode='test' run row. Used for demos and UI smoke checks. See CLAUDE.md — TEST RUN code paths are immutable.


Public deployment

Set ADMIN_TOKEN in .env to enable the admin login page. Generate a token:

node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"

Optionally change the admin path to something unguessable:

ADMIN_PATH=/my-secret-ops-panel

Put the application behind a reverse proxy (nginx, Caddy) that terminates HTTPS. The admin surface should not be reachable over plain HTTP in production. The Broadcast Live toggle (POST /api/broadcast) controls whether the public / and /live pages stream the in-flight audit or only the last-completed snapshot.

See docs/OPERATOR-RUNBOOK.md for the full deployment checklist.


Environment variables

VariableRequiredDefaultDescription
MNEMONICYes12-word Cosmos mnemonic. Signs session and gas transactions. Never commit to git.
RPCNohttps://rpc-sentinel.busurnode.comPrimary RPC endpoint for chain queries and broadcasts. (rpc.sentinel.co was the old default but stalled behind tip while reporting catching_up=false, returning stale balances — kept last in core/constants.js as a fallback only.)
DENOMNoudvpnToken denomination. Do not change.
GAS_PRICENo0.2udvpnGas price for transactions.
PORTNo3001HTTP port the server listens on.
LISTEN_HOSTNo127.0.0.1Bind address. Set 0.0.0.0 to expose on the network (with ADMIN_TOKEN).
ADMIN_TOKENRecommendedAdmin login password. If unset, admin surface is unauthenticated (localhost dev only).
ADMIN_PATHNo/adminURL prefix for the admin panel. Change to an unguessable path in production.
PUBLIC_MODENofalseWhen true, root path serves the public dashboard; admin moves to ADMIN_PATH. Requires ADMIN_TOKEN.
INSECURE_COOKIENofalseAllow admin session cookies over HTTP (local dev only — production must use HTTPS).
ENABLE_HSTSNofalseSend Strict-Transport-Security header (set behind HTTPS proxy in production).
LCD_ENDPOINTSNoBuilt-in fallbackComma-separated LCD URLs used only if RPC fails.
DNS_SERVERSNounsetComma-separated DNS IPs to use inside tunnels.
NODE_DELAY_MSNo5000Milliseconds between node tests. Keep ≥ 5000 to avoid chain rate limits.
MAX_NODESNo0 (all)Cap on nodes tested per run. 0 = no limit.
TEST_MBNo10Megabytes transferred per speed test.
GIGABYTES_PER_NODENo1Gigabytes allocated per opened session.
ALLOW_PUBLIC_TESTNofalseIf true, public visitors can trigger a pre-configured test against PUBLIC_TEST_PLAN_ID / PUBLIC_TEST_SUB_ID / PUBLIC_TEST_SUB_GRANTER. Off by default — leave off unless you intend to spend your wallet on visitor traffic.
WIREGUARD_PATHNoauto-detectedOverride the wg/wg-quick binary path on Linux/macOS.

Architecture

Single Express process on port 3001. Two audit paths: audit/pipeline.js is the single-pass engine called by the admin "New Test" and "Retest Failed" buttons; audit/continuous.js wraps pipeline in a recursive loop with configurable inter-pass delay, emitting loop:* and iteration:* SSE events consumed by the public /live page. All results persist to audit.db (SQLite via better-sqlite3); raw per-run JSON lands in results/. The public SSE stream (/api/public/events) only forwards events while the broadcastLive toggle is on, and the redaction path strips wallet addresses, plan IDs, and fee-grant internals before fan-out.

For module dependency graph + per-stage flow, see ARCH.md. For decisions and "why we did X", see DECISIONS.md. For all reference docs, see docs/INDEX.md.


Testing this tool

npm test

License

MIT. Part of the Sentinel dVPN ecosystem.

About

Network audit dashboard for Sentinel dVPN — built on blue-js-sdk. Tests every node on the blockchain for real VPN throughput, speed, and protocol compliance

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Strip utm_, fbclid, gclid, etc. from all links on page (function() { var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid', 'ref', 'ref_src', 'source', 'medium', 'campaign']; function cleanUrl(url) { try { var u = new URL(url, window.location.origin); var changed = false; trackingParams.forEach(function(p) { if (u.searchParams.has(p)) { u.searchParams.delete(p); changed = true; } }); return changed ? u.toString() : url; } catch (e) { return url; } } function cleanLinks() { document.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } cleanLinks(); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A') cleanLinks(); node.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + ' GitHub - Sentinel-Bluebuilder/sentinel-node-tester: Network audit dashboard for Sentinel dVPN — built on blue-js-sdk. Tests every node on the blockchain for real VPN throughput, speed, and protocol compliance · GitHub
Skip to content

Latest commit

History

161 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

npm versionTestsLicense: MITNode.js

Stress-test every node on the Sentinel dVPN chain. Admin-gated testing, public-read results.


What it does

Sentinel Node Tester discovers every active dVPN node on the Sentinel blockchain, opens real VPN sessions, measures actual throughput and protocol compliance, and records pass/fail results in a local SQLite database. A built-in Express dashboard lets an operator run audits and publish results. Public visitors can search and filter results — but only the operator can start or stop tests.


Core flow

Admin logs in at /admin, optionally flips the Broadcast Live toggle (controls whether public surfaces show the live in-flight audit or the last-completed snapshot), and starts an audit via POST /api/start. The continuous loop cycles through every online node; public visitors at / browse the node directory and at /live watch the real-time iteration feed via SSE — both are read-only. The operator stops the loop with POST /api/stop. No public user can trigger any test.


Routes

RouteWhoDescription
/PublicNode directory — search, filter, sort, detail drawer.
/livePublicReal-time audit progress + results feed via SSE.
/node/:addrPublicSingle-node result detail page.
/admin (configurable)AdminFull control panel — start/stop audits, broadcast toggle, logs.
/api/public/*PublicRead-only JSON API: nodes, stats, countries, run summaries, SSE events.
/api/start, /api/stop, /api/broadcastAdminAudit lifecycle + broadcast-live toggle. Admin session required.

Quick start (local dev)

# 1. Clone
git clone https://github.com/Sentinel-Bluebuilder/sentinel-node-tester.git
cd sentinel-node-tester
# 2. Install dependencies (downloads V2Ray binary for your platform)
npm install
# 3. Create .env and set MNEMONIC to your 12-word Cosmos phrase
cp .env.example .env
# 4. Start# Windows: cscript //nologo SentinelAudit.vbs (auto-elevates to Admin)# macOS: sudo -E node server.js (root for WireGuard)# Linux: sudo -E node server.js# Any OS: npm start (V2Ray-only, ~70% nodes)

Open http://localhost:3001 in your browser. No ADMIN_TOKEN needed for local dev — the admin surface defaults to unauthenticated (safe on localhost only).

WireGuard requires admin/root. Without elevation, V2Ray-only audits still run (~70% of nodes). Full setup walkthrough for all three platforms: SETUP.md.


CLI for scripting and AI agents

The sentinel-audit binary emits JSON on stdout for every command.

sentinel-audit serve # Start dashboard (same as npm start)
sentinel-audit nodes --pretty # List all active dVPN nodes as JSON
sentinel-audit balance # Check wallet P2P balance
sentinel-audit test<sentnode1...># Test a single node end-to-end
sentinel-audit audit # Full network audit across all nodes
sentinel-audit list # Enumerate all subcommands
sentinel-audit functions --json # Enumerate every exported SDK function

Full reference: docs/CLI.md


Audit modes

P2P (default)

Scans every active node on the Sentinel chain and opens a paid session on each. The tester wallet pays gas and bandwidth costs directly from its P2P balance. Suitable for full network audits. This is what POST /api/start does with no plan/subscription params.

Subscription / fee-granted

Pass subscriptionId + subscriptionGranter (or planId) to POST /api/start. Only nodes attached to that plan are scanned. Each session transaction is broadcast via broadcastWithFeeGrant using the plan operator's on-chain fee-grant allowance — the tester pays zero gas. This mirrors the flow used by commercial Sentinel apps where end users hold no P2P tokens.

TEST RUN

Pass testRun: true in the body or ?testRun=1 to POST /api/start. The pipeline skips chain operations and payments and writes a mode='test' run row. Used for demos and UI smoke checks. See CLAUDE.md — TEST RUN code paths are immutable.


Public deployment

Set ADMIN_TOKEN in .env to enable the admin login page. Generate a token:

node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"

Optionally change the admin path to something unguessable:

ADMIN_PATH=/my-secret-ops-panel

Put the application behind a reverse proxy (nginx, Caddy) that terminates HTTPS. The admin surface should not be reachable over plain HTTP in production. The Broadcast Live toggle (POST /api/broadcast) controls whether the public / and /live pages stream the in-flight audit or only the last-completed snapshot.

See docs/OPERATOR-RUNBOOK.md for the full deployment checklist.


Environment variables

VariableRequiredDefaultDescription
MNEMONICYes12-word Cosmos mnemonic. Signs session and gas transactions. Never commit to git.
RPCNohttps://rpc-sentinel.busurnode.comPrimary RPC endpoint for chain queries and broadcasts. (rpc.sentinel.co was the old default but stalled behind tip while reporting catching_up=false, returning stale balances — kept last in core/constants.js as a fallback only.)
DENOMNoudvpnToken denomination. Do not change.
GAS_PRICENo0.2udvpnGas price for transactions.
PORTNo3001HTTP port the server listens on.
LISTEN_HOSTNo127.0.0.1Bind address. Set 0.0.0.0 to expose on the network (with ADMIN_TOKEN).
ADMIN_TOKENRecommendedAdmin login password. If unset, admin surface is unauthenticated (localhost dev only).
ADMIN_PATHNo/adminURL prefix for the admin panel. Change to an unguessable path in production.
PUBLIC_MODENofalseWhen true, root path serves the public dashboard; admin moves to ADMIN_PATH. Requires ADMIN_TOKEN.
INSECURE_COOKIENofalseAllow admin session cookies over HTTP (local dev only — production must use HTTPS).
ENABLE_HSTSNofalseSend Strict-Transport-Security header (set behind HTTPS proxy in production).
LCD_ENDPOINTSNoBuilt-in fallbackComma-separated LCD URLs used only if RPC fails.
DNS_SERVERSNounsetComma-separated DNS IPs to use inside tunnels.
NODE_DELAY_MSNo5000Milliseconds between node tests. Keep ≥ 5000 to avoid chain rate limits.
MAX_NODESNo0 (all)Cap on nodes tested per run. 0 = no limit.
TEST_MBNo10Megabytes transferred per speed test.
GIGABYTES_PER_NODENo1Gigabytes allocated per opened session.
ALLOW_PUBLIC_TESTNofalseIf true, public visitors can trigger a pre-configured test against PUBLIC_TEST_PLAN_ID / PUBLIC_TEST_SUB_ID / PUBLIC_TEST_SUB_GRANTER. Off by default — leave off unless you intend to spend your wallet on visitor traffic.
WIREGUARD_PATHNoauto-detectedOverride the wg/wg-quick binary path on Linux/macOS.

Architecture

Single Express process on port 3001. Two audit paths: audit/pipeline.js is the single-pass engine called by the admin "New Test" and "Retest Failed" buttons; audit/continuous.js wraps pipeline in a recursive loop with configurable inter-pass delay, emitting loop:* and iteration:* SSE events consumed by the public /live page. All results persist to audit.db (SQLite via better-sqlite3); raw per-run JSON lands in results/. The public SSE stream (/api/public/events) only forwards events while the broadcastLive toggle is on, and the redaction path strips wallet addresses, plan IDs, and fee-grant internals before fan-out.

For module dependency graph + per-stage flow, see ARCH.md. For decisions and "why we did X", see DECISIONS.md. For all reference docs, see docs/INDEX.md.


Testing this tool

npm test

License

MIT. Part of the Sentinel dVPN ecosystem.

About

Network audit dashboard for Sentinel dVPN — built on blue-js-sdk. Tests every node on the blockchain for real VPN throughput, speed, and protocol compliance

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' GitHub - Sentinel-Bluebuilder/sentinel-node-tester: Network audit dashboard for Sentinel dVPN — built on blue-js-sdk. Tests every node on the blockchain for real VPN throughput, speed, and protocol compliance · GitHub
Skip to content

Latest commit

History

161 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

npm versionTestsLicense: MITNode.js

Stress-test every node on the Sentinel dVPN chain. Admin-gated testing, public-read results.


What it does

Sentinel Node Tester discovers every active dVPN node on the Sentinel blockchain, opens real VPN sessions, measures actual throughput and protocol compliance, and records pass/fail results in a local SQLite database. A built-in Express dashboard lets an operator run audits and publish results. Public visitors can search and filter results — but only the operator can start or stop tests.


Core flow

Admin logs in at /admin, optionally flips the Broadcast Live toggle (controls whether public surfaces show the live in-flight audit or the last-completed snapshot), and starts an audit via POST /api/start. The continuous loop cycles through every online node; public visitors at / browse the node directory and at /live watch the real-time iteration feed via SSE — both are read-only. The operator stops the loop with POST /api/stop. No public user can trigger any test.


Routes

RouteWhoDescription
/PublicNode directory — search, filter, sort, detail drawer.
/livePublicReal-time audit progress + results feed via SSE.
/node/:addrPublicSingle-node result detail page.
/admin (configurable)AdminFull control panel — start/stop audits, broadcast toggle, logs.
/api/public/*PublicRead-only JSON API: nodes, stats, countries, run summaries, SSE events.
/api/start, /api/stop, /api/broadcastAdminAudit lifecycle + broadcast-live toggle. Admin session required.

Quick start (local dev)

# 1. Clone
git clone https://github.com/Sentinel-Bluebuilder/sentinel-node-tester.git
cd sentinel-node-tester
# 2. Install dependencies (downloads V2Ray binary for your platform)
npm install
# 3. Create .env and set MNEMONIC to your 12-word Cosmos phrase
cp .env.example .env
# 4. Start# Windows: cscript //nologo SentinelAudit.vbs (auto-elevates to Admin)# macOS: sudo -E node server.js (root for WireGuard)# Linux: sudo -E node server.js# Any OS: npm start (V2Ray-only, ~70% nodes)

Open http://localhost:3001 in your browser. No ADMIN_TOKEN needed for local dev — the admin surface defaults to unauthenticated (safe on localhost only).

WireGuard requires admin/root. Without elevation, V2Ray-only audits still run (~70% of nodes). Full setup walkthrough for all three platforms: SETUP.md.


CLI for scripting and AI agents

The sentinel-audit binary emits JSON on stdout for every command.

sentinel-audit serve # Start dashboard (same as npm start)
sentinel-audit nodes --pretty # List all active dVPN nodes as JSON
sentinel-audit balance # Check wallet P2P balance
sentinel-audit test<sentnode1...># Test a single node end-to-end
sentinel-audit audit # Full network audit across all nodes
sentinel-audit list # Enumerate all subcommands
sentinel-audit functions --json # Enumerate every exported SDK function

Full reference: docs/CLI.md


Audit modes

P2P (default)

Scans every active node on the Sentinel chain and opens a paid session on each. The tester wallet pays gas and bandwidth costs directly from its P2P balance. Suitable for full network audits. This is what POST /api/start does with no plan/subscription params.

Subscription / fee-granted

Pass subscriptionId + subscriptionGranter (or planId) to POST /api/start. Only nodes attached to that plan are scanned. Each session transaction is broadcast via broadcastWithFeeGrant using the plan operator's on-chain fee-grant allowance — the tester pays zero gas. This mirrors the flow used by commercial Sentinel apps where end users hold no P2P tokens.

TEST RUN

Pass testRun: true in the body or ?testRun=1 to POST /api/start. The pipeline skips chain operations and payments and writes a mode='test' run row. Used for demos and UI smoke checks. See CLAUDE.md — TEST RUN code paths are immutable.


Public deployment

Set ADMIN_TOKEN in .env to enable the admin login page. Generate a token:

node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"

Optionally change the admin path to something unguessable:

ADMIN_PATH=/my-secret-ops-panel

Put the application behind a reverse proxy (nginx, Caddy) that terminates HTTPS. The admin surface should not be reachable over plain HTTP in production. The Broadcast Live toggle (POST /api/broadcast) controls whether the public / and /live pages stream the in-flight audit or only the last-completed snapshot.

See docs/OPERATOR-RUNBOOK.md for the full deployment checklist.


Environment variables

VariableRequiredDefaultDescription
MNEMONICYes12-word Cosmos mnemonic. Signs session and gas transactions. Never commit to git.
RPCNohttps://rpc-sentinel.busurnode.comPrimary RPC endpoint for chain queries and broadcasts. (rpc.sentinel.co was the old default but stalled behind tip while reporting catching_up=false, returning stale balances — kept last in core/constants.js as a fallback only.)
DENOMNoudvpnToken denomination. Do not change.
GAS_PRICENo0.2udvpnGas price for transactions.
PORTNo3001HTTP port the server listens on.
LISTEN_HOSTNo127.0.0.1Bind address. Set 0.0.0.0 to expose on the network (with ADMIN_TOKEN).
ADMIN_TOKENRecommendedAdmin login password. If unset, admin surface is unauthenticated (localhost dev only).
ADMIN_PATHNo/adminURL prefix for the admin panel. Change to an unguessable path in production.
PUBLIC_MODENofalseWhen true, root path serves the public dashboard; admin moves to ADMIN_PATH. Requires ADMIN_TOKEN.
INSECURE_COOKIENofalseAllow admin session cookies over HTTP (local dev only — production must use HTTPS).
ENABLE_HSTSNofalseSend Strict-Transport-Security header (set behind HTTPS proxy in production).
LCD_ENDPOINTSNoBuilt-in fallbackComma-separated LCD URLs used only if RPC fails.
DNS_SERVERSNounsetComma-separated DNS IPs to use inside tunnels.
NODE_DELAY_MSNo5000Milliseconds between node tests. Keep ≥ 5000 to avoid chain rate limits.
MAX_NODESNo0 (all)Cap on nodes tested per run. 0 = no limit.
TEST_MBNo10Megabytes transferred per speed test.
GIGABYTES_PER_NODENo1Gigabytes allocated per opened session.
ALLOW_PUBLIC_TESTNofalseIf true, public visitors can trigger a pre-configured test against PUBLIC_TEST_PLAN_ID / PUBLIC_TEST_SUB_ID / PUBLIC_TEST_SUB_GRANTER. Off by default — leave off unless you intend to spend your wallet on visitor traffic.
WIREGUARD_PATHNoauto-detectedOverride the wg/wg-quick binary path on Linux/macOS.

Architecture

Single Express process on port 3001. Two audit paths: audit/pipeline.js is the single-pass engine called by the admin "New Test" and "Retest Failed" buttons; audit/continuous.js wraps pipeline in a recursive loop with configurable inter-pass delay, emitting loop:* and iteration:* SSE events consumed by the public /live page. All results persist to audit.db (SQLite via better-sqlite3); raw per-run JSON lands in results/. The public SSE stream (/api/public/events) only forwards events while the broadcastLive toggle is on, and the redaction path strips wallet addresses, plan IDs, and fee-grant internals before fan-out.

For module dependency graph + per-stage flow, see ARCH.md. For decisions and "why we did X", see DECISIONS.md. For all reference docs, see docs/INDEX.md.


Testing this tool

npm test

License

MIT. Part of the Sentinel dVPN ecosystem.

About

Network audit dashboard for Sentinel dVPN — built on blue-js-sdk. Tests every node on the blockchain for real VPN throughput, speed, and protocol compliance

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); })(); GitHub - Sentinel-Bluebuilder/sentinel-node-tester: Network audit dashboard for Sentinel dVPN — built on blue-js-sdk. Tests every node on the blockchain for real VPN throughput, speed, and protocol compliance · GitHub
Skip to content

Latest commit

History

161 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

npm versionTestsLicense: MITNode.js

Stress-test every node on the Sentinel dVPN chain. Admin-gated testing, public-read results.


What it does

Sentinel Node Tester discovers every active dVPN node on the Sentinel blockchain, opens real VPN sessions, measures actual throughput and protocol compliance, and records pass/fail results in a local SQLite database. A built-in Express dashboard lets an operator run audits and publish results. Public visitors can search and filter results — but only the operator can start or stop tests.


Core flow

Admin logs in at /admin, optionally flips the Broadcast Live toggle (controls whether public surfaces show the live in-flight audit or the last-completed snapshot), and starts an audit via POST /api/start. The continuous loop cycles through every online node; public visitors at / browse the node directory and at /live watch the real-time iteration feed via SSE — both are read-only. The operator stops the loop with POST /api/stop. No public user can trigger any test.


Routes

RouteWhoDescription
/PublicNode directory — search, filter, sort, detail drawer.
/livePublicReal-time audit progress + results feed via SSE.
/node/:addrPublicSingle-node result detail page.
/admin (configurable)AdminFull control panel — start/stop audits, broadcast toggle, logs.
/api/public/*PublicRead-only JSON API: nodes, stats, countries, run summaries, SSE events.
/api/start, /api/stop, /api/broadcastAdminAudit lifecycle + broadcast-live toggle. Admin session required.

Quick start (local dev)

# 1. Clone
git clone https://github.com/Sentinel-Bluebuilder/sentinel-node-tester.git
cd sentinel-node-tester
# 2. Install dependencies (downloads V2Ray binary for your platform)
npm install
# 3. Create .env and set MNEMONIC to your 12-word Cosmos phrase
cp .env.example .env
# 4. Start# Windows: cscript //nologo SentinelAudit.vbs (auto-elevates to Admin)# macOS: sudo -E node server.js (root for WireGuard)# Linux: sudo -E node server.js# Any OS: npm start (V2Ray-only, ~70% nodes)

Open http://localhost:3001 in your browser. No ADMIN_TOKEN needed for local dev — the admin surface defaults to unauthenticated (safe on localhost only).

WireGuard requires admin/root. Without elevation, V2Ray-only audits still run (~70% of nodes). Full setup walkthrough for all three platforms: SETUP.md.


CLI for scripting and AI agents

The sentinel-audit binary emits JSON on stdout for every command.

sentinel-audit serve # Start dashboard (same as npm start)
sentinel-audit nodes --pretty # List all active dVPN nodes as JSON
sentinel-audit balance # Check wallet P2P balance
sentinel-audit test<sentnode1...># Test a single node end-to-end
sentinel-audit audit # Full network audit across all nodes
sentinel-audit list # Enumerate all subcommands
sentinel-audit functions --json # Enumerate every exported SDK function

Full reference: docs/CLI.md


Audit modes

P2P (default)

Scans every active node on the Sentinel chain and opens a paid session on each. The tester wallet pays gas and bandwidth costs directly from its P2P balance. Suitable for full network audits. This is what POST /api/start does with no plan/subscription params.

Subscription / fee-granted

Pass subscriptionId + subscriptionGranter (or planId) to POST /api/start. Only nodes attached to that plan are scanned. Each session transaction is broadcast via broadcastWithFeeGrant using the plan operator's on-chain fee-grant allowance — the tester pays zero gas. This mirrors the flow used by commercial Sentinel apps where end users hold no P2P tokens.

TEST RUN

Pass testRun: true in the body or ?testRun=1 to POST /api/start. The pipeline skips chain operations and payments and writes a mode='test' run row. Used for demos and UI smoke checks. See CLAUDE.md — TEST RUN code paths are immutable.


Public deployment

Set ADMIN_TOKEN in .env to enable the admin login page. Generate a token:

node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"

Optionally change the admin path to something unguessable:

ADMIN_PATH=/my-secret-ops-panel

Put the application behind a reverse proxy (nginx, Caddy) that terminates HTTPS. The admin surface should not be reachable over plain HTTP in production. The Broadcast Live toggle (POST /api/broadcast) controls whether the public / and /live pages stream the in-flight audit or only the last-completed snapshot.

See docs/OPERATOR-RUNBOOK.md for the full deployment checklist.


Environment variables

VariableRequiredDefaultDescription
MNEMONICYes12-word Cosmos mnemonic. Signs session and gas transactions. Never commit to git.
RPCNohttps://rpc-sentinel.busurnode.comPrimary RPC endpoint for chain queries and broadcasts. (rpc.sentinel.co was the old default but stalled behind tip while reporting catching_up=false, returning stale balances — kept last in core/constants.js as a fallback only.)
DENOMNoudvpnToken denomination. Do not change.
GAS_PRICENo0.2udvpnGas price for transactions.
PORTNo3001HTTP port the server listens on.
LISTEN_HOSTNo127.0.0.1Bind address. Set 0.0.0.0 to expose on the network (with ADMIN_TOKEN).
ADMIN_TOKENRecommendedAdmin login password. If unset, admin surface is unauthenticated (localhost dev only).
ADMIN_PATHNo/adminURL prefix for the admin panel. Change to an unguessable path in production.
PUBLIC_MODENofalseWhen true, root path serves the public dashboard; admin moves to ADMIN_PATH. Requires ADMIN_TOKEN.
INSECURE_COOKIENofalseAllow admin session cookies over HTTP (local dev only — production must use HTTPS).
ENABLE_HSTSNofalseSend Strict-Transport-Security header (set behind HTTPS proxy in production).
LCD_ENDPOINTSNoBuilt-in fallbackComma-separated LCD URLs used only if RPC fails.
DNS_SERVERSNounsetComma-separated DNS IPs to use inside tunnels.
NODE_DELAY_MSNo5000Milliseconds between node tests. Keep ≥ 5000 to avoid chain rate limits.
MAX_NODESNo0 (all)Cap on nodes tested per run. 0 = no limit.
TEST_MBNo10Megabytes transferred per speed test.
GIGABYTES_PER_NODENo1Gigabytes allocated per opened session.
ALLOW_PUBLIC_TESTNofalseIf true, public visitors can trigger a pre-configured test against PUBLIC_TEST_PLAN_ID / PUBLIC_TEST_SUB_ID / PUBLIC_TEST_SUB_GRANTER. Off by default — leave off unless you intend to spend your wallet on visitor traffic.
WIREGUARD_PATHNoauto-detectedOverride the wg/wg-quick binary path on Linux/macOS.

Architecture

Single Express process on port 3001. Two audit paths: audit/pipeline.js is the single-pass engine called by the admin "New Test" and "Retest Failed" buttons; audit/continuous.js wraps pipeline in a recursive loop with configurable inter-pass delay, emitting loop:* and iteration:* SSE events consumed by the public /live page. All results persist to audit.db (SQLite via better-sqlite3); raw per-run JSON lands in results/. The public SSE stream (/api/public/events) only forwards events while the broadcastLive toggle is on, and the redaction path strips wallet addresses, plan IDs, and fee-grant internals before fan-out.

For module dependency graph + per-stage flow, see ARCH.md. For decisions and "why we did X", see DECISIONS.md. For all reference docs, see docs/INDEX.md.


Testing this tool

npm test

License

MIT. Part of the Sentinel dVPN ecosystem.

About

Network audit dashboard for Sentinel dVPN — built on blue-js-sdk. Tests every node on the blockchain for real VPN throughput, speed, and protocol compliance

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages