From 8db8cb1f7adad8a28ad7b6ee760e5971ee01d2c7 Mon Sep 17 00:00:00 2001 From: Frederic Jung Date: Mon, 26 Oct 2026 22:37:51 +0100 Subject: [PATCH] Peering inbox, PNI lead times and minimum sizes, Microsnoft US East Peering inbox (Networks tab): requests from small and made-up networks arrive with every IX port, max-prefix alerts take bilateral sessions down for a few weeks unless answered (raise the limit for growth, keep it down for a leak; raising it on a full table is a route leak). Unanswered mail costs reputation, which makes selective networks up to 10% pickier. The Large Peering Model agent costs $20M a year and gets about a third of its decisions wrong, with a log to prove it. PNIs are ordered, not instant: 2 to 6 weeks for small networks, 6 to 12 months for big content networks, Tier 1s and big eyeballs, for new PNIs and augments alike (halved during a conference). Content networks and Tier 1s start at 100G; Doitsche Telekomm sells 1G. Microsnoft refuses PNIs and IX sessions in Ashburn, New York, Boston, Atlanta and Miami. Only delivered PNIs carry traffic, bill, or count for goals and Tier 1. --- CHANGELOG.md | 2 + package.json | 2 +- site/i18n/fr.js | 102 ++++++++++++++++++++++- site/i18n/it.js | 102 ++++++++++++++++++++++- site/i18n/pt.js | 102 ++++++++++++++++++++++- site/index.html | 178 +++++++++++++++++++++++++++++++++------- tests/inbox.test.js | 183 ++++++++++++++++++++++++++++++++++++++++++ tests/issues.test.js | 2 +- tests/regions.test.js | 2 +- 9 files changed, 641 insertions(+), 34 deletions(-) create mode 100644 tests/inbox.test.js diff --git a/CHANGELOG.md b/CHANGELOG.md index 555b73c..476eada 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ All notable changes to this project are documented here. The project follows ## [Unreleased] +- Peering now comes with an inbox: every IX port brings peering requests from networks you have never heard of, and sessions drop when someone blows past the max-prefix limit their PeeringDB promised. Answer requests, decide whether a max-prefix alert is growth or a route leak, and keep your reputation up, because selective networks hear when you never answer. For $20M a year the Large Peering Model AI answers it all for you, quickly and often wrongly. +- PNIs take time: a cross-connect with a small network takes a few weeks, and the big content networks, Tier 1s and big eyeball networks quote 6 to 12 months for a new PNI or an augment. The content networks and Tier 1s no longer do 10G PNIs (100G and up), Doitsche Telekomm still sells 1G, and Microsnoft has no capacity on the US east coast at all. - RouteScript has a new “Slop it with AI” button: an AI reads your live traffic, writes you a script and tells you how great it is. A new help page explains what every rule does and how real routers do the same, with seven ready-made scripts (Penny Pincher, Peering First, Shields Up and more) filled in from your own network and loaded with one tap. - Six Atlantic stops join the map: Halifax, Bermuda, the Azores, Tenerife, Cape Verde and St Helena (#120). The cables across the Atlantic now stop where they really land, and a POP on an island splits a crossing that is just too long for 1.6T into hops that each carry 1.6T or more: Miami to Madrid via Bermuda and the Azores, Atlanta to Lisbon via Bermuda, Lisbon and London to Lagos via Tenerife, and Fortaleza to Europe via Cape Verde. Halifax sits at the start of the shortest line to England. Three new cables, Sol Survivor, Atlantis-2: The Sequel and Canary in the Cable Mine, link the islands, and older ones gain island stops. Exchanges only where one runs today, in Praia and Halifax. New island networks from One Commotion to Pretty Sure South Atlantic, cables that go quiet in the Bermuda Triangle, and a new scenario, Mid-Atlantic Accent, asks you to cross at 1.6T hop by hop. Broadband in a very small town no longer starts above what the town can use. - You can zoom in much further on the map, and a short link between two close cities can now be picked (#126). Dense regions like southern Brazil spread out properly when you zoom in, and tapping right on a link next to a city opens the link instead of the city. diff --git a/package.json b/package.json index d2b3521..d0451b8 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "url": "git+https://github.com/fjaeckel/seriesoftubes.git" }, "scripts": { - "test": "node --test --test-concurrency=1 tests/game.test.js tests/build.test.js tests/persist.test.js tests/services.test.js tests/peering.test.js tests/issues.test.js tests/regions.test.js tests/modes.test.js tests/levels.test.js tests/speed.test.js tests/i18n.test.js tests/routing-reference.test.js tests/perf.test.js", + "test": "node --test --test-concurrency=1 tests/game.test.js tests/build.test.js tests/persist.test.js tests/services.test.js tests/peering.test.js tests/inbox.test.js tests/issues.test.js tests/regions.test.js tests/modes.test.js tests/levels.test.js tests/speed.test.js tests/i18n.test.js tests/routing-reference.test.js tests/perf.test.js", "build": "bash scripts/build.sh", "i18n:check": "node scripts/i18n-check.js", "serve": "npm run build && npx --yes serve@14.2.4 _site", diff --git a/site/i18n/fr.js b/site/i18n/fr.js index a9b244e..7789625 100644 --- a/site/i18n/fr.js +++ b/site/i18n/fr.js @@ -1242,7 +1242,6 @@ "{n} new session at {ix}.
Small networks, but they add up, and they all count towards the club.":"{n} nouvelle session sur {ix}.
Des petits réseaux, mais ça s’additionne, et tout compte pour le club.", "{n} new sessions at {ix}.
Small networks, but they add up, and they all count towards the club.":"{n} nouvelles sessions sur {ix}.
Des petits réseaux, mais ça s’additionne, et tout compte pour le club.", "{net} declined the PNI.
{why}":"{net} a refusé le PNI.
{why}", -"PNI with {net} is up.
A cross-connect in {dc}. Private and fast.":"PNI avec {net} actif.
Un cross-connect dans {dc}. Privé et rapide.", "{net} says not yet.
Send them {min}+ Gbps first.":"{net} dit : pas encore.
Envoie-leur d’abord {min}+ Gbps.", "{cache} installed in {city}!
{net} shipped it for free. You pay {mo}/mo power.":"{cache} installé à {city} !
{net} te l’a envoyé gratuitement. Tu paies {mo}/mois d’électricité.", "You need a POP in every city on the contract first.":"Il te faut d’abord un POP dans chaque ville du contrat.", @@ -2712,4 +2711,105 @@ "Loaded {name}. Check it, then deploy.":"{name} chargé. Vérifiez-le, puis déployez.", "Commit complete. Traffic down {p}.
The AI apologises for the confusion, and remains completely sure the script was right. Fix it from the NOC tab.":"Commit terminé. Trafic en baisse de {p}.
L’IA s’excuse pour la confusion, et reste absolument certaine que le script était juste. Corrigez-le depuis l’onglet NOC.", "Rules for your Auto-TE controller: which exits to prefer, which to avoid, and when to spill onto the next one. The editor’s help explains every rule and has ready-made scripts.":"Des règles pour votre contrôleur Auto-TE : quelles sorties préférer, lesquelles éviter et quand déborder sur la suivante. L’aide de l’éditeur explique chaque règle et propose des scripts tout prêts.", +"Delivery: 6 to 12 months":"Livraison : 6 à 12 mois", +"Delivery: 2 to 6 weeks":"Livraison : 2 à 6 semaines", +"Their team quotes {m} months":"Leur équipe annonce {m} mois", +"Ready in about {n} days":"Prête dans environ {n} jours", +"on order":"commandée", +"About {n} days to go. Nothing to do but wait, or chase it.":"Encore environ {n} jours. Rien à faire qu’attendre, ou relancer.", +"Chase it":"Relancer", +"Cancel the order":"Annuler la commande", +"PNI with {net} is up in {city}.
A cross-connect in {dc}. Private and fast.":"La PNI avec {net} est en service à {city}.
Un cross-connect chez {dc}. Privé et rapide.", +"Augment with {net} delivered in {city}.
Now {port}.":"Extension avec {net} livrée à {city}.
Désormais {port}.", +"No capacity in US East. You can join the waitlist; the waitlist is also out of capacity.":"Pas de capacité en US East. Vous pouvez vous inscrire sur la liste d’attente ; la liste d’attente est aussi à court de capacité.", +"US East is sold out until further notice. Further notice is also sold out.":"US East est complet jusqu’à nouvel ordre. Le nouvel ordre est complet aussi.", +"Their peering team says US East is “capacity constrained”, which is cloud for “no”.":"Leur équipe de peering dit qu’US East est « capacity constrained », ce qui veut dire « non » en langage cloud.", +"A new region is coming online soon. It has been coming online soon since 2019.":"Une nouvelle région arrive bientôt. Elle arrive bientôt depuis 2019.", +"Hi! We would like to peer with you at {ix}. Our PeeringDB record is up to date.":"Bonjour ! Nous aimerions faire du peering avec vous à {ix}. Notre fiche PeeringDB est à jour.", +"Dear Sir or Madam, please peer. We have three prefixes and very big plans.":"Madame, Monsieur, merci de bien vouloir peerer. Nous avons trois préfixes et de très grands projets.", +"We noticed you are at {ix}. So are we. Shall we?":"Nous avons remarqué que vous êtes à {ix}. Nous aussi. On y va ?", +"Hello, please find attached our peering request as a Word document, scanned from a printout.":"Bonjour, veuillez trouver ci-joint notre demande de peering au format Word, scannée depuis une impression.", +"Peering request, fifth attempt. Is anyone there?":"Demande de peering, cinquième tentative. Il y a quelqu’un ?", +"Hey, quick one: can you peer with us at {ix}? We have a very important Minecraft server.":"Salut, petite question : vous pouvez peerer avec nous à {ix} ? On a un serveur Minecraft très important.", +"Greetings. We are a fast-growing network. Last year we had one customer; this year we have two.":"Salutations. Nous sommes un réseau en pleine croissance. L’an dernier nous avions un client ; cette année, deux.", +"Please configure sessions with us at {ix}. We will do ours next week, or the week after.":"Merci de configurer les sessions avec nous à {ix}. Nous ferons les nôtres la semaine prochaine, ou celle d’après.", +"Replied to a peering request with a haiku about BGP. No answer yet.":"A répondu à une demande de peering par un haïku sur BGP. Pas de réponse pour l’instant.", +"Signed you up for a webinar on “Peering in the Age of AI”.":"Vous a inscrit à un webinaire sur « Le peering à l’ère de l’IA ».", +"Opened a ticket with itself to review its own decisions. It approved them.":"S’est ouvert un ticket pour revoir ses propres décisions. Il les a approuvées.", +"Wrote a thousand-word apology to a network you never peered with.":"A écrit mille mots d’excuses à un réseau avec qui vous n’avez jamais peeré.", +"Updated your PeeringDB record. Your NOC phone number is now a pizza place.":"A mis à jour votre fiche PeeringDB. Le numéro de votre NOC est maintenant celui d’une pizzeria.", +"Asked NetChill’s peering team to “please provide more Netchill”.":"A demandé à l’équipe peering de NetChill de « fournir plus de Netchill, svp ».", +"Responsive":"Réactif", +"Average":"Dans la moyenne", +"Mostly ignores email":"Ignore presque tous les e-mails", +"Black hole":"Trou noir", +"Max-prefix limit hit: {who} at {ix}.
The session is down until you look at it.":"Limite max-prefix atteinte : {who} à {ix}.
La session reste coupée tant que vous n’y avez pas regardé.", +"Inbox":"Boîte", +"{who} asked a mailing list whether anyone has a working contact at {me}.
Their peering request sat in your inbox for a month.":"{who} a demandé sur une liste de diffusion si quelqu’un avait un contact qui marche chez {me}.
Leur demande de peering a dormi un mois dans votre boîte.", +"{who} at {ix} was sending a full table, and the max-prefix limit was the only thing stopping it. With the limit raised, {net}’s prefixes point at their basement. Traffic to {net} over transit is black-holed for a few days.":"{who} à {ix} envoyait une table complète, et la limite max-prefix était la seule chose qui la retenait. Limite relevée, les préfixes de {net} pointent vers leur cave. Le trafic vers {net} via le transit part dans un trou noir pendant quelques jours.", +"That was a route leak.
{who} was announcing {n} prefixes: a full table. Next time, keep it down.":"C’était une fuite de routes.
{who} annonçait {n} préfixes : une table complète. La prochaine fois, laissez-la coupée.", +"Session with {who} is back up.
New limit: {n} prefixes. They promise to update PeeringDB.":"La session avec {who} est rétablie.
Nouvelle limite : {n} préfixes. Ils promettent de mettre PeeringDB à jour.", +"Good call: it was a route leak.
{who} found a fat-fingered route map. The session comes back on its own in a few days.":"Bien vu : c’était une fuite de routes.
{who} a trouvé une route-map mal tapée. La session revient toute seule dans quelques jours.", +"The session stays down.
{who} will update PeeringDB and ask again. Eventually.":"La session reste coupée.
{who} va mettre PeeringDB à jour et redemander. Un jour.", +"Declined {who} at {ix}: “not a strategic fit”. They were.":"A refusé {who} à {ix} : « pas stratégique ». Ils l’étaient.", +"Raised the max-prefix limit for {who} at {ix} to {n}. They seemed nice.":"A relevé la limite max-prefix de {who} à {ix} à {n}. Ils avaient l’air sympas.", +"Kept {who} down at {ix} for “suspicious growth”. They had grown by one customer.":"A laissé {who} coupé à {ix} pour « croissance suspecte ». Ils avaient gagné un client.", +"Raised the max-prefix limit for {who} at {ix}. Correctly, this time.":"A relevé la limite max-prefix de {who} à {ix}. À raison, cette fois.", +"Kept {who} down at {ix}: it was a route leak. Nailed it.":"A laissé {who} coupé à {ix} : c’était une fuite de routes. Dans le mille.", +"Answered your mail: {a} accepted, {d} declined.":"A répondu à votre courrier : {a} acceptées, {d} refusées.", +"Tidied up a session it decided was unused: de-peered {who} at {ix}.":"A fait le ménage dans les sessions qu’il jugeait inutiles : a dépeeré {who} à {ix}.", +"{n} day ago":"il y a {n} jour", +"{n} days ago":"il y a {n} jours", +"today":"aujourd’hui", +"PeeringDB last updated {n} year ago":"PeeringDB mis à jour il y a {n} an", +"PeeringDB last updated {n} years ago":"PeeringDB mis à jour il y a {n} ans", +"PeeringDB updated last month":"PeeringDB mis à jour le mois dernier", +"Max-prefix limit hit: {who} at {ix}":"Limite max-prefix atteinte : {who} à {ix}", +"Configured: {lim} prefixes. Received: {got}.":"Configuré : {lim} préfixes. Reçus : {got}.", +"Their PeeringDB says {lim}, last updated {n} year ago.":"Leur PeeringDB indique {lim}, mis à jour il y a {n} an.", +"Their PeeringDB says {lim}, last updated {n} years ago.":"Leur PeeringDB indique {lim}, mis à jour il y a {n} ans.", +"Raise the limit":"Relever la limite", +"Keep it down":"La laisser coupée", +"bumped":"relancé", +"Peering inbox":"Boîte de peering", +"{n} unanswered":"{n} sans réponse", +"Every exchange port brings mail. Answer peering requests, and look at sessions that hit their max-prefix limit: is it growth, or a route leak? Unanswered mail gets you a reputation, and selective networks hear about it.":"Chaque port IX amène du courrier. Répondez aux demandes de peering et regardez les sessions qui dépassent leur limite max-prefix : croissance ou fuite de routes ? Le courrier sans réponse vous fait une réputation, et les réseaux sélectifs en entendent parler.", +"Your reputation":"Votre réputation", +"Large Peering Model is answering your mail":"Large Peering Model répond à votre courrier", +"{price}/year. It never sleeps, never complains and is often wrong.":"{price}/an. Ne dort jamais, ne se plaint jamais et se trompe souvent.", +"Day {d}":"Jour {d}", +"Fire the AI":"Licencier l’IA", +"Large Peering Model":"Large Peering Model", +"An AI agent that answers every peering request and max-prefix alert for you, every day. {price}/year. Trained on twenty years of peering mailing lists.":"Un agent IA qui répond pour vous à chaque demande de peering et à chaque alerte max-prefix, tous les jours. {price}/an. Entraîné sur vingt ans de listes de diffusion sur le peering.", +"Hire it {mo}/mo":"L’embaucher {mo}/mois", +"Accept all requests":"Accepter toutes les demandes", +"Decline all requests":"Refuser toutes les demandes", +"Inbox zero. Enjoy it while it lasts.":"Inbox zéro. Profitez-en tant que ça dure.", +"No mail yet. Buy an IX port and it will come.":"Pas encore de courrier. Achetez un port IX, il viendra.", +"Augment ordered with {net}.
{eta}.":"Extension commandée chez {net}.
{eta}.", +"{net} does not do {port} PNIs.
Nothing smaller than 100G. Come back with more traffic, or a bigger optic.":"{net} ne fait pas de PNI en {port}.
Rien en dessous de 100G. Revenez avec plus de trafic, ou une optique plus grosse.", +"PNI with {net} ordered.
{eta}. A cross-connect in {dc}, once somebody finds the LOA.":"PNI avec {net} commandée.
{eta}. Un cross-connect chez {dc}, dès que quelqu’un aura retrouvé la LOA.", +"Your account manager found the order under a desk.
It is a month closer.":"Votre account manager a retrouvé la commande sous un bureau.
Elle a un mois d’avance.", +"“It is with the provisioning team.”
Nobody has ever met the provisioning team.":"« C’est chez l’équipe de provisioning. »
Personne n’a jamais rencontré l’équipe de provisioning.", +"“We are waiting on the colo for the cross-connect.”
The colo says it is waiting on them.":"« Nous attendons le colo pour le cross-connect. »
Le colo dit qu’il les attend.", +"Your ticket was merged into another ticket.
That ticket was closed as a duplicate of yours.":"Votre ticket a été fusionné avec un autre ticket.
Ce ticket a été fermé comme doublon du vôtre.", +"“Could you resend the LOA?”
You have sent it four times.":"« Pourriez-vous renvoyer la LOA ? »
Vous l’avez envoyée quatre fois.", +"Your account manager is on paternity leave.
His replacement is also on paternity leave.":"Votre account manager est en congé paternité.
Son remplaçant aussi.", +"Hello! I am Large Peering Model. I have read your inbox and I already have opinions.":"Bonjour ! Je suis Large Peering Model. J’ai lu votre boîte et j’ai déjà des avis.", +"Large Peering Model is hired.
Your inbox is its problem now. {price} a year, billed monthly.":"Large Peering Model est embauché.
Votre boîte, c’est son problème maintenant. {price} par an, facturés chaque mois.", +"The AI is gone.
It left a 40-page handover document. It is mostly about itself.":"L’IA est partie.
Elle a laissé un document de passation de 40 pages. Il parle surtout d’elle.", +"Large Peering Model is on it.":"Large Peering Model s’en occupe.", +"{n} session is down on its max-prefix limit.":"{n} session est coupée par sa limite max-prefix.", +"{n} sessions are down on their max-prefix limit.":"{n} sessions sont coupées par leur limite max-prefix.", +"{n} message waiting for an answer.":"{n} message attend une réponse.", +"{n} messages waiting for an answer.":"{n} messages attendent une réponse.", +"Inbox zero.":"Inbox zéro.", +"Open inbox":"Ouvrir la boîte", +"Augment on order: {port}, about {n} days to go.":"Extension commandée : {port}, encore environ {n} jours.", +"no 10G: {net} starts at 100G":"pas de 10G : {net} commence à 100G", +"sells PNIs down to 1G":"vend des PNI dès 1G", +"on order: {n} days":"commandée : {n} jours", +"PNI lead times":"Délais des PNI", +"A cross-connect with a small network takes a few weeks. The big content networks, Tier 1s and big eyeball networks quote 6 to 12 months for a new PNI or an augment, and the content networks and Tier 1s start at 100G. Doitsche Telekomm still sells 1G.":"Un cross-connect avec un petit réseau prend quelques semaines. Les grands réseaux de contenu, les Tier 1 et les grands opérateurs d’accès annoncent 6 à 12 mois pour une nouvelle PNI ou une extension, et les réseaux de contenu et les Tier 1 commencent à 100G. Doitsche Telekomm vend encore du 1G.", +"Every IX port brings peering requests and max-prefix alerts, in the Networks tab. A session that blows past its limit is down until you look: raise the limit for growth, keep it down for a leak. Ignore your mail and selective networks get pickier.":"Chaque port IX amène des demandes de peering et des alertes max-prefix, dans l’onglet Réseaux. Une session qui dépasse sa limite reste coupée tant que vous n’y regardez pas : relevez la limite si c’est de la croissance, laissez-la coupée si c’est une fuite. Ignorez votre courrier et les réseaux sélectifs deviennent plus exigeants.", }; diff --git a/site/i18n/it.js b/site/i18n/it.js index 4e2ce1c..664d7ef 100644 --- a/site/i18n/it.js +++ b/site/i18n/it.js @@ -1241,7 +1241,6 @@ "{n} new session at {ix}.
Small networks, but they add up, and they all count towards the club.":"{n} nuova sessione a {ix}.
Reti piccole, ma fanno numero, e contano tutte per il club.", "{n} new sessions at {ix}.
Small networks, but they add up, and they all count towards the club.":"{n} nuove sessioni a {ix}.
Reti piccole, ma fanno numero, e contano tutte per il club.", "{net} declined the PNI.
{why}":"{net} ha rifiutato il PNI.
{why}", -"PNI with {net} is up.
A cross-connect in {dc}. Private and fast.":"PNI con {net} attivo.
Un cross-connect in {dc}. Privato e veloce.", "{net} says not yet.
Send them {min}+ Gbps first.":"{net} dice: non ancora.
Prima mandagli {min}+ Gbps.", "{cache} installed in {city}!
{net} shipped it for free. You pay {mo}/mo power.":"{cache} installata a {city}!
{net} te l’ha spedita gratis. Tu paghi {mo}/mese di corrente.", "You need a POP in every city on the contract first.":"Prima ti serve un POP in ogni città del contratto.", @@ -2712,4 +2711,105 @@ "Loaded {name}. Check it, then deploy.":"{name} caricato. Controllalo, poi fai il deploy.", "Commit complete. Traffic down {p}.
The AI apologises for the confusion, and remains completely sure the script was right. Fix it from the NOC tab.":"Commit completato. Traffico giù del {p}.
L’IA si scusa per la confusione, e resta sicurissima che lo script fosse giusto. Correggilo dalla scheda NOC.", "Rules for your Auto-TE controller: which exits to prefer, which to avoid, and when to spill onto the next one. The editor’s help explains every rule and has ready-made scripts.":"Regole per il tuo controller Auto-TE: quali uscite preferire, quali evitare e quando passare alla successiva. L’aiuto dell’editor spiega ogni regola e ha script pronti.", +"Delivery: 6 to 12 months":"Consegna: da 6 a 12 mesi", +"Delivery: 2 to 6 weeks":"Consegna: da 2 a 6 settimane", +"Their team quotes {m} months":"Il loro team parla di {m} mesi", +"Ready in about {n} days":"Pronta in circa {n} giorni", +"on order":"in ordine", +"About {n} days to go. Nothing to do but wait, or chase it.":"Mancano circa {n} giorni. Non resta che aspettare, o sollecitare.", +"Chase it":"Sollecita", +"Cancel the order":"Annulla l’ordine", +"PNI with {net} is up in {city}.
A cross-connect in {dc}. Private and fast.":"La PNI con {net} è attiva a {city}.
Un cross-connect in {dc}. Privato e veloce.", +"Augment with {net} delivered in {city}.
Now {port}.":"Ampliamento con {net} consegnato a {city}.
Ora {port}.", +"No capacity in US East. You can join the waitlist; the waitlist is also out of capacity.":"Niente capacità in US East. Puoi iscriverti alla lista d’attesa; anche la lista d’attesa è senza capacità.", +"US East is sold out until further notice. Further notice is also sold out.":"US East è esaurito fino a nuovo avviso. Anche il nuovo avviso è esaurito.", +"Their peering team says US East is “capacity constrained”, which is cloud for “no”.":"Il loro team di peering dice che US East è “capacity constrained”, che in linguaggio cloud vuol dire “no”.", +"A new region is coming online soon. It has been coming online soon since 2019.":"Una nuova region arriverà presto. Arriva presto dal 2019.", +"Hi! We would like to peer with you at {ix}. Our PeeringDB record is up to date.":"Ciao! Vorremmo fare peering con voi a {ix}. Il nostro record su PeeringDB è aggiornato.", +"Dear Sir or Madam, please peer. We have three prefixes and very big plans.":"Gentile Signore o Signora, per favore fate peering. Abbiamo tre prefissi e progetti molto grandi.", +"We noticed you are at {ix}. So are we. Shall we?":"Abbiamo notato che siete a {ix}. Anche noi. Che ne dite?", +"Hello, please find attached our peering request as a Word document, scanned from a printout.":"Salve, in allegato la nostra richiesta di peering come documento Word, scansionato da una stampa.", +"Peering request, fifth attempt. Is anyone there?":"Richiesta di peering, quinto tentativo. C’è qualcuno?", +"Hey, quick one: can you peer with us at {ix}? We have a very important Minecraft server.":"Ehi, domanda veloce: potete fare peering con noi a {ix}? Abbiamo un server Minecraft molto importante.", +"Greetings. We are a fast-growing network. Last year we had one customer; this year we have two.":"Saluti. Siamo una rete in rapida crescita. L’anno scorso avevamo un cliente; quest’anno ne abbiamo due.", +"Please configure sessions with us at {ix}. We will do ours next week, or the week after.":"Per favore configurate le sessioni con noi a {ix}. Noi faremo le nostre la settimana prossima, o quella dopo.", +"Replied to a peering request with a haiku about BGP. No answer yet.":"Ha risposto a una richiesta di peering con un haiku sul BGP. Nessuna risposta per ora.", +"Signed you up for a webinar on “Peering in the Age of AI”.":"Ti ha iscritto a un webinar su “Il peering nell’era dell’IA”.", +"Opened a ticket with itself to review its own decisions. It approved them.":"Ha aperto un ticket a se stesso per rivedere le proprie decisioni. Le ha approvate.", +"Wrote a thousand-word apology to a network you never peered with.":"Ha scritto mille parole di scuse a una rete con cui non hai mai fatto peering.", +"Updated your PeeringDB record. Your NOC phone number is now a pizza place.":"Ha aggiornato il tuo record su PeeringDB. Il numero del tuo NOC ora è una pizzeria.", +"Asked NetChill’s peering team to “please provide more Netchill”.":"Ha chiesto al team di peering di NetChill di “fornire più Netchill, per favore”.", +"Responsive":"Reattivo", +"Average":"Nella media", +"Mostly ignores email":"Ignora quasi tutte le email", +"Black hole":"Buco nero", +"Max-prefix limit hit: {who} at {ix}.
The session is down until you look at it.":"Limite max-prefix superato: {who} a {ix}.
La sessione resta giù finché non ci guardi.", +"Inbox":"Posta", +"{who} asked a mailing list whether anyone has a working contact at {me}.
Their peering request sat in your inbox for a month.":"{who} ha chiesto su una mailing list se qualcuno ha un contatto funzionante da {me}.
La loro richiesta di peering è rimasta nella tua casella per un mese.", +"{who} at {ix} was sending a full table, and the max-prefix limit was the only thing stopping it. With the limit raised, {net}’s prefixes point at their basement. Traffic to {net} over transit is black-holed for a few days.":"{who} a {ix} stava mandando una full table, e il limite max-prefix era l’unica cosa che la fermava. Col limite alzato, i prefissi di {net} puntano alla loro cantina. Il traffico verso {net} via transito finisce in un buco nero per qualche giorno.", +"That was a route leak.
{who} was announcing {n} prefixes: a full table. Next time, keep it down.":"Era un route leak.
{who} annunciava {n} prefissi: una full table. La prossima volta, tienila giù.", +"Session with {who} is back up.
New limit: {n} prefixes. They promise to update PeeringDB.":"La sessione con {who} è di nuovo su.
Nuovo limite: {n} prefissi. Promettono di aggiornare PeeringDB.", +"Good call: it was a route leak.
{who} found a fat-fingered route map. The session comes back on its own in a few days.":"Ben fatto: era un route leak.
{who} ha trovato una route map scritta male. La sessione torna da sola tra qualche giorno.", +"The session stays down.
{who} will update PeeringDB and ask again. Eventually.":"La sessione resta giù.
{who} aggiornerà PeeringDB e chiederà di nuovo. Prima o poi.", +"Declined {who} at {ix}: “not a strategic fit”. They were.":"Ha rifiutato {who} a {ix}: “non strategico”. Lo era.", +"Raised the max-prefix limit for {who} at {ix} to {n}. They seemed nice.":"Ha alzato il limite max-prefix per {who} a {ix} a {n}. Sembravano simpatici.", +"Kept {who} down at {ix} for “suspicious growth”. They had grown by one customer.":"Ha tenuto giù {who} a {ix} per “crescita sospetta”. Erano cresciuti di un cliente.", +"Raised the max-prefix limit for {who} at {ix}. Correctly, this time.":"Ha alzato il limite max-prefix per {who} a {ix}. Correttamente, stavolta.", +"Kept {who} down at {ix}: it was a route leak. Nailed it.":"Ha tenuto giù {who} a {ix}: era un route leak. Centrato.", +"Answered your mail: {a} accepted, {d} declined.":"Ha risposto alla tua posta: {a} accettate, {d} rifiutate.", +"Tidied up a session it decided was unused: de-peered {who} at {ix}.":"Ha fatto ordine tra le sessioni che riteneva inutili: ha tolto il peering con {who} a {ix}.", +"{n} day ago":"{n} giorno fa", +"{n} days ago":"{n} giorni fa", +"today":"oggi", +"PeeringDB last updated {n} year ago":"PeeringDB aggiornato {n} anno fa", +"PeeringDB last updated {n} years ago":"PeeringDB aggiornato {n} anni fa", +"PeeringDB updated last month":"PeeringDB aggiornato il mese scorso", +"Max-prefix limit hit: {who} at {ix}":"Limite max-prefix superato: {who} a {ix}", +"Configured: {lim} prefixes. Received: {got}.":"Configurato: {lim} prefissi. Ricevuti: {got}.", +"Their PeeringDB says {lim}, last updated {n} year ago.":"Il loro PeeringDB dice {lim}, aggiornato {n} anno fa.", +"Their PeeringDB says {lim}, last updated {n} years ago.":"Il loro PeeringDB dice {lim}, aggiornato {n} anni fa.", +"Raise the limit":"Alza il limite", +"Keep it down":"Tienila giù", +"bumped":"sollecitata", +"Peering inbox":"Casella di peering", +"{n} unanswered":"{n} senza risposta", +"Every exchange port brings mail. Answer peering requests, and look at sessions that hit their max-prefix limit: is it growth, or a route leak? Unanswered mail gets you a reputation, and selective networks hear about it.":"Ogni porta IX porta posta. Rispondi alle richieste di peering e guarda le sessioni che superano il limite max-prefix: è crescita o un route leak? La posta senza risposta ti fa una reputazione, e le reti selettive lo vengono a sapere.", +"Your reputation":"La tua reputazione", +"Large Peering Model is answering your mail":"Large Peering Model risponde alla tua posta", +"{price}/year. It never sleeps, never complains and is often wrong.":"{price}/anno. Non dorme mai, non si lamenta mai e sbaglia spesso.", +"Day {d}":"Giorno {d}", +"Fire the AI":"Licenzia l’IA", +"Large Peering Model":"Large Peering Model", +"An AI agent that answers every peering request and max-prefix alert for you, every day. {price}/year. Trained on twenty years of peering mailing lists.":"Un agente IA che risponde per te a ogni richiesta di peering e allarme max-prefix, ogni giorno. {price}/anno. Addestrato su vent’anni di mailing list sul peering.", +"Hire it {mo}/mo":"Assumilo {mo}/mese", +"Accept all requests":"Accetta tutte le richieste", +"Decline all requests":"Rifiuta tutte le richieste", +"Inbox zero. Enjoy it while it lasts.":"Inbox zero. Goditela finché dura.", +"No mail yet. Buy an IX port and it will come.":"Ancora niente posta. Compra una porta IX e arriverà.", +"Augment ordered with {net}.
{eta}.":"Ampliamento ordinato con {net}.
{eta}.", +"{net} does not do {port} PNIs.
Nothing smaller than 100G. Come back with more traffic, or a bigger optic.":"{net} non fa PNI da {port}.
Niente sotto i 100G. Torna con più traffico, o con un’ottica più grande.", +"PNI with {net} ordered.
{eta}. A cross-connect in {dc}, once somebody finds the LOA.":"PNI con {net} ordinata.
{eta}. Un cross-connect in {dc}, appena qualcuno trova la LOA.", +"Your account manager found the order under a desk.
It is a month closer.":"Il tuo account manager ha trovato l’ordine sotto una scrivania.
È un mese più vicino.", +"“It is with the provisioning team.”
Nobody has ever met the provisioning team.":"“È in mano al team di provisioning.”
Nessuno ha mai conosciuto il team di provisioning.", +"“We are waiting on the colo for the cross-connect.”
The colo says it is waiting on them.":"“Stiamo aspettando il colo per il cross-connect.”
Il colo dice che sta aspettando loro.", +"Your ticket was merged into another ticket.
That ticket was closed as a duplicate of yours.":"Il tuo ticket è stato unito a un altro ticket.
Quel ticket è stato chiuso come duplicato del tuo.", +"“Could you resend the LOA?”
You have sent it four times.":"“Può rimandarci la LOA?”
L’hai mandata quattro volte.", +"Your account manager is on paternity leave.
His replacement is also on paternity leave.":"Il tuo account manager è in congedo di paternità.
Anche il suo sostituto è in congedo di paternità.", +"Hello! I am Large Peering Model. I have read your inbox and I already have opinions.":"Ciao! Sono Large Peering Model. Ho letto la tua casella e ho già delle opinioni.", +"Large Peering Model is hired.
Your inbox is its problem now. {price} a year, billed monthly.":"Large Peering Model è assunto.
La tua casella ora è un problema suo. {price} all’anno, fatturati ogni mese.", +"The AI is gone.
It left a 40-page handover document. It is mostly about itself.":"L’IA se n’è andata.
Ha lasciato un documento di passaggio di consegne di 40 pagine. Parla soprattutto di sé.", +"Large Peering Model is on it.":"Ci pensa Large Peering Model.", +"{n} session is down on its max-prefix limit.":"{n} sessione è giù per il limite max-prefix.", +"{n} sessions are down on their max-prefix limit.":"{n} sessioni sono giù per il limite max-prefix.", +"{n} message waiting for an answer.":"{n} messaggio aspetta una risposta.", +"{n} messages waiting for an answer.":"{n} messaggi aspettano una risposta.", +"Inbox zero.":"Inbox zero.", +"Open inbox":"Apri la casella", +"Augment on order: {port}, about {n} days to go.":"Ampliamento in ordine: {port}, mancano circa {n} giorni.", +"no 10G: {net} starts at 100G":"niente 10G: {net} parte da 100G", +"sells PNIs down to 1G":"vende PNI anche da 1G", +"on order: {n} days":"in ordine: {n} giorni", +"PNI lead times":"Tempi di consegna delle PNI", +"A cross-connect with a small network takes a few weeks. The big content networks, Tier 1s and big eyeball networks quote 6 to 12 months for a new PNI or an augment, and the content networks and Tier 1s start at 100G. Doitsche Telekomm still sells 1G.":"Un cross-connect con una rete piccola richiede qualche settimana. Le grandi reti di contenuti, i Tier 1 e i grandi operatori di accesso parlano di 6-12 mesi per una nuova PNI o un ampliamento, e le reti di contenuti e i Tier 1 partono da 100G. Doitsche Telekomm vende ancora 1G.", +"Every IX port brings peering requests and max-prefix alerts, in the Networks tab. A session that blows past its limit is down until you look: raise the limit for growth, keep it down for a leak. Ignore your mail and selective networks get pickier.":"Ogni porta IX porta richieste di peering e allarmi max-prefix, nella scheda Reti. Una sessione che supera il limite resta giù finché non ci guardi: alza il limite se è crescita, tienila giù se è un leak. Ignora la posta e le reti selettive diventano più esigenti.", }; diff --git a/site/i18n/pt.js b/site/i18n/pt.js index 56c7943..32667b0 100644 --- a/site/i18n/pt.js +++ b/site/i18n/pt.js @@ -1240,7 +1240,6 @@ "{n} new session at {ix}.
Small networks, but they add up, and they all count towards the club.":"{n} nova sessão em {ix}.
Redes pequenas, mas somam, e todas contam para o clube.", "{n} new sessions at {ix}.
Small networks, but they add up, and they all count towards the club.":"{n} novas sessões em {ix}.
Redes pequenas, mas somam, e todas contam para o clube.", "{net} declined the PNI.
{why}":"{net} recusou o PNI.
{why}", -"PNI with {net} is up.
A cross-connect in {dc}. Private and fast.":"PNI com {net} no ar.
Um cross-connect em {dc}. Privado e rápido.", "{net} says not yet.
Send them {min}+ Gbps first.":"{net} diz: ainda não.
Mande {min}+ Gbps pra eles primeiro.", "{cache} installed in {city}!
{net} shipped it for free. You pay {mo}/mo power.":"{cache} instalado em {city}!
{net} mandou de graça. Você paga {mo}/mês de energia.", "You need a POP in every city on the contract first.":"Primeiro você precisa de um POP em cada cidade do contrato.", @@ -2712,4 +2711,105 @@ "Loaded {name}. Check it, then deploy.":"{name} carregado. Verifique e depois faça o deploy.", "Commit complete. Traffic down {p}.
The AI apologises for the confusion, and remains completely sure the script was right. Fix it from the NOC tab.":"Commit concluído. Tráfego caiu {p}.
A IA pede desculpas pela confusão, e continua totalmente certa de que o script estava correto. Corrija pela aba NOC.", "Rules for your Auto-TE controller: which exits to prefer, which to avoid, and when to spill onto the next one. The editor’s help explains every rule and has ready-made scripts.":"Regras para o seu controlador Auto-TE: quais saídas preferir, quais evitar e quando passar para a próxima. A ajuda do editor explica cada regra e tem scripts prontos.", +"Delivery: 6 to 12 months":"Entrega: de 6 a 12 meses", +"Delivery: 2 to 6 weeks":"Entrega: de 2 a 6 semanas", +"Their team quotes {m} months":"A equipe deles fala em {m} meses", +"Ready in about {n} days":"Pronta em cerca de {n} dias", +"on order":"encomendada", +"About {n} days to go. Nothing to do but wait, or chase it.":"Faltam cerca de {n} dias. Não há nada a fazer além de esperar, ou cobrar.", +"Chase it":"Cobrar", +"Cancel the order":"Cancelar o pedido", +"PNI with {net} is up in {city}.
A cross-connect in {dc}. Private and fast.":"A PNI com {net} está no ar em {city}.
Um cross-connect em {dc}. Privado e rápido.", +"Augment with {net} delivered in {city}.
Now {port}.":"Ampliação com {net} entregue em {city}.
Agora {port}.", +"No capacity in US East. You can join the waitlist; the waitlist is also out of capacity.":"Sem capacidade em US East. Você pode entrar na lista de espera; a lista de espera também está sem capacidade.", +"US East is sold out until further notice. Further notice is also sold out.":"US East está esgotado até segunda ordem. A segunda ordem também esgotou.", +"Their peering team says US East is “capacity constrained”, which is cloud for “no”.":"O time de peering deles diz que US East está “capacity constrained”, que na língua da nuvem quer dizer “não”.", +"A new region is coming online soon. It has been coming online soon since 2019.":"Uma nova região vai entrar no ar em breve. Ela está entrando no ar em breve desde 2019.", +"Hi! We would like to peer with you at {ix}. Our PeeringDB record is up to date.":"Oi! Gostaríamos de fazer peering com vocês no {ix}. Nosso registro no PeeringDB está atualizado.", +"Dear Sir or Madam, please peer. We have three prefixes and very big plans.":"Prezado senhor ou senhora, por favor façam peering. Temos três prefixos e planos enormes.", +"We noticed you are at {ix}. So are we. Shall we?":"Vimos que vocês estão no {ix}. Nós também. Vamos?", +"Hello, please find attached our peering request as a Word document, scanned from a printout.":"Olá, segue em anexo nosso pedido de peering como documento Word, escaneado de uma impressão.", +"Peering request, fifth attempt. Is anyone there?":"Pedido de peering, quinta tentativa. Tem alguém aí?", +"Hey, quick one: can you peer with us at {ix}? We have a very important Minecraft server.":"E aí, rapidinho: dá pra fazer peering com a gente no {ix}? Temos um servidor de Minecraft muito importante.", +"Greetings. We are a fast-growing network. Last year we had one customer; this year we have two.":"Saudações. Somos uma rede em rápido crescimento. Ano passado tínhamos um cliente; este ano temos dois.", +"Please configure sessions with us at {ix}. We will do ours next week, or the week after.":"Por favor configurem as sessões com a gente no {ix}. Nós faremos as nossas semana que vem, ou na outra.", +"Replied to a peering request with a haiku about BGP. No answer yet.":"Respondeu a um pedido de peering com um haicai sobre BGP. Nenhuma resposta ainda.", +"Signed you up for a webinar on “Peering in the Age of AI”.":"Inscreveu você num webinar sobre “Peering na era da IA”.", +"Opened a ticket with itself to review its own decisions. It approved them.":"Abriu um chamado para si mesma para revisar as próprias decisões. Aprovou todas.", +"Wrote a thousand-word apology to a network you never peered with.":"Escreveu um pedido de desculpas de mil palavras para uma rede com quem você nunca fez peering.", +"Updated your PeeringDB record. Your NOC phone number is now a pizza place.":"Atualizou seu registro no PeeringDB. O telefone do seu NOC agora é de uma pizzaria.", +"Asked NetChill’s peering team to “please provide more Netchill”.":"Pediu ao time de peering da NetChill “mais Netchill, por favor”.", +"Responsive":"Responde rápido", +"Average":"Na média", +"Mostly ignores email":"Ignora quase todos os e-mails", +"Black hole":"Buraco negro", +"Max-prefix limit hit: {who} at {ix}.
The session is down until you look at it.":"Limite de max-prefix estourado: {who} no {ix}.
A sessão fica fora até você dar uma olhada.", +"Inbox":"Caixa de entrada", +"{who} asked a mailing list whether anyone has a working contact at {me}.
Their peering request sat in your inbox for a month.":"{who} perguntou numa lista de e-mails se alguém tem um contato que funcione na {me}.
O pedido de peering deles ficou um mês na sua caixa de entrada.", +"{who} at {ix} was sending a full table, and the max-prefix limit was the only thing stopping it. With the limit raised, {net}’s prefixes point at their basement. Traffic to {net} over transit is black-holed for a few days.":"{who} no {ix} estava mandando uma tabela completa, e o limite de max-prefix era a única coisa que segurava. Com o limite aumentado, os prefixos da {net} apontam para o porão deles. O tráfego para a {net} via trânsito vai para um buraco negro por alguns dias.", +"That was a route leak.
{who} was announcing {n} prefixes: a full table. Next time, keep it down.":"Era um vazamento de rotas.
{who} anunciava {n} prefixos: uma tabela completa. Da próxima vez, deixe fora.", +"Session with {who} is back up.
New limit: {n} prefixes. They promise to update PeeringDB.":"A sessão com {who} voltou.
Novo limite: {n} prefixos. Eles prometem atualizar o PeeringDB.", +"Good call: it was a route leak.
{who} found a fat-fingered route map. The session comes back on its own in a few days.":"Boa: era um vazamento de rotas.
{who} achou um route map digitado errado. A sessão volta sozinha em alguns dias.", +"The session stays down.
{who} will update PeeringDB and ask again. Eventually.":"A sessão continua fora.
{who} vai atualizar o PeeringDB e pedir de novo. Algum dia.", +"Declined {who} at {ix}: “not a strategic fit”. They were.":"Recusou {who} no {ix}: “não é estratégico”. Era.", +"Raised the max-prefix limit for {who} at {ix} to {n}. They seemed nice.":"Aumentou o limite de max-prefix de {who} no {ix} para {n}. Pareciam simpáticos.", +"Kept {who} down at {ix} for “suspicious growth”. They had grown by one customer.":"Deixou {who} fora no {ix} por “crescimento suspeito”. Eles tinham ganhado um cliente.", +"Raised the max-prefix limit for {who} at {ix}. Correctly, this time.":"Aumentou o limite de max-prefix de {who} no {ix}. Corretamente, desta vez.", +"Kept {who} down at {ix}: it was a route leak. Nailed it.":"Deixou {who} fora no {ix}: era um vazamento de rotas. Acertou em cheio.", +"Answered your mail: {a} accepted, {d} declined.":"Respondeu seus e-mails: {a} aceitos, {d} recusados.", +"Tidied up a session it decided was unused: de-peered {who} at {ix}.":"Fez uma faxina nas sessões que achou inúteis: desfez o peering com {who} no {ix}.", +"{n} day ago":"há {n} dia", +"{n} days ago":"há {n} dias", +"today":"hoje", +"PeeringDB last updated {n} year ago":"PeeringDB atualizado há {n} ano", +"PeeringDB last updated {n} years ago":"PeeringDB atualizado há {n} anos", +"PeeringDB updated last month":"PeeringDB atualizado no mês passado", +"Max-prefix limit hit: {who} at {ix}":"Limite de max-prefix estourado: {who} no {ix}", +"Configured: {lim} prefixes. Received: {got}.":"Configurado: {lim} prefixos. Recebidos: {got}.", +"Their PeeringDB says {lim}, last updated {n} year ago.":"O PeeringDB deles diz {lim}, atualizado há {n} ano.", +"Their PeeringDB says {lim}, last updated {n} years ago.":"O PeeringDB deles diz {lim}, atualizado há {n} anos.", +"Raise the limit":"Aumentar o limite", +"Keep it down":"Deixar fora", +"bumped":"cobrado de novo", +"Peering inbox":"Caixa de peering", +"{n} unanswered":"{n} sem resposta", +"Every exchange port brings mail. Answer peering requests, and look at sessions that hit their max-prefix limit: is it growth, or a route leak? Unanswered mail gets you a reputation, and selective networks hear about it.":"Cada porta de IX traz e-mails. Responda aos pedidos de peering e olhe as sessões que estouraram o limite de max-prefix: é crescimento ou vazamento de rotas? E-mail sem resposta te dá uma reputação, e as redes seletivas ficam sabendo.", +"Your reputation":"Sua reputação", +"Large Peering Model is answering your mail":"Large Peering Model está respondendo seus e-mails", +"{price}/year. It never sleeps, never complains and is often wrong.":"{price}/ano. Nunca dorme, nunca reclama e erra com frequência.", +"Day {d}":"Dia {d}", +"Fire the AI":"Demitir a IA", +"Large Peering Model":"Large Peering Model", +"An AI agent that answers every peering request and max-prefix alert for you, every day. {price}/year. Trained on twenty years of peering mailing lists.":"Um agente de IA que responde por você a cada pedido de peering e alerta de max-prefix, todo dia. {price}/ano. Treinado em vinte anos de listas de e-mails sobre peering.", +"Hire it {mo}/mo":"Contratar {mo}/mês", +"Accept all requests":"Aceitar todos os pedidos", +"Decline all requests":"Recusar todos os pedidos", +"Inbox zero. Enjoy it while it lasts.":"Caixa zerada. Aproveite enquanto dura.", +"No mail yet. Buy an IX port and it will come.":"Nenhum e-mail ainda. Compre uma porta de IX que eles chegam.", +"Augment ordered with {net}.
{eta}.":"Ampliação encomendada com {net}.
{eta}.", +"{net} does not do {port} PNIs.
Nothing smaller than 100G. Come back with more traffic, or a bigger optic.":"{net} não faz PNI de {port}.
Nada abaixo de 100G. Volte com mais tráfego, ou uma óptica maior.", +"PNI with {net} ordered.
{eta}. A cross-connect in {dc}, once somebody finds the LOA.":"PNI com {net} encomendada.
{eta}. Um cross-connect em {dc}, assim que alguém achar a LOA.", +"Your account manager found the order under a desk.
It is a month closer.":"Seu gerente de contas achou o pedido embaixo de uma mesa.
Está um mês mais perto.", +"“It is with the provisioning team.”
Nobody has ever met the provisioning team.":"“Está com o time de provisionamento.”
Ninguém nunca conheceu o time de provisionamento.", +"“We are waiting on the colo for the cross-connect.”
The colo says it is waiting on them.":"“Estamos esperando o colo fazer o cross-connect.”
O colo diz que está esperando por eles.", +"Your ticket was merged into another ticket.
That ticket was closed as a duplicate of yours.":"Seu chamado foi juntado a outro chamado.
Esse chamado foi fechado como duplicado do seu.", +"“Could you resend the LOA?”
You have sent it four times.":"“Pode reenviar a LOA?”
Você já mandou quatro vezes.", +"Your account manager is on paternity leave.
His replacement is also on paternity leave.":"Seu gerente de contas está de licença-paternidade.
O substituto dele também está de licença-paternidade.", +"Hello! I am Large Peering Model. I have read your inbox and I already have opinions.":"Olá! Eu sou o Large Peering Model. Li sua caixa de entrada e já tenho opiniões.", +"Large Peering Model is hired.
Your inbox is its problem now. {price} a year, billed monthly.":"Large Peering Model contratado.
Sua caixa de entrada agora é problema dele. {price} por ano, cobrados por mês.", +"The AI is gone.
It left a 40-page handover document. It is mostly about itself.":"A IA foi embora.
Deixou um documento de transição de 40 páginas. Ele fala principalmente dela mesma.", +"Large Peering Model is on it.":"Large Peering Model está cuidando disso.", +"{n} session is down on its max-prefix limit.":"{n} sessão está fora pelo limite de max-prefix.", +"{n} sessions are down on their max-prefix limit.":"{n} sessões estão fora pelo limite de max-prefix.", +"{n} message waiting for an answer.":"{n} mensagem esperando resposta.", +"{n} messages waiting for an answer.":"{n} mensagens esperando resposta.", +"Inbox zero.":"Caixa zerada.", +"Open inbox":"Abrir a caixa", +"Augment on order: {port}, about {n} days to go.":"Ampliação encomendada: {port}, faltam cerca de {n} dias.", +"no 10G: {net} starts at 100G":"sem 10G: {net} começa em 100G", +"sells PNIs down to 1G":"vende PNI a partir de 1G", +"on order: {n} days":"encomendada: {n} dias", +"PNI lead times":"Prazos de PNI", +"A cross-connect with a small network takes a few weeks. The big content networks, Tier 1s and big eyeball networks quote 6 to 12 months for a new PNI or an augment, and the content networks and Tier 1s start at 100G. Doitsche Telekomm still sells 1G.":"Um cross-connect com uma rede pequena leva algumas semanas. As grandes redes de conteúdo, os Tier 1 e as grandes operadoras de acesso falam em 6 a 12 meses para uma PNI nova ou uma ampliação, e as redes de conteúdo e os Tier 1 começam em 100G. A Doitsche Telekomm ainda vende 1G.", +"Every IX port brings peering requests and max-prefix alerts, in the Networks tab. A session that blows past its limit is down until you look: raise the limit for growth, keep it down for a leak. Ignore your mail and selective networks get pickier.":"Cada porta de IX traz pedidos de peering e alertas de max-prefix, na aba Redes. Uma sessão que estoura o limite fica fora até você olhar: aumente o limite se for crescimento, deixe fora se for vazamento. Ignore seus e-mails e as redes seletivas ficam mais exigentes.", }; diff --git a/site/index.html b/site/index.html index 07973b1..9169896 100644 --- a/site/index.html +++ b/site/index.html @@ -259,6 +259,7 @@ section h3{font-size:17px;margin-bottom:6px;display:flex;align-items:center;gap: .setline>span{font-weight:800} .thb{font:inherit;font-weight:900;background:none;border:0;padding:0;cursor:pointer;color:inherit} .ttop{margin:4px 0;padding:4px 8px;border-left:3px solid #FF8A3D;background:#FFF6EC;border-radius:6px} +.ibx{border:2px solid var(--line,#DDE3EE);border-radius:12px;padding:8px 10px;margin:8px 0;background:#fff}.ibx .nm{font-weight:800}.ibx.mp{border-color:#FF5A5F;background:#FFF1F1}.ibx.ai{border-color:#8E5CF7;background:#F7F2FF}.ibx .term{font-size:11.5px;white-space:pre-wrap;max-height:180px;overflow:auto}.ibx .cnt{display:inline-block;min-width:18px;padding:0 5px;border-radius:9px;background:var(--me);color:#fff;font-size:11px;text-align:center}.ibx .cnt.red{background:#FF5A5F} .aibtn{background:linear-gradient(90deg,#8E5CF7,#E84FA8);color:#fff}.aisay{background:#F3ECFF;border:2px solid #8E5CF7;border-radius:10px;padding:8px 10px;color:var(--ink)} .tehelp h3{margin:14px 0 4px}.tehelp ul{margin:4px 0;padding-left:18px}.tehelp li{margin:4px 0;font-size:13.5px;line-height:1.4}.tehelp dt{margin-top:8px}.tehelp dd{margin:2px 0 0;font-size:13px;line-height:1.4;color:var(--ink2)}.tehelp code{font:600 12.5px ui-monospace,Menlo,Consolas,monospace;background:#1E2640;color:#E6F0FF;border-radius:6px;padding:1px 6px;word-break:break-word} .terec{display:flex;align-items:center;gap:10px;justify-content:space-between;border-top:2px dashed var(--line,#DDE3EE);padding:8px 0}.terec .btn{flex:none} @@ -1428,7 +1429,7 @@ const GOALS=[ {id:'bz',t:tr('Sign a business customer'),d:tr('Businesses show up with a $ bubble. You need a POP in their city. Check the Deals tab.'),r:12500,ok:()=>S.biz.some(b=>!b.scripted)}, {id:'rd',t:tr('Survive a failure'),d:tr('Things break all the time. Build a second path or a second upstream so traffic reroutes when something dies.'),r:12500,ok:()=>S.stats.survived>0}, {id:'ca',t:tr('Host an embedded cache'),d:tr('Big CDNs give you free cache boxes once you send them enough traffic. Free bandwidth, just add power.'),r:12500,ok:()=>S.caches.length>0}, - {id:'pn',t:tr('Set up a PNI'),d:tr('A private cross-connect to one network in the same data center, for when traffic outgrows the IX.'),r:15000,ok:()=>S.pni.length>0}, + {id:'pn',t:tr('Set up a PNI'),d:tr('A private cross-connect to one network in the same data center, for when traffic outgrows the IX.'),r:15000,ok:()=>S.pni.some(pniOn)}, {id:'scrub',t:tr('Stand up DDoS defences'),d:tr('Build a scrubbing center from a POP\'s Infra tab. It cleans attacks up to its capacity and lets you sell DDoS protection.'),r:20000,ok:()=>hasScrub()}, {id:'c3',t:tr('Go global'),d:tr('Have POPs on 3 continents. Subsea cables cost a fortune, so plan the route.'),r:50000,ok:()=>regionsCount()>=3}, {id:'t2',t:tr('Become a Tier 2'),d:tr('5+ POPs, ports on 3+ IXs and 15+ peering sessions.'),r:50000,ok:()=>isTier2()}, @@ -1632,7 +1633,7 @@ function trPaths(src){const live=S.links.filter(l=>!linkDown(l)),rem=remoteCitie const path=dst=>{if(dist[dst]===undefined)return null;const out=[];let v=dst;while(v!==src){const l=prev[v];out.unshift({l,from:l.a===v?l.b:l.a,to:v});v=l.a===v?l.b:l.a;}return out;};return {dist,path};} function trExits(net){const day=S.day,ev=S.ev,leak=ev.leak&&ev.leak.until>day?ev.leak.net:null,out=[]; for(const x of S.caches)if(x.net===net&&popUp(x.city)&&!siteDown(x.city,'a'))out.push({k:'c',rank:0,city:x.city,pref:'normal',lab:tr('{name} cache',{name:NET[net].cache.name}),used:R.useCache[x.id]||0,cap:CACHE_CAP}); - for(const p of S.pni)if(p.net===net&&popUp(p.city)&&liveN(p.city,p.site,p.n))out.push({k:'p',rank:1,city:p.city,pref:p.pref||'normal',lab:tr('PNI with {net}',{net:NET[net].name}),used:R.usePni[p.id]||0,cap:liveCap(PORT[p.tier].g,p.city,p.site,p.n)}); + for(const p of S.pni)if(p.net===net&&pniOn(p)&&popUp(p.city)&&liveN(p.city,p.site,p.n))out.push({k:'p',rank:1,city:p.city,pref:p.pref||'normal',lab:tr('PNI with {net}',{net:NET[net].name}),used:R.usePni[p.id]||0,cap:liveCap(pniG(p),p.city,p.site,p.n)}); for(const c in S.ixp)if(ixSessions(c).has(net)&&(popUp(ixCity(c))||remoteCities().includes(ixCity(c)))&&!(ev.ixdown&&ev.ixdown[c]>day))out.push({k:'ix',rank:2,city:ixCity(c),id:c,pref:(S.ixPref&&S.ixPref[c])||'normal',lab:tr('{ix} peering',{ix:ixName(c)}),used:R.useIx[c]||0,cap:ixCap(c)}); for(const t of S.transit)if(popUp(t.city)&&!(t.down>day)&&liveN(t.city,t.site,t.n)&&net!==leak&&!((ev.depeer>day||scnRule('spat'))&&t.net==='cog'&&net==='ggl'))out.push({k:'t',rank:3,city:t.city,pref:t.pref||'normal',lab:tr('{name} transit',{name:NET[t.net].name}),tnet:t.net,used:R.useT[t.id]||0,cap:liveCap(PORT[t.tier].g,t.city,t.site,t.n)}); return out;} @@ -1709,7 +1710,7 @@ function scenarioModal(){const wk=weekly(),h=scnHof();let best=null;try{best=JSO function newGame(name,home){ S={v:1,name,asn:200000+Math.floor(_rand()*15000),home,day:0,cash:START_CASH, ltv:2,t1v:2,seen:NETS.map(n=>n.id),spares:{},pops:{[home]:{day:0,bb:null,boost:0,down:0,routers:1,gen:false}},links:[],nni:[],transit:[],ixp:{},rs:{},peers:{},pni:[],caches:[],biz:[],offers:[],myIx:{}, - done:{},inc:[],ev:{},priceMul:1,nextFail:45,nextEvent:40,usedNames:[],stats:{survived:0,incidents:0,peak:0},cnLic:{state:'none'},scrubs:[],scrubMode:'always',won:false,lost:false,neg:0,loans:[],loanOffers:[],loanStrikes:0}; + done:{},inc:[],ev:{},priceMul:1,nextFail:45,nextEvent:40,usedNames:[],stats:{survived:0,incidents:0,peak:0},cnLic:{state:'none'},scrubs:[],scrubMode:'always',won:false,lost:false,neg:0,loans:[],loanOffers:[],loanStrikes:0,inbox:{items:[],down:{},tiny:{},rep:0,bot:false,log:[],seq:0}}; } /* ================= HELPERS ================= */ @@ -1743,7 +1744,7 @@ function ixCap(c){return ixLagF(c)*(S.myIx[c]?myFab(c).g*(myIxLive(c)?1:0):liveC function ixSessions(c){ const s=new Set(); if(S.ixp[c]===undefined)return s; for(const id of ixMembers(c)){const n=NET[id]; - if(S.peers[id+'@'+c]&&!snub(id,c)&&!(isRemote(c)&&noRemote(id)))s.add(id); + if(S.peers[id+'@'+c]&&!snub(id,c)&&!(isRemote(c)&&noRemote(id))&&!mpDown(id,c))s.add(id); else if(S.rs[c]&&n.pol==='open')s.add(id); else if(S.myIx[c]&&(n.pol==='open'||n.pol==='selective'))s.add(id);} return s; @@ -1756,6 +1757,101 @@ function t1Club(){ if(R.sessions<20)miss.push(tr('20+ peering sessions ({n})',{n:R.sessions})); return {ok:!miss.length,missing:miss}; } +/* ---------- PNIs with the big networks: months of lead time and no small ports ---------- + Big content networks, Tier 1s and big eyeball networks quote 6 to 12 months for a PNI or an augment, and + the content networks and Tier 1s start at 100G. Doitsche Telekomm sells PNIs down to 1G, and takes its time too. */ +const pniBig=id=>{const n=NET[id];return n.type==='t1'||(n.type==='cdn'&&n.pol!=='open')||(n.type==='eye'&&n.share>=0.02);}; +const pniMin=id=>{const n=NET[id];return n.type==='t1'||(n.type==='cdn'&&n.pol!=='open')?1:0;}; +const pniG1=id=>id==='dtk'; +// A beer with their peering coordinator at a conference halves the wait. It is how it really works. +const pniLead=id=>{const n=pniBig(id)?180+Math.floor(Math.random()*186):14+Math.floor(Math.random()*29);return S.conf&&S.conf.until>S.day?Math.round(n/2):n;}; +const pniG=p=>p.g1?1:PORT[p.tier].g,pniPN=p=>p.g1?'1G':PORT[p.tier].n,pniOn=p=>!(p.ready>S.day); +const pniEta=id=>pniBig(id)?tr('Delivery: 6 to 12 months'):tr('Delivery: 2 to 6 weeks'); +const PNI_G1_COST=1200,pniWhen=n=>n>=60?tr('Their team quotes {m} months',{m:Math.round(n/30)}):tr('Ready in about {n} days',{n}); +function pniWait(p,c){return `
${(p.n||1)>1?p.n+'×':''}${pniPN(p)} PNI${tr('on order')}
${tr('About {n} days to go. Nothing to do but wait, or chase it.',{n:Math.max(0,p.ready-S.day)})}
${btn(tr('Chase it'),'pniChase',{id:p.id},'ghost sm')}${btn(UI.confirm===p.id?tr('Really remove?'):tr('Cancel the order'),'cancelPni',{id:p.id},'ghost sm')}
`;} +function pniDay(d){for(const p of S.pni){const nm=esc(NET[p.net].name),city=esc(CITY[p.city].name); + if(p.ready===d)toast(tr('PNI with {net} is up in {city}.
A cross-connect in {dc}. Private and fast.',{net:nm,city,dc:esc(CITY[p.city].dc)}),'good'); + if(p.up&&p.up.ready<=d){p.tier=p.up.tier;p.n=p.up.n;if(p.up.g1)p.g1=true;else delete p.g1;delete p.up;toast(tr('Augment with {net} delivered in {city}.
Now {port}.',{net:nm,city,port:((p.n||1)>1?p.n+'×':'')+pniPN(p)}),'good');}}} +// Microsnoft has no capacity on the US east coast. Not for a PNI, not at an exchange, not for anyone. +const US_EAST=['ash','nyc','bos','atn','mia']; +const MSF_NOPE=[N_('No capacity in US East. You can join the waitlist; the waitlist is also out of capacity.'),N_('US East is sold out until further notice. Further notice is also sold out.'),N_('Their peering team says US East is “capacity constrained”, which is cloud for “no”.'),N_('A new region is coming online soon. It has been coming online soon since 2019.')]; +const msfNope=(id,city)=>id==='msf'&&!!city&&US_EAST.includes(ixCity(city)); +/* ---------- The peering inbox ---------- + Every exchange port brings mail: peering requests from networks nobody has heard of, and sessions that drop + because someone's PeeringDB says 50 prefixes and they now send 400 (or a full table). Answer it, or hire an AI. */ +const AI_MO=Math.round(20e6/12),INBOX_MAX=80,IBX_LEAKS=['nfx','ggl','fbk','amz','msf']; +const TINY=['Basement Broadband','Uncle Dave’s WISP','Fibre Fiesta','Raspberry Pi Transit','Vanity ASN Ltd','Moonshot Crypto Hosting','Minecraft Collective','Bob’s Bits','Homelab Heroes','Hackerspace Uplink','Tiny Tower Networks','Pigeon Post IP','Retro BBS Revival','Overkill Home Network','Two Guys and a Rack','Big Dreams Small Prefix','Mesh-y Business','Garden Shed Datacenter','Carrier-Grade NAT Fan Club','LIR in a Box','Yet Another VPN','Grandma’s Fibre Co-op','Seedbox Society','The /24 That Could']; +const REQ_SAY=[N_('Hi! We would like to peer with you at {ix}. Our PeeringDB record is up to date.'),N_('Dear Sir or Madam, please peer. We have three prefixes and very big plans.'),N_('We noticed you are at {ix}. So are we. Shall we?'),N_('Hello, please find attached our peering request as a Word document, scanned from a printout.'),N_('Peering request, fifth attempt. Is anyone there?'),N_('Hey, quick one: can you peer with us at {ix}? We have a very important Minecraft server.'),N_('Greetings. We are a fast-growing network. Last year we had one customer; this year we have two.'),N_('Please configure sessions with us at {ix}. We will do ours next week, or the week after.')]; +const IBX_AI=[N_('Replied to a peering request with a haiku about BGP. No answer yet.'),N_('Signed you up for a webinar on “Peering in the Age of AI”.'),N_('Opened a ticket with itself to review its own decisions. It approved them.'),N_('Wrote a thousand-word apology to a network you never peered with.'),N_('Updated your PeeringDB record. Your NOC phone number is now a pizza place.'),N_('Asked NetChill’s peering team to “please provide more Netchill”.')]; +function ibx(){if(!S.inbox||typeof S.inbox!=='object')S.inbox={items:[],down:{},tiny:{},rep:0,bot:false,log:[],seq:0};return S.inbox;} +// Reputation nudges selective networks by up to 10% either way: worth caring about, never a wall. +const repMul=()=>1-clamp((S.inbox&&S.inbox.rep)||0,-10,5)*0.01; +const repName=r=>r>=1?tr('Responsive'):r>=-2?tr('Average'):r>=-6?tr('Mostly ignores email'):tr('Black hole'); +const ibxOpen=()=>S.inbox?S.inbox.items.length:0,ibxUrgent=()=>S.inbox?S.inbox.items.filter(x=>x.k==='mp').length:0; +const mpDown=(id,c)=>{const t=S.inbox&&S.inbox.down[id+'@'+c];return !!t&&t>S.day;}; +const ibxWho=x=>x.net?NET[x.net].name:x.nm,ibxAsn=x=>x.net?NET[x.net].asn:x.asn; +function ibxLog(m,a){const I=ibx();I.log.unshift({d:S.day,m,a:a||{}});I.log.length=Math.min(I.log.length,40);} +function inboxDay(d){const I=ibx(),ixs=Object.keys(S.ixp); + // new peering requests: more exchange ports, more mail + if(ixs.length&&Math.random(){const n=NET[id];return !set.has(id)&&n.type!=='t1'&&n.type!=='cdn'&&n.pol!=='paid'&&n.share<=0.006&&!I.items.some(x=>x.net===id&&x.ix===c);}); + const it={id:++I.seq,k:'req',ix:c,day:d,stale:Math.random()<0.6,yrs:1+Math.floor(Math.random()*9),say:Math.floor(Math.random()*REQ_SAY.length)}; + if(real.length&&Math.random()<0.4)it.net=pick(real);else{it.nm=pick(TINY);it.asn=Math.random()<0.05?64512+Math.floor(Math.random()*1000):200000+Math.floor(Math.random()*200000);} + I.items.push(it);} + // max-prefix: someone grew past what their PeeringDB says, or leaked a full table + const ses=Object.keys(S.peers).filter(k=>{const n=NET[k.split('@')[0]];return n&&n.type!=='cdn'&&n.type!=='t1'&&!mpDown(...k.split('@'));}).map(k=>({key:k,net:k.split('@')[0],ix:k.split('@')[1]})) + .concat(Object.keys(I.tiny).map(a=>({key:'t'+a,nm:I.tiny[a].nm,asn:+a,ix:I.tiny[a].ix,stale:I.tiny[a].stale}))); + if(ses.length&&Math.random()y.k==='mp'&&y.key===x.key)){ + const lim=pick([10,20,50,100,200,500,1000]),leak=Math.random()<0.3,yrs=1+Math.floor(Math.random()*9); + I.items.push({id:++I.seq,k:'mp',key:x.key,net:x.net,nm:x.nm,asn:x.asn,ix:x.ix,day:d,lim,got:leak?940000+Math.floor(Math.random()*90000):Math.ceil(lim*(1.15+Math.random()*1.6)),leak,yrs}); + // A session that blows its limit is down for at most a few weeks: the other side eventually notices too. + if(x.net){I.down[x.key]=d+20+Math.floor(Math.random()*20);toast(tr('Max-prefix limit hit: {who} at {ix}.
The session is down until you look at it.',{who:esc(ibxWho(x)),ix:esc(ixName(x.ix))}),'bad',[{l:tr('Inbox'),act:'inbox',args:{}}]);}}} + // unanswered mail: requests go stale and people start asking around about you + for(const x of I.items){if(x.k==='mp')I.rep-=0.05;else if(d-x.day===14)x.bump=1;} + // A max-prefix alert nobody answers resolves itself in the end: the other side raises it, or gives up. + I.items=I.items.filter(x=>x.k!=='mp'||(x.net?(I.down[x.key]||0)>d:d-x.day<=30)); + const old=I.items.filter(x=>x.k==='req'&&d-x.day>30);if(old.length){I.rep-=0.25*old.length;I.items=I.items.filter(x=>!old.includes(x)); + if(old.some(x=>x.net))toast(tr('{who} asked a mailing list whether anyone has a working contact at {me}.
Their peering request sat in your inbox for a month.',{who:esc(ibxWho(old.find(x=>x.net))),me:esc(S.name)}),'bad',[{l:tr('Inbox'),act:'inbox',args:{}}]);} + while(I.items.length>INBOX_MAX){const i=I.items.findIndex(x=>x.k==='req');if(i<0)break;I.items.splice(i,1);I.rep-=0.5;} + I.rep=clamp(I.rep,-10,5); + if(I.bot)inboxBot();} +// Answer one item. a: accept | decline | raise | keep. Returns false when the item is gone. +function ibxAnswer(id,a,bot){const I=ibx(),i=I.items.findIndex(x=>x.id===id);if(i<0)return false;const x=I.items[i];I.items.splice(i,1);const who=ibxWho(x),ix=ixName(x.ix); + if(x.k==='req'){if(a==='accept'){if(x.net){if(S.ixp[x.ix]!==undefined)S.peers[x.net+'@'+x.ix]=true;}else if(Object.keys(I.tiny).length<200)I.tiny[x.asn]={nm:x.nm,ix:x.ix,stale:!!x.stale};I.rep+=0.3;}else I.rep+=0.2;} + else if(a==='raise'){delete I.down[x.key];if(x.leak){const n=pick(IBX_LEAKS);S.ev.leak={net:n,until:S.day+4}; + addInc({type:'leak',ref:n,until:S.day+4,msg:tr('{who} at {ix} was sending a full table, and the max-prefix limit was the only thing stopping it. With the limit raised, {net}’s prefixes point at their basement. Traffic to {net} over transit is black-holed for a few days.',{who,ix,net:NET[n].name}),cost:0}); + if(!bot)toast(tr('That was a route leak.
{who} was announcing {n} prefixes: a full table. Next time, keep it down.',{who:esc(who),n:x.got.toLocaleString()}),'bad');I.rep-=1;} + else{I.rep+=0.3;if(!bot)toast(tr('Session with {who} is back up.
New limit: {n} prefixes. They promise to update PeeringDB.',{who:esc(who),n:Math.ceil(x.got*1.5).toLocaleString()}),'good');}} + else{const back=S.day+(x.leak?3:10)+Math.floor(Math.random()*(x.leak?8:21));if(x.net)I.down[x.key]=back;I.rep+=x.leak?0.3:0.1; + if(!bot)toast(x.leak?tr('Good call: it was a route leak.
{who} found a fat-fingered route map. The session comes back on its own in a few days.',{who:esc(who)}):tr('The session stays down.
{who} will update PeeringDB and ask again. Eventually.',{who:esc(who)}),x.leak?'good':'');} + I.rep=clamp(I.rep,-10,5);return true;} +// The AI agent clears the inbox every day. It is fast, polite and wrong about a third of the time. +function inboxBot(){const I=ibx();let acc=0,dec=0; + for(const x of I.items.slice()){const oops=Math.random()<0.3; + if(x.k==='req'){const want=!x.stale||!!x.net;const a=(want!==oops)?'accept':'decline';ibxAnswer(x.id,a,true);a==='accept'?acc++:dec++;if(oops&&a==='decline'&&x.net)ibxLog(N_('Declined {who} at {ix}: “not a strategic fit”. They were.'),{who:ibxWho(x),ix:ixName(x.ix)});} + else{const a=(x.leak!==oops)?'keep':'raise';ibxAnswer(x.id,a,true); + if(a==='raise'&&x.leak)ibxLog(N_('Raised the max-prefix limit for {who} at {ix} to {n}. They seemed nice.'),{who:ibxWho(x),ix:ixName(x.ix),n:Math.ceil(x.got*1.5).toLocaleString()}); + else if(a==='keep'&&!x.leak)ibxLog(N_('Kept {who} down at {ix} for “suspicious growth”. They had grown by one customer.'),{who:ibxWho(x),ix:ixName(x.ix)}); + else ibxLog(a==='raise'?N_('Raised the max-prefix limit for {who} at {ix}. Correctly, this time.'):N_('Kept {who} down at {ix}: it was a route leak. Nailed it.'),{who:ibxWho(x),ix:ixName(x.ix)});}} + if(acc||dec)ibxLog(N_('Answered your mail: {a} accepted, {d} declined.'),{a:acc,d:dec}); + if(Math.random()<0.01){const ks=Object.keys(S.peers);if(ks.length){const k=pick(ks),[id,c]=k.split('@');delete S.peers[k];ibxLog(N_('Tidied up a session it decided was unused: de-peered {who} at {ix}.'),{who:NET[id].name,ix:ixName(c)});}} + if(Math.random()<0.08)ibxLog(pick(IBX_AI),{});} +function inboxModal(){const I=ibx(),items=I.items.slice().sort((a,b)=>(b.k==='mp')-(a.k==='mp')||b.day-a.day),reqs=items.filter(x=>x.k==='req').length; + const age=x=>{const n=S.day-x.day;return n?trn('{n} day ago','{n} days ago',n):tr('today');}; + const pdb=x=>x.stale?trn('PeeringDB last updated {n} year ago','PeeringDB last updated {n} years ago',x.yrs):tr('PeeringDB updated last month'); + const card=x=>x.k==='mp'?`
⚠️ ${tr('Max-prefix limit hit: {who} at {ix}',{who:esc(ibxWho(x)),ix:esc(ixName(x.ix))})}
+
AS${ibxAsn(x)} · ${age(x)}

${tr('Configured: {lim} prefixes. Received: {got}.',{lim:x.lim.toLocaleString(),got:x.got.toLocaleString()})} ${trn('Their PeeringDB says {lim}, last updated {n} year ago.','Their PeeringDB says {lim}, last updated {n} years ago.',x.yrs,{lim:x.lim.toLocaleString()})}

+
${btn(tr('Raise the limit'),'inboxAct',{id:x.id,a:'raise'},'sm')}${btn(tr('Keep it down'),'inboxAct',{id:x.id,a:'keep'},'ghost sm')}
` + :`
${esc(ibxWho(x))} AS${ibxAsn(x)}${x.bump?` ${tr('bumped')}`:''}
${esc(ixName(x.ix))} · ${age(x)} · ${pdb(x)}
+

“${esc(tr(REQ_SAY[x.say]||REQ_SAY[0],{ix:ixName(x.ix)}))}”

${btn(tr('Accept'),'inboxAct',{id:x.id,a:'accept'},'sm')}${btn(tr('Decline'),'inboxAct',{id:x.id,a:'decline'},'ghost sm')}
`; + openModal(`
${tr('Peering inbox')}

📬 ${trn('{n} unanswered','{n} unanswered',items.length)}

+

${tr('Every exchange port brings mail. Answer peering requests, and look at sessions that hit their max-prefix limit: is it growth, or a route leak? Unanswered mail gets you a reputation, and selective networks hear about it.')}

+
${tr('Your reputation')}${repName(I.rep)}
+
${I.bot?`
🤖 ${tr('Large Peering Model is answering your mail')}
${tr('{price}/year. It never sleeps, never complains and is often wrong.',{price:fmt$(20e6)})}
+ ${I.log.length?`
${I.log.slice(0,8).map(e=>esc(tr('Day {d}',{d:e.d})+': '+tr(e.m,e.a))).join('\n')}
`:''}
${btn(tr('Fire the AI'),'inboxBot',{on:0},'ghost sm')}
` + :`
🤖 ${tr('Large Peering Model')}
${tr('An AI agent that answers every peering request and max-prefix alert for you, every day. {price}/year. Trained on twenty years of peering mailing lists.',{price:fmt$(20e6)})}
${btn(tr('Hire it {mo}/mo',{mo:fmt$(AI_MO)}),'inboxBot',{on:1},'aibtn sm',S.cash`}
+ ${reqs>1?`
${btn(tr('Accept all requests'),'inboxAll',{a:'accept'},'sm')}${btn(tr('Decline all requests'),'inboxAll',{a:'decline'},'ghost sm')}
`:''} + ${items.length?items.slice(0,40).map(card).join(''):`

${Object.keys(S.ixp).length?tr('Inbox zero. Enjoy it while it lasts.'):tr('No mail yet. Buy an IX port and it will come.')}

`}`);} /* Big networks sometimes refuse to peer in a particular city, for a while. Each (network, city) pair gets a stable verdict per window, derived from a hash, so asking again does not reroll it. */ const SNUB_WIN=150,SNUB_P=0.22; @@ -1824,9 +1920,10 @@ const paidFree=n=>!!(n&&n.freeLv&&lvl()>=n.freeLv); function peerOk(id,via,city){ const n=NET[id],dem=R.demTo[id]||0; const sn=snub(id,city);if(sn&&(via==='ix'||sn.all))return {ok:false,snub:true,why:snubWhy(sn)}; + if(msfNope(id,city))return {ok:false,why:tr(MSF_NOPE[hstr(ixCity(city)+S.day)%MSF_NOPE.length])}; if(via==='ix'&&city&&isRemote(city)&&noRemote(id))return {ok:false,remote:true,why:REMOTE_WHY[hstr(id)%REMOTE_WHY.length]}; if(n.pol==='open')return {ok:true}; - if(n.pol==='selective'){const need=Math.round((via==='pni'?n.minPni:n.minIx)*confBoost(id));return dem>=need?{ok:true}:{ok:false,why:tr('Wants ≥ {need} Gbps of traffic from you (you send {dem})',{need,dem:dem.toFixed(1)})};} + if(n.pol==='selective'){const need=Math.round((via==='pni'?n.minPni:n.minIx)*confBoost(id)*repMul());return dem>=need?{ok:true}:{ok:false,why:tr('Wants ≥ {need} Gbps of traffic from you (you send {dem})',{need,dem:dem.toFixed(1)})};} if(n.pol==='paid'&&paidFree(n))return via==='pni'?{ok:true,free:true}:{ok:false,why:tr('Peers with you for free now, but only over a PNI')}; if(n.pol==='paid')return via==='pni'?{ok:true,fee:n.paidFee}:{ok:false,why:n.perG?tr('Sender pays: a paid PNI only, {fee}/mo plus {g} per Gbps you send',{fee:fmt$(n.paidFee),g:fmt$(n.perG)}):tr('Paid peering only, over a PNI')}; if(n.type!=='t1'){if(via!=='pni')return {ok:false,why:tr('Only peers over PNIs, and only with networks it considers important')};const need=Math.round(60*confBoost(id));return dem>=need||isTier2()?{ok:true}:{ok:false,why:tr('Wants you to be a Tier 2, or send ≥ {need} Gbps to it (you send {dem})',{need,dem:dem.toFixed(1)})};} @@ -1838,7 +1935,7 @@ const HOT=0.9,HOTL={t:'T',ix:'IX',p:'P',c:'C',r:'R'},HOTC={t:'#7B61FF',ix:'#FFD2 function hotPorts(){const out=[];if(!R||!S)return out; for(const t of S.transit){if(t.down>S.day)continue;const cap=lagCap(PORT[t.tier].g,t.n),u=(R.useT[t.id]||0)/cap;if(u>=HOT)out.push({k:'t',city:t.city,lab:tr('{net} transit · {lag}',{net:NET[t.net].name,lag:lagName(t.tier,t.n)}),u,tip:tr('Add a LAG member, upgrade the port or buy a second upstream.')});} for(const c in S.ixp){const cap=ixCap(c);if(!cap)continue;const u=(R.useIx[c]||0)/cap;if(u>=HOT)out.push({k:'ix',city:ixCity(c),lab:tr('{port} port',{port:ixName(c)}),u,tip:tr('Upgrade the IX port or add a LAG member.')});} - for(const p of S.pni){const cap=lagCap(PORT[p.tier].g,p.n),u=(R.usePni[p.id]||0)/cap;if(u>=HOT)out.push({k:'p',city:p.city,lab:tr('PNI with {net}',{net:NET[p.net].name}),u,tip:tr('Add a LAG member or upgrade the PNI.')});} + for(const p of S.pni){if(!pniOn(p))continue;const cap=lagCap(pniG(p),p.n),u=(R.usePni[p.id]||0)/cap;if(u>=HOT)out.push({k:'p',city:p.city,lab:tr('PNI with {net}',{net:NET[p.net].name}),u,tip:tr('Add a LAG member or upgrade the PNI.')});} const cc={};for(const x of S.caches){const k=x.city+'|'+x.net;(cc[k]=cc[k]||{city:x.city,net:x.net,used:0,cap:0});cc[k].used+=R.useCache[x.id]||0;cc[k].cap+=CACHE_CAP;} for(const k in cc){const x=cc[k],u=x.used/x.cap;if(u>=HOT)out.push({k:'c',city:x.city,lab:x.cap>CACHE_CAP?tr('{name} caches',{name:NET[x.net].cache.name}):tr('{name} cache',{name:NET[x.net].cache.name}),u,tip:tr('Ask for another box. The overflow goes out over peering or transit.')});} for(const c in S.pops){const cap=R.nodeCap[c];if(!cap)continue;const u=(R.nodeLoad[c]||0)/cap;if(u>=HOT)out.push({k:'r',city:c,lab:tr('Routers'),u,tip:tr('Upgrade the router or add a second one in the Infra tab.')});} @@ -1847,10 +1944,10 @@ function hotByCity(){const m={};for(const h of hotPorts())(m[h.city]=m[h.city]|| function isTier2(){return Object.keys(S.pops).length>=5&&Object.keys(S.ixp).length>=3&&R.sessions>=15;} // Sparkly Seabone joined the Tier 1s in 1.12. Older saves keep the five they were playing for. const t1Need=()=>NETS.filter(n=>n.type==='t1'&&(n.id!=='skl'||(S&&S.t1v>=2))); -function isTier1(){return t1Need().every(n=>S.pni.some(p=>p.net===n.id))&&S.transit.length===0&&R.reach>0.999;} +function isTier1(){return t1Need().every(n=>S.pni.some(p=>p.net===n.id&&pniOn(p)))&&S.transit.length===0&&R.reach>0.999;} // What you are now, not what you once were (#46): buying transit again or losing reach drops the label. function tierLabel(){return S.won&&isTier1()?'Tier 1':isTier2()?'Tier 2':'Tier 3';} -function t1Why(){if(S.transit.length)return tr('you buy transit again');const miss=t1Need().filter(n=>!S.pni.some(p=>p.net===n.id));if(miss.length)return tr('no PNI with {list}',{list:miss.map(n=>n.name).join(', ')});{const lost=NETS.filter(n=>!R.reachable[n.id]).sort((a,b)=>NSH[b.id]-NSH[a.id]);if(lost.length)return tr('you cannot reach {list}',{list:lost.slice(0,3).map(n=>n.name).join(', ')+(lost.length>3?' '+tr('and {n} more',{n:lost.length-3}):'')});}return tr('your reach is {p}, not 100%',{p:reachPct(R.reach)});} +function t1Why(){if(S.transit.length)return tr('you buy transit again');const miss=t1Need().filter(n=>!S.pni.some(p=>p.net===n.id&&pniOn(p)));if(miss.length)return tr('no PNI with {list}',{list:miss.map(n=>n.name).join(', ')});{const lost=NETS.filter(n=>!R.reachable[n.id]).sort((a,b)=>NSH[b.id]-NSH[a.id]);if(lost.length)return tr('you cannot reach {list}',{list:lost.slice(0,3).map(n=>n.name).join(', ')+(lost.length>3?' '+tr('and {n} more',{n:lost.length-3}):'')});}return tr('your reach is {p}, not 100%',{p:reachPct(R.reach)});} /* ================= SIMULATION ================= */ // Binary-heap Dijkstra over city indices: adj[i] lists [neighbour, edge]. wf(edge) gives the weight, skip(v,edge) can @@ -2021,7 +2118,7 @@ function compute(){ // `nets`: every network ok() can say yes to, so it need not be asked about the other hundred. for(const c in S.ixp){const ct=ixCity(c);if(!(popUp(ct)||remote.includes(ct))||(S.ev.ixdown&&S.ev.ixdown[c]>day)||!(S.myIx[c]?myIxLive(c):liveN(ct,(S.ixSite||{})[c],(S.ixn||{})[c])))continue;const set=ixSessions(c);R2.sessions+=set.size; E.push({k:'ix',pref:(S.ixPref&&S.ixPref[c])||'normal',lab:labOf(N_('{ix} peering'),'ix',ixName(c)),id:c,city:ct,cap:ixCap(c),used:0,rank:2,ok:n=>set.has(n),nets:set});} - for(const p of S.pni){if(!popUp(p.city)||!liveN(p.city,p.site,p.n))continue;R2.sessions++;E.push({k:'p',pnc:!!NET[p.net].cn,pref:p.pref||'normal',lab:labOf(N_('PNI with {net}'),'net',NET[p.net].name),id:p.id,city:p.city,cap:liveCap(PORT[p.tier].g,p.city,p.site,p.n)*lagF(p)*(p.sacrif?0.5:1),used:0,rank:1,ok:n=>n===p.net||!!(NET[n].up&&NET[n].up.includes(p.net)),nets:PNI_NETS[p.net]});} + for(const p of S.pni){if(!pniOn(p)||!popUp(p.city)||!liveN(p.city,p.site,p.n))continue;R2.sessions++;E.push({k:'p',pnc:!!NET[p.net].cn,pref:p.pref||'normal',lab:labOf(N_('PNI with {net}'),'net',NET[p.net].name),id:p.id,city:p.city,cap:liveCap(pniG(p),p.city,p.site,p.n)*lagF(p)*(p.sacrif?0.5:1),used:0,rank:1,ok:n=>n===p.net||!!(NET[n].up&&NET[n].up.includes(p.net)),nets:PNI_NETS[p.net]});} for(const c of S.caches){if(!popUp(c.city)||siteDown(c.city,c.site==='b'?'b':'a'))continue;E.push({k:'c',pref:'normal',lab:labOf(N_('{name} cache'),'name',NET[c.net].cache.name),id:c.id,city:c.city,cap:CACHE_CAP,used:0,rank:0,ok:n=>n===c.net,nets:[c.net]});} // After an update adds networks, a free courtesy route reaches the new ones you have no other way to (#46). R2.graceNets=0;if(S.grace&&S.grace.until>day){const gs=new Set(S.grace.nets.filter(n=>NET[n]&&!E.some(e=>e.k!=='c'&&e.ok(n)))),hc=popUp(S.home)?S.home:pops.find(popUp); @@ -2066,7 +2163,7 @@ function compute(){ const sp=edge?null:scrubPlan(atk); if(sp&&scrubIdeal(sp)x.id===en.id);if(p&&p.sacrif)dd=Math.min(dd,liveCap(PORT[p.tier].g,p.city,p.site,p.n)*0.9);}} + if(en.k==='p'){const p=S.pni.find(x=>x.id===en.id);if(p&&p.sacrif)dd=Math.min(dd,liveCap(pniG(p),p.city,p.site,p.n)*0.9);}} const bh=rtbh||edge; if(dd>0)for(let j=0;ja+pniMo(p,R2.usePni[p.id]||0),0); C.caches=S.caches.length*CACHE_MO; C.loans=(S.loans||[]).reduce((a,l)=>a+(BANKS[l.bank].equity?0:l.model==='transit'?Math.round((C.transit||0)*(l.cut||0.3)):l.pay)+loanFees(l),0); - C.extras=(S.cnLic&&S.cnLic.state==='ok'?CN_JV_MO:0)+scrubMo()+Object.keys(S.pops).filter(ruCity).length*RU_BOX_MO+Object.values(S.pops).filter(p=>p.site2).length*SITE2_MO+(S.te?TE_MO:0); + C.extras=(S.cnLic&&S.cnLic.state==='ok'?CN_JV_MO:0)+scrubMo()+Object.keys(S.pops).filter(ruCity).length*RU_BOX_MO+Object.values(S.pops).filter(p=>p.site2).length*SITE2_MO+(S.te?TE_MO:0)+(S.inbox&&S.inbox.bot?AI_MO:0); V.eyeballs=0;V.business=0;V.ix=0; for(const c in S.pops){const sf=sfOf(R2,c);V.eyeballs+=R2.cityEye[c]*sf*EYE_RATE*(CITY[c].arpu||1);} for(const b of S.biz){const sf=BIZ_T[b.type].fiber?(fiberOk(b)?1:0):BIZ_T[b.type].l2?clamp((R2.l2[b.id]||0)/b.bw,0,1):sfOf(R2,b.city);V.business+=b.bw*b.rate*Math.min(1,sf/0.95);} @@ -2264,7 +2361,7 @@ function remoteCities(){return [...new Set(S.links.filter(l=>l.kind==='vxc').fla function nniUsed(c,prov){return S.links.filter(l=>l.kind==='vxc'&&l.prov===prov&&(l.a===c||l.b===c)).reduce((a,l)=>a+VXC[l.vt].g,0)+S.biz.filter(b=>BIZ_T[b.type].nni&&b.prov===prov&&b.city===c).reduce((a,b)=>a+b.bw,0);} // Monthly price of one connection; compute() sums these, the connections overview lists them. function transitMo(t,q){const n=t.n||1;return Math.max(q,PORT[t.tier].g*n*0.2)*NET[t.net].price*(t.premium&&t.city==='hkg'?NET[t.net].premium:1)*S.priceMul*regionMult(t.city)+PORT[t.tier].tmo*n+(t.clean?cleanMo(t):0);} -function pniMo(p,use){return PORT[p.tier].pni*(p.n||1)+(NET[p.net].pol==='paid'&&!paidFree(NET[p.net])?NET[p.net].paidFee:0)+(NET[p.net].perG?Math.round(NET[p.net].perG*use):0);} +function pniMo(p,use){if(!pniOn(p))return 0;return (p.g1?Math.round(PORT[0].pni/2):PORT[p.tier].pni)*(p.n||1)+(NET[p.net].pol==='paid'&&!paidFree(NET[p.net])?NET[p.net].paidFee:0)+(NET[p.net].perG?Math.round(NET[p.net].perG*use):0);} function ixMo(c){return S.myIx[c]?Math.round(myFab(c).mo*((S.ixSite||{})[c]==='ab'?1.5:1)):ixPortMo(c,S.ixp[c])*((S.ixn||{})[c]||1)+dkAddonMo(c);} function nniPort(c,prov){return (S.nni||[]).find(x=>x.city===c&&x.prov===prov);} function repayCost(l,B){return B.equity?Math.round(l.amount*3):Math.round(Math.max(l.bal,B.crypto&&l.got?l.got:0)*1.02);} @@ -2288,6 +2385,14 @@ function sanitize(s){ const degO=v=>v&&typeof v==='object'?{until:num(v.until,0),f:Math.min(1,Math.max(0,num(v.f,1)))}:null; s.transit=s.transit.filter(t=>t&&isCity(t.city)&&isNet(t.net)).map(t=>(t.lacp=degO(t.lacp),t.site=['a','b','ab'].includes(t.site)?t.site:'a',t.id=sid(t.id),t.tier=tier(t.tier),t.n=lag(t.n),t.down=num(t.down,0),t.clean=!!t.clean,t)); s.pni=s.pni.filter(x=>x&&isCity(x.city)&&isNet(x.net)).map(x=>(x.lacp=degO(x.lacp),x.site=['a','b','ab'].includes(x.site)?x.site:'a',x.id=sid(x.id),x.tier=tier(x.tier),x.n=lag(x.n),x.sacrif=!!x.sacrif,x)); + // PNIs on order (#…): delivery day, a pending augment, and 1G for the one network that sells it + for(const x of s.pni){if(x.ready!==undefined)x.ready=num(x.ready,0);if(x.g1)x.g1=x.tier===0&&x.net==='dtk'?true:undefined;else delete x.g1;if(x.up){const u=x.up;x.up=u&&typeof u==='object'?{tier:tier(u.tier),n:lag(u.n),ready:num(u.ready,0),g1:!!u.g1&&x.net==='dtk'&&tier(u.tier)===0}:undefined;if(!x.up)delete x.up;}} + {const I=s.inbox&&typeof s.inbox==='object'&&!Array.isArray(s.inbox)?s.inbox:{},o=v=>v&&typeof v==='object'&&!Array.isArray(v)?v:{},str=(v,n)=>String(v==null?'':v).slice(0,n); + const items=(Array.isArray(I.items)?I.items:[]).filter(x=>x&&typeof x==='object'&&(x.k==='req'||x.k==='mp')&&typeof x.ix==='string'&&isIx(x.ix)&&(x.net===undefined||isNet(x.net))&&(x.net!==undefined||typeof x.nm==='string')).slice(0,INBOX_MAX).map(x=>({id:int(x.id,0,1e9,0),k:x.k,ix:x.ix,net:x.net,nm:x.net?undefined:str(x.nm,40),asn:x.net?undefined:int(x.asn,1,4294967294,64512),day:num(x.day,0),stale:!!x.stale,yrs:int(x.yrs,1,30,1),say:int(x.say,0,REQ_SAY.length-1,0),bump:x.bump?1:undefined,key:x.k==='mp'?str(x.key,80):undefined,lim:x.k==='mp'?int(x.lim,1,1e7,100):undefined,got:x.k==='mp'?int(x.got,1,1e7,100):undefined,leak:x.k==='mp'?!!x.leak:undefined})); + const down={};for(const [k,v] of Object.entries(o(I.down)))if(typeof k==='string'&&k.length<80)down[k]=num(v,0); + const tiny={};for(const [k,v] of Object.entries(o(I.tiny)).slice(0,200))if(/^\d{1,10}$/.test(k)&&v&&typeof v==='object'&&isIx(v.ix))tiny[k]={nm:str(v.nm,40),ix:v.ix,stale:!!v.stale}; + const log=(Array.isArray(I.log)?I.log:[]).filter(e=>e&&typeof e==='object'&&typeof e.m==='string').slice(0,40).map(e=>{const a={};for(const [k,v] of Object.entries(o(e.a)).slice(0,6))a[str(k,12)]=typeof v==='number'?v:str(v,60);return {d:num(e.d,0),m:str(e.m,200),a};}); + s.inbox={items,down,tiny,rep:clamp(num(I.rep,0),-10,5),bot:!!I.bot,log,seq:Math.max(int(I.seq,0,1e9,0),...items.map(x=>x.id))};} {const sp={};if(s.spares&&typeof s.spares==='object')for(const k in s.spares)if(own(OPT,k)){const v=Math.floor(+s.spares[k]);if(v>0)sp[k]=Math.min(999,v);}s.spares=sp;} s.caches=s.caches.filter(x=>x&&isCity(x.city)&&isNet(x.net)&&NET[x.net].cache).map(x=>(x.id=sid(x.id),x.site=x.site==='b'&&s.pops[x.city]&&s.pops[x.city].site2?'b':'a',x)); for(const c of Object.keys(s.ixp)){if(!isIx(c))delete s.ixp[c];else s.ixp[c]=tier(s.ixp[c]);} @@ -2327,14 +2432,14 @@ const REQS={ diverse:{l:tr('Two paths that share no trench or fabric'),bonus:.25,l2:true,can:(b,s=S)=>diversityPossible(b.city,b.city2,s),ok:b=>R.div[b.id]!==undefined?!!R.div[b.id]:diversePaths(b.city,b.city2)}, sharks:{l:tr('Afraid of sharks: needs a path with no subsea cable'),bonus:.2,l2:true,ok:b=>terrestrialPath(b.city,b.city2),can:b=>!!b.city2&&!isSub(b.city,b.city2)}, nocog:{l:tr('Refuses Cogentle transit anywhere on your network (long story)'),bonus:.15,ok:()=>!S.transit.some(t=>t.net==='cog')}, - ipv6:{l:tr('IPv6 or bust: you must peer with Drizzle Electric'),bonus:.1,ok:()=>Object.keys(S.ixp).some(c=>ixSessions(c).has('drz'))||S.pni.some(p=>p.net==='drz')}, - netchill:{l:tr('Wants NetChill on-net: a cache or a PNI'),bonus:.15,ok:()=>S.caches.some(c=>c.net==='nfx')||S.pni.some(p=>p.net==='nfx')}, + ipv6:{l:tr('IPv6 or bust: you must peer with Drizzle Electric'),bonus:.1,ok:()=>Object.keys(S.ixp).some(c=>ixSessions(c).has('drz'))||S.pni.some(p=>p.net==='drz'&&pniOn(p))}, + netchill:{l:tr('Wants NetChill on-net: a cache or a PNI'),bonus:.15,ok:()=>S.caches.some(c=>c.net==='nfx')||S.pni.some(p=>p.net==='nfx'&&pniOn(p))}, gen:{l:tr('Backup generator in every city they touch'),bonus:.15,ok:b=>[b.city,b.city2].filter(Boolean).every(c=>S.pops[c]&&S.pops[c].gen)}, routers:{l:tr('Insists on two routers in their city'),bonus:.15,ok:b=>((S.pops[b.city]&&S.pops[b.city].routers)||1)>=2}, local:{l:tr('Local breakout: transit or an IX port in their own city, or a local PNI while Tier 1'),bonus:.2,ip:true,ok:b=>S.transit.some(t=>t.city===b.city)||hasIxAt(b.city)||(isTier1()&&S.pni.some(p=>p.city===b.city))}, metro:{l:tr('Two data centers in every metro they touch'),bonus:.2,only:true,ok:b=>[b.city,b.city2].filter(Boolean).every(c=>S.pops[c]&&S.pops[c].site2)}, twoup:{l:tr('Wants two different transit providers (or none at all)'),bonus:.15,ip:true,ok:()=>new Set(S.transit.map(t=>t.net)).size>=2||S.transit.length===0}, - china:{l:tr('Needs low-loss reach into China'),bonus:.3,ip:true,ok:()=>S.transit.some(t=>t.premium&&t.city==='hkg')||S.links.some(l=>l.premium)||S.pni.some(p=>NET[p.net].cn)}, + china:{l:tr('Needs low-loss reach into China'),bonus:.3,ip:true,ok:()=>S.transit.some(t=>t.premium&&t.city==='hkg')||S.links.some(l=>l.premium)||S.pni.some(p=>NET[p.net].cn&&pniOn(p))}, scrubbed:{l:tr('Will only sign with a network that runs a DDoS scrubbing center'),bonus:.15,ok:()=>hasScrub()}, scrubnear:{l:tr('Wants a scrubbing center on its own continent, so attacks are not hauled across an ocean'),bonus:.15,ip:true,ok:b=>S.scrubs.some(x=>CITY[x.city].reg===CITY[b.city].reg)}, puns:{l:tr('Their CEO hates puns. Please do not mention the network names.'),bonus:.05,ok:()=>true}, @@ -2785,7 +2890,7 @@ function dayTick(){ if(!S||S.lost)return; S.day++; const d=S.day; - dkTick(d);ixPriceWar(d); + dkTick(d);ixPriceWar(d);inboxDay(d);pniDay(d); if(!S.phpDone&&d>45&&Math.random()<1/400)elephant(); if(R&&R.teMoved)S.stats.teMax=Math.max(S.stats.teMax||0,R.teMoved); {const t1=!!S.won&&isTier1();if(S.t1Now&&!t1)toast(tr('You are no longer Tier 1.
Because {why}. Your Tier 1 badge stays; win the status back to show it again.',{why:t1Why()}),'bad');S.t1Now=t1;} @@ -2901,7 +3006,7 @@ const BADGES=[ {id:'unsub',i:'📭',t:tr('Unsubscribed'),d:tr('Opt out of 3 auto-enrolled add-ons.'),r:'r',ok:()=>(st().optouts||0)>=3}, {id:'read',i:'💔',t:tr('Left on Read'),d:tr('Get de-peered by a big network.'),r:'r',ok:()=>(st().depeered||0)>=1}, {id:'couch',i:'🛋️',t:tr('Peering From the Couch'),d:tr('Peer at an IX remotely.'),r:'r',ok:()=>Object.keys(S.ixp).some(c=>isRemote(c)&&ixSessions(c).size>0)}, - {id:'sender',i:'🇰🇷',t:tr('Sender Pays'),d:tr('Paid PNIs with all three Korean incumbents.'),r:'e',ok:()=>['ktt','skb','lgu'].every(n=>S.pni.some(p=>p.net===n))}, + {id:'sender',i:'🇰🇷',t:tr('Sender Pays'),d:tr('Paid PNIs with all three Korean incumbents.'),r:'e',ok:()=>['ktt','skb','lgu'].every(n=>S.pni.some(p=>p.net===n&&pniOn(p)))}, {id:'oink',i:'🐖',t:tr('Pig Whisperer'),d:tr('Run a slow-booting PacketOinker chassis.'),r:'r',ok:()=>Object.keys(S.pops).some(c=>/Oinker/.test(RG[S.pops[c].rgen||0].chip)&&slowBoot(c))}, {id:'gap',i:'🌴',t:tr('Mind the Gap'),d:tr('Link Panama City and Bogotá.'),r:'r',ok:()=>S.links.some(l=>[l.a,l.b].includes('pan')&&[l.a,l.b].includes('bog'))}, {id:'andes',i:'🏔️',t:tr('Over the Mountains'),d:tr('Build fiber across the Andes.'),r:'r',ok:()=>S.links.some(l=>!l.sub&&andesPair(l.a,l.b))}, @@ -3022,7 +3127,9 @@ const ACT={ ad:({city})=>{const p=S.pops[city];if(!p||!p.bb)return;if(!spend(8000))return;p.boost=S.day+30;floater(CITY[city].x,CITY[city].y-30,tr('Ad campaign!'),'#FF8A3D');after();}, buyTransit:({city,net,tier})=>{tier=+tier;if(scnRule('noTransit')){toast(tr('No transit in this scenario.
Peering, PNIs, caches and your own fiber only.'),'bad');sfx('err');return;}if(!S.pops[city]||!NET[net]||!NET[net].price||!NET[net].pops.includes(city)||!PORT[tier])return;if(!portOk(city,tier)){toast(tr("Your router can't take a {port} port.
Upgrade it in the Infra tab.",{port:PORT[tier].n}),'bad');sfx('err');return;}const ex=S.transit.find(t=>t.city===city&&t.net===net);if(ex&&tier<=ex.tier)return;if(!portGate(city,ex?(PORT_SLOT(tier)-PORT_SLOT(ex.tier))*(ex.n||1):PORT_SLOT(tier)))return;if(!spend(PORT[tier].setup*(ex&&ex.n||1)))return;if(ex)ex.tier=tier;else S.transit.push({id:uid(),city,net,tier,down:0});toast(tr('{net} transit is live in {city}.
Full table received: ~1,000,000 routes.',{net:esc(NET[net].name),city:CITY[city].name}),'good');after();}, lagT:({id,d})=>{d=+d;if(d!==1&&d!==-1)return;const t=S.transit.find(x=>x.id===id);if(!t)return;const n=(t.n||1)+(+d);if(n<1||n>LAG_MAX)return;if(+d>0){if(!portOk(t.city,t.tier)||!portGate(t.city,PORT_SLOT(t.tier)))return;if(!spend(PORT[t.tier].setup))return;}t.n=n;if(n<2&&t.site==='ab')t.site='a';toast(+d>0?tr('LAG member added.
{net} in {city} is now {lag}.',{net:esc(NET[t.net].name),city:CITY[t.city].name,lag:lagName(t.tier,n)}):tr(`LAG member removed.`),'good');after();}, - lagP:({id,d})=>{d=+d;if(d!==1&&d!==-1)return;const p=S.pni.find(x=>x.id===id);if(!p)return;const n=(p.n||1)+(+d);if(n<1||n>LAG_MAX)return;if(+d>0&&(!portGate(p.city,PORT_SLOT(p.tier))||!spend(1500+PORT[p.tier].setup/2)))return;p.n=n;if(n<2&&p.site==='ab')p.site='a';sfx('build');after();}, + lagP:({id,d})=>{d=+d;if(d!==1&&d!==-1)return;const p=S.pni.find(x=>x.id===id);if(!p)return;const n=(p.n||1)+(+d);if(n<1||n>LAG_MAX)return;if(d>0&&(!pniOn(p)||p.up||msfNope(p.net,p.city)))return;if(+d>0&&(!portGate(p.city,PORT_SLOT(p.tier))||!spend(1500+PORT[p.tier].setup/2)))return; + // A LAG member is an augment: the big networks take months for that too. + if(d>0){const lead=pniLead(p.net);p.up={tier:p.tier,n,ready:S.day+lead,g1:!!p.g1};toast(tr('Augment ordered with {net}.
{eta}.',{net:esc(NET[p.net].name),eta:pniWhen(lead)}),'good');after();return;}p.n=n;if(n<2&&p.site==='ab')p.site='a';sfx('build');after();}, lagIx:({city,d})=>{d=+d;if(d!==1&&d!==-1)return;if(!isIx(city)||S.ixp[city]===undefined||S.myIx[city]||!S.pops[ixCity(city)])return;S.ixn=S.ixn||{};const n=(S.ixn[city]||1)+(+d);if(n<1||n>LAG_MAX)return;if(+d>0&&(!portGate(ixCity(city),PORT_SLOT(S.ixp[city]))||!spend(ixPortMo(city,S.ixp[city]))))return;S.ixn[city]=n;if(n<2&&S.ixSite&&S.ixSite[city]==='ab')S.ixSite[city]='a';sfx('build');after();}, cancelTransit:({id,ok})=>{if(!ok&&UI.confirm!==id){UI.confirm=id;renderPanel();return;}S.transit=S.transit.filter(t=>t.id!==id);UI.confirm=null;after();}, buyIx:({city,tier,signed})=>{tier=+tier;if(!PORT[tier]||!ixName(city)||(!S.pops[ixCity(city)]&&(!remoteCities().includes(ixCity(city))||tier>1))||(S.ixp[city]!==undefined&&tier<=S.ixp[city]))return;if(S.pops[ixCity(city)]&&!portOk(ixCity(city),tier)){toast(tr("Your router can't take a {port} port.
Upgrade it in the Infra tab.",{port:PORT[tier].n}),'bad');sfx('err');return;}{const h0=S.ixp[city]!==undefined;if(!S.myIx[city]&&!portGate(ixCity(city),h0?(PORT_SLOT(tier)-PORT_SLOT(S.ixp[city]))*((S.ixn||{})[city]||1):PORT_SLOT(tier)))return;} @@ -3077,9 +3184,20 @@ const ACT={ unpeer:({city,net})=>{delete S.peers[net+'@'+city];after();}, peerAll:({city})=>{if(!isIx(city)||S.ixp[city]===undefined)return;const set=ixSessions(city);let n=0;for(const id of ixMembers(city))if(!set.has(id)&&peerOk(id,'ix',city).ok){S.peers[id+'@'+city]=true;n++;}if(!n)return;toast(trn('{n} new session at {ix}.
Small networks, but they add up, and they all count towards the club.','{n} new sessions at {ix}.
Small networks, but they add up, and they all count towards the club.',n,{ix:esc(ixName(city))}),'good');sfx('build');after();}, tailTog:()=>{UI.tailOpen=!UI.tailOpen;renderLeft();}, - pni:({city,net,tier})=>{tier=+tier;if(!S.pops[city]||!NET[net]||!NET[net].pops.includes(city)||!PORT[tier])return;if(!portOk(city,tier)){toast(tr("Your router can't take a {port} port.
Upgrade it in the Infra tab.",{port:PORT[tier].n}),'bad');sfx('err');return;}const r=peerOk(net,'pni',city);if(!r.ok){toast(tr('{net} declined the PNI.
{why}',{net:esc(NET[net].name),why:esc(r.why)}),'bad');sfx('err');after();return;}if(S.conf&&S.conf.until>S.day)S.stats.beerPni=1; - const ex=S.pni.find(p=>p.city===city&&p.net===net);if(ex&&tier<=ex.tier)return;if(!portGate(city,ex?(PORT_SLOT(tier)-PORT_SLOT(ex.tier))*(ex.n||1):PORT_SLOT(tier)))return;if(!spend((1500+PORT[tier].setup/2)*(ex&&ex.n||1)))return;if(ex)ex.tier=tier;else S.pni.push({id:uid(),city,net,tier}); - toast(tr('PNI with {net} is up.
A cross-connect in {dc}. Private and fast.',{net:esc(NET[net].name),dc:esc(CITY[city].dc)}),'good');after();}, + pni:({city,net,tier})=>{tier=+tier;const g1=tier===-1;if(g1){if(!pniG1(net))return;tier=0;}if(!S.pops[city]||!NET[net]||!NET[net].pops.includes(city)||!PORT[tier])return;if(!portOk(city,tier)){toast(tr("Your router can't take a {port} port.
Upgrade it in the Infra tab.",{port:PORT[tier].n}),'bad');sfx('err');return;}const r=peerOk(net,'pni',city);if(!r.ok){toast(tr('{net} declined the PNI.
{why}',{net:esc(NET[net].name),why:esc(r.why)}),'bad');sfx('err');after();return;} + if(!g1&&tier{net} does not do {port} PNIs.
Nothing smaller than 100G. Come back with more traffic, or a bigger optic.',{net:esc(NET[net].name),port:PORT[tier].n}),'bad');sfx('err');return;} + const ex=S.pni.find(p=>p.city===city&&p.net===net);if(ex&&(g1||!pniOn(ex)||ex.up))return;if(ex&&!(ex.g1&&tier===0)&&tier<=ex.tier)return; + const cost=g1?PNI_G1_COST:(1500+PORT[tier].setup/2)*(ex&&ex.n||1);if(!portGate(city,ex?(PORT_SLOT(tier)-PORT_SLOT(ex.tier))*(ex.n||1):PORT_SLOT(tier)))return;if(!spend(cost))return;if(S.conf&&S.conf.until>S.day)S.stats.beerPni=1; + // Nothing is instant: a cross-connect takes weeks, and the big networks quote months for a new PNI or an augment. + const lead=pniLead(net);if(ex)ex.up={tier,n:ex.n||1,ready:S.day+lead,g1:false};else S.pni.push({id:uid(),city,net,tier,g1:g1||undefined,ready:S.day+lead}); + toast(tr('PNI with {net} ordered.
{eta}. A cross-connect in {dc}, once somebody finds the LOA.',{net:esc(NET[net].name),eta:pniWhen(lead),dc:esc(CITY[city].dc)}),'good');after();}, + pniChase:({id})=>{const p=S.pni.find(x=>x.id===id);if(!p||(pniOn(p)&&!p.up))return;const r=Math.random(); + if(r<0.15){if(p.up)p.up.ready=Math.max(S.day+1,p.up.ready-30);else p.ready=Math.max(S.day+1,p.ready-30);toast(tr('Your account manager found the order under a desk.
It is a month closer.'),'good');} + else toast(pick([tr('“It is with the provisioning team.”
Nobody has ever met the provisioning team.'),tr('“We are waiting on the colo for the cross-connect.”
The colo says it is waiting on them.'),tr('Your ticket was merged into another ticket.
That ticket was closed as a duplicate of yours.'),tr('“Could you resend the LOA?”
You have sent it four times.'),tr('Your account manager is on paternity leave.
His replacement is also on paternity leave.')]));after();}, + inbox:()=>{inboxModal();}, + inboxAct:({id,a})=>{if(!['accept','decline','raise','keep'].includes(a))return;ibxAnswer(+id,a);after();inboxModal();}, + inboxAll:({a})=>{if(a!=='accept'&&a!=='decline')return;const I=ibx();for(const x of I.items.filter(x=>x.k==='req'))ibxAnswer(x.id,a,true);after();inboxModal();}, + inboxBot:({on})=>{const I=ibx();if(+on){if(I.bot||!spend(AI_MO))return;I.bot=true;ibxLog(N_('Hello! I am Large Peering Model. I have read your inbox and I already have opinions.'),{});toast(tr('Large Peering Model is hired.
Your inbox is its problem now. {price} a year, billed monthly.',{price:fmt$(20e6)}),'good');}else{I.bot=false;toast(tr('The AI is gone.
It left a 40-page handover document. It is mostly about itself.'));}after();inboxModal();}, cancelPni:({id,ok})=>{if(!ok&&UI.confirm!==id){UI.confirm=id;renderPanel();return;}S.pni=S.pni.filter(p=>p.id!==id);UI.confirm=null;after();}, cache:({city,net})=>{const n=NET[net];if(!n||!n.cache||!S.pops[city])return;if((R.demTo[net]||0){net} says not yet.
Send them {min}+ Gbps first.',{net:esc(n.name),min:n.cache.min}),'bad');sfx('err');return;}if(!portGate(city,1))return; {const hv=S.caches.filter(x=>x.city===city&&x.net===net),nb=hv.filter(x=>x.site==='b').length;S.caches.push({id:uid(),city,net,site:S.pops[city].site2&&nb{cache} installed in {city}!
{net} shipped it for free. You pay {mo}/mo power.',{cache:esc(n.cache.name),city:CITY[city].name,net:esc(n.name),mo:fmt$(CACHE_MO)}),'good');sfx('build');after();}, @@ -3339,7 +3457,7 @@ function renderTabbar(){const tb=$('tabbar');if(!tb||(pressing&&UI.ticking))retu const tab=(k,ic,l,cnt,red)=>``; const h=``+ ``+ - (()=>{const P=scnProg();return tab('goals','🎯',tr('Goals'),P&&!S.scn.done&&!S.scn.failed?`${Math.round(P.f*100)}%`:`${ndone}/${GOALS.length}`);})()+(()=>{const u=custStats().unhappy;return u?tab('deals','💼',tr('Deals'),u,true):tab('deals','💼',tr('Deals'),S.offers.length||'');})()+tab('noc','🚨','NOC',S.inc.length||'',true)+tab('nets','🌐',tr('Networks')); + (()=>{const P=scnProg();return tab('goals','🎯',tr('Goals'),P&&!S.scn.done&&!S.scn.failed?`${Math.round(P.f*100)}%`:`${ndone}/${GOALS.length}`);})()+(()=>{const u=custStats().unhappy;return u?tab('deals','💼',tr('Deals'),u,true):tab('deals','💼',tr('Deals'),S.offers.length||'');})()+tab('noc','🚨','NOC',S.inc.length||'',true)+tab('nets','🌐',tr('Networks'),ibxOpen()||'',ibxUrgent()>0); if(h!==UI._tb){UI._tb=h;tb.innerHTML=h;} document.body.classList.toggle('sheet-open',!!(UI.sel||UI.leftOpen));} function haptic(ms){if(UI.muted)return;try{navigator.vibrate&&navigator.vibrate(ms||12);}catch(e){}} @@ -3407,7 +3525,7 @@ function renderLeft(){checkLayer(); renderTabbar(); if(!S){L.hidden=true;return;}L.hidden=false; const ndone=GOALS.filter(g=>S.done[g.id]!==undefined).length; - const tabs=[['goals',`${tr('Goals')}${ndone}/${GOALS.length}`],['deals',`${tr('Deals')}${S.offers.length?`${S.offers.length}`:''}`],['noc',`NOC${S.inc.length?`${S.inc.length}`:''}`],['nets',tr('Networks')]]; + const tabs=[['goals',`${tr('Goals')}${ndone}/${GOALS.length}`],['deals',`${tr('Deals')}${S.offers.length?`${S.offers.length}`:''}`],['noc',`NOC${S.inc.length?`${S.inc.length}`:''}`],['nets',`${tr('Networks')}${ibxOpen()?`${ibxOpen()}`:''}`]]; $('leftTabs').innerHTML=tabs.map(([k,l])=>``).join('')+(innerWidth<760?``:''); let h=''; if(UI.left==='goals'){ @@ -3444,6 +3562,7 @@ function renderLeft(){checkLayer(); if(S.log&&S.log.length){h+=`

${tr('Recent events')}

`+S.log.slice(0,15).map(e=>`
${dateStr(e.d)} ${esc(e.t)}
`).join('');} h+=`
${tr('Incidents so far')}${S.stats.incidents}
${tr('Survived with no impact')}${S.stats.survived}
`; }else{ + if(Object.keys(S.ixp).length||ibxOpen()||(S.inbox&&S.inbox.bot)){const n=ibxOpen(),u=ibxUrgent();h+=`
📬 ${tr('Peering inbox')} ${n?`${n}`:''}
${S.inbox&&S.inbox.bot?tr('Large Peering Model is on it.'):u?trn('{n} session is down on its max-prefix limit.','{n} sessions are down on their max-prefix limit.',u):n?trn('{n} message waiting for an answer.','{n} messages waiting for an answer.',n):tr('Inbox zero.')}
${btn(tr('Open inbox'),'inbox',{},'sm')}
`;} h+=`

${tr("Every network on the map. Traffic share is how much of your users' traffic goes to them. Tap a connection to jump to its POP.")}

`; {const nc=conns().length;if(nc)h+=`
${btn(tr('All connections {n}',{n:nc}),'connOpen',{},'pink sm')}
`;} const where=netWhereIdx(),tl=NETS.filter(n=>n.tail),tlOn=tl.filter(n=>where(n.id).some(x=>x[2]==='ix')).length; @@ -3523,8 +3642,9 @@ function cityPanel(c){ const here=NETS.filter(n=>n.pops.includes(c)); for(const n of here){const pn=S.pni.find(x=>x.city===c&&x.net===n.id),chk=peerOk(n.id,'pni',c); h+=`
${logo(n)}
${esc(n.name)} ${n.pol}
`; - if(pn){const u=R.usePni[pn.id]||0,cap=lagCap(PORT[pn.tier].g,pn.n);h+=`
${(pn.n||1)>1?`${pn.n}×${PORT[pn.tier].n} LAG`:PORT[pn.tier].n} PNI${fmtG(u)}
${prefCtl('p',pn.id,pn.pref)}${siteCtl('p',pn.id,c,pn.site)}
${PORT.map((P2,i)=>i>pn.tier?btn((a=>(pn.n||1)>1?tr('Upgrade all to {port} {cost} + {mo}/mo',a):tr('Upgrade {port} {cost} + {mo}/mo',a))({port:P2.n,cost:fmt$((1500+P2.setup/2)*(pn.n||1)),mo:fmt$(P2.pni*(pn.n||1))}),'pni',{city:c,net:n.id,tier:i},'sm',!portOk(c,i)||S.cash<(1500+P2.setup/2)*(pn.n||1)):'').join('')}${(pn.n||1){cost} + {mo}/mo',{cost:fmt$(1500+PORT[pn.tier].setup/2),mo:fmt$(PORT[pn.tier].pni)}),'lagP',{id:pn.id,d:1},'sm',S.cash<1500+PORT[pn.tier].setup/2):''}${(pn.n||1)>1?btn(tr('− member'),'lagP',{id:pn.id,d:-1},'ghost sm'):''}${NET[n.id].cn?btn(pn.sacrif?tr('Sacrificial choke ✓'):tr('Make sacrificial contains floods · ½ capacity'),'sacrif',{id:pn.id},pn.sacrif?'green sm':'sm'):''}${btn(UI.confirm===pn.id?tr('Really remove?'):tr('Remove'),'cancelPni',{id:pn.id},'ghost sm')}
`;} - else{h+=chk.ok?`
${PORT.map((P2,i)=>portShown(i)?btn(tr('{port} {cost} + {mo}/mo',{port:P2.n,cost:fmt$(1500+P2.setup/2),mo:fmt$(P2.pni)}),'pni',{city:c,net:n.id,tier:i},'sm',S.cash<1500+P2.setup/2||!portOk(c,i)):'').join('')}
${chk.fee?`
${tr('Paid peering: {price}/mo on top',{price:fmt$(chk.fee)})}
`:''}`:`
${esc(chk.why)}
`;} + if(pn&&!pniOn(pn))h+=pniWait(pn,c); + else if(pn){const u=R.usePni[pn.id]||0,cap=lagCap(pniG(pn),pn.n);h+=`
${(pn.n||1)>1?`${pn.n}×${pniPN(pn)} LAG`:pniPN(pn)} PNI${fmtG(u)}
${pn.up?`
${tr('Augment on order: {port}, about {n} days to go.',{port:(pn.up.n>1?pn.up.n+'×':'')+(pn.up.g1?'1G':PORT[pn.up.tier].n),n:Math.max(0,pn.up.ready-S.day)})} ${btn(tr('Chase it'),'pniChase',{id:pn.id},'ghost sm')}
`:''}
${prefCtl('p',pn.id,pn.pref)}${siteCtl('p',pn.id,c,pn.site)}
${PORT.map((P2,i)=>!pn.up&&!msfNope(n.id,c)&&(i>pn.tier||(pn.g1&&i===0))?btn((a=>(pn.n||1)>1?tr('Upgrade all to {port} {cost} + {mo}/mo',a):tr('Upgrade {port} {cost} + {mo}/mo',a))({port:P2.n,cost:fmt$((1500+P2.setup/2)*(pn.n||1)),mo:fmt$(P2.pni*(pn.n||1))}),'pni',{city:c,net:n.id,tier:i},'sm',!portOk(c,i)||S.cash<(1500+P2.setup/2)*(pn.n||1)):'').join('')}${(pn.n||1){cost} + {mo}/mo',{cost:fmt$(1500+PORT[pn.tier].setup/2),mo:fmt$(PORT[pn.tier].pni)}),'lagP',{id:pn.id,d:1},'sm',S.cash<1500+PORT[pn.tier].setup/2):''}${(pn.n||1)>1?btn(tr('− member'),'lagP',{id:pn.id,d:-1},'ghost sm'):''}${NET[n.id].cn?btn(pn.sacrif?tr('Sacrificial choke ✓'):tr('Make sacrificial contains floods · ½ capacity'),'sacrif',{id:pn.id},pn.sacrif?'green sm':'sm'):''}${btn(UI.confirm===pn.id?tr('Really remove?'):tr('Remove'),'cancelPni',{id:pn.id},'ghost sm')}
`;} + else{h+=chk.ok?`
${pniG1(n.id)?btn(tr('{port} {cost} + {mo}/mo',{port:'1G',cost:fmt$(PNI_G1_COST),mo:fmt$(Math.round(PORT[0].pni/2))}),'pni',{city:c,net:n.id,tier:-1},'sm',S.cashportShown(i)&&i>=pniMin(n.id)?btn(tr('{port} {cost} + {mo}/mo',{port:P2.n,cost:fmt$(1500+P2.setup/2),mo:fmt$(P2.pni)}),'pni',{city:c,net:n.id,tier:i},'sm',S.cash<1500+P2.setup/2||!portOk(c,i)):'').join('')}
${pniEta(n.id)}${pniMin(n.id)?' · '+tr('no 10G: {net} starts at 100G',{net:esc(n.name)}):pniG1(n.id)?' · '+tr('sells PNIs down to 1G'):''}
${chk.fee?`
${tr('Paid peering: {price}/mo on top',{price:fmt$(chk.fee)})}
`:''}`:`
${esc(chk.why)}
`;} h+=`
`;} h+=`

${tr('Embedded caches')}

${tr('CDNs put free cache servers inside your POP. Most of their traffic is then served right here, with no transit and no IX port.')}

`; for(const n of NETS.filter(n=>n.cache)){const have=S.caches.filter(x=>x.city===c&&x.net===n.id),dem=R.demTo[n.id]||0,ok=dem>=n.cache.min; @@ -3787,7 +3907,7 @@ function nearestSpot(id){const x=meetSpots(id)[0];return x&&!S.pops[x.c]?x:null; // Networks you reach only through transit, biggest first: what stands between you and Tier 1. const ntLost=()=>NETS.filter(n=>!R.nt[n.id]).sort((a,b)=>NSH[b.id]-NSH[a.id]); function t1Card(){const cur=GOALS.find(g=>S.done[g.id]===undefined);if(!((cur&&cur.id==='t1')||S.won)||isTier1())return ''; - const need=t1Need(),miss=need.filter(n=>!S.pni.some(p=>p.net===n.id)),club=t1Club(),lost=ntLost(),nb=n=>btn(esc(n.name),'netFocus',{id:n.id},'ghost sm'); + const need=t1Need(),miss=need.filter(n=>!S.pni.some(p=>p.net===n.id&&pniOn(p))),club=t1Club(),lost=ntLost(),nb=n=>btn(esc(n.name),'netFocus',{id:n.id},'ghost sm'); let h=`
${tr('Goal')} · ${tr('Go transit-free: Tier 1!')}
${tr('Road to Tier 1')}
`; h+=pRow({l:tr('Transit ports to cancel'),v:S.transit.length?0:1,max:1,txt:S.transit.length?String(S.transit.length):'✓'}); h+=pRow({l:tr('PNIs with every Tier 1'),v:need.length-miss.length,max:need.length,txt:`${need.length-miss.length} / ${need.length}`}); @@ -3836,7 +3956,7 @@ const CONN_K={t:N_('Transit'),p:'PNI',ix:'IX',c:N_('Cache'),nni:'NNI'},CONN_ORD= const connTab=k=>k==='t'?'up':k==='nni'?'links':'peer'; function conns(){const out=[],pn=(tier,n)=>(n||1)>1?`${n}×${PORT[tier].n} LAG`:PORT[tier].n; for(const t of S.transit){const q=(R.p95&&R.p95[t.id])||0;out.push({k:'t',id:t.id,city:t.city,net:t.net,name:NET[t.net].name,port:pn(t.tier,t.n),cap:lagCap(PORT[t.tier].g,t.n),use:R.useT[t.id]||0,mo:transitMo(t,q),down:t.down>S.day||!popUp(t.city),low:t.pref==='low',note:tr('95th percentile {g}',{g:fmtG(q)})});} - for(const x of S.pni){const u=R.usePni[x.id]||0;out.push({k:'p',id:x.id,city:x.city,net:x.net,name:NET[x.net].name,port:pn(x.tier,x.n),cap:lagCap(PORT[x.tier].g,x.n),use:u,mo:pniMo(x,u),down:!popUp(x.city),low:x.pref==='low',note:NET[x.net].pol==='paid'?tr('paid peering'):''});} + for(const x of S.pni){const u=R.usePni[x.id]||0;out.push({k:'p',id:x.id,city:x.city,net:x.net,name:NET[x.net].name,port:x.g1?((x.n||1)>1?x.n+'×1G':'1G'):pn(x.tier,x.n),cap:lagCap(pniG(x),x.n),use:u,mo:pniMo(x,u),down:!popUp(x.city)||!pniOn(x),low:x.pref==='low',note:!pniOn(x)?tr('on order: {n} days',{n:x.ready-S.day}):NET[x.net].pol==='paid'?tr('paid peering'):''});} for(const c in S.ixp){const ses=ixSessions(c),mine=!!S.myIx[c];out.push({k:'ix',id:c,city:ixCity(c),net:null,nets:[...ses],name:ixName(c),port:mine?tr('your exchange'):pn(S.ixp[c],(S.ixn||{})[c]),cap:ixCap(c),use:R.useIx[c]||0,mo:ixMo(c),mine,down:!!(S.ev.ixdown&&S.ev.ixdown[c]>S.day),low:(S.ixPref&&S.ixPref[c])==='low',note:trn('{n} peering session','{n} peering sessions',ses.size)+(isRemote(c)?' · '+tr('remote'):'')});} const cg={};for(const x of S.caches){const key=x.city+'|'+x.net;(cg[key]=cg[key]||[]).push(x);} for(const key in cg){const g=cg[key],x=g[0];out.push({k:'c',id:x.id,n:g.length,city:x.city,net:x.net,name:NET[x.net].cache.name,port:trn('{n} box','{n} boxes',g.length),cap:CACHE_CAP*g.length,use:g.reduce((a,y)=>a+(R.useCache[y.id]||0),0),mo:CACHE_MO*g.length,down:!popUp(x.city),low:false,note:tr('from {net}',{net:NET[x.net].name})});} @@ -3848,7 +3968,7 @@ function connUp(r){if(r.mine)return '';const nx=t=>PORT[t+1]&&portShown(t+1)?t+1 if(r.k==='t'){const t=S.transit.find(x=>x.id===r.id);if(!t)return '';const n=t.n||1,i=nx(t.tier); if(i>=0){const a={port:PORT[i].n,cost:fmt$(PORT[i].setup*n),mo:fmt$(PORT[i].tmo*n)};h+=btn(n>1?tr('Upgrade all to {port} {cost} + {mo}/mo',a):tr('Upgrade {port} {cost} + {mo}/mo',a),'buyTransit',{city:t.city,net:t.net,tier:i},'sm',S.cash{cost} + {mo}/mo',{cost:fmt$(PORT[t.tier].setup),mo:fmt$(PORT[t.tier].tmo)}),'lagT',{id:t.id,d:1},'sm',S.cashx.id===r.id);if(!p)return '';const n=p.n||1,i=nx(p.tier),c=i>=0?(1500+PORT[i].setup/2)*n:0; + else if(r.k==='p'){const p=S.pni.find(x=>x.id===r.id);if(!p)return '';if(!pniOn(p)||p.up||msfNope(p.net,p.city))return `${!pniOn(p)||p.up?tr('on order'):''}`;const n=p.n||1,i=p.g1?0:nx(p.tier),c=i>=0?(1500+PORT[i].setup/2)*n:0; if(i>=0){const a={port:PORT[i].n,cost:fmt$(c),mo:fmt$(PORT[i].pni*n)};h+=btn(n>1?tr('Upgrade all to {port} {cost} + {mo}/mo',a):tr('Upgrade {port} {cost} + {mo}/mo',a),'pni',{city:p.city,net:p.net,tier:i},'sm',!portOk(p.city,i)||S.cash{cost} + {mo}/mo',{cost:fmt$(1500+PORT[p.tier].setup/2),mo:fmt$(PORT[p.tier].pni)}),'lagP',{id:p.id,d:1},'sm',S.cash<1500+PORT[p.tier].setup/2);} else if(r.k==='ix'){const c=r.id,city=ixCity(c),n=(S.ixn||{})[c]||1,i=nx(S.ixp[c]); @@ -4090,6 +4210,8 @@ function showHelp(){
CDN
${tr('Content networks like NetChill and Goggle. Most of your traffic comes from them. Peer with them and that traffic is free.')}
${tr('IX (Internet Exchange)')}
${tr('A shared switch in a city. One port, many free peering sessions. The route server peers you with every open member at once.')}
PNI
${tr('Private network interconnect: a cable straight to one network in the same building. For big traffic.')}
+
${tr('PNI lead times')}
${tr('A cross-connect with a small network takes a few weeks. The big content networks, Tier 1s and big eyeball networks quote 6 to 12 months for a new PNI or an augment, and the content networks and Tier 1s start at 100G. Doitsche Telekomm still sells 1G.')}
+
${tr('Peering inbox')}
${tr('Every IX port brings peering requests and max-prefix alerts, in the Networks tab. A session that blows past its limit is down until you look: raise the limit for growth, keep it down for a leak. Ignore your mail and selective networks get pickier.')}
${tr('Embedded cache')}
${tr('A CDN\'s server in your rack. Serves most of that CDN\'s traffic locally, for the price of power.')}
DE-KICKS
${tr('The group behind several big exchanges (Frankfurt, Madrid, Marseille, Dubai, Mumbai, New York) treats price lists as a state secret. Ports are quoted per customer and go up the bigger you look. Haggling can work, backfire or stall for a week. Prices get "harmonised" upwards once a year, add-ons appear on your invoice until you opt out, and trying to leave earns you a retention discount that ends with a fee.')}
${tr('Remote peering')}
${tr('Reach an IX over a fabric circuit without a POP there. It works, and the route server still gets you every open network, but it is discouraged: the reseller charges 1.5× for the port and oversubscribes it to 80%, latency rides the fabric, one fabric outage drops every session, and many selective networks refuse remote members outright.')}
${tr('Peering policy')}
${tr('Open peers with anyone. Selective wants to see traffic first. Restrictive (Tier 1s) only peers with giants, over PNIs. Paid means exactly that. Big selective networks also have moods: in some cities they refuse new peers for a few months, or only take PNIs, and now and then they tear down a session you already had. Try another city or a PNI, and ask again later.')}
${tr('Waves')}
${tr('Your fiber links are leased waves at a flat monthly rate. Longer and bigger costs more (10G → 6.4T), and subsea is 1.8× the price.')}
${tr('95th percentile')}
${tr('Transit bills sample your usage every day and charge the 95th percentile of the last 30 days, so short spikes are forgiven but long ones are not.')}
${tr('Routers')}
${tr('Each POP\'s router model caps its fastest port (100G, 400G, 800G, 1.6T) and how much it can forward. Bigger waves and ports need better routers at both ends. Better models unlock with your customer level. With one router, upgrades mean a day of downtime.')}
${tr('Dark fiber')}
${tr('Lease an IRU or build your own (slow, with delays), then buy a line system with amplifiers and light channels with 400ZR+, 800ZR+ or 1.6T transponders. Much cheaper than waves at scale, but the gear can fail. A spares kit speeds up repairs.')}
${tr('Subsea cables')}
${tr('Subsea waves can only follow cable systems modelled on real ones, drawn faintly on the map (tap a city to highlight its cables). Teal ones are new and cheap, purple ones pricey, dashed ones old and cut-prone. All your waves on one cable die together when it is cut. Between continents on land, you can often choose overland (2.5×, many borders) or a cable.')}
${tr('Latency')}
${tr('Every link has latency. High-frequency traders pay a fortune for a circuit within their latency budget; route them “Lowest latency”. Bulk backup customers do not care, so route them “Scenic” over your quiet links to keep busy ones free.')}
${tr('NOC dashboard')}
${tr('The chart button at the top opens traffic graphs by exit (caches, PNIs, IX, transit), money over time, per-ASN traffic with how it reaches you and what its transit costs, plus your busiest links and routers.')}
${tr('Asia')}
${tr('A weird, underserved market. Transit costs 2.5× what it does in Europe (Africa 2×, Oceania 1.8×), local incumbents mostly peer only for pay, and IXs are fragmented. But demand is enormous and users sign up 60% faster than anywhere else. Peering and caches pay off most here.')}
${tr('Russia')}
${tr('Moscow needs a mandatory government box in every POP, Western CDNs are mostly gone, Goggle video is throttled to half speed, and the sovereign internet drills now and then cut Moscow off for a day.')}
${tr('Events, chains and wholesale')}
${tr('Event networks (a final, a festival, a keynote) need a burst of capacity in one city for a few days and pay once at the end, prorated by how much of the crowd you served; below 70% you pay a penalty. SD-WAN chains connect 3–6 of your POPs hub-and-spoke, so one broken spoke upsets the whole contract. Once you run your own dark fiber, carriers want to rent spare channels as alien waves, and on fiber you built yourself, a spare pair.')}
${tr('Bank')}
${tr('Tap your cash to open the bank. Lenders make offers now and then, and much more often when you are in the red. Each loan has a monthly payment and some odd conditions; break one and you pay a penalty. Your credit rating decides which banks talk to you. The loan shark is always there. Do not be late.')}
${tr('LAGs')}
${tr('Out of port speed? Bundle up to 8 identical ports to the same transit provider, IX or PNI into a LAG. Each member costs a full port; flow hashing is never perfectly even, so a bundle carries about 95% of the sum.')}
${tr('Traffic engineering')}
${tr('Tap a link to see which networks, which entry points and which customer cities fill it. Raise a link\'s metric to steer traffic around it, or set an egress (transit, IX, PNI) to Prefer or Backup only.')}
${tr('China')}
${tr('Mainland China needs a license and a local joint venture. Many foreign services are blocked there, and traffic crossing the border loses packets unless you pay for premium routes.')}
${tr('Weird requirements')}
${tr('Some customers come with conditions: no Cogentle anywhere, no subsea cables because of sharks, two routers, a generator, NetChill on-net, low-loss China reach and more. Each pays a bonus. Unmet ones make them grumpy until you fix it or they leave.')}
${tr('Customer levels')}
${tr('As your peak traffic and footprint grow, bigger customers show up: streaming startups and universities, then AI GPU data centers and cloud on-ramps, then AI training interconnects and hyperscaler DCI deals measured in terabits. Pink $$ bubbles mark the big ones.')}
${tr('L2VPN & DDoS protection')}
${tr('Businesses may want a private circuit between two of your POPs (it rides your backbone), or DDoS protection (needs your own scrubbing center).')}
${tr('Scrubbing centers')}
${tr('Build one in as many POPs as you like. An attack goes to the nearest working center, and what it cannot take spills to the next. A far center means the flood rides your backbone there and the victim’s traffic comes back the long way: it fills your links, adds latency, and whatever the links cannot carry is not scrubbed. Customers who buy DDoS protection notice when their attacks cross an ocean.')}
${tr('NNI fabrics')}
${tr('Megapork, PocketFabric and Consolation Connect sell a port plus virtual circuits between cities. Great for small links and remote peering at an IX where you have no POP.')}
diff --git a/tests/inbox.test.js b/tests/inbox.test.js new file mode 100644 index 0000000..35fe0f4 --- /dev/null +++ b/tests/inbox.test.js @@ -0,0 +1,183 @@ +const test = require('node:test'); +const assert = require('node:assert/strict'); +const { load } = require('./harness'); + +function setup(ev) { + ev("ACT.start({});S.cash=1e9;S.lvl=6;for(const g of GOALS)S.done[g.id]=0;ACT.launchBB({city:'fra'});for(const c in S.pops)S.pops[c].rgen=3;compute()"); +} + +test('PNIs with the big networks take 6 to 12 months and start at 100G; small ones take weeks', () => { + const { ev, errors } = load(); + setup(ev); + ev("R.demTo.nfx=1e4;ACT.pni({city:'fra',net:'nfx',tier:0})"); + assert.equal(ev('S.pni.length'), 0, 'no 10G PNI with NetChill'); + assert.match(ev("document.getElementById('toasts').textContent"), /does not do 10G/); + ev("R.demTo.nfx=1e4;ACT.pni({city:'fra',net:'nfx',tier:1})"); + const p = JSON.parse(ev('JSON.stringify(S.pni[0])')); + assert.ok(p.ready - ev('S.day') >= 180 && p.ready - ev('S.day') <= 365, `six to twelve months (${p.ready - ev('S.day')} days)`); + ev('compute()'); + assert.equal(ev('R.usePni[S.pni[0].id]||0'), 0, 'nothing flows before delivery'); + assert.equal(ev('R.cost.pni'), 0, 'and nothing is billed'); + ev('S.nextFail=S.nextEvent=1e9;S.pni[0].ready=S.day+1;dayTick();compute()'); + assert.ok(ev('R.usePni[S.pni[0].id]') > 0, 'delivered on the day'); + // an upgrade is an augment on order: the old port keeps working meanwhile + ev("R.demTo.nfx=1e4;ACT.pni({city:'fra',net:'nfx',tier:2})"); + assert.equal(ev('S.pni[0].tier'), 1); + assert.equal(ev('S.pni[0].up.tier'), 2); + ev('ACT.lagP({id:S.pni[0].id,d:1})'); + assert.equal(ev('S.pni[0].up.n'), 1, 'one augment at a time'); + ev('S.day=S.pni[0].up.ready-1;dayTick()'); + assert.equal(ev('S.pni[0].tier'), 2); + assert.equal(ev('S.pni[0].up'), undefined); + // chasing it does nothing, mostly + ev("Math.random=()=>0.5;R.demTo.nfx=1e4;ACT.pni({city:'fra',net:'nfx',tier:3});const r0=S.pni[0].up.ready;ACT.pniChase({id:S.pni[0].id});window.__r=[r0,S.pni[0].up.ready]"); + const [r0, r1] = JSON.parse(ev('JSON.stringify(__r)')); + assert.equal(r0, r1); + // a beer at a conference halves the wait + ev("Math.random=()=>0.99;S.conf={until:S.day+10,reg:'EU',name:'RIPE'}"); + assert.equal(ev("pniLead('ggl')"), Math.round((180 + Math.floor(0.99 * 186)) / 2)); + ev('S.conf=null'); + // a small network: a few weeks + const small = ev("NETS.find(n=>n.pops.includes('fra')&&!pniBig(n.id)&&n.pol==='open'&&n.type!=='cdn').id"); + ev(`Math.random=()=>0.99;ACT.pni({city:'fra',net:'${small}',tier:0})`); + const lead = ev(`S.pni.find(p=>p.net==='${small}').ready-S.day`); + assert.ok(lead >= 14 && lead <= 42, `weeks, not months (${lead})`); + assert.deepEqual(errors, []); +}); + +test('Doitsche Telekomm sells 1G PNIs; nobody else does', () => { + const { ev, errors } = load(); + setup(ev); + ev("S.lvl=10;ACT.pni({city:'fra',net:'nfx',tier:-1})"); + assert.equal(ev('S.pni.length'), 0); + assert.equal(ev("peerOk('dtk','pni','fra').ok"), true); + ev("ACT.pni({city:'fra',net:'dtk',tier:-1})"); + assert.equal(ev('S.pni[0].g1'), true); + ev('S.pni[0].ready=S.day;compute()'); + assert.equal(ev('pniG(S.pni[0])'), 1); + assert.equal(ev("liveCap(pniG(S.pni[0]),'fra','a',1)"), 1); + assert.equal(ev('pniPN(S.pni[0])'), '1G'); + // and 1G grows into 10G + ev("ACT.pni({city:'fra',net:'dtk',tier:0})"); + assert.equal(ev('S.pni[0].up.tier'), 0); + ev('S.day=S.pni[0].up.ready-1;dayTick()'); + assert.equal(ev('S.pni[0].g1'), undefined); + assert.equal(ev('pniG(S.pni[0])'), 10); + ev("selectCity('fra');ACT.tab({t:'peer'})"); + assert.deepEqual(errors, []); +}); + +test('Microsnoft has no capacity on the US east coast, at any price', () => { + const { ev, errors } = load(); + setup(ev); + ev("for(const c of ['ash','nyc','hou'])ACT.buildPop({city:c});R.demTo.msf=1e5"); + for (const c of ['ash', 'nyc', 'bos', 'atn', 'mia']) { + assert.equal(ev(`peerOk('msf','pni','${c}').ok`), false, c); + assert.equal(ev(`peerOk('msf','ix','${c}').ok`), false, c); + } + assert.match(ev("peerOk('msf','pni','ash').why"), /capacity|sold out|coming online/i); + assert.equal(ev("peerOk('msf','pni','hou').ok"), true, 'Houston is fine'); + ev("ACT.pni({city:'ash',net:'msf',tier:1})"); + assert.equal(ev("S.pni.filter(p=>p.city==='ash').length"), 0); + assert.equal(ev("peerOk('ggl','pni','ash').ok"), ev("R.demTo.ggl>=Math.round(NET.ggl.minPni*repMul())"), 'other networks are not affected'); + assert.deepEqual(errors, []); +}); + +test('the peering inbox fills up, wants answers, and max-prefix alerts are growth or a leak', () => { + const { ev, errors } = load(); + setup(ev); + ev("ACT.buildPop({city:'ams'});S.pops.ams.rgen=3;ACT.buyIx({city:'ams',tier:1});compute()"); + ev('for(let i=0;i<60;i++)dayTick()'); + assert.ok(ev('S.inbox.items.length') >= 2, 'mail arrives with an exchange port'); + assert.ok(ev('S.inbox.rep') < 0, 'and ignoring it has a price'); + // accept a real network's request: a bilateral session + const net = ev("ixMembers('ams').find(id=>{const n=NET[id];return n.type!=='cdn'&&n.type!=='t1'&&n.pol!=='paid'&&n.share<=0.006&&!ixSessions('ams').has(id);})"); + assert.ok(net); + ev(`S.inbox.items=[{id:901,k:'req',ix:'ams',net:'${net}',day:S.day,stale:false,yrs:1,say:0},{id:902,k:'req',ix:'ams',nm:'Bob’s Bits',asn:212345,day:S.day,stale:true,yrs:7,say:3}];ACT.inbox()`); + assert.match(ev("document.getElementById('modalCard').textContent"), /Bob’s Bits/); + ev("ACT.inboxAct({id:901,a:'accept'});ACT.inboxAct({id:902,a:'accept'})"); + assert.equal(ev(`!!S.peers['${net}@ams']`), true); + assert.equal(ev('S.inbox.tiny[212345].nm'), 'Bob’s Bits'); + ev('compute()'); + assert.equal(ev(`ixSessions('ams').has('${net}')`), true); + // growth: raising the limit brings the session back + ev(`S.inbox.items.push({id:903,k:'mp',key:'${net}@ams',net:'${net}',ix:'ams',day:S.day,lim:100,got:180,leak:false,yrs:4});S.inbox.down['${net}@ams']=1e9`); + assert.equal(ev(`ixSessions('ams').has('${net}')`), false, 'down on max-prefix'); + ev("ACT.inboxAct({id:903,a:'raise'})"); + assert.equal(ev(`ixSessions('ams').has('${net}')`), true); + // a leak: raising the limit is a route leak, keeping it down is right + ev(`S.inbox.items.push({id:904,k:'mp',key:'${net}@ams',net:'${net}',ix:'ams',day:S.day,lim:100,got:987654,leak:true,yrs:4});S.inbox.down['${net}@ams']=1e9;ACT.inboxAct({id:904,a:'raise'})`); + assert.ok(ev('S.ev.leak&&S.ev.leak.until>S.day'), 'a route leak'); + assert.ok(ev("S.inc.some(i=>i.type==='leak')")); + ev(`S.inbox.items.push({id:905,k:'mp',key:'${net}@ams',net:'${net}',ix:'ams',day:S.day,lim:100,got:987654,leak:true,yrs:4});S.inbox.down['${net}@ams']=1e9;ACT.inboxAct({id:905,a:'keep'})`); + const back = ev(`S.inbox.down['${net}@ams']`); + assert.ok(back > ev('S.day') && back < ev('S.day') + 12, 'back on its own in a few days'); + // unanswered requests expire, and the reputation makes selective networks pickier + ev("S.inbox.items=[{id:906,k:'req',ix:'ams',net:'" + net + "',day:S.day-31,stale:false,yrs:1,say:0}];S.inbox.rep=0;inboxDay(S.day)"); + assert.equal(ev('S.inbox.items.some(x=>x.id===906)'), false); + assert.ok(ev('S.inbox.rep') < 0); + ev('S.inbox.rep=-10'); + assert.ok(ev('repMul()') > 1.05 && ev('repMul()') <= 1.1, 'pickier, but never a wall'); + // an alert nobody answers clears itself once the other side notices + ev(`S.inbox.items=[{id:910,k:'mp',key:'${net}@ams',net:'${net}',ix:'ams',day:S.day,lim:100,got:180,leak:false,yrs:4}];S.inbox.down['${net}@ams']=S.day+1;inboxDay(S.day+1)`); + assert.equal(ev('S.inbox.items.some(x=>x.id===910)'), false); + // bulk answers + ev("S.inbox.items=[{id:907,k:'req',ix:'ams',nm:'A',asn:1,day:S.day,say:0,yrs:1},{id:908,k:'req',ix:'ams',nm:'B',asn:2,day:S.day,say:0,yrs:1}];ACT.inboxAll({a:'decline'})"); + assert.equal(ev('S.inbox.items.length'), 0); + // the Networks tab says how much mail is waiting + ev("S.inbox.items=[{id:909,k:'req',ix:'ams',nm:'C',asn:3,day:S.day,say:1,yrs:1}];closeModal();UI.left='nets';UI.leftOpen=true;renderLeft()"); + assert.match(ev("document.getElementById('left').textContent"), /Peering inbox/); + assert.deepEqual(errors, []); +}); + +test('the AI agent answers everything, costs $20M a year and gets it wrong a lot', () => { + const { ev, errors } = load(); + setup(ev); + ev("ACT.buildPop({city:'ams'});S.pops.ams.rgen=3;ACT.buyIx({city:'ams',tier:1});compute()"); + const net = ev("ixMembers('ams').find(id=>{const n=NET[id];return n.type!=='cdn'&&n.type!=='t1'&&n.pol!=='paid'&&n.share<=0.006;})"); + const cash = ev('S.cash'); + ev("ACT.inboxBot({on:1});compute()"); + assert.equal(ev('S.inbox.bot'), true); + assert.ok(cash - ev('S.cash') >= ev('AI_MO')); + assert.ok(ev('R.cost.extras') >= ev('AI_MO'), 'billed every month'); + assert.ok(Math.abs(ev('AI_MO*12') - 20e6) < 12); + // it always gets a leak wrong when the dice say so + ev(`S.peers['${net}@ams']=true;S.inbox.items=[{id:1,k:'mp',key:'${net}@ams',net:'${net}',ix:'ams',day:S.day,lim:50,got:999999,leak:true,yrs:3},{id:2,k:'req',ix:'ams',nm:'D',asn:4,day:S.day,say:0,yrs:1}];S.inbox.down['${net}@ams']=1e9`); + ev('Math.random=()=>0.1;inboxBot()'); + assert.equal(ev('S.inbox.items.length'), 0, 'inbox zero'); + assert.ok(ev('S.ev.leak&&S.ev.leak.until>S.day'), 'and a route leak'); + assert.ok(ev("S.inbox.log.some(e=>/They seemed nice/.test(e.m))")); + ev('ACT.inbox()'); + assert.match(ev("document.getElementById('modalCard').textContent"), /They seemed nice/); + // and sometimes it gets it right + ev(`S.inbox.items=[{id:3,k:'mp',key:'${net}@ams',net:'${net}',ix:'ams',day:S.day,lim:50,got:999999,leak:true,yrs:3}];S.ev.leak=null;Math.random=()=>0.9;inboxBot()`); + assert.ok(!ev('S.ev.leak')); + ev('ACT.inboxBot({on:0});compute()'); + assert.equal(ev('S.inbox.bot'), false); + assert.ok(ev('R.cost.extras') < ev('AI_MO')); + assert.deepEqual(errors, []); +}); + +test('saves: the inbox and PNIs on order survive, and garbage is repaired', () => { + const { ev, errors } = load(); + setup(ev); + ev("S.pni.push({id:'x',city:'fra',net:'dtk',tier:0,g1:true,ready:S.day+30,up:{tier:'9',n:99,ready:'x'}},{id:'y',city:'fra',net:'nfx',tier:1,g1:true})"); + ev("S.inbox={items:[{id:1,k:'req',ix:'ams',nm:'Ok',asn:5,day:1,say:99},{k:'evil',ix:'ams'},{id:2,k:'mp',ix:'nowhere',key:'a'},'x'],down:{'a@b':'7'},tiny:{'12':{nm:'T',ix:'ams'},'no':{ix:'ams'}},rep:99,bot:'yes',log:[{d:1,m:'hi',a:{who:{x:1}}},5],seq:'z'}"); + ev('const o=JSON.parse(JSON.stringify(S));sanitize(o);window.__o=o'); + assert.equal(ev('__o.inbox.items.length'), 1); + assert.equal(ev('__o.inbox.items[0].say'), ev('REQ_SAY.length-1')); + assert.equal(ev('__o.inbox.rep'), 5); + assert.equal(ev('__o.inbox.bot'), true); + assert.equal(ev("__o.inbox.down['a@b']"), 7); + assert.deepEqual(JSON.parse(ev('JSON.stringify(Object.keys(__o.inbox.tiny))')), ['12']); + assert.equal(ev('typeof __o.inbox.log[0].a.who'), 'string'); + assert.equal(ev('__o.inbox.seq'), 1); + assert.equal(ev("__o.pni.find(p=>p.id==='x').up.n"), ev('LAG_MAX')); + assert.equal(ev("__o.pni.find(p=>p.id==='x').g1"), true); + assert.equal(ev("__o.pni.find(p=>p.id==='y').g1"), undefined, 'only Doitsche Telekomm does 1G'); + // an old save without an inbox loads with an empty one + ev('const p=JSON.parse(JSON.stringify(S));delete p.inbox;sanitize(p);window.__p=p'); + assert.equal(ev('__p.inbox.items.length'), 0); + assert.equal(ev('__p.inbox.bot'), false); + assert.deepEqual(errors, []); +}); diff --git a/tests/issues.test.js b/tests/issues.test.js index c611a03..0766868 100644 --- a/tests/issues.test.js +++ b/tests/issues.test.js @@ -759,7 +759,7 @@ test('connections in the NOC dashboard can be upgraded and grown into LAGs right assert.ok(tap('buyTransit')); assert.equal(ev("S.transit[0].tier"), 2); assert.ok(tap('lagP')); - assert.equal(ev("S.pni[0].n"), 2); + assert.equal(ev("S.pni[0].up.n"), 2, 'a LAG member with NetChill is an augment on order'); assert.ok(tap('lagIx')); assert.equal(ev("S.ixn.ams"), 2); assert.ok(tap('buyIx')); diff --git a/tests/regions.test.js b/tests/regions.test.js index 4bcae8f..0719e77 100644 --- a/tests/regions.test.js +++ b/tests/regions.test.js @@ -340,7 +340,7 @@ test('Korea: sender pays, pricey transit, Glitch leaves and Faceplant detours', assert.equal(ev(`NET.${n}.pol`), 'paid'); assert.match(ev(`peerOk('${n}','ix','icn').why`), /Sender pays/); } - ev("S.pops.icn.bb={d:400};ACT.buyTransit({city:'icn',net:'ntt',tier:1});ACT.pni({city:'icn',net:'ktt',tier:1});compute()"); + ev("S.pops.icn.bb={d:400};ACT.buyTransit({city:'icn',net:'ntt',tier:1});ACT.pni({city:'icn',net:'ktt',tier:1});S.pni[0].ready=S.day;compute()"); const used = ev("R.usePni[S.pni[0].id]||0"); assert.ok(used > 0, 'traffic flows over the Kay-Tea PNI'); assert.equal(ev("R.cost.pni"), ev(`PORT[1].pni+NET.ktt.paidFee+Math.round(NET.ktt.perG*${used})`), 'billed per gigabit sent');