5xYourTeam as a network site (2026-11-15): fixed network link nw5x -> https://5xyourteam.com/{s2}?ref={s1} on the admin account, catalog network template 5xyourteam + NET_SRC fivex/5xyourteam, netsites CODES fivex: nw5x; qa netsrc expects eight network links + nw5x redirect

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-11-15 08:52:30 -06:00
parent b2b670df14
commit ab6124ea9b
5 changed files with 20 additions and 6 deletions
+11
View File
@@ -141,6 +141,17 @@
"verified": true,
"source": "network"
},
{
"key": "5xyourteam",
"name": "5xYourTeam",
"site": "5xyourteam.com",
"costModel": "",
"params": [],
"postbackUrl": "",
"notes": "Crypto Team Build Network team-building site. Clicks that arrive from 5xYourTeam (its footer, its promo kit) carry ?src=fivex and are counted under this source automatically.",
"verified": true,
"source": "network"
},
{
"key": "stackpol",
"name": "Stack POL",
+1
View File
@@ -12,6 +12,7 @@ const SITES = [
{ id: 'dlb', code: 'nwdlb', name: 'Downline Banners', url: 'https://downlinebanners.com/{s2}?ref={s1}' },
{ id: 'vbb', code: 'nwvbb', name: 'Viral Banner Blitz', url: 'https://viralbannerblitz.com/{s2}?ref={s1}' },
{ id: 'viraladblitz', code: 'nwvab', name: 'ViralAdBlitz', url: 'https://viraladblitz.com/{s2}?ref={s1}' },
{ id: 'fivex', code: 'nw5x', name: '5xYourTeam', url: 'https://5xyourteam.com/{s2}?ref={s1}' },
{ id: 'stackpol', code: 'nwsp', name: 'Stack POL', url: 'https://stackpol.com/{s2}?ref={s1}' },
{ id: 'earnerscorner', code: 'nwec', name: 'Earners Corner', url: 'https://earnerscorner.com/{s2}' }
];
+1 -1
View File
@@ -36,7 +36,7 @@ function list() { if (Date.now() - cache.at > TTL) refresh(); return cache.list;
// entry also gets go = the LinkSpin network link for that site with ?src=<this site>, so a click shows in LinkSpin Reports under the
// site that sent it (LinkSpin netlinks.js: fixed codes on the admin account). This site = NETWORK_SITE_ID, else the request host.
// No go for this site itself, or when this site cannot be told (a test host): the page then uses the plain url.
const CODES = { iap: 'nwiap', linkspin: 'nwls', dlb: 'nwdlb', vbb: 'nwvbb', viraladblitz: 'nwvab', stackpol: 'nwsp', earnerscorner: 'nwec' };
const CODES = { iap: 'nwiap', linkspin: 'nwls', dlb: 'nwdlb', vbb: 'nwvbb', viraladblitz: 'nwvab', fivex: 'nw5x', stackpol: 'nwsp', earnerscorner: 'nwec' };
const linksBase = () => String(process.env.NETWORK_LINKS_BASE || 'https://linkspin.app').trim().replace(/\/+$/, '');
const hostOf = u => { try { return new URL(u).hostname.toLowerCase().replace(/^www\./, ''); } catch (e) { return ''; } };
function selfId(req, l) {
+6 -4
View File
@@ -1,5 +1,5 @@
// Network sites as traffic sources (2026-11-14). Boots server.js on its own port with a throwaway seeded data dir (JSON store, no DB)
// and checks: the admin account gets one fixed network link per site (nwiap, nwls, nwdlb, nwvbb, nwvab, nwsp, nwec) and one source per
// and checks: the admin account gets one fixed network link per site (nwiap, nwls, nwdlb, nwvbb, nwvab, nw5x, nwsp, nwec) and one source per
// network site; /r/<code>?src=&s1=&s2= lands on the right page with ?ref=<member>; the click counts under the sending site's source;
// a member's own link with ?src=<site> gets that site's source made on first use; an unknown src changes nothing; a reboot makes
// nothing twice.
@@ -28,9 +28,9 @@ const srcOf = (owner, tpl) => read('sources.json').items.find(x => x.owner === o
try {
await boot();
const rots = read('rotator.json').rotations.filter(r => r.owner === ADMIN);
ok(['nwiap', 'nwls', 'nwdlb', 'nwvbb', 'nwvab', 'nwsp', 'nwec'].every(c => rots.some(r => r.code === c)) && rots.length === 7, 'the admin account has the seven network links', rots.map(r => r.code));
ok(['nwiap', 'nwls', 'nwdlb', 'nwvbb', 'nwvab', 'nw5x', 'nwsp', 'nwec'].every(c => rots.some(r => r.code === c)) && rots.length === 8, 'the admin account has the eight network links', rots.map(r => r.code));
const mineSrc = read('sources.json').items.filter(x => x.owner === ADMIN);
ok(['instantadpay', 'linkspin', 'downlinebanners', 'viralbannerblitz', 'viraladblitz', 'stackpol', 'earnerscorner'].every(t => mineSrc.some(x => x.template === t)) && mineSrc.length === 7, 'and one source per network site', mineSrc.map(x => x.template));
ok(['instantadpay', 'linkspin', 'downlinebanners', 'viralbannerblitz', 'viraladblitz', '5xyourteam', 'stackpol', 'earnerscorner'].every(t => mineSrc.some(x => x.template === t)) && mineSrc.length === 8, 'and one source per network site', mineSrc.map(x => x.template));
let r = await go('/r/nwdlb?src=iap&s1=bob&s2=how');
ok(r.status === 302 && /^https:\/\/downlinebanners\.com\/how\?ref=bob$/.test(r.loc), 'nwdlb: lands on /how with ?ref=bob', r);
@@ -38,6 +38,8 @@ try {
ok(r.status === 302 && /^https:\/\/instantadpay\.com\/\?ref=amy&lsclk=[a-f0-9]{10}$/.test(r.loc), 'nwiap: home page with ?ref=amy and the click id (InstantAdPay reports joins against it)', r);
r = await go('/r/nwec?src=dlb');
ok(r.status === 302 && /^https:\/\/earnerscorner\.com\/(\?|$)/.test(r.loc), 'nwec: the forum home', r);
r = await go('/r/nw5x?src=fivex&s1=bob');
ok(r.status === 302 && /^https:\/\/5xyourteam\.com\/\?ref=bob$/.test(r.loc), 'nw5x: 5xYourTeam with the member ref', r);
r = await go('/r/nwvab?src=vab&s1=bob&s2=boost');
ok(r.status === 302 && /^https:\/\/viraladblitz\.com\/boost\?ref=bob$/.test(r.loc), 'nwvab: ViralAdBlitz page with the member ref', r);
r = await go('/r/nwvbb?src=linkspin', 'https://linkspin.app/contract');
@@ -60,7 +62,7 @@ try {
ok(read('sources.json').items.filter(x => x.owner === MEM).length === 2, 'an unknown src makes no source');
await stop(); await boot();
ok(read('rotator.json').rotations.filter(x => x.owner === ADMIN).length === 7 && read('sources.json').items.filter(x => x.owner === ADMIN).length === 7, 'a reboot makes nothing twice');
ok(read('rotator.json').rotations.filter(x => x.owner === ADMIN).length === 8 && read('sources.json').items.filter(x => x.owner === ADMIN).length === 8, 'a reboot makes nothing twice');
} catch (e) { fail++; console.error(e); }
finally { await stop(); try { fs.rmSync(DATA, { recursive: true, force: true }); } catch (e) {} }
console.log('\n' + pass + ' passed, ' + fail + ' failed'); process.exit(fail ? 1 : 0);
+1 -1
View File
@@ -143,7 +143,7 @@ function meta(owner) { const m = {}; for (const s of mine(owner)) m[s.id] = { na
// source for that site, made from the network catalog template the first time it is needed. Only network templates qualify.
const NET_SRC = { iap: 'instantadpay', instantadpay: 'instantadpay', linkspin: 'linkspin', dlb: 'downlinebanners', downlinebanners: 'downlinebanners',
vbb: 'viralbannerblitz', viralbannerblitz: 'viralbannerblitz', stackpol: 'stackpol', earnerscorner: 'earnerscorner',
dh: 'downlinehydra', downlinehydra: 'downlinehydra', vab: 'viraladblitz', viraladblitz: 'viraladblitz' };
dh: 'downlinehydra', downlinehydra: 'downlinehydra', vab: 'viraladblitz', viraladblitz: 'viraladblitz', fivex: '5xyourteam', '5xyourteam': '5xyourteam' };
function networkTemplate(src) { const k = NET_SRC[String(src || '').trim().toLowerCase()]; const t = k ? template(k) : null; return t && t.source === 'network' ? t : null; }
function networkSource(owner, src) {
const t = networkTemplate(src); if (!t || !owner) return null;