Network sign-in for DownlineHydra (2026-11-15, same change as InstantAdPay 1c06c58): networksso NAMES downlinehydra (same file as IAP), wallets.downlinehydra = DH_URL (default https://downlinehydra.com; staging https://dh.saasy.top until the domain switch), /go/downlinehydra and /go/viraladblitz hops

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-11-15 08:39:12 -06:00
parent 90596b4d0f
commit b2b670df14
2 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ const BACK_AGE = 1200; // seconds: the provider remembers an unf
const TRIED_AGE = 1800; // seconds: one silent check per browser per 30 minutes
const OFF_AGE = 12 * 3600; // seconds: no silent check after a sign-out on this site
const HINT_AGE = 300; // seconds: the email prefill when the member is not here yet
const NAMES = { iap: 'InstantAdPay', linkspin: 'LinkSpin', bannerline: 'Downline Banners', vbb: 'Viral Banner Blitz', viraladblitz: 'ViralAdBlitz' }; // vbb = Viral Banner Blitz, a wallet site like Downline Banners (2026-11-14); viraladblitz = ViralAdBlitz, a wallet site like VBB (2026-11-15)
const NAMES = { iap: 'InstantAdPay', linkspin: 'LinkSpin', bannerline: 'Downline Banners', vbb: 'Viral Banner Blitz', viraladblitz: 'ViralAdBlitz', downlinehydra: 'DownlineHydra' }; // vbb = Viral Banner Blitz, a wallet site like Downline Banners (2026-11-14); viraladblitz = ViralAdBlitz, a wallet site like VBB (2026-11-15); downlinehydra = DownlineHydra (2026-11-15)
const WALLET_RE = /^0x[0-9a-f]{40}$/;
let C = null; // { self, peer, peerBase(), isProd, dataDir, db, member(req), accept(email, req, v), signIn(email, req, v), landing(to), signinPath(to), defaultPath,
+3 -2
View File
@@ -646,7 +646,8 @@ async function boot() {
networksso.init({ self: 'linkspin', peer: 'iap', peerBase: IAP_BASE, isProd: IS_PROD, dataDir: DATA_DIR, db, defaultPath: '/ads',
wallets: { bannerline: () => String(process.env.BL_URL || 'https://downlinebanners.com').replace(/\/+$/, ''), // Downline Banners by wallet (2026-11-13)
vbb: () => String(process.env.VBB_URL || 'https://viralbannerblitz.com').replace(/\/+$/, ''), // Viral Banner Blitz by wallet (2026-11-14)
viraladblitz: () => String(process.env.VAB_URL || 'https://viraladblitz.com').replace(/\/+$/, '') }, // ViralAdBlitz by wallet (2026-11-15; VAB_URL = staging host until the domain switch)
viraladblitz: () => String(process.env.VAB_URL || 'https://viraladblitz.com').replace(/\/+$/, ''), // ViralAdBlitz by wallet (2026-11-15; VAB_URL = staging host until the domain switch)
downlinehydra: () => String(process.env.DH_URL || 'https://downlinehydra.com').replace(/\/+$/, '') }, // DownlineHydra (2026-11-15; DH_URL = https://dh.saasy.top until the domain switch)
wallet: async s => { const a = await accounts.byEmail(s.email); const addr = String(s.address || (a && a.address) || '').toLowerCase(); return addr ? { address: addr, name: '' } : null; },
member: async req => { // a wallet sign-in carries the address, not the email: find the account that owns the wallet (2026-11-13)
const s = await auth.fromRequest(req); if (!s) return null;
@@ -1440,7 +1441,7 @@ const server = http.createServer(async (req, res) => {
// support must reach everyone, invited or not (2026-10-16): someone locked out or not yet let in is exactly who needs it
if (!zonePath && !supportOpen(p) && curtained(req, res, u)) return; // nothing below this line runs for an uninvited visitor
// network sign-in with InstantAdPay (2026-11-12): /go/iap, /sso/start, /sso/check, /sso/in, /api/sso/status (app host only)
if (req.method === 'GET' && (p === '/go/iap' || p.startsWith('/sso/') || p === '/api/sso/status') && !isPagesHost(req) && !isLinkHost(req) && await networksso.handle(req, res, u)) return;
if (req.method === 'GET' && (p === '/go/iap' || p === '/go/viraladblitz' || p === '/go/downlinehydra' || p.startsWith('/sso/') || p === '/api/sso/status') && !isPagesHost(req) && !isLinkHost(req) && await networksso.handle(req, res, u)) return;
// -- the rotator redirect: one hop, recorded, on any host (LinkSpin)
let rm = /^\/r\/([a-z0-9]{4,12})$/i.exec(p);