Compare commits
2 commits
3bc1641a46
...
e25f843526
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e25f843526 | ||
|
|
69328ce257 |
26 changed files with 825 additions and 59 deletions
|
|
@ -46,7 +46,7 @@ These are what the game promises, held up by `tests/gameplay-rules.test.js` (one
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| M1 | On-call is the classic game: it equals `RULE_DEF`, and a save without rules loads as On-call. The seeded suites (`tests/game.test.js`, `tests/rules.test.js`) are its behaviour. | Old saves never change under them. |
|
| M1 | On-call is the classic game: it equals `RULE_DEF`, and a save without rules loads as On-call. The seeded suites (`tests/game.test.js`, `tests/rules.test.js`) are its behaviour. | Old saves never change under them. |
|
||||||
| M2 | Presets are ordered: Best Effort never harsher than Change Freeze, Change Freeze never harsher than On-call, BGP at 3 a.m. never gentler (chaos, lead times, market; and a seeded year of incidents). Only Best Effort mends sea cuts without ships, skips conferences, rescues instead of game over, has patient customers and instant PNIs. | The names promise it. |
|
| M2 | Presets are ordered: Best Effort never harsher than Change Freeze, Change Freeze never harsher than On-call, BGP at 3 a.m. never gentler (chaos, lead times, market; and a seeded year of incidents). Only Best Effort mends sea cuts without ships, skips conferences, rescues instead of game over, has patient customers and instant PNIs. | The names promise it. |
|
||||||
| M3 | Every subsystem that can annoy the player reads a rule: outages and events (`chaos`), DDoS, sold-out routes, de-peering and hardware prices (`market`), lead times (`lead`), the clock, cable ships (`sea`), conferences (`confs`), going broke (`broke`), customer patience (`moods`), PNI delivery (`pnis`), scarce IPv4 and CGNAT (`ip4`, On-call and BGP at 3 a.m. only; scenarios opt in), and the day's toasts (quiet notifications). A quiet ruleset gives a quiet year. | Rules are presets of flags, not separate code. |
|
| M3 | Every subsystem that can annoy the player reads a rule: outages and events (`chaos`), DDoS, sold-out routes, de-peering and hardware prices (`market`), lead times (`lead`), the clock, cable ships (`sea`), conferences (`confs`), going broke (`broke`), customer patience (`moods`), PNI delivery (`pnis`), scarce IPv4, CGNAT and IPv6-only homes behind NAT64 (`ip4`, On-call and BGP at 3 a.m. only; scenarios opt in), and the day's toasts (quiet notifications). A quiet ruleset gives a quiet year. | Rules are presets of flags, not separate code. |
|
||||||
| M4 | Scenarios and the weekly challenge always run On-call plus their own `S.scn.rules`. | Fair scores. |
|
| M4 | Scenarios and the weekly challenge always run On-call plus their own `S.scn.rules`. | Fair scores. |
|
||||||
| M5 | Sandbox has no locked feature: open gates, every level, own cables, endless money. | It is a sandbox. |
|
| M5 | Sandbox has no locked feature: open gates, every level, own cables, endless money. | It is a sandbox. |
|
||||||
| M6 | A Normal game picks its charter once, when it starts (sandbox, puzzles and scenarios never do). A charter changes what you set out to do, never what things cost: the Cable broker gets glass (fiber, line systems, optics, own subsea cables and the routers to light them) from day one at the prices everyone pays at the top level, and everything else by level. | Same prices and rules for every charter (#300). |
|
| M6 | A Normal game picks its charter once, when it starts (sandbox, puzzles and scenarios never do). A charter changes what you set out to do, never what things cost: the Cable broker gets glass (fiber, line systems, optics, own subsea cables and the routers to light them) from day one at the prices everyone pays at the top level, and everything else by level. | Same prices and rules for every charter (#300). |
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,8 @@ All notable changes to this project are documented here. The project follows
|
||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
- Broadband cities can now go IPv6-only with 464XLAT, a second way to save IPv4 next to CGNAT. Start it from a city's Home broadband, which also says what it does to your monthly IPv4 bill: its home routers are swapped over a month or more, paid as each one goes in (new homes there get one too, at the same price), and the homes then need no IPv4 address of their own, only a share of a NAT64 pool at up to 256 homes per address, with fewer refunds than CGNAT at the same ratio. The bank's Address space section shows your homes as public, behind CGNAT and IPv6-only, with the NAT64 ratio next to the CGNAT one, and says which of the two to stretch when space runs out.
|
||||||
|
- CGNAT gets a little cheaper every year: the world moves to IPv6 about two points a year, so less of your homes' traffic needs IPv4 and the CGNAT and NAT64 boxes carry less of it.
|
||||||
- The router model and the line system your intern standardizes on are now picked in one place, the build standard. Keep routers ahead and Upgrade optical transport take them from there and say so, with a button to the sheet. With a model or line system in the standard, both orders bring everything up to it and stop there (Upgrade optical transport on every fiber, even at POPs that Keep to the build standard skips); "Keep as is" leaves them to the next one up when busy. A model or line system you had picked in an order that was running moves into your standard, so new POPs get that model too.
|
- The router model and the line system your intern standardizes on are now picked in one place, the build standard. Keep routers ahead and Upgrade optical transport take them from there and say so, with a button to the sheet. With a model or line system in the standard, both orders bring everything up to it and stop there (Upgrade optical transport on every fiber, even at POPs that Keep to the build standard skips); "Keep as is" leaves them to the next one up when busy. A model or line system you had picked in an order that was running moves into your standard, so new POPs get that model too.
|
||||||
- Your intern no longer takes a fiber dark for the build standard just because it looks quiet: like the optical upgrade order, it first checks that every gigabit, circuit and express gets around the fiber for the day. The two orders share one line system swap a night (two for Kevin), never work on the same fiber in one shift, and a wave the standard just upgraded is no longer handed back the same day.
|
- Your intern no longer takes a fiber dark for the build standard just because it looks quiet: like the optical upgrade order, it first checks that every gigabit, circuit and express gets around the fiber for the day. The two orders share one line system swap a night (two for Kevin), never work on the same fiber in one shift, and a wave the standard just upgraded is no longer handed back the same day.
|
||||||
- Whoever runs sales can now answer renewal haggles for you, each in their own way: switch it on at the sales desk. The engineer keeps nerdy customers at the market price and gives everyone else their discount, the shark refuses discounts and some customers walk, and the CEO settles it on the golf course, for better or worse.
|
- Whoever runs sales can now answer renewal haggles for you, each in their own way: switch it on at the sales desk. The engineer keeps nerdy customers at the market price and gives everyone else their discount, the shark refuses discounts and some customers walk, and the CEO settles it on the golf course, for better or worse.
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,9 @@
|
||||||
# What is left (as of 2026-11-07)
|
# What is left (as of 2026-11-07)
|
||||||
|
|
||||||
Work in this fork, pushed to the `vanvik` Forgejo remote (never to `origin`). Built so far: the build standard, multiplayer
|
Work in this fork, pushed to the `vanvik` Forgejo remote (never to `origin`). Built so far: the build standard (the only
|
||||||
phase 1, dark mode (#80), IPv4 address space (#150), express fiber (#58) and satellite teleports (#83). Everything below is
|
place for the router model and line system), multiplayer phase 1, dark mode (#80), IPv4 address space (#150) with
|
||||||
planned or known, not built.
|
IPv6-only broadband and NAT64, express fiber (#58) and satellite teleports (#83). Everything below is planned or known,
|
||||||
|
not built. Items 5 and 6 wait for the owner's go.
|
||||||
|
|
||||||
## Promised and not done yet
|
## Promised and not done yet
|
||||||
|
|
||||||
|
|
@ -27,10 +28,14 @@ planned or known, not built.
|
||||||
puzzles) has to ask for them.
|
puzzles) has to ask for them.
|
||||||
- **Phase 2 gets simpler:** with every world in one server process, its wall-clock timing (tenders that close after 10
|
- **Phase 2 gets simpler:** with every world in one server process, its wall-clock timing (tenders that close after 10
|
||||||
real minutes, `idle` ≥ 300 s, notice on each player's own clock) can move to game days.
|
real minutes, `idle` ≥ 300 s, notice on each player's own clock) can move to game days.
|
||||||
4. **Wave B: #97 co-op companies** (several players run one network with roles, budgets and approvals), host-authoritative
|
4. **IPv6-only broadband, the follow-up** (after the server-run game, or alongside it: it touches the build standard and
|
||||||
|
the intern, not the server). A build-standard row "Broadband: IPv6-only" (cities with broadband start the swap) and the
|
||||||
|
intern's `std` order rolling it out when there is money, busiest CGNAT cities first. `ip6Go`/`ip6Stop` and the city
|
||||||
|
panel are in `src/game/60-features/34-ipv6-only.js`; the row goes into `BSTD` and `bstdPlan` (96-pop-standard.js).
|
||||||
|
5. **Wave B: #97 co-op companies** (several players run one network with roles, budgets and approvals), host-authoritative
|
||||||
over the multiplayer server, and **multiplayer phase 2** (players as carriers in each other's simulations: transit,
|
over the multiplayer server, and **multiplayer phase 2** (players as carriers in each other's simulations: transit,
|
||||||
peering, PNIs, shared fiber): design in `docs/plans/multiplayer-phase2.md`.
|
peering, PNIs, shared fiber): design in `docs/plans/multiplayer-phase2.md`.
|
||||||
5. **Wave C: #144 directional traffic**, last and on its own: keep the totals, split them by traffic profile, utilization is
|
6. **Wave C: #144 directional traffic**, last and on its own: keep the totals, split them by traffic profile, utilization is
|
||||||
the busier direction. It comes after #58 because both touch link capacity (express channels now count too).
|
the busier direction. It comes after #58 because both touch link capacity (express channels now count too).
|
||||||
|
|
||||||
## Known limitations of what shipped
|
## Known limitations of what shipped
|
||||||
|
|
@ -52,6 +57,9 @@ planned or known, not built.
|
||||||
- **IPv4 (#150):** the intern does not manage addresses (optional in the issue); transfers are instant; lease-out income
|
- **IPv4 (#150):** the intern does not manage addresses (optional in the issue); transfers are instant; lease-out income
|
||||||
is not in the investor revenue share; blocks granted to old saves can be sold after two years (a one-off windfall);
|
is not in the investor revenue share; blocks granted to old saves can be sold after two years (a one-off windfall);
|
||||||
CGNAT annoyance costs refunds but does not slow broadband growth; the NOC window's address-space button does nothing.
|
CGNAT annoyance costs refunds but does not slow broadband growth; the NOC window's address-space button does nothing.
|
||||||
|
- **IPv6-only broadband:** no one-off grumble while a city's home routers are swapped; the swap and the NAT64 ratio are
|
||||||
|
not in the build standard or the intern's orders yet (item 4); a new home in an IPv6-only city pays its router even
|
||||||
|
when cash is short (a running cost, so a finished city never looks like a stopped swap).
|
||||||
- **Express fiber (#58):** splicing a whole fiber pair through a city was left out on purpose (every fiber end is a POP;
|
- **Express fiber (#58):** splicing a whole fiber pair through a city was left out on purpose (every fiber end is a POP;
|
||||||
expresses cover the need); loss and MTU incidents on a fiber do not reduce the expresses on it; the fiber panel's
|
expresses cover the need); loss and MTU incidents on a fiber do not reduce the expresses on it; the fiber panel's
|
||||||
"n of max channels" line does not count express slots (the Express section does); regen sites added later do not charge
|
"n of max channels" line does not count express slots (the Express section does); regen sites added later do not charge
|
||||||
|
|
|
||||||
|
|
@ -2693,20 +2693,26 @@
|
||||||
"ip4.cgnat_boxes":"CGNAT-Boxen",
|
"ip4.cgnat_boxes":"CGNAT-Boxen",
|
||||||
"ip4.cgnat_note":"Mehr Haushalte pro Adresse macht Platz für Kunden, aber Spiele und Portweiterleitungen leiden: {p} der Rechnung eines CGNAT-Haushalts gehen als Erstattung zurück.",
|
"ip4.cgnat_note":"Mehr Haushalte pro Adresse macht Platz für Kunden, aber Spiele und Portweiterleitungen leiden: {p} der Rechnung eines CGNAT-Haushalts gehen als Erstattung zurück.",
|
||||||
"ip4.cgnat_ratio":"CGNAT: Haushalte pro Adresse",
|
"ip4.cgnat_ratio":"CGNAT: Haushalte pro Adresse",
|
||||||
"ip4.costs_row":"IPv4-Mieten und CGNAT",
|
|
||||||
"ip4.free":"Frei für neue Kunden (Haushalte kommen zuerst hinter CGNAT)",
|
"ip4.free":"Frei für neue Kunden (Haushalte kommen zuerst hinter CGNAT)",
|
||||||
"ip4.from_rir":"Von der RIR",
|
"ip4.from_rir":"Von der RIR",
|
||||||
"ip4.give_back":"Zurückgeben",
|
"ip4.give_back":"Zurückgeben",
|
||||||
"ip4.held":"Die RIR überträgt diesen Block erst ab {date} wieder.",
|
"ip4.held":"Die RIR überträgt diesen Block erst ab {date} wieder.",
|
||||||
"ip4.homes":"Breitband-Haushalte",
|
"ip4.homes":"Breitband-Haushalte",
|
||||||
|
"ip4.homes_behind_cgnat":"Haushalte hinter CGNAT",
|
||||||
"ip4.homes_cgnat":"{n}, davon {p} hinter CGNAT",
|
"ip4.homes_cgnat":"{n}, davon {p} hinter CGNAT",
|
||||||
|
"ip4.homes_public":"Haushalte mit eigener Adresse",
|
||||||
|
"ip4.homes_v6":"Nur-IPv6-Haushalte (464XLAT)",
|
||||||
|
"ip4.homes_v6_pool":"{n}, NAT64-Pool {pool}",
|
||||||
"ip4.in_use":"Deine Kunden brauchen diese Adressen: steck mehr Haushalte hinter CGNAT oder hol dir erst einen weiteren Block.",
|
"ip4.in_use":"Deine Kunden brauchen diese Adressen: steck mehr Haushalte hinter CGNAT oder hol dir erst einen weiteren Block.",
|
||||||
|
"ip4.in_use_both":"Deine Kunden brauchen diese Adressen: pack mehr Haushalte auf jede CGNAT- oder NAT64-Adresse oder hol dir erst einen weiteren Block.",
|
||||||
|
"ip4.in_use_v6":"Deine Kunden brauchen diese Adressen: pack mehr Nur-IPv6-Haushalte auf jede NAT64-Adresse oder hol dir erst einen weiteren Block.",
|
||||||
"ip4.lease":"Mieten {price}/Monat",
|
"ip4.lease":"Mieten {price}/Monat",
|
||||||
"ip4.lease_out":"Vermieten +{price}/Monat",
|
"ip4.lease_out":"Vermieten +{price}/Monat",
|
||||||
"ip4.leased_in":"Einen {p}-Block ({n} Adressen) für {price}/Monat gemietet.",
|
"ip4.leased_in":"Einen {p}-Block ({n} Adressen) für {price}/Monat gemietet.",
|
||||||
"ip4.leased_in_mo":"Gemietet · {price}/Monat",
|
"ip4.leased_in_mo":"Gemietet · {price}/Monat",
|
||||||
"ip4.leased_out":"Dein {p}-Block ist vermietet: +{price}/Monat.",
|
"ip4.leased_out":"Dein {p}-Block ist vermietet: +{price}/Monat.",
|
||||||
"ip4.leased_out_mo":"Vermietet · +{price}/Monat",
|
"ip4.leased_out_mo":"Vermietet · +{price}/Monat",
|
||||||
|
"ip4.leases_cgnat_nat64":"IPv4-Mieten, CGNAT und NAT64",
|
||||||
"ip4.leases_in":"Gemietete Blöcke",
|
"ip4.leases_in":"Gemietete Blöcke",
|
||||||
"ip4.leases_out":"Vermietete Blöcke",
|
"ip4.leases_out":"Vermietete Blöcke",
|
||||||
"ip4.market":"Transfermarkt",
|
"ip4.market":"Transfermarkt",
|
||||||
|
|
@ -2714,8 +2720,13 @@
|
||||||
"ip4.movable_from":"wieder übertragbar ab {date}",
|
"ip4.movable_from":"wieder übertragbar ab {date}",
|
||||||
"ip4.n_addresses":{"one":"{n} Adresse","other":"{n} Adressen"},
|
"ip4.n_addresses":{"one":"{n} Adresse","other":"{n} Adressen"},
|
||||||
"ip4.n_homes_per_address":{"one":"{n} Haushalt pro Adresse","other":"{n} Haushalte pro Adresse"},
|
"ip4.n_homes_per_address":{"one":"{n} Haushalt pro Adresse","other":"{n} Haushalte pro Adresse"},
|
||||||
|
"ip4.nat64_gateways":"NAT64-Gateways",
|
||||||
|
"ip4.nat64_note":"Nur-IPv6-Haushalte haben kein eigenes IPv4: Was es noch braucht (Konsolen, Nur-IPv4-VPNs), teilt sich deinen NAT64-Pool, und {p} ihrer Rechnung gehen als Erstattung zurück, jedes Jahr weniger, weil die Welt zu IPv6 umzieht. Eine Stadt stellst du unter Heim-Breitband auf Nur-IPv6 um.",
|
||||||
|
"ip4.nat64_ratio":"NAT64: Nur-IPv6-Haushalte pro Adresse",
|
||||||
"ip4.no_grow":"{name} ({city}) wollte auf {bw} wachsen, aber du hattest keine freien IPv4-Adressen dafür.",
|
"ip4.no_grow":"{name} ({city}) wollte auf {bw} wachsen, aber du hattest keine freien IPv4-Adressen dafür.",
|
||||||
"ip4.no_space":"{name} braucht einen IPv4-Block {p} ({n} Adressen), und nur {free} sind frei. Kauf oder miete einen Block oder steck mehr Haushalte hinter CGNAT.",
|
"ip4.no_space":"{name} braucht einen IPv4-Block {p} ({n} Adressen), und nur {free} sind frei. Kauf oder miete einen Block oder steck mehr Haushalte hinter CGNAT.",
|
||||||
|
"ip4.no_space_both":"{name} braucht einen IPv4-Block {p} ({n} Adressen), und nur {free} sind frei. Kauf oder miete einen Block oder pack mehr Haushalte auf jede CGNAT- oder NAT64-Adresse.",
|
||||||
|
"ip4.no_space_v6":"{name} braucht einen IPv4-Block {p} ({n} Adressen), und nur {free} sind frei. Kauf oder miete einen Block oder pack mehr Nur-IPv6-Haushalte auf jede NAT64-Adresse.",
|
||||||
"ip4.note":"IPv6 ist kostenlos und unendlich. IPv4 ist seit Jahren aus: Geschäftskunden brauchen öffentliche Blöcke davon, und Haushalte, die nicht mehr reinpassen, teilen sich Adressen hinter CGNAT (IPv6-Traffic läuft an der Box vorbei).",
|
"ip4.note":"IPv6 ist kostenlos und unendlich. IPv4 ist seit Jahren aus: Geschäftskunden brauchen öffentliche Blöcke davon, und Haushalte, die nicht mehr reinpassen, teilen sich Adressen hinter CGNAT (IPv6-Traffic läuft an der Box vorbei).",
|
||||||
"ip4.off":"Nach den Regeln dieses Spiels gibt es IPv4 reichlich.",
|
"ip4.off":"Nach den Regeln dieses Spiels gibt es IPv4 reichlich.",
|
||||||
"ip4.offer_needs":"Braucht einen IPv4-Block {p} ({n} Adressen); nur {free} frei.",
|
"ip4.offer_needs":"Braucht einen IPv4-Block {p} ({n} Adressen); nur {free} frei.",
|
||||||
|
|
@ -2727,11 +2738,39 @@
|
||||||
"ip4.sell":"Verkaufen {price}",
|
"ip4.sell":"Verkaufen {price}",
|
||||||
"ip4.sold":"Dein {p}-Block ist für {price} verkauft.",
|
"ip4.sold":"Dein {p}-Block ist für {price} verkauft.",
|
||||||
"ip4.squeezed":"Kein Platz mehr: {p} der Haushalte passen nicht mal bei {r} Haushalten pro Adresse rein. Ihre Verbindungen brechen ab und sie wollen Geld zurück: kauf oder miete einen Block.",
|
"ip4.squeezed":"Kein Platz mehr: {p} der Haushalte passen nicht mal bei {r} Haushalten pro Adresse rein. Ihre Verbindungen brechen ab und sie wollen Geld zurück: kauf oder miete einen Block.",
|
||||||
|
"ip4.squeezed_both":"Kein Platz mehr: {p} der Haushalte passen nicht mal bei {r} Haushalten pro CGNAT-Adresse und {r6} pro NAT64-Adresse rein. Ihre Verbindungen brechen ab und sie wollen Geld zurück: kauf oder miete einen Block.",
|
||||||
|
"ip4.squeezed_v6":"Kein Platz mehr: {p} der Haushalte passen nicht mal bei {r} Nur-IPv6-Haushalten pro NAT64-Adresse rein. Ihre Verbindungen brechen ab und sie wollen Geld zurück: kauf oder miete einen Block.",
|
||||||
"ip4.take_back":"Zurückholen",
|
"ip4.take_back":"Zurückholen",
|
||||||
"ip4.toast_cgnat":"<b>Dein IPv4 ist voll.</b> {p} deiner Haushalte teilen sich jetzt Adressen hinter CGNAT, und ein paar Gamer haben schon geschrieben.",
|
"ip4.toast_cgnat":"<b>Dein IPv4 ist voll.</b> {p} deiner Haushalte teilen sich jetzt Adressen hinter CGNAT, und ein paar Gamer haben schon geschrieben.",
|
||||||
"ip4.toast_out":"<b>IPv4 ist aus.</b> Selbst bei {r} Haushalten pro Adresse passt nicht jeder hinter CGNAT: kauf oder miete einen Block bei der Bank.",
|
"ip4.toast_out":"<b>IPv4 ist aus.</b> Selbst bei {r} Haushalten pro Adresse passt nicht jeder hinter CGNAT: kauf oder miete einen Block bei der Bank.",
|
||||||
|
"ip4.toast_out_both":"<b>IPv4 ist aus.</b> Selbst bei {r} Haushalten pro Adresse hinter CGNAT und {r6} bei NAT64 passt nicht jeder Haushalt rein: kauf oder miete einen Block bei der Bank.",
|
||||||
|
"ip4.toast_out_v6":"<b>IPv4 ist aus.</b> Selbst bei {r} Haushalten pro Adresse passt nicht jeder Nur-IPv6-Haushalt in deinen NAT64-Pool: kauf oder miete einen Block bei der Bank.",
|
||||||
"ip4.too_many":"Du hast {n} IPv4-Blöcke, mehr kann ein Netz nicht führen. Verkauf kleine Blöcke oder gib sie zurück, um Platz für einen größeren zu schaffen.",
|
"ip4.too_many":"Du hast {n} IPv4-Blöcke, mehr kann ein Netz nicht führen. Verkauf kleine Blöcke oder gib sie zurück, um Platz für einen größeren zu schaffen.",
|
||||||
|
"ip4.v6_share":"IPv6-Anteil am Traffic der Haushalte dieses Jahr",
|
||||||
"ip4.yours":"Deine IPv4-Adressen",
|
"ip4.yours":"Deine IPv4-Adressen",
|
||||||
|
"ip6.already":"Jeder Haushalt hier ist schon Nur-IPv6.",
|
||||||
|
"ip6.busy":"Der Tausch läuft hier schon.",
|
||||||
|
"ip6.done":"<b>{city} ist jetzt Nur-IPv6.</b> Jeder Haushalt dort läuft mit 464XLAT, und was noch IPv4 braucht, teilt sich deinen NAT64-Pool.",
|
||||||
|
"ip6.dual_stack":"Dual Stack",
|
||||||
|
"ip6.every_home":"Alle Haushalte",
|
||||||
|
"ip6.go":"Auf Nur-IPv6 umstellen {cost}",
|
||||||
|
"ip6.homes_that_join_later":"Haushalte, die später dazukommen, bekommen auch einen, für {cost} pro Stück.",
|
||||||
|
"ip6.n_routers":{"one":"{n} Heimrouter","other":"{n} Heimrouter"},
|
||||||
|
"ip6.new_homes_get_a_clat":"Neue Haushalte bekommen gleich einen Router mit CLAT, für {cost} pro Stück, und was noch IPv4 braucht, teilt sich deinen NAT64-Pool, {r} Haushalte pro Adresse.",
|
||||||
|
"ip6.no_bb":"Starte hier zuerst Breitband.",
|
||||||
|
"ip6.no_home_is_behind_cgnat":"Noch steckt kein Haushalt hinter CGNAT: Das lohnt sich erst, wenn dein IPv4 knapp wird.",
|
||||||
|
"ip6.part_note":"Der Tausch wurde bei {p} der Haushalte gestoppt, und neue Haushalte bekommen wieder Dual Stack.",
|
||||||
|
"ip6.pitch":"Tausch die Heimrouter hier gegen welche mit CLAT: Die Haushalte laufen nur mit IPv6 und haben kein eigenes IPv4, und was noch IPv4 braucht, teilt sich deinen NAT64-Pool, {r} Haushalte pro Adresse.",
|
||||||
|
"ip6.share_homes":"{p} der Haushalte",
|
||||||
|
"ip6.started":"{routers} in {city} werden gegen Nur-IPv6-Router getauscht: etwa {days} Tage.",
|
||||||
|
"ip6.stop":"Tausch stoppen",
|
||||||
|
"ip6.stopped":"Tausch in {city} bei {p} der Haushalte gestoppt. Die schon getauschten Router bleiben; neue Haushalte bekommen wieder Dual Stack.",
|
||||||
|
"ip6.swapping_home_routers_paid":"Die Heimrouter werden getauscht und beim Einbau bezahlt; neue Haushalte bekommen gleich den neuen, für {cost} pro Stück. Fertig etwa am {date}.",
|
||||||
|
"ip6.title":"Nur IPv6 (464XLAT)",
|
||||||
|
"ip6.waiting":"Warten auf Geld: Die Trupps machen weiter, sobald du die Router des Tages bezahlen kannst.",
|
||||||
|
"ip6.what":"Tauscht {routers} in etwa {days} Tagen, bezahlt beim Einbau, und macht {addr} für neue Kunden frei.",
|
||||||
|
"ip6.your_ipv4_bill_goes_down":"Deine IPv4-Rechnung sinkt um {price}/Monat (weniger CGNAT-Boxen und Erstattungen).",
|
||||||
|
"ip6.your_ipv4_bill_goes_up":"Deine IPv4-Rechnung steigt um {price}/Monat (NAT64-Gateways und Erstattungen).",
|
||||||
"ix_downgrade.pni_downgraded":"Das PNI mit {net} in {city} ist jetzt {port}.",
|
"ix_downgrade.pni_downgraded":"Das PNI mit {net} in {city} ist jetzt {port}.",
|
||||||
"ix_downgrade.port_downgraded_at_ix":"Der Port bei {ix} ist jetzt {port}.",
|
"ix_downgrade.port_downgraded_at_ix":"Der Port bei {ix} ist jetzt {port}.",
|
||||||
"ix_downgrade.transit_downgraded":"{net}-Transit in {city} ist jetzt {port}.",
|
"ix_downgrade.transit_downgraded":"{net}-Transit in {city} ist jetzt {port}.",
|
||||||
|
|
|
||||||
|
|
@ -2691,20 +2691,26 @@
|
||||||
"ip4.cgnat_boxes":"Equipos CGNAT",
|
"ip4.cgnat_boxes":"Equipos CGNAT",
|
||||||
"ip4.cgnat_note":"Más hogares por dirección liberan espacio para clientes, pero los juegos y el port forwarding sufren: el {p} de la factura de un hogar con CGNAT se devuelve en reembolsos.",
|
"ip4.cgnat_note":"Más hogares por dirección liberan espacio para clientes, pero los juegos y el port forwarding sufren: el {p} de la factura de un hogar con CGNAT se devuelve en reembolsos.",
|
||||||
"ip4.cgnat_ratio":"CGNAT: hogares por dirección",
|
"ip4.cgnat_ratio":"CGNAT: hogares por dirección",
|
||||||
"ip4.costs_row":"Alquiler de IPv4 y CGNAT",
|
|
||||||
"ip4.free":"Libres para nuevos clientes (los hogares pasan antes a CGNAT)",
|
"ip4.free":"Libres para nuevos clientes (los hogares pasan antes a CGNAT)",
|
||||||
"ip4.from_rir":"Del RIR",
|
"ip4.from_rir":"Del RIR",
|
||||||
"ip4.give_back":"Devolver",
|
"ip4.give_back":"Devolver",
|
||||||
"ip4.held":"El RIR no volverá a transferir ese bloque antes del {date}.",
|
"ip4.held":"El RIR no volverá a transferir ese bloque antes del {date}.",
|
||||||
"ip4.homes":"Hogares con banda ancha",
|
"ip4.homes":"Hogares con banda ancha",
|
||||||
|
"ip4.homes_behind_cgnat":"Hogares detrás de CGNAT",
|
||||||
"ip4.homes_cgnat":"{n}, {p} detrás de CGNAT",
|
"ip4.homes_cgnat":"{n}, {p} detrás de CGNAT",
|
||||||
|
"ip4.homes_public":"Hogares con dirección propia",
|
||||||
|
"ip4.homes_v6":"Hogares solo IPv6 (464XLAT)",
|
||||||
|
"ip4.homes_v6_pool":"{n}, pool NAT64 de {pool}",
|
||||||
"ip4.in_use":"Tus clientes necesitan esas direcciones: pon más hogares detrás de CGNAT o consigue antes otro bloque.",
|
"ip4.in_use":"Tus clientes necesitan esas direcciones: pon más hogares detrás de CGNAT o consigue antes otro bloque.",
|
||||||
|
"ip4.in_use_both":"Tus clientes necesitan esas direcciones: pon más hogares en cada dirección de CGNAT o NAT64 o consigue antes otro bloque.",
|
||||||
|
"ip4.in_use_v6":"Tus clientes necesitan esas direcciones: pon más hogares solo IPv6 en cada dirección NAT64 o consigue antes otro bloque.",
|
||||||
"ip4.lease":"Alquilar {price}/mes",
|
"ip4.lease":"Alquilar {price}/mes",
|
||||||
"ip4.lease_out":"Ceder en alquiler +{price}/mes",
|
"ip4.lease_out":"Ceder en alquiler +{price}/mes",
|
||||||
"ip4.leased_in":"Has alquilado un {p} ({n} direcciones) por {price}/mes.",
|
"ip4.leased_in":"Has alquilado un {p} ({n} direcciones) por {price}/mes.",
|
||||||
"ip4.leased_in_mo":"Alquilado · {price}/mes",
|
"ip4.leased_in_mo":"Alquilado · {price}/mes",
|
||||||
"ip4.leased_out":"Tu {p} está cedido en alquiler: +{price}/mes.",
|
"ip4.leased_out":"Tu {p} está cedido en alquiler: +{price}/mes.",
|
||||||
"ip4.leased_out_mo":"Cedido en alquiler · +{price}/mes",
|
"ip4.leased_out_mo":"Cedido en alquiler · +{price}/mes",
|
||||||
|
"ip4.leases_cgnat_nat64":"Alquiler de IPv4, CGNAT y NAT64",
|
||||||
"ip4.leases_in":"Bloques alquilados",
|
"ip4.leases_in":"Bloques alquilados",
|
||||||
"ip4.leases_out":"Bloques cedidos en alquiler",
|
"ip4.leases_out":"Bloques cedidos en alquiler",
|
||||||
"ip4.market":"Mercado de transferencias",
|
"ip4.market":"Mercado de transferencias",
|
||||||
|
|
@ -2712,8 +2718,13 @@
|
||||||
"ip4.movable_from":"transferible desde el {date}",
|
"ip4.movable_from":"transferible desde el {date}",
|
||||||
"ip4.n_addresses":{"one":"{n} dirección","other":"{n} direcciones"},
|
"ip4.n_addresses":{"one":"{n} dirección","other":"{n} direcciones"},
|
||||||
"ip4.n_homes_per_address":{"one":"{n} hogar por dirección","other":"{n} hogares por dirección"},
|
"ip4.n_homes_per_address":{"one":"{n} hogar por dirección","other":"{n} hogares por dirección"},
|
||||||
|
"ip4.nat64_gateways":"Pasarelas NAT64",
|
||||||
|
"ip4.nat64_note":"Los hogares solo IPv6 no tienen IPv4 propio: lo que aún lo necesita (consolas, VPN solo IPv4) comparte tu pool NAT64, y el {p} de su factura se devuelve en reembolsos, menos cada año a medida que el mundo pasa a IPv6. Una ciudad pasa a solo IPv6 desde su banda ancha doméstica.",
|
||||||
|
"ip4.nat64_ratio":"NAT64: hogares solo IPv6 por dirección",
|
||||||
"ip4.no_grow":"{name} ({city}) quería crecer a {bw}, pero no tenías direcciones IPv4 libres para ello.",
|
"ip4.no_grow":"{name} ({city}) quería crecer a {bw}, pero no tenías direcciones IPv4 libres para ello.",
|
||||||
"ip4.no_space":"{name} necesita un {p} de IPv4 ({n} direcciones) y solo hay {free} libres. Compra o alquila un bloque, o pon más hogares detrás de CGNAT.",
|
"ip4.no_space":"{name} necesita un {p} de IPv4 ({n} direcciones) y solo hay {free} libres. Compra o alquila un bloque, o pon más hogares detrás de CGNAT.",
|
||||||
|
"ip4.no_space_both":"{name} necesita un {p} de IPv4 ({n} direcciones) y solo hay {free} libres. Compra o alquila un bloque, o pon más hogares en cada dirección de CGNAT o NAT64.",
|
||||||
|
"ip4.no_space_v6":"{name} necesita un {p} de IPv4 ({n} direcciones) y solo hay {free} libres. Compra o alquila un bloque, o pon más hogares solo IPv6 en cada dirección NAT64.",
|
||||||
"ip4.note":"IPv6 es gratis e infinito. IPv4 se agotó hace años: los clientes empresariales necesitan bloques públicos, y los hogares que no caben comparten direcciones detrás de CGNAT (el tráfico IPv6 rodea la caja).",
|
"ip4.note":"IPv6 es gratis e infinito. IPv4 se agotó hace años: los clientes empresariales necesitan bloques públicos, y los hogares que no caben comparten direcciones detrás de CGNAT (el tráfico IPv6 rodea la caja).",
|
||||||
"ip4.off":"Con las reglas de esta partida sobra IPv4.",
|
"ip4.off":"Con las reglas de esta partida sobra IPv4.",
|
||||||
"ip4.offer_needs":"Necesita un {p} de IPv4 ({n} direcciones); solo hay {free} libres.",
|
"ip4.offer_needs":"Necesita un {p} de IPv4 ({n} direcciones); solo hay {free} libres.",
|
||||||
|
|
@ -2725,11 +2736,39 @@
|
||||||
"ip4.sell":"Vender {price}",
|
"ip4.sell":"Vender {price}",
|
||||||
"ip4.sold":"Has vendido tu {p} por {price}.",
|
"ip4.sold":"Has vendido tu {p} por {price}.",
|
||||||
"ip4.squeezed":"Sin espacio: el {p} de los hogares no cabe ni con {r} hogares por dirección. Sus conexiones fallan y piden reembolsos: compra o alquila un bloque.",
|
"ip4.squeezed":"Sin espacio: el {p} de los hogares no cabe ni con {r} hogares por dirección. Sus conexiones fallan y piden reembolsos: compra o alquila un bloque.",
|
||||||
|
"ip4.squeezed_both":"Sin espacio: el {p} de los hogares no cabe ni con {r} hogares por dirección de CGNAT y {r6} por dirección NAT64. Sus conexiones fallan y piden reembolsos: compra o alquila un bloque.",
|
||||||
|
"ip4.squeezed_v6":"Sin espacio: el {p} de los hogares no cabe ni con {r} hogares solo IPv6 por dirección NAT64. Sus conexiones fallan y piden reembolsos: compra o alquila un bloque.",
|
||||||
"ip4.take_back":"Recuperar",
|
"ip4.take_back":"Recuperar",
|
||||||
"ip4.toast_cgnat":"<b>Tu IPv4 está lleno.</b> El {p} de tus hogares comparte ahora direcciones detrás de CGNAT, y algunos gamers ya han escrito.",
|
"ip4.toast_cgnat":"<b>Tu IPv4 está lleno.</b> El {p} de tus hogares comparte ahora direcciones detrás de CGNAT, y algunos gamers ya han escrito.",
|
||||||
"ip4.toast_out":"<b>Sin IPv4.</b> Ni con {r} hogares por dirección cabe todo el mundo en el CGNAT: compra o alquila un bloque en el banco.",
|
"ip4.toast_out":"<b>Sin IPv4.</b> Ni con {r} hogares por dirección cabe todo el mundo en el CGNAT: compra o alquila un bloque en el banco.",
|
||||||
|
"ip4.toast_out_both":"<b>Sin IPv4.</b> Ni con {r} hogares por dirección detrás de CGNAT y {r6} en NAT64 caben todos los hogares: compra o alquila un bloque en el banco.",
|
||||||
|
"ip4.toast_out_v6":"<b>Sin IPv4.</b> Ni con {r} hogares por dirección caben en tu pool NAT64 todos los hogares solo IPv6: compra o alquila un bloque en el banco.",
|
||||||
"ip4.too_many":"Tienes {n} bloques IPv4, el máximo que puede llevar una red. Vende o devuelve bloques pequeños para hacer sitio a uno más grande.",
|
"ip4.too_many":"Tienes {n} bloques IPv4, el máximo que puede llevar una red. Vende o devuelve bloques pequeños para hacer sitio a uno más grande.",
|
||||||
|
"ip4.v6_share":"Cuota de IPv6 en el tráfico de los hogares este año",
|
||||||
"ip4.yours":"Tus direcciones IPv4",
|
"ip4.yours":"Tus direcciones IPv4",
|
||||||
|
"ip6.already":"Todos los hogares de aquí ya son solo IPv6.",
|
||||||
|
"ip6.busy":"El cambio ya está en marcha aquí.",
|
||||||
|
"ip6.done":"<b>{city} es solo IPv6.</b> Todos sus hogares usan 464XLAT, y lo que aún necesita IPv4 comparte tu pool NAT64.",
|
||||||
|
"ip6.dual_stack":"Doble pila",
|
||||||
|
"ip6.every_home":"Todos los hogares",
|
||||||
|
"ip6.go":"Pasar a solo IPv6 {cost}",
|
||||||
|
"ip6.homes_that_join_later":"Los hogares que lleguen después también reciben uno, a {cost} cada uno.",
|
||||||
|
"ip6.n_routers":{"one":"{n} router doméstico","other":"{n} routers domésticos"},
|
||||||
|
"ip6.new_homes_get_a_clat":"Los hogares nuevos reciben un router con CLAT desde el principio, a {cost} cada uno, y lo que aún necesita IPv4 comparte tu pool NAT64, {r} hogares por dirección.",
|
||||||
|
"ip6.no_bb":"Lanza primero la banda ancha aquí.",
|
||||||
|
"ip6.no_home_is_behind_cgnat":"Aún no hay ningún hogar detrás de CGNAT: esto compensa cuando empiece a faltarte IPv4.",
|
||||||
|
"ip6.part_note":"El cambio se detuvo en el {p} de los hogares, y los hogares nuevos vuelven a tener doble pila.",
|
||||||
|
"ip6.pitch":"Cambia los routers domésticos de aquí por otros con CLAT: los hogares funcionan solo con IPv6 y no tienen IPv4 propio, y lo que aún necesita IPv4 comparte tu pool NAT64, {r} hogares por dirección.",
|
||||||
|
"ip6.share_homes":"El {p} de los hogares",
|
||||||
|
"ip6.started":"Cambiando {routers} en {city} por otros solo IPv6: unos {days} días.",
|
||||||
|
"ip6.stop":"Detener el cambio",
|
||||||
|
"ip6.stopped":"Cambio detenido en {city} en el {p} de los hogares. Los routers ya cambiados se quedan; los hogares nuevos vuelven a tener doble pila.",
|
||||||
|
"ip6.swapping_home_routers_paid":"Cambiando routers domésticos, pagados a medida que se instalan; los hogares nuevos reciben el nuevo desde el principio, a {cost} cada uno. Listo hacia el {date}.",
|
||||||
|
"ip6.title":"Solo IPv6 (464XLAT)",
|
||||||
|
"ip6.waiting":"Esperando efectivo: los equipos siguen en cuanto puedas pagar los routers del día.",
|
||||||
|
"ip6.what":"Cambia {routers} en unos {days} días, pagados a medida que se instalan, y libera {addr} para nuevos clientes.",
|
||||||
|
"ip6.your_ipv4_bill_goes_down":"Tu factura de IPv4 baja {price}/mes (menos equipos CGNAT y reembolsos).",
|
||||||
|
"ip6.your_ipv4_bill_goes_up":"Tu factura de IPv4 sube {price}/mes (pasarelas NAT64 y reembolsos).",
|
||||||
"ix_downgrade.pni_downgraded":"El PNI con {net} en {city} ahora es {port}.",
|
"ix_downgrade.pni_downgraded":"El PNI con {net} en {city} ahora es {port}.",
|
||||||
"ix_downgrade.port_downgraded_at_ix":"El puerto en {ix} es ahora de {port}.",
|
"ix_downgrade.port_downgraded_at_ix":"El puerto en {ix} es ahora de {port}.",
|
||||||
"ix_downgrade.transit_downgraded":"El tránsito de {net} en {city} ahora es {port}.",
|
"ix_downgrade.transit_downgraded":"El tránsito de {net} en {city} ahora es {port}.",
|
||||||
|
|
|
||||||
|
|
@ -2691,20 +2691,26 @@
|
||||||
"ip4.cgnat_boxes":"Boîtiers CGNAT",
|
"ip4.cgnat_boxes":"Boîtiers CGNAT",
|
||||||
"ip4.cgnat_note":"Plus de foyers par adresse libère de la place pour les clients, mais les jeux et la redirection de ports en pâtissent : {p} de la facture d’un foyer derrière le CGNAT repart en remboursements.",
|
"ip4.cgnat_note":"Plus de foyers par adresse libère de la place pour les clients, mais les jeux et la redirection de ports en pâtissent : {p} de la facture d’un foyer derrière le CGNAT repart en remboursements.",
|
||||||
"ip4.cgnat_ratio":"CGNAT : foyers par adresse",
|
"ip4.cgnat_ratio":"CGNAT : foyers par adresse",
|
||||||
"ip4.costs_row":"Locations IPv4 et CGNAT",
|
|
||||||
"ip4.free":"Libres pour de nouveaux clients (les foyers passent d’abord derrière le CGNAT)",
|
"ip4.free":"Libres pour de nouveaux clients (les foyers passent d’abord derrière le CGNAT)",
|
||||||
"ip4.from_rir":"Attribué par le RIR",
|
"ip4.from_rir":"Attribué par le RIR",
|
||||||
"ip4.give_back":"Le rendre",
|
"ip4.give_back":"Le rendre",
|
||||||
"ip4.held":"Le RIR ne transférera pas ce bloc avant le {date}.",
|
"ip4.held":"Le RIR ne transférera pas ce bloc avant le {date}.",
|
||||||
"ip4.homes":"Foyers en haut débit",
|
"ip4.homes":"Foyers en haut débit",
|
||||||
|
"ip4.homes_behind_cgnat":"Foyers derrière le CGNAT",
|
||||||
"ip4.homes_cgnat":"{n}, dont {p} derrière le CGNAT",
|
"ip4.homes_cgnat":"{n}, dont {p} derrière le CGNAT",
|
||||||
|
"ip4.homes_public":"Foyers avec leur propre adresse",
|
||||||
|
"ip4.homes_v6":"Foyers IPv6 uniquement (464XLAT)",
|
||||||
|
"ip4.homes_v6_pool":"{n}, pool NAT64 de {pool}",
|
||||||
"ip4.in_use":"Tes clients ont besoin de ces adresses : mets plus de foyers derrière le CGNAT ou trouve d’abord un autre bloc.",
|
"ip4.in_use":"Tes clients ont besoin de ces adresses : mets plus de foyers derrière le CGNAT ou trouve d’abord un autre bloc.",
|
||||||
|
"ip4.in_use_both":"Tes clients ont besoin de ces adresses : mets plus de foyers sur chaque adresse CGNAT ou NAT64 ou trouve d’abord un autre bloc.",
|
||||||
|
"ip4.in_use_v6":"Tes clients ont besoin de ces adresses : mets plus de foyers IPv6 uniquement sur chaque adresse NAT64 ou trouve d’abord un autre bloc.",
|
||||||
"ip4.lease":"Louer {price}/mois",
|
"ip4.lease":"Louer {price}/mois",
|
||||||
"ip4.lease_out":"Mettre en location +{price}/mois",
|
"ip4.lease_out":"Mettre en location +{price}/mois",
|
||||||
"ip4.leased_in":"Tu as loué un {p} ({n} adresses) pour {price}/mois.",
|
"ip4.leased_in":"Tu as loué un {p} ({n} adresses) pour {price}/mois.",
|
||||||
"ip4.leased_in_mo":"Loué · {price}/mois",
|
"ip4.leased_in_mo":"Loué · {price}/mois",
|
||||||
"ip4.leased_out":"Ton {p} est en location : +{price}/mois.",
|
"ip4.leased_out":"Ton {p} est en location : +{price}/mois.",
|
||||||
"ip4.leased_out_mo":"Mis en location · +{price}/mois",
|
"ip4.leased_out_mo":"Mis en location · +{price}/mois",
|
||||||
|
"ip4.leases_cgnat_nat64":"Locations IPv4, CGNAT et NAT64",
|
||||||
"ip4.leases_in":"Blocs loués",
|
"ip4.leases_in":"Blocs loués",
|
||||||
"ip4.leases_out":"Blocs mis en location",
|
"ip4.leases_out":"Blocs mis en location",
|
||||||
"ip4.market":"Marché des transferts",
|
"ip4.market":"Marché des transferts",
|
||||||
|
|
@ -2712,8 +2718,13 @@
|
||||||
"ip4.movable_from":"transférable à partir du {date}",
|
"ip4.movable_from":"transférable à partir du {date}",
|
||||||
"ip4.n_addresses":{"one":"{n} adresse","other":"{n} adresses"},
|
"ip4.n_addresses":{"one":"{n} adresse","other":"{n} adresses"},
|
||||||
"ip4.n_homes_per_address":{"one":"{n} foyer par adresse","other":"{n} foyers par adresse"},
|
"ip4.n_homes_per_address":{"one":"{n} foyer par adresse","other":"{n} foyers par adresse"},
|
||||||
|
"ip4.nat64_gateways":"Passerelles NAT64",
|
||||||
|
"ip4.nat64_note":"Les foyers IPv6 uniquement n’ont pas d’IPv4 à eux : ce qui en a encore besoin (consoles, VPN IPv4 uniquement) partage ton pool NAT64, et {p} de leur facture repart en remboursements, un peu moins chaque année à mesure que le monde passe à l’IPv6. Une ville passe en IPv6 uniquement depuis son haut débit résidentiel.",
|
||||||
|
"ip4.nat64_ratio":"NAT64 : foyers IPv6 uniquement par adresse",
|
||||||
"ip4.no_grow":"{name} ({city}) voulait passer à {bw}, mais tu n’avais pas d’adresses IPv4 libres pour ça.",
|
"ip4.no_grow":"{name} ({city}) voulait passer à {bw}, mais tu n’avais pas d’adresses IPv4 libres pour ça.",
|
||||||
"ip4.no_space":"{name} a besoin d’un {p} d’IPv4 ({n} adresses), et seulement {free} sont libres. Achète ou loue un bloc, ou mets plus de foyers derrière le CGNAT.",
|
"ip4.no_space":"{name} a besoin d’un {p} d’IPv4 ({n} adresses), et seulement {free} sont libres. Achète ou loue un bloc, ou mets plus de foyers derrière le CGNAT.",
|
||||||
|
"ip4.no_space_both":"{name} a besoin d’un {p} d’IPv4 ({n} adresses), et seulement {free} sont libres. Achète ou loue un bloc, ou mets plus de foyers sur chaque adresse CGNAT ou NAT64.",
|
||||||
|
"ip4.no_space_v6":"{name} a besoin d’un {p} d’IPv4 ({n} adresses), et seulement {free} sont libres. Achète ou loue un bloc, ou mets plus de foyers IPv6 uniquement sur chaque adresse NAT64.",
|
||||||
"ip4.note":"L’IPv6 est gratuit et sans fin. L’IPv4 est épuisé depuis des années : les clients pros ont besoin de blocs publics, et les foyers qui ne rentrent plus partagent des adresses derrière le CGNAT (le trafic IPv6 contourne la boîte).",
|
"ip4.note":"L’IPv6 est gratuit et sans fin. L’IPv4 est épuisé depuis des années : les clients pros ont besoin de blocs publics, et les foyers qui ne rentrent plus partagent des adresses derrière le CGNAT (le trafic IPv6 contourne la boîte).",
|
||||||
"ip4.off":"Avec les règles de cette partie, l’IPv4 ne manque pas.",
|
"ip4.off":"Avec les règles de cette partie, l’IPv4 ne manque pas.",
|
||||||
"ip4.offer_needs":"Il lui faut un {p} d’IPv4 ({n} adresses) ; seulement {free} libres.",
|
"ip4.offer_needs":"Il lui faut un {p} d’IPv4 ({n} adresses) ; seulement {free} libres.",
|
||||||
|
|
@ -2725,11 +2736,39 @@
|
||||||
"ip4.sell":"Vendre {price}",
|
"ip4.sell":"Vendre {price}",
|
||||||
"ip4.sold":"Ton {p} est vendu pour {price}.",
|
"ip4.sold":"Ton {p} est vendu pour {price}.",
|
||||||
"ip4.squeezed":"Plus de place : {p} des foyers ne rentrent pas, même à {r} foyers par adresse. Leurs connexions lâchent et ils veulent être remboursés : achète ou loue un bloc.",
|
"ip4.squeezed":"Plus de place : {p} des foyers ne rentrent pas, même à {r} foyers par adresse. Leurs connexions lâchent et ils veulent être remboursés : achète ou loue un bloc.",
|
||||||
|
"ip4.squeezed_both":"Plus de place : {p} des foyers ne rentrent pas, même à {r} foyers par adresse CGNAT et {r6} par adresse NAT64. Leurs connexions lâchent et ils veulent être remboursés : achète ou loue un bloc.",
|
||||||
|
"ip4.squeezed_v6":"Plus de place : {p} des foyers ne rentrent pas, même à {r} foyers IPv6 uniquement par adresse NAT64. Leurs connexions lâchent et ils veulent être remboursés : achète ou loue un bloc.",
|
||||||
"ip4.take_back":"Le reprendre",
|
"ip4.take_back":"Le reprendre",
|
||||||
"ip4.toast_cgnat":"<b>Ton IPv4 est plein.</b> {p} de tes foyers partagent maintenant des adresses derrière le CGNAT, et quelques gamers ont déjà écrit.",
|
"ip4.toast_cgnat":"<b>Ton IPv4 est plein.</b> {p} de tes foyers partagent maintenant des adresses derrière le CGNAT, et quelques gamers ont déjà écrit.",
|
||||||
"ip4.toast_out":"<b>Plus d’IPv4.</b> Même à {r} foyers par adresse, le CGNAT ne suffit pas pour tout le monde : achète ou loue un bloc à la banque.",
|
"ip4.toast_out":"<b>Plus d’IPv4.</b> Même à {r} foyers par adresse, le CGNAT ne suffit pas pour tout le monde : achète ou loue un bloc à la banque.",
|
||||||
|
"ip4.toast_out_both":"<b>Plus d’IPv4.</b> Même à {r} foyers par adresse derrière le CGNAT et {r6} en NAT64, tous les foyers ne rentrent pas : achète ou loue un bloc à la banque.",
|
||||||
|
"ip4.toast_out_v6":"<b>Plus d’IPv4.</b> Même à {r} foyers par adresse, ton pool NAT64 ne suffit pas pour tous les foyers IPv6 uniquement : achète ou loue un bloc à la banque.",
|
||||||
"ip4.too_many":"Tu as {n} blocs IPv4, le maximum qu’un réseau peut garder. Vends ou rends de petits blocs pour faire de la place à un plus grand.",
|
"ip4.too_many":"Tu as {n} blocs IPv4, le maximum qu’un réseau peut garder. Vends ou rends de petits blocs pour faire de la place à un plus grand.",
|
||||||
|
"ip4.v6_share":"Part de l’IPv6 dans le trafic des foyers cette année",
|
||||||
"ip4.yours":"Tes adresses IPv4",
|
"ip4.yours":"Tes adresses IPv4",
|
||||||
|
"ip6.already":"Tous les foyers d’ici sont déjà en IPv6 uniquement.",
|
||||||
|
"ip6.busy":"Le remplacement est déjà en cours ici.",
|
||||||
|
"ip6.done":"<b>{city} est en IPv6 uniquement.</b> Tous ses foyers tournent en 464XLAT, et ce qui a encore besoin d’IPv4 partage ton pool NAT64.",
|
||||||
|
"ip6.dual_stack":"Double pile",
|
||||||
|
"ip6.every_home":"Tous les foyers",
|
||||||
|
"ip6.go":"Passer en IPv6 uniquement {cost}",
|
||||||
|
"ip6.homes_that_join_later":"Les foyers qui arrivent ensuite en ont une aussi, à {cost} pièce.",
|
||||||
|
"ip6.n_routers":{"one":"{n} box","other":"{n} box"},
|
||||||
|
"ip6.new_homes_get_a_clat":"Les nouveaux foyers ont une box avec CLAT dès le départ, à {cost} pièce, et ce qui a encore besoin d’IPv4 partage ton pool NAT64, {r} foyers par adresse.",
|
||||||
|
"ip6.no_bb":"Lance d’abord le haut débit ici.",
|
||||||
|
"ip6.no_home_is_behind_cgnat":"Aucun foyer n’est encore derrière le CGNAT : ça ne paie qu’une fois que ton IPv4 vient à manquer.",
|
||||||
|
"ip6.part_note":"Le remplacement s’est arrêté à {p} des foyers, et les nouveaux foyers repassent en double pile.",
|
||||||
|
"ip6.pitch":"Remplace les box des foyers d’ici par des modèles avec CLAT : les foyers tournent en IPv6 seul, sans IPv4 à eux, et ce qui a encore besoin d’IPv4 partage ton pool NAT64, {r} foyers par adresse.",
|
||||||
|
"ip6.share_homes":"{p} des foyers",
|
||||||
|
"ip6.started":"Remplacement de {routers} à {city} par des modèles IPv6 uniquement : environ {days} jours.",
|
||||||
|
"ip6.stop":"Arrêter le remplacement",
|
||||||
|
"ip6.stopped":"Remplacement arrêté à {city} à {p} des foyers. Les box déjà remplacées restent ; les nouveaux foyers repassent en double pile.",
|
||||||
|
"ip6.swapping_home_routers_paid":"Remplacement des box en cours, payées au fil de la pose ; les nouveaux foyers ont la nouvelle dès le départ, à {cost} pièce. Fini vers le {date}.",
|
||||||
|
"ip6.title":"IPv6 uniquement (464XLAT)",
|
||||||
|
"ip6.waiting":"En attente de trésorerie : les équipes reprennent dès que tu peux payer les box du jour.",
|
||||||
|
"ip6.what":"Remplace {routers} en environ {days} jours, payées au fil de la pose, et libère {addr} pour de nouveaux clients.",
|
||||||
|
"ip6.your_ipv4_bill_goes_down":"Ta facture IPv4 baisse de {price}/mois (moins de boîtiers CGNAT et de remboursements).",
|
||||||
|
"ip6.your_ipv4_bill_goes_up":"Ta facture IPv4 augmente de {price}/mois (passerelles NAT64 et remboursements).",
|
||||||
"ix_downgrade.pni_downgraded":"Le PNI avec {net} à {city} est maintenant en {port}.",
|
"ix_downgrade.pni_downgraded":"Le PNI avec {net} à {city} est maintenant en {port}.",
|
||||||
"ix_downgrade.port_downgraded_at_ix":"Le port chez {ix} est maintenant en {port}.",
|
"ix_downgrade.port_downgraded_at_ix":"Le port chez {ix} est maintenant en {port}.",
|
||||||
"ix_downgrade.transit_downgraded":"Le transit {net} à {city} est maintenant en {port}.",
|
"ix_downgrade.transit_downgraded":"Le transit {net} à {city} est maintenant en {port}.",
|
||||||
|
|
|
||||||
|
|
@ -2691,20 +2691,26 @@
|
||||||
"ip4.cgnat_boxes":"Apparati CGNAT",
|
"ip4.cgnat_boxes":"Apparati CGNAT",
|
||||||
"ip4.cgnat_note":"Più case per indirizzo liberano spazio per i clienti, ma giochi e port forwarding ne soffrono: il {p} della bolletta di una casa dietro il CGNAT torna indietro in rimborsi.",
|
"ip4.cgnat_note":"Più case per indirizzo liberano spazio per i clienti, ma giochi e port forwarding ne soffrono: il {p} della bolletta di una casa dietro il CGNAT torna indietro in rimborsi.",
|
||||||
"ip4.cgnat_ratio":"CGNAT: case per indirizzo",
|
"ip4.cgnat_ratio":"CGNAT: case per indirizzo",
|
||||||
"ip4.costs_row":"Affitti IPv4 e CGNAT",
|
|
||||||
"ip4.free":"Liberi per nuovi clienti (prima le case passano dietro il CGNAT)",
|
"ip4.free":"Liberi per nuovi clienti (prima le case passano dietro il CGNAT)",
|
||||||
"ip4.from_rir":"Dal RIR",
|
"ip4.from_rir":"Dal RIR",
|
||||||
"ip4.give_back":"Restituiscilo",
|
"ip4.give_back":"Restituiscilo",
|
||||||
"ip4.held":"Il RIR non trasferisce di nuovo quel blocco prima del {date}.",
|
"ip4.held":"Il RIR non trasferisce di nuovo quel blocco prima del {date}.",
|
||||||
"ip4.homes":"Case in banda larga",
|
"ip4.homes":"Case in banda larga",
|
||||||
|
"ip4.homes_behind_cgnat":"Case dietro il CGNAT",
|
||||||
"ip4.homes_cgnat":"{n}, il {p} dietro il CGNAT",
|
"ip4.homes_cgnat":"{n}, il {p} dietro il CGNAT",
|
||||||
|
"ip4.homes_public":"Case con un indirizzo proprio",
|
||||||
|
"ip4.homes_v6":"Case solo IPv6 (464XLAT)",
|
||||||
|
"ip4.homes_v6_pool":"{n}, pool NAT64 di {pool}",
|
||||||
"ip4.in_use":"I tuoi clienti hanno bisogno di quegli indirizzi: metti più case dietro il CGNAT o prendi prima un altro blocco.",
|
"ip4.in_use":"I tuoi clienti hanno bisogno di quegli indirizzi: metti più case dietro il CGNAT o prendi prima un altro blocco.",
|
||||||
|
"ip4.in_use_both":"I tuoi clienti hanno bisogno di quegli indirizzi: metti più case su ogni indirizzo CGNAT o NAT64 o prendi prima un altro blocco.",
|
||||||
|
"ip4.in_use_v6":"I tuoi clienti hanno bisogno di quegli indirizzi: metti più case solo IPv6 su ogni indirizzo NAT64 o prendi prima un altro blocco.",
|
||||||
"ip4.lease":"Affitta {price}/mese",
|
"ip4.lease":"Affitta {price}/mese",
|
||||||
"ip4.lease_out":"Dai in affitto +{price}/mese",
|
"ip4.lease_out":"Dai in affitto +{price}/mese",
|
||||||
"ip4.leased_in":"Preso in affitto un {p} ({n} indirizzi) per {price}/mese.",
|
"ip4.leased_in":"Preso in affitto un {p} ({n} indirizzi) per {price}/mese.",
|
||||||
"ip4.leased_in_mo":"In affitto · {price}/mese",
|
"ip4.leased_in_mo":"In affitto · {price}/mese",
|
||||||
"ip4.leased_out":"Il tuo {p} è dato in affitto: +{price}/mese.",
|
"ip4.leased_out":"Il tuo {p} è dato in affitto: +{price}/mese.",
|
||||||
"ip4.leased_out_mo":"Dato in affitto · +{price}/mese",
|
"ip4.leased_out_mo":"Dato in affitto · +{price}/mese",
|
||||||
|
"ip4.leases_cgnat_nat64":"Affitti IPv4, CGNAT e NAT64",
|
||||||
"ip4.leases_in":"Blocchi presi in affitto",
|
"ip4.leases_in":"Blocchi presi in affitto",
|
||||||
"ip4.leases_out":"Blocchi dati in affitto",
|
"ip4.leases_out":"Blocchi dati in affitto",
|
||||||
"ip4.market":"Mercato dei trasferimenti",
|
"ip4.market":"Mercato dei trasferimenti",
|
||||||
|
|
@ -2712,8 +2718,13 @@
|
||||||
"ip4.movable_from":"trasferibile dal {date}",
|
"ip4.movable_from":"trasferibile dal {date}",
|
||||||
"ip4.n_addresses":{"one":"{n} indirizzo","other":"{n} indirizzi"},
|
"ip4.n_addresses":{"one":"{n} indirizzo","other":"{n} indirizzi"},
|
||||||
"ip4.n_homes_per_address":{"one":"{n} casa per indirizzo","other":"{n} case per indirizzo"},
|
"ip4.n_homes_per_address":{"one":"{n} casa per indirizzo","other":"{n} case per indirizzo"},
|
||||||
|
"ip4.nat64_gateways":"Gateway NAT64",
|
||||||
|
"ip4.nat64_note":"Le case solo IPv6 non hanno un IPv4 proprio: quello che ne ha ancora bisogno (console, VPN solo IPv4) condivide il tuo pool NAT64, e il {p} della loro bolletta torna indietro in rimborsi, meno ogni anno man mano che il mondo passa a IPv6. Una città passa a solo IPv6 dalla sua banda larga domestica.",
|
||||||
|
"ip4.nat64_ratio":"NAT64: case solo IPv6 per indirizzo",
|
||||||
"ip4.no_grow":"{name} ({city}) voleva crescere a {bw}, ma non avevi indirizzi IPv4 liberi per farlo.",
|
"ip4.no_grow":"{name} ({city}) voleva crescere a {bw}, ma non avevi indirizzi IPv4 liberi per farlo.",
|
||||||
"ip4.no_space":"{name} ha bisogno di un {p} di IPv4 ({n} indirizzi), e ne restano liberi solo {free}. Compra o affitta un blocco, o metti più case dietro il CGNAT.",
|
"ip4.no_space":"{name} ha bisogno di un {p} di IPv4 ({n} indirizzi), e ne restano liberi solo {free}. Compra o affitta un blocco, o metti più case dietro il CGNAT.",
|
||||||
|
"ip4.no_space_both":"{name} ha bisogno di un {p} di IPv4 ({n} indirizzi), e ne restano liberi solo {free}. Compra o affitta un blocco, o metti più case su ogni indirizzo CGNAT o NAT64.",
|
||||||
|
"ip4.no_space_v6":"{name} ha bisogno di un {p} di IPv4 ({n} indirizzi), e ne restano liberi solo {free}. Compra o affitta un blocco, o metti più case solo IPv6 su ogni indirizzo NAT64.",
|
||||||
"ip4.note":"IPv6 è gratis e infinito. IPv4 è finito anni fa: i clienti business hanno bisogno di blocchi pubblici, e le case che non ci stanno condividono gli indirizzi dietro il CGNAT (il traffico IPv6 gli passa accanto).",
|
"ip4.note":"IPv6 è gratis e infinito. IPv4 è finito anni fa: i clienti business hanno bisogno di blocchi pubblici, e le case che non ci stanno condividono gli indirizzi dietro il CGNAT (il traffico IPv6 gli passa accanto).",
|
||||||
"ip4.off":"Con le regole di questa partita l'IPv4 abbonda.",
|
"ip4.off":"Con le regole di questa partita l'IPv4 abbonda.",
|
||||||
"ip4.offer_needs":"Serve un {p} di IPv4 ({n} indirizzi); solo {free} liberi.",
|
"ip4.offer_needs":"Serve un {p} di IPv4 ({n} indirizzi); solo {free} liberi.",
|
||||||
|
|
@ -2725,11 +2736,39 @@
|
||||||
"ip4.sell":"Vendi {price}",
|
"ip4.sell":"Vendi {price}",
|
||||||
"ip4.sold":"Venduto il tuo {p} per {price}.",
|
"ip4.sold":"Venduto il tuo {p} per {price}.",
|
||||||
"ip4.squeezed":"Spazio esaurito: il {p} delle case non ci sta nemmeno con {r} case per indirizzo. Le connessioni saltano e vogliono un rimborso: compra o affitta un blocco.",
|
"ip4.squeezed":"Spazio esaurito: il {p} delle case non ci sta nemmeno con {r} case per indirizzo. Le connessioni saltano e vogliono un rimborso: compra o affitta un blocco.",
|
||||||
|
"ip4.squeezed_both":"Spazio esaurito: il {p} delle case non ci sta nemmeno con {r} case per indirizzo CGNAT e {r6} per indirizzo NAT64. Le connessioni saltano e vogliono un rimborso: compra o affitta un blocco.",
|
||||||
|
"ip4.squeezed_v6":"Spazio esaurito: il {p} delle case non ci sta nemmeno con {r} case solo IPv6 per indirizzo NAT64. Le connessioni saltano e vogliono un rimborso: compra o affitta un blocco.",
|
||||||
"ip4.take_back":"Riprendilo",
|
"ip4.take_back":"Riprendilo",
|
||||||
"ip4.toast_cgnat":"<b>Il tuo IPv4 è pieno.</b> Il {p} delle tue case ora condivide gli indirizzi dietro il CGNAT, e qualche gamer ha già scritto.",
|
"ip4.toast_cgnat":"<b>Il tuo IPv4 è pieno.</b> Il {p} delle tue case ora condivide gli indirizzi dietro il CGNAT, e qualche gamer ha già scritto.",
|
||||||
"ip4.toast_out":"<b>IPv4 esaurito.</b> Nemmeno con {r} case per indirizzo il CGNAT basta per tutti: compra o affitta un blocco in banca.",
|
"ip4.toast_out":"<b>IPv4 esaurito.</b> Nemmeno con {r} case per indirizzo il CGNAT basta per tutti: compra o affitta un blocco in banca.",
|
||||||
|
"ip4.toast_out_both":"<b>IPv4 esaurito.</b> Nemmeno con {r} case per indirizzo dietro il CGNAT e {r6} in NAT64 ci stanno tutte le case: compra o affitta un blocco in banca.",
|
||||||
|
"ip4.toast_out_v6":"<b>IPv4 esaurito.</b> Nemmeno con {r} case per indirizzo il tuo pool NAT64 basta per tutte le case solo IPv6: compra o affitta un blocco in banca.",
|
||||||
"ip4.too_many":"Hai {n} blocchi IPv4, il massimo che una rete può tenere. Vendi o restituisci qualche blocco piccolo per fare posto a uno più grande.",
|
"ip4.too_many":"Hai {n} blocchi IPv4, il massimo che una rete può tenere. Vendi o restituisci qualche blocco piccolo per fare posto a uno più grande.",
|
||||||
|
"ip4.v6_share":"Quota IPv6 del traffico delle case quest’anno",
|
||||||
"ip4.yours":"I tuoi indirizzi IPv4",
|
"ip4.yours":"I tuoi indirizzi IPv4",
|
||||||
|
"ip6.already":"Tutte le case qui sono già solo IPv6.",
|
||||||
|
"ip6.busy":"La sostituzione qui è già in corso.",
|
||||||
|
"ip6.done":"<b>{city} è solo IPv6.</b> Tutte le case lì vanno in 464XLAT, e quello che ha ancora bisogno di IPv4 condivide il tuo pool NAT64.",
|
||||||
|
"ip6.dual_stack":"Dual stack",
|
||||||
|
"ip6.every_home":"Tutte le case",
|
||||||
|
"ip6.go":"Passa a solo IPv6 {cost}",
|
||||||
|
"ip6.homes_that_join_later":"Anche le case che arrivano dopo ne ricevono uno, a {cost} l’uno.",
|
||||||
|
"ip6.n_routers":{"one":"{n} router di casa","other":"{n} router di casa"},
|
||||||
|
"ip6.new_homes_get_a_clat":"Le case nuove hanno subito un router con CLAT, a {cost} l’uno, e quello che ha ancora bisogno di IPv4 condivide il tuo pool NAT64, {r} case per indirizzo.",
|
||||||
|
"ip6.no_bb":"Prima lancia la banda larga qui.",
|
||||||
|
"ip6.no_home_is_behind_cgnat":"Nessuna casa è ancora dietro il CGNAT: conviene solo quando l’IPv4 comincia a scarseggiare.",
|
||||||
|
"ip6.part_note":"La sostituzione si è fermata al {p} delle case, e le case nuove tornano in dual stack.",
|
||||||
|
"ip6.pitch":"Sostituisci i router di casa qui con modelli con CLAT: le case vanno solo in IPv6 e non hanno un IPv4 proprio, e quello che ha ancora bisogno di IPv4 condivide il tuo pool NAT64, {r} case per indirizzo.",
|
||||||
|
"ip6.share_homes":"Il {p} delle case",
|
||||||
|
"ip6.started":"Sostituzione di {routers} a {city} con modelli solo IPv6: circa {days} giorni.",
|
||||||
|
"ip6.stop":"Ferma la sostituzione",
|
||||||
|
"ip6.stopped":"Sostituzione fermata a {city} al {p} delle case. I router già sostituiti restano; le case nuove tornano in dual stack.",
|
||||||
|
"ip6.swapping_home_routers_paid":"Sostituzione dei router di casa in corso, pagati man mano che vengono installati; le case nuove hanno subito quello nuovo, a {cost} l’uno. Finito verso il {date}.",
|
||||||
|
"ip6.title":"Solo IPv6 (464XLAT)",
|
||||||
|
"ip6.waiting":"In attesa di cassa: le squadre ripartono appena puoi pagare i router del giorno.",
|
||||||
|
"ip6.what":"Sostituisce {routers} in circa {days} giorni, pagati man mano che vengono installati, e libera {addr} per nuovi clienti.",
|
||||||
|
"ip6.your_ipv4_bill_goes_down":"La tua bolletta IPv4 scende di {price}/mese (meno apparati CGNAT e rimborsi).",
|
||||||
|
"ip6.your_ipv4_bill_goes_up":"La tua bolletta IPv4 sale di {price}/mese (gateway NAT64 e rimborsi).",
|
||||||
"ix_downgrade.pni_downgraded":"Il PNI con {net} a {city} ora è {port}.",
|
"ix_downgrade.pni_downgraded":"Il PNI con {net} a {city} ora è {port}.",
|
||||||
"ix_downgrade.port_downgraded_at_ix":"La porta su {ix} ora è da {port}.",
|
"ix_downgrade.port_downgraded_at_ix":"La porta su {ix} ora è da {port}.",
|
||||||
"ix_downgrade.transit_downgraded":"Il transito {net} a {city} ora è {port}.",
|
"ix_downgrade.transit_downgraded":"Il transito {net} a {city} ora è {port}.",
|
||||||
|
|
|
||||||
|
|
@ -2691,20 +2691,26 @@
|
||||||
"ip4.cgnat_boxes":"Caixas de CGNAT",
|
"ip4.cgnat_boxes":"Caixas de CGNAT",
|
||||||
"ip4.cgnat_note":"Mais casas por endereço liberam espaço para clientes, mas jogos e redirecionamento de portas sofrem: {p} da conta de uma casa atrás do CGNAT volta como reembolso.",
|
"ip4.cgnat_note":"Mais casas por endereço liberam espaço para clientes, mas jogos e redirecionamento de portas sofrem: {p} da conta de uma casa atrás do CGNAT volta como reembolso.",
|
||||||
"ip4.cgnat_ratio":"CGNAT: casas por endereço",
|
"ip4.cgnat_ratio":"CGNAT: casas por endereço",
|
||||||
"ip4.costs_row":"Aluguel de IPv4 e CGNAT",
|
|
||||||
"ip4.free":"Livres para novos clientes (as casas vão antes para trás do CGNAT)",
|
"ip4.free":"Livres para novos clientes (as casas vão antes para trás do CGNAT)",
|
||||||
"ip4.from_rir":"Do RIR",
|
"ip4.from_rir":"Do RIR",
|
||||||
"ip4.give_back":"Devolver",
|
"ip4.give_back":"Devolver",
|
||||||
"ip4.held":"O RIR não transfere esse bloco de novo antes de {date}.",
|
"ip4.held":"O RIR não transfere esse bloco de novo antes de {date}.",
|
||||||
"ip4.homes":"Casas com banda larga",
|
"ip4.homes":"Casas com banda larga",
|
||||||
|
"ip4.homes_behind_cgnat":"Casas atrás do CGNAT",
|
||||||
"ip4.homes_cgnat":"{n}, {p} atrás do CGNAT",
|
"ip4.homes_cgnat":"{n}, {p} atrás do CGNAT",
|
||||||
|
"ip4.homes_public":"Casas com endereço próprio",
|
||||||
|
"ip4.homes_v6":"Casas só IPv6 (464XLAT)",
|
||||||
|
"ip4.homes_v6_pool":"{n}, pool NAT64 de {pool}",
|
||||||
"ip4.in_use":"Seus clientes precisam desses endereços: coloque mais casas atrás do CGNAT ou arrume outro bloco antes.",
|
"ip4.in_use":"Seus clientes precisam desses endereços: coloque mais casas atrás do CGNAT ou arrume outro bloco antes.",
|
||||||
|
"ip4.in_use_both":"Seus clientes precisam desses endereços: coloque mais casas em cada endereço de CGNAT ou NAT64 ou arrume outro bloco antes.",
|
||||||
|
"ip4.in_use_v6":"Seus clientes precisam desses endereços: coloque mais casas só IPv6 em cada endereço NAT64 ou arrume outro bloco antes.",
|
||||||
"ip4.lease":"Alugar {price}/mês",
|
"ip4.lease":"Alugar {price}/mês",
|
||||||
"ip4.lease_out":"Alugar para terceiros +{price}/mês",
|
"ip4.lease_out":"Alugar para terceiros +{price}/mês",
|
||||||
"ip4.leased_in":"Você alugou um {p} ({n} endereços) por {price}/mês.",
|
"ip4.leased_in":"Você alugou um {p} ({n} endereços) por {price}/mês.",
|
||||||
"ip4.leased_in_mo":"Alugado · {price}/mês",
|
"ip4.leased_in_mo":"Alugado · {price}/mês",
|
||||||
"ip4.leased_out":"Seu {p} está alugado: +{price}/mês.",
|
"ip4.leased_out":"Seu {p} está alugado: +{price}/mês.",
|
||||||
"ip4.leased_out_mo":"Alugado para terceiros · +{price}/mês",
|
"ip4.leased_out_mo":"Alugado para terceiros · +{price}/mês",
|
||||||
|
"ip4.leases_cgnat_nat64":"Aluguel de IPv4, CGNAT e NAT64",
|
||||||
"ip4.leases_in":"Blocos alugados",
|
"ip4.leases_in":"Blocos alugados",
|
||||||
"ip4.leases_out":"Blocos alugados para terceiros",
|
"ip4.leases_out":"Blocos alugados para terceiros",
|
||||||
"ip4.market":"Mercado de transferências",
|
"ip4.market":"Mercado de transferências",
|
||||||
|
|
@ -2712,8 +2718,13 @@
|
||||||
"ip4.movable_from":"transferível a partir de {date}",
|
"ip4.movable_from":"transferível a partir de {date}",
|
||||||
"ip4.n_addresses":{"one":"{n} endereço","other":"{n} endereços"},
|
"ip4.n_addresses":{"one":"{n} endereço","other":"{n} endereços"},
|
||||||
"ip4.n_homes_per_address":{"one":"{n} casa por endereço","other":"{n} casas por endereço"},
|
"ip4.n_homes_per_address":{"one":"{n} casa por endereço","other":"{n} casas por endereço"},
|
||||||
|
"ip4.nat64_gateways":"Gateways NAT64",
|
||||||
|
"ip4.nat64_note":"Casas só IPv6 não têm IPv4 próprio: o que ainda precisa dele (consoles, VPNs só IPv4) compartilha seu pool NAT64, e {p} da conta delas volta como reembolso, menos a cada ano conforme o mundo migra para o IPv6. Uma cidade passa a só IPv6 pela banda larga residencial dela.",
|
||||||
|
"ip4.nat64_ratio":"NAT64: casas só IPv6 por endereço",
|
||||||
"ip4.no_grow":"{name} ({city}) queria crescer para {bw}, mas você não tinha endereços IPv4 livres para isso.",
|
"ip4.no_grow":"{name} ({city}) queria crescer para {bw}, mas você não tinha endereços IPv4 livres para isso.",
|
||||||
"ip4.no_space":"{name} precisa de um {p} de IPv4 ({n} endereços), e só {free} estão livres. Compre ou alugue um bloco, ou coloque mais casas atrás do CGNAT.",
|
"ip4.no_space":"{name} precisa de um {p} de IPv4 ({n} endereços), e só {free} estão livres. Compre ou alugue um bloco, ou coloque mais casas atrás do CGNAT.",
|
||||||
|
"ip4.no_space_both":"{name} precisa de um {p} de IPv4 ({n} endereços), e só {free} estão livres. Compre ou alugue um bloco, ou coloque mais casas em cada endereço de CGNAT ou NAT64.",
|
||||||
|
"ip4.no_space_v6":"{name} precisa de um {p} de IPv4 ({n} endereços), e só {free} estão livres. Compre ou alugue um bloco, ou coloque mais casas só IPv6 em cada endereço NAT64.",
|
||||||
"ip4.note":"IPv6 é grátis e infinito. IPv4 acabou há anos: clientes empresariais precisam de blocos públicos, e as casas que não cabem compartilham endereços atrás do CGNAT (o tráfego IPv6 passa por fora da caixa).",
|
"ip4.note":"IPv6 é grátis e infinito. IPv4 acabou há anos: clientes empresariais precisam de blocos públicos, e as casas que não cabem compartilham endereços atrás do CGNAT (o tráfego IPv6 passa por fora da caixa).",
|
||||||
"ip4.off":"Nas regras deste jogo, IPv4 não falta.",
|
"ip4.off":"Nas regras deste jogo, IPv4 não falta.",
|
||||||
"ip4.offer_needs":"Precisa de um {p} de IPv4 ({n} endereços); só {free} livres.",
|
"ip4.offer_needs":"Precisa de um {p} de IPv4 ({n} endereços); só {free} livres.",
|
||||||
|
|
@ -2725,11 +2736,39 @@
|
||||||
"ip4.sell":"Vender {price}",
|
"ip4.sell":"Vender {price}",
|
||||||
"ip4.sold":"Seu {p} foi vendido por {price}.",
|
"ip4.sold":"Seu {p} foi vendido por {price}.",
|
||||||
"ip4.squeezed":"Sem espaço: {p} das casas não cabem nem com {r} casas por endereço. As conexões caem e elas querem reembolso: compre ou alugue um bloco.",
|
"ip4.squeezed":"Sem espaço: {p} das casas não cabem nem com {r} casas por endereço. As conexões caem e elas querem reembolso: compre ou alugue um bloco.",
|
||||||
|
"ip4.squeezed_both":"Sem espaço: {p} das casas não cabem nem com {r} casas por endereço de CGNAT e {r6} por endereço NAT64. As conexões caem e elas querem reembolso: compre ou alugue um bloco.",
|
||||||
|
"ip4.squeezed_v6":"Sem espaço: {p} das casas não cabem nem com {r} casas só IPv6 por endereço NAT64. As conexões caem e elas querem reembolso: compre ou alugue um bloco.",
|
||||||
"ip4.take_back":"Pegar de volta",
|
"ip4.take_back":"Pegar de volta",
|
||||||
"ip4.toast_cgnat":"<b>Seu IPv4 está cheio.</b> {p} das suas casas agora compartilham endereços atrás do CGNAT, e alguns gamers já reclamaram.",
|
"ip4.toast_cgnat":"<b>Seu IPv4 está cheio.</b> {p} das suas casas agora compartilham endereços atrás do CGNAT, e alguns gamers já reclamaram.",
|
||||||
"ip4.toast_out":"<b>Acabou o IPv4.</b> Nem com {r} casas por endereço o CGNAT comporta todo mundo: compre ou alugue um bloco no banco.",
|
"ip4.toast_out":"<b>Acabou o IPv4.</b> Nem com {r} casas por endereço o CGNAT comporta todo mundo: compre ou alugue um bloco no banco.",
|
||||||
|
"ip4.toast_out_both":"<b>Acabou o IPv4.</b> Nem com {r} casas por endereço atrás do CGNAT e {r6} no NAT64 cabem todas as casas: compre ou alugue um bloco no banco.",
|
||||||
|
"ip4.toast_out_v6":"<b>Acabou o IPv4.</b> Nem com {r} casas por endereço seu pool NAT64 comporta todas as casas só IPv6: compre ou alugue um bloco no banco.",
|
||||||
"ip4.too_many":"Você tem {n} blocos IPv4, o máximo que uma rede pode manter. Venda ou devolva blocos pequenos para abrir espaço para um maior.",
|
"ip4.too_many":"Você tem {n} blocos IPv4, o máximo que uma rede pode manter. Venda ou devolva blocos pequenos para abrir espaço para um maior.",
|
||||||
|
"ip4.v6_share":"Participação do IPv6 no tráfego das casas este ano",
|
||||||
"ip4.yours":"Seus endereços IPv4",
|
"ip4.yours":"Seus endereços IPv4",
|
||||||
|
"ip6.already":"Todas as casas daqui já são só IPv6.",
|
||||||
|
"ip6.busy":"A troca já está em andamento aqui.",
|
||||||
|
"ip6.done":"<b>{city} agora é só IPv6.</b> Todas as casas de lá rodam 464XLAT, e o que ainda precisa de IPv4 compartilha seu pool NAT64.",
|
||||||
|
"ip6.dual_stack":"Pilha dupla",
|
||||||
|
"ip6.every_home":"Todas as casas",
|
||||||
|
"ip6.go":"Passar a só IPv6 {cost}",
|
||||||
|
"ip6.homes_that_join_later":"As casas que chegarem depois também recebem um, a {cost} cada.",
|
||||||
|
"ip6.n_routers":{"one":"{n} roteador doméstico","other":"{n} roteadores domésticos"},
|
||||||
|
"ip6.new_homes_get_a_clat":"Casas novas já recebem um roteador com CLAT, a {cost} cada, e o que ainda precisa de IPv4 compartilha seu pool NAT64, {r} casas por endereço.",
|
||||||
|
"ip6.no_bb":"Lance a banda larga aqui primeiro.",
|
||||||
|
"ip6.no_home_is_behind_cgnat":"Nenhuma casa está atrás do CGNAT ainda: isso só compensa quando seu IPv4 começar a faltar.",
|
||||||
|
"ip6.part_note":"A troca parou em {p} das casas, e as casas novas voltam a ter pilha dupla.",
|
||||||
|
"ip6.pitch":"Troque os roteadores das casas daqui por modelos com CLAT: as casas rodam só em IPv6 e não têm IPv4 próprio, e o que ainda precisa de IPv4 compartilha seu pool NAT64, {r} casas por endereço.",
|
||||||
|
"ip6.share_homes":"{p} das casas",
|
||||||
|
"ip6.started":"Trocando {routers} em {city} por modelos só IPv6: cerca de {days} dias.",
|
||||||
|
"ip6.stop":"Parar a troca",
|
||||||
|
"ip6.stopped":"Troca parada em {city} em {p} das casas. Os roteadores já trocados ficam; casas novas voltam a ter pilha dupla.",
|
||||||
|
"ip6.swapping_home_routers_paid":"Trocando os roteadores das casas, pagos conforme são instalados; casas novas já recebem o novo, a {cost} cada. Pronto por volta de {date}.",
|
||||||
|
"ip6.title":"Só IPv6 (464XLAT)",
|
||||||
|
"ip6.waiting":"Esperando dinheiro: as equipes continuam assim que você puder pagar os roteadores do dia.",
|
||||||
|
"ip6.what":"Troca {routers} em cerca de {days} dias, pagos conforme são instalados, e libera {addr} para novos clientes.",
|
||||||
|
"ip6.your_ipv4_bill_goes_down":"Sua conta de IPv4 cai {price}/mês (menos caixas de CGNAT e reembolsos).",
|
||||||
|
"ip6.your_ipv4_bill_goes_up":"Sua conta de IPv4 sobe {price}/mês (gateways NAT64 e reembolsos).",
|
||||||
"ix_downgrade.pni_downgraded":"O PNI com {net} em {city} agora é {port}.",
|
"ix_downgrade.pni_downgraded":"O PNI com {net} em {city} agora é {port}.",
|
||||||
"ix_downgrade.port_downgraded_at_ix":"A porta em {ix} agora é de {port}.",
|
"ix_downgrade.port_downgraded_at_ix":"A porta em {ix} agora é de {port}.",
|
||||||
"ix_downgrade.transit_downgraded":"O trânsito de {net} em {city} agora é {port}.",
|
"ix_downgrade.transit_downgraded":"O trânsito de {net} em {city} agora é {port}.",
|
||||||
|
|
|
||||||
|
|
@ -88,9 +88,10 @@ const API_DOMAINS={
|
||||||
pieSpatId:{table:'PIE_SPAT_DEF',kind:'key'},
|
pieSpatId:{table:'PIE_SPAT_DEF',kind:'key'},
|
||||||
pieSpatChoice:{kind:'enum',values:[0,1]},
|
pieSpatChoice:{kind:'enum',values:[0,1]},
|
||||||
countryCode:{kind:'enum',values:()=>[...new Set(CITIES.map(c=>c.cc))].sort()},
|
countryCode:{kind:'enum',values:()=>[...new Set(CITIES.map(c=>c.cc))].sort()},
|
||||||
// Address space: an IPv4 prefix length the market sells, and the CGNAT ratios.
|
// Address space: an IPv4 prefix length the market sells, and the CGNAT and NAT64 ratios.
|
||||||
ip4Len:{kind:'enum',values:()=>Array.from({length:IP4_MAX-IP4_MIN+1},(_,i)=>IP4_MIN+i)},
|
ip4Len:{kind:'enum',values:()=>Array.from({length:IP4_MAX-IP4_MIN+1},(_,i)=>IP4_MIN+i)},
|
||||||
ip4Ratio:{kind:'enum',values:()=>IP4_NAT.slice()},
|
ip4Ratio:{kind:'enum',values:()=>IP4_NAT.slice()},
|
||||||
|
ip4Ratio64:{kind:'enum',values:()=>IP4_N64.slice()},
|
||||||
scnId:{table:'SCN',kind:'id'},
|
scnId:{table:'SCN',kind:'id'},
|
||||||
// A traceroute target in the modal's own terms.
|
// A traceroute target in the modal's own terms.
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -315,7 +315,7 @@ const API_CMD={
|
||||||
quote:a=>({setup:0,monthly:ip4InMo(Number(a.len)),blocked:[ip4On()?'':tr('ip4.off'),ip4On()&&ip4Full()?tr('ip4.too_many',{n:IP4_BLK}):''].filter(Boolean)}),
|
quote:a=>({setup:0,monthly:ip4InMo(Number(a.len)),blocked:[ip4On()?'':tr('ip4.off'),ip4On()&&ip4Full()?tr('ip4.too_many',{n:IP4_BLK}):''].filter(Boolean)}),
|
||||||
doc:'Lease an IPv4 block of this prefix length by the month, at today\'s rate (fixed for the lease). Hand it back with ip4Return. Refused at 256 blocks, like ip4Buy.'},
|
doc:'Lease an IPv4 block of this prefix length by the month, at today\'s rate (fixed for the lease). Hand it back with ip4Return. Refused at 256 blocks, like ip4Buy.'},
|
||||||
ip4Sell:{args:[['id','entityId']],confirm:'double',watch:['ip4'],
|
ip4Sell:{args:[['id','entityId']],confirm:'double',watch:['ip4'],
|
||||||
doc:'Sell an owned block (not leased out) for 92% of the market price. Refused within two years of its last transfer, or when the customers signed would no longer fit with every home behind CGNAT.'},
|
doc:'Sell an owned block (not leased out) for 92% of the market price. Refused within two years of its last transfer, or when the customers signed would no longer fit with every dual-stack home behind CGNAT and the IPv6-only homes in the NAT64 pool.'},
|
||||||
ip4Out:{args:[['id','entityId']],watch:['ip4'],
|
ip4Out:{args:[['id','entityId']],watch:['ip4'],
|
||||||
doc:'Lease an owned block out through a broker for a monthly income, while your own customers still fit without it.'},
|
doc:'Lease an owned block out through a broker for a monthly income, while your own customers still fit without it.'},
|
||||||
ip4Back:{args:[['id','entityId']],watch:['ip4'],
|
ip4Back:{args:[['id','entityId']],watch:['ip4'],
|
||||||
|
|
@ -324,6 +324,13 @@ const API_CMD={
|
||||||
doc:'Hand a leased-in block back, ending its monthly fee, when your customers still fit without it.'},
|
doc:'Hand a leased-in block back, ending its monthly fee, when your customers still fit without it.'},
|
||||||
ip4Nat:{args:[['v','ip4Ratio']],watch:['ip4'],
|
ip4Nat:{args:[['v','ip4Ratio']],watch:['ip4'],
|
||||||
doc:'Set how many broadband homes share one IPv4 address behind CGNAT (8, 16, 32 or 64). More frees space for business customers but more gamers ask for refunds; fewer is refused when the customers signed would not fit.'},
|
doc:'Set how many broadband homes share one IPv4 address behind CGNAT (8, 16, 32 or 64). More frees space for business customers but more gamers ask for refunds; fewer is refused when the customers signed would not fit.'},
|
||||||
|
ip4Nat64:{args:[['v','ip4Ratio64']],watch:['ip4'],
|
||||||
|
doc:'Set how many IPv6-only homes share one IPv4 address in the NAT64 pool (64, 128 or 256). Their refunds are well under CGNAT\'s at the same ratio and shrink as the world moves to IPv6; fewer is refused when the customers signed would not fit.'},
|
||||||
|
ip6Go:{args:[['city','cityId']],watch:['pops.#city'],
|
||||||
|
quote:a=>({setup:ip6Cost(a.city),days:ip6Days(a.city),monthly:Math.round(ip6Mo(a.city,(R.rev&&R.rev.eyeballs)||0)),blocked:[ip6Why(a.city)].filter(Boolean)}),
|
||||||
|
doc:'Take a broadband city IPv6-only (464XLAT): swap its dual-stack home routers for ones with a CLAT over the quoted days, paid day by day as they go in (setup is the whole swap; starting needs only the first day\'s share on hand, and it waits while cash is short). Those homes then need no IPv4 of their own, only a share of the NAT64 pool; new homes there get the new router too, at the swap\'s price a router, paid the day they join (even short of cash: a new home needs it). monthly is what it does to the IPv4 bill (NAT64 gateways and refunds against the CGNAT it saves; negative saves). Frees what the city panel says for new customers.'},
|
||||||
|
ip6Stop:{args:[['city','cityId']],watch:['pops.#city'],
|
||||||
|
doc:'Stop a city\'s swap to IPv6-only. The homes already swapped stay IPv6-only (their routers are paid for, nothing comes back); new homes come dual stack again. ip6Go resumes it for the rest.'},
|
||||||
/* ---------- security, China, incidents ---------- */
|
/* ---------- security, China, incidents ---------- */
|
||||||
buildScrub:{args:[['city','cityId'],['tier','scrubTier',false]],watch:['scrubs'],
|
buildScrub:{args:[['city','cityId'],['tier','scrubTier',false]],watch:['scrubs'],
|
||||||
quote:a=>{const T=SCRUB_TIERS[a.tier||0];return {setup:T?T.cost:undefined,monthly:T?T.mo:undefined};},
|
quote:a=>{const T=SCRUB_TIERS[a.tier||0];return {setup:T?T.cost:undefined,monthly:T?T.mo:undefined};},
|
||||||
|
|
@ -498,7 +505,7 @@ const API_CMD={
|
||||||
|
|
||||||
const API_VIEW={
|
const API_VIEW={
|
||||||
pieOpen:{args:[],doc:'Open Pie Control, the rocket company\'s panel.'},
|
pieOpen:{args:[],doc:'Open Pie Control, the rocket company\'s panel.'},
|
||||||
ip4Open:{args:[],doc:'Open the bank at its Address space section: your IPv4 blocks, who uses them, CGNAT and the transfer market.'},
|
ip4Open:{args:[],doc:'Open the bank at its Address space section: your IPv4 blocks, who uses them, CGNAT, the NAT64 pool and the transfer market.'},
|
||||||
ip4Pick:{args:[['v','ip4Len']],doc:'Pick the block size the Address space market quotes (a prefix length, 24 to 16).'},
|
ip4Pick:{args:[['v','ip4Len']],doc:'Pick the block size the Address space market quotes (a prefix length, 24 to 16).'},
|
||||||
pieGovOpen:{args:[],doc:'Open the bank at its Government money section: the rocket company\'s fund auctions, the Pitcairn grant and the Ex-Im Pie Bank (it used to be Pie Control\'s Gov tab).'},
|
pieGovOpen:{args:[],doc:'Open the bank at its Government money section: the rocket company\'s fund auctions, the Pitcairn grant and the Ex-Im Pie Bank (it used to be Pie Control\'s Gov tab).'},
|
||||||
pieTab:{args:[['t','pieTab']],doc:'Switch the Pie Control tab: traffic, co (the company, its books and the Founder\'s posts), fly (launches) or dish.'},
|
pieTab:{args:[['t','pieTab']],doc:'Switch the Pie Control tab: traffic, co (the company, its books and the Founder\'s posts), fly (launches) or dish.'},
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ const API_STATE_DOC={
|
||||||
t1v:{type:'integer',doc:'Level at which Tier 1 transit was offered.'},
|
t1v:{type:'integer',doc:'Level at which Tier 1 transit was offered.'},
|
||||||
auV:{type:'integer',doc:'Australia content level gate.'},
|
auV:{type:'integer',doc:'Australia content level gate.'},
|
||||||
seen:{type:'array',doc:'Network ids the deals panel has already shown. Vestigial: written by newGame, read nowhere.'},
|
seen:{type:'array',doc:'Network ids the deals panel has already shown. Vestigial: written by newGame, read nowhere.'},
|
||||||
pops:{type:'map',doc:'Your POPs by city id: day opened, broadband (bb), ad boost, downtime, routers, generator, second site, teleport (tele: 1 GEO dishes, 2 with MEO tracking antennas).'},
|
pops:{type:'map',doc:'Your POPs by city id: day opened, broadband (bb: d, its demand in Gbps; v6, the share of its homes that are IPv6-only behind NAT64, absent for dual stack; v6e, the day a swap to IPv6-only finishes, while it runs), ad boost, downtime, routers, generator, second site, teleport (tele: 1 GEO dishes, 2 with MEO tracking antennas).'},
|
||||||
links:{type:'array',doc:'Your links: waves, dark fiber (df), own cables, fabric circuits (vxc), express lightpaths (xp: via lists the dark fibers it rides from a, ch its optics) and rented satellite circuits (sat: bird, g Gbps, km of radio path, ready day), each with an entity id.'},
|
links:{type:'array',doc:'Your links: waves, dark fiber (df), own cables, fabric circuits (vxc), express lightpaths (xp: via lists the dark fibers it rides from a, ch its optics) and rented satellite circuits (sat: bird, g Gbps, km of radio path, ready day), each with an entity id.'},
|
||||||
transit:{type:'array',doc:'Transit ports: city, net, tier, LAG members, port history for 95th-percentile billing.'},
|
transit:{type:'array',doc:'Transit ports: city, net, tier, LAG members, port history for 95th-percentile billing.'},
|
||||||
ixp:{type:'map',doc:'IX ports by exchange city; tier per port (may exceed 1 with LAG members in ixn).'},
|
ixp:{type:'map',doc:'IX ports by exchange city; tier per port (may exceed 1 with LAG members in ixn).'},
|
||||||
|
|
@ -61,7 +61,7 @@ const API_STATE_DOC={
|
||||||
ops:{type:'map',doc:'The NOC intern: who is hired, each standing order\'s on/off switch and settings (network work only: deals belong to the sales desk, slAuto), the monthly budget and what it spent, per-POP exceptions, the new-POP template and the weekly log.'},
|
ops:{type:'map',doc:'The NOC intern: who is hired, each standing order\'s on/off switch and settings (network work only: deals belong to the sales desk, slAuto), the monthly budget and what it spent, per-POP exceptions, the new-POP template and the weekly log.'},
|
||||||
core:{type:'map',doc:'Your backbone technology: lv bought, the level it runs at, the interop lab.'},
|
core:{type:'map',doc:'Your backbone technology: lv bought, the level it runs at, the interop lab.'},
|
||||||
ddosAuto:{type:'map',doc:'The NOC\'s auto-mitigation switches: rtbh and scrub.'},
|
ddosAuto:{type:'map',doc:'The NOC\'s auto-mitigation switches: rtbh and scrub.'},
|
||||||
ip4:{type:'map',doc:'IPv4 address space (rule ip4): b, the blocks, at most 256 (len: prefix length 16-24, k: rir from the registry, buy bought, in leased in; d: the day it last moved, out: leased out, mo: the monthly fee or income), nat: homes per address behind CGNAT, w: which warnings were shown. What customers use is derived from their kind and size.'},
|
ip4:{type:'map',doc:'IPv4 address space (rule ip4): b, the blocks, at most 256 (len: prefix length 16-24, k: rir from the registry, buy bought, in leased in; d: the day it last moved, out: leased out, mo: the monthly fee or income), nat: homes per address behind CGNAT, n64: IPv6-only homes per address in the NAT64 pool, w: which warnings were shown. What customers use is derived from their kind and size.'},
|
||||||
popStd:{type:'map',doc:'The build standard, or null for none. g router model (an RG index), rt routers, then only the targets that are set: site2, gen (true), lag (2 or 4 members), split, ix (true), pni (2 or 3 cities per network), sys (roadm, cl), opt (fast), wv (an LT index). New POPs get g, rt, site2 and gen at once; the std standing order and bstdApply bring the rest up. g and sys are also the model the routers order and the line system the optup order standardize on.'},
|
popStd:{type:'map',doc:'The build standard, or null for none. g router model (an RG index), rt routers, then only the targets that are set: site2, gen (true), lag (2 or 4 members), split, ix (true), pni (2 or 3 cities per network), sys (roadm, cl), opt (fast), wv (an LT index). New POPs get g, rt, site2 and gen at once; the std standing order and bstdApply bring the rest up. g and sys are also the model the routers order and the line system the optup order standardize on.'},
|
||||||
mp:{type:'map',doc:'Multiplayer, only in a self-hosted copy with a session server: the session code, your player id, the AS number and seed the session gave you, its rules preset, your colour, its title and the last save number the server holds; null in every other game.'},
|
mp:{type:'map',doc:'Multiplayer, only in a self-hosted copy with a session server: the session code, your player id, the AS number and seed the session gave you, its rules preset, your colour, its title and the last save number the server holds; null in every other game.'},
|
||||||
demo:{type:'map',doc:'Vendor demo units on order, by "kind:id" → ready day.'},
|
demo:{type:'map',doc:'Vendor demo units on order, by "kind:id" → ready day.'},
|
||||||
|
|
|
||||||
|
|
@ -14,8 +14,13 @@
|
||||||
so the first months fit with room for a few customers (gameplay rule F1). */
|
so the first months fit with room for a few customers (gameplay rule F1). */
|
||||||
// IP4_BLK: the most blocks a network holds; buying and leasing stop there, and a save keeps that many.
|
// IP4_BLK: the most blocks a network holds; buying and leasing stop there, and a save keeps that many.
|
||||||
const IP4_START=21,IP4_MIN=16,IP4_MAX=24,IP4_HOLD=730,IP4_NAT=[8,16,32,64],IP4_NAT0=16,IP4_BLK=256;
|
const IP4_START=21,IP4_MIN=16,IP4_MAX=24,IP4_HOLD=730,IP4_NAT=[8,16,32,64],IP4_NAT0=16,IP4_BLK=256;
|
||||||
// Public addresses per Gbps of busy-hour broadband (a home each), and the part of it CGNAT still carries: the rest is IPv6.
|
// Public addresses per Gbps of busy-hour broadband (a home each), and the part of it CGNAT still carries on day 0: the rest
|
||||||
const IP4_BB=10,IP4_V4=0.55,IP4_CGN=2;
|
// is IPv6. The world moves on, two points a year to a floor that never goes (ip4V4).
|
||||||
|
const IP4_BB=10,IP4_V4=0.55,IP4_V4_YR=0.02,IP4_V4_MIN=0.2,IP4_CGN=2;
|
||||||
|
// IPv6-only homes (464XLAT, 34-ipv6-only.js) have no address of their own: their IPv4 shares a NAT64 pool, at a wider ratio
|
||||||
|
// than CGNAT can take. Only what still needs IPv4 notices (consoles, IPv4-only VPNs): a share of the bill comes back, well
|
||||||
|
// under CGNAT's at the same ratio, and shrinking as the world goes IPv6.
|
||||||
|
const IP4_N64=[64,128,256],IP4_N640=128,IP4_ANNOY64={64:0.006,128:0.01,256:0.016};
|
||||||
// The market: dollars per address, flat for half a year, then +3% a year on a slow four-year swing. Leases are by the
|
// The market: dollars per address, flat for half a year, then +3% a year on a slow four-year swing. Leases are by the
|
||||||
// month (a broker keeps a cut of what yours earn), sales pay 92% of the price after the broker's fee.
|
// month (a broker keeps a cut of what yours earn), sales pay 92% of the price after the broker's fee.
|
||||||
const IP4_PX=38,IP4_FREE=180,IP4_YR=0.03,IP4_IN=0.5,IP4_OUT=0.4,IP4_SELL=0.92;
|
const IP4_PX=38,IP4_FREE=180,IP4_YR=0.03,IP4_IN=0.5,IP4_OUT=0.4,IP4_SELL=0.92;
|
||||||
|
|
@ -30,17 +35,22 @@ const ip4Sz=len=>2**(32-len),ip4LenOk=len=>Number.isInteger(len)&&len>=IP4_MIN&&
|
||||||
const ip4Cidr=n=>'/'+(32-Math.ceil(Math.log2(Math.max(1,n)))),ip4N=n=>Math.round(n).toLocaleString();
|
const ip4Cidr=n=>'/'+(32-Math.ceil(Math.log2(Math.max(1,n)))),ip4N=n=>Math.round(n).toLocaleString();
|
||||||
function ip4On(){return !!S&&!!S.ip4&&rule('ip4')===true&&(S.scn?scnRule('ip4'):S.mode==='normal');}
|
function ip4On(){return !!S&&!!S.ip4&&rule('ip4')===true&&(S.scn?scnRule('ip4'):S.mode==='normal');}
|
||||||
function ip4Need(b){const k=b&&IP4_BIZ[b.type];if(!k||!(b.bw>0))return 0;return Math.min(4096,2**Math.ceil(Math.log2(Math.max(k[1],b.bw*k[0]))));}
|
function ip4Need(b){const k=b&&IP4_BIZ[b.type];if(!k||!(b.bw>0))return 0;return Math.min(4096,2**Math.ceil(Math.log2(Math.max(k[1],b.bw*k[0]))));}
|
||||||
/* Who uses what. T: usable addresses (owned and leased in, without what is leased out); B: business customers; H: homes;
|
/* Who uses what. T: usable addresses (owned and leased in, without what is leased out); B: business customers; H: homes,
|
||||||
cg: homes behind CGNAT; over: the share of homes that do not fit even at the ratio; free: what a new customer can have
|
of them H6 IPv6-only (Hd dual stack); p6: the NAT64 pool; cg: dual-stack homes behind CGNAT; over: the share of homes
|
||||||
with every home behind CGNAT. */
|
that do not fit even at the ratios; need: the least the homes can live with; free: what a new customer can have with
|
||||||
function ip4Use(s=S){const I=s.ip4,r=I.nat;let own=0,inn=0,out=0,B=0,H=0;
|
every dual-stack home behind CGNAT. The NAT64 pool comes right after business customers: its homes gave their own
|
||||||
|
addresses up already and cannot fall back on anything, while dual-stack homes still can (behind CGNAT). */
|
||||||
|
function ip4Use(s=S){const I=s.ip4,r=I.nat,r6=I.n64||IP4_N640;let own=0,inn=0,out=0,B=0,H=0,H6=0;
|
||||||
for(const b of I.b){const n=ip4Sz(b.len);if(b.k==='in')inn+=n;else if(b.out)out+=n;else own+=n;}
|
for(const b of I.b){const n=ip4Sz(b.len);if(b.k==='in')inn+=n;else if(b.out)out+=n;else own+=n;}
|
||||||
for(const b of s.biz)B+=ip4Need(b);
|
for(const b of s.biz)B+=ip4Need(b);
|
||||||
for(const c in s.pops){const p=s.pops[c];if(p.bb)H+=p.bb.d*IP4_BB;}
|
for(const c in s.pops){const p=s.pops[c];if(p.bb){const h=p.bb.d*IP4_BB;H+=h;if(p.bb.v6)H6+=h*p.bb.v6;}}
|
||||||
H=Math.ceil(H);const T=own+inn,A=Math.max(0,T-B),min=Math.ceil(H/r);let cg=0,over=0;
|
H=Math.ceil(H);H6=Math.min(H,Math.ceil(H6));const Hd=H-H6,T=own+inn,A=Math.max(0,T-B),p6=Math.ceil(H6/r6),min=Math.ceil(Hd/r),need=p6+min,A2=A-p6;let cg=0,over=0;
|
||||||
if(A<H){if(A>=min)cg=Math.min(H,Math.ceil((H-A)*r/(r-1)));else{cg=H;over=min?1-A/min:0;}}
|
if(A2<Hd){if(A2>=min)cg=Math.min(Hd,Math.ceil((Hd-A2)*r/(r-1)));else{cg=Hd;over=need?1-A/need:0;}}
|
||||||
return {T,own,inn,out,B,H,cg,over,free:T-B-min,r};}
|
return {T,own,inn,out,B,H,H6,Hd,p6,cg,over,need,free:T-B-need,r,r6};}
|
||||||
const ip4Fits=o=>!ip4On()||ip4Need(o)<=Math.max(0,ip4Use().free);
|
const ip4Fits=o=>!ip4On()||ip4Need(o)<=Math.max(0,ip4Use().free);
|
||||||
|
// Which sharing is left to stretch when space runs out, for the advice: CGNAT (0, no IPv6-only homes), the NAT64 pool alone
|
||||||
|
// (1, every home IPv6-only) or both (2).
|
||||||
|
const ip4Pools=u=>!u.H6?0:u.Hd?2:1;
|
||||||
// A customer renewing at bw: does the bigger block it needs fit what is free?
|
// A customer renewing at bw: does the bigger block it needs fit what is free?
|
||||||
const ip4GrowOk=(b,bw)=>!ip4On()||ip4Need({type:b.type,bw})-ip4Need(b)<=Math.max(0,ip4Use().free);
|
const ip4GrowOk=(b,bw)=>!ip4On()||ip4Need({type:b.type,bw})-ip4Need(b)<=Math.max(0,ip4Use().free);
|
||||||
const ip4Full=()=>S.ip4.b.length>=IP4_BLK;
|
const ip4Full=()=>S.ip4.b.length>=IP4_BLK;
|
||||||
|
|
@ -54,11 +64,17 @@ function ip4Px(d=S.day){if(!rule('market')||d<=IP4_FREE)return IP4_PX;const y=(d
|
||||||
const ip4Cost=len=>Math.round(ip4Sz(len)*ip4Px()*(1-0.015*(IP4_MAX-len))/100)*100;
|
const ip4Cost=len=>Math.round(ip4Sz(len)*ip4Px()*(1-0.015*(IP4_MAX-len))/100)*100;
|
||||||
const ip4Value=len=>Math.round(ip4Cost(len)*IP4_SELL/100)*100;
|
const ip4Value=len=>Math.round(ip4Cost(len)*IP4_SELL/100)*100;
|
||||||
const ip4InMo=len=>Math.round(ip4Sz(len)*IP4_IN*ip4Px()/IP4_PX),ip4OutMo=len=>Math.round(ip4Sz(len)*IP4_OUT*ip4Px()/IP4_PX);
|
const ip4InMo=len=>Math.round(ip4Sz(len)*IP4_IN*ip4Px()/IP4_PX),ip4OutMo=len=>Math.round(ip4Sz(len)*IP4_OUT*ip4Px()/IP4_PX);
|
||||||
// The month's IPv4 bill: leases in and out, CGNAT boxes, refunds (eye: what broadband earns a month).
|
// The IPv4 share of home traffic on day d: 55% on day 0 (so nothing changes at the start), two points less a year, never
|
||||||
function ip4Bill(eye){const u=ip4Use();let lin=0,lout=0;for(const b of S.ip4.b){if(b.k==='in')lin+=b.mo||0;else if(b.out)lout+=b.mo||0;}
|
// under a fifth (old consoles, old VPNs, old everything).
|
||||||
const cgS=u.H?u.cg/u.H:0;return {u,lin,lout,box:u.cg/IP4_BB*IP4_V4*IP4_CGN,refund:eye*(cgS*IP4_ANNOY[u.r]+u.over*IP4_SQZ)};}
|
const ip4V4=(d=S.day)=>Math.max(IP4_V4_MIN,IP4_V4-IP4_V4_YR*Math.max(0,d)/365.2425);
|
||||||
|
/* The month's IPv4 bill: leases in and out, CGNAT boxes and NAT64 gateways (the same price per Gbps of IPv4 they carry),
|
||||||
|
refunds (eye: what broadband earns a month). NAT64 refunds shrink with the IPv4 share: in an IPv6-only home only what
|
||||||
|
still needs IPv4 meets the NAT at all. s: the network as ip4Use() takes it (a city panel asks about one that might be). */
|
||||||
|
function ip4Bill(eye,s=S){const u=ip4Use(s),v4=ip4V4();let lin=0,lout=0;for(const b of s.ip4.b){if(b.k==='in')lin+=b.mo||0;else if(b.out)lout+=b.mo||0;}
|
||||||
|
const cgS=u.H?u.cg/u.H:0,v6S=u.H?u.H6/u.H:0;
|
||||||
|
return {u,lin,lout,v4,box:u.cg/IP4_BB*v4*IP4_CGN,box64:u.H6/IP4_BB*v4*IP4_CGN,refund:eye*(cgS*IP4_ANNOY[u.r]+v6S*IP4_ANNOY64[u.r6]*v4/IP4_V4+u.over*IP4_SQZ)};}
|
||||||
// computeMoney: only what is there, so a network with nothing to pay keeps its money rows as they were.
|
// computeMoney: only what is there, so a network with nothing to pay keeps its money rows as they were.
|
||||||
function ip4Money(C,V){if(!ip4On())return;const b=ip4Bill(V.eyeballs||0),c=Math.round(b.lin+b.box+b.refund);if(c>0)C.ip4=c;if(b.lout>0)V.ip4=b.lout;}
|
function ip4Money(C,V){if(!ip4On())return;const b=ip4Bill(V.eyeballs||0),c=Math.round(b.lin+b.box+b.box64+b.refund);if(c>0)C.ip4=c;if(b.lout>0)V.ip4=b.lout;}
|
||||||
/* A new network gets its /21 from the RIR. An older save gets what it already uses registered to it and a quarter more to
|
/* A new network gets its /21 from the RIR. An older save gets what it already uses registered to it and a quarter more to
|
||||||
grow into (about a month for a big, fast-growing network), rounded up to /24s in real CIDR blocks (a /21 at the
|
grow into (about a month for a big, fast-growing network), rounded up to /24s in real CIDR blocks (a /21 at the
|
||||||
least), so nothing changes on load; those blocks move like any other two years on.
|
least), so nothing changes on load; those blocks move like any other two years on.
|
||||||
|
|
@ -69,19 +85,22 @@ function ip4Grant(s){const d=s.day||0,b=[],add=len=>b.push({id:'rir'+b.length,le
|
||||||
need=Math.max(ip4Sz(IP4_START),Math.ceil(need*1.25/256)*256);
|
need=Math.max(ip4Sz(IP4_START),Math.ceil(need*1.25/256)*256);
|
||||||
while(need>=ip4Sz(IP4_MIN)&&b.length<200){add(IP4_MIN);need-=ip4Sz(IP4_MIN);}
|
while(need>=ip4Sz(IP4_MIN)&&b.length<200){add(IP4_MIN);need-=ip4Sz(IP4_MIN);}
|
||||||
for(let len=IP4_MIN+1;len<=IP4_MAX;len++)if(need>=ip4Sz(len)){add(len);need-=ip4Sz(len);}
|
for(let len=IP4_MIN+1;len<=IP4_MAX;len++)if(need>=ip4Sz(len)){add(len);need-=ip4Sz(len);}
|
||||||
return {b,nat:IP4_NAT0,w:0};}
|
return {b,nat:IP4_NAT0,n64:IP4_N640,w:0};}
|
||||||
const ip4New=()=>ip4Grant({});
|
const ip4New=()=>ip4Grant({});
|
||||||
function ip4Fix(s){const I=s.ip4&&typeof s.ip4==='object'&&!Array.isArray(s.ip4)?s.ip4:null;if(!I){s.ip4=ip4Grant(s);return;}
|
function ip4Fix(s){const I=s.ip4&&typeof s.ip4==='object'&&!Array.isArray(s.ip4)?s.ip4:null;if(!I){s.ip4=ip4Grant(s);return;}
|
||||||
const day=Math.max(0,num(s.day,0)),mo=v=>Math.round(Math.min(1e8,Math.max(0,num(v,0))));
|
const day=Math.max(0,num(s.day,0)),mo=v=>Math.round(Math.min(1e8,Math.max(0,num(v,0))));
|
||||||
const b=(Array.isArray(I.b)?I.b:[]).filter(x=>x&&typeof x==='object'&&ip4LenOk(x.len)&&['rir','buy','in'].includes(x.k)).slice(0,IP4_BLK).map(x=>{
|
const b=(Array.isArray(I.b)?I.b:[]).filter(x=>x&&typeof x==='object'&&ip4LenOk(x.len)&&['rir','buy','in'].includes(x.k)).slice(0,IP4_BLK).map(x=>{
|
||||||
const o={id:typeof x.id==='string'&&x.id&&x.id.length<=40?x.id:uid(),len:x.len,k:x.k,d:int(x.d,0,day,0)};
|
const o={id:typeof x.id==='string'&&x.id&&x.id.length<=40?x.id:uid(),len:x.len,k:x.k,d:int(x.d,0,day,0)};
|
||||||
if(x.k==='in')o.mo=mo(x.mo);else if(x.out===true){o.out=true;o.mo=mo(x.mo);}return o;});
|
if(x.k==='in')o.mo=mo(x.mo);else if(x.out===true){o.out=true;o.mo=mo(x.mo);}return o;});
|
||||||
s.ip4={b,nat:IP4_NAT.includes(I.nat)?I.nat:IP4_NAT0,w:int(I.w,0,3,0)};}
|
s.ip4={b,nat:IP4_NAT.includes(I.nat)?I.nat:IP4_NAT0,n64:IP4_N64.includes(I.n64)?I.n64:IP4_N640,w:int(I.w,0,3,0)};}
|
||||||
/* Once a day: say so when homes go behind CGNAT (a percent of them at least), and when even CGNAT cannot fit them all
|
/* Once a day: say so when homes go behind CGNAT (a percent of them at least), and when even CGNAT cannot fit them all
|
||||||
(w: what was said). Each rearms only with room to spare again, so homes hovering at the limit hear it once. */
|
(w: what was said). Each rearms only with room to spare again, so homes hovering at the limit hear it once. */
|
||||||
function ip4Day(d){if(!ip4On())return;const I=S.ip4,u=ip4Use(),A=u.T-u.B,go=[{l:tr('ip4.section'),act:'ip4Open'}];
|
function ip4Day(d){if(!ip4On())return;ip6Day(d);const I=S.ip4,u=ip4Use(),A=u.T-u.B,go=[{l:tr('ip4.section'),act:'ip4Open'}];
|
||||||
if(u.cg>=Math.max(1,u.H*0.01)){if(!(I.w&1)){I.w|=1;toast(tr('ip4.toast_cgnat',{p:pct(u.cg/u.H)}),'',go);}}else if(A>=u.H*1.05)I.w&=~1;
|
if(u.cg>=Math.max(1,u.H*0.01)){if(!(I.w&1)){I.w|=1;toast(tr('ip4.toast_cgnat',{p:pct(u.cg/u.H)}),'',go);}}else if(A-u.p6>=u.Hd*1.05)I.w&=~1;
|
||||||
if(u.over>0){if(!(I.w&2)){I.w|=2;toast(tr('ip4.toast_out',{r:u.r}),'bad',go);sfx('err');}}else if(A>=Math.ceil(u.H/u.r)*1.1)I.w&=~2;}
|
if(u.over>0){if(!(I.w&2)){I.w|=2;const k=ip4Pools(u);toast(k===1?tr('ip4.toast_out_v6',{r:u.r6}):k?tr('ip4.toast_out_both',{r:u.r,r6:u.r6}):tr('ip4.toast_out',{r:u.r}),'bad',go);sfx('err');}}
|
||||||
|
else if(A>=u.need*1.1)I.w&=~2;}
|
||||||
|
// Your customers need the addresses: what to stretch or get instead (ip4Busy, the bank's block rows).
|
||||||
|
function ip4InUse(u=ip4Use()){const k=ip4Pools(u);return k===1?tr('ip4.in_use_v6'):k?tr('ip4.in_use_both'):tr('ip4.in_use');}
|
||||||
// Renewals that wanted a bigger block than is free (clGrow, [customer, bandwidth]): they stay as they are, and hear why.
|
// Renewals that wanted a bigger block than is free (clGrow, [customer, bandwidth]): they stay as they are, and hear why.
|
||||||
function ip4News(l=[]){for(const [b,bw] of l.slice(0,3))toast(tr('ip4.no_grow',{name:esc(b.name),city:esc(clWhere(b)),bw:fmtG(bw)}),'',[{l:tr('ip4.section'),act:'ip4Open'}]);}
|
function ip4News(l=[]){for(const [b,bw] of l.slice(0,3))toast(tr('ip4.no_grow',{name:esc(b.name),city:esc(clWhere(b)),bw:fmtG(bw)}),'',[{l:tr('ip4.section'),act:'ip4Open'}]);}
|
||||||
// The line under an offer that cannot be signed for want of addresses.
|
// The line under an offer that cannot be signed for want of addresses.
|
||||||
|
|
|
||||||
58
src/game/60-features/34-ipv6-only.js
Normal file
58
src/game/60-features/34-ipv6-only.js
Normal file
|
|
@ -0,0 +1,58 @@
|
||||||
|
/* ---------- IPv6-only broadband (464XLAT), city by city, next to CGNAT (33-address-space.js) ----------
|
||||||
|
A broadband city can go IPv6-only: every home router is swapped for one with a CLAT, and the network runs NAT64/DNS64
|
||||||
|
for whatever still needs IPv4. Those homes hold no IPv4 address of their own: their IPv4 shares the NAT64 pool at the
|
||||||
|
player's NAT64 ratio (S.ip4.n64), which ip4Use() sets aside right after business customers. CGNAT costs nothing to
|
||||||
|
start; this costs a home router per home, paid as each one goes in, and some days per city.
|
||||||
|
p.bb.v6: the share of the city's homes that are IPv6-only (absent: none, dual stack, as in every older save);
|
||||||
|
p.bb.v6e: the day the swap finishes, while it runs. Homes that join a city that is swapping or done get the new router
|
||||||
|
from the start, at the same price (ip6Grow): a city that goes IPv6-only the day it launches pays for every home it grows
|
||||||
|
into, as one that switches years later does. Stop halfway and the swapped ones stay, the new ones come dual stack
|
||||||
|
again. A POP closed and rebuilt starts dual stack: its homes, and the routers they had, left with it. Rule ip4, like
|
||||||
|
the rest of the address space. */
|
||||||
|
// Dollars per home router; a swap takes IP6_D0 days plus one for every IP6_PER homes, IP6_DMAX at most.
|
||||||
|
const IP6_CPE=4,IP6_D0=30,IP6_PER=200,IP6_DMAX=180;
|
||||||
|
const ip6Pop=c=>own(S.pops,c)?S.pops[c]:null;
|
||||||
|
// Dual-stack homes still to swap in a city.
|
||||||
|
const ip6Homes=p=>p&&p.bb?Math.max(0,p.bb.d*IP4_BB*(1-(p.bb.v6||0))):0;
|
||||||
|
const ip6Cost=c=>{const n=ip6Homes(ip6Pop(c));return n>0?Math.max(100,Math.round(n*IP6_CPE/100)*100):0;};
|
||||||
|
const ip6Days=c=>Math.min(IP6_DMAX,IP6_D0+Math.ceil(ip6Homes(ip6Pop(c))/IP6_PER));
|
||||||
|
// To start, the first day's routers on hand: the rest is paid as they go in, and the swap waits while cash is short.
|
||||||
|
const ip6First=c=>ip6Cost(c)/Math.max(1,ip6Days(c));
|
||||||
|
// The network as it would be with every home here IPv6-only (p: the city's POP, with broadband).
|
||||||
|
const ip6If=(c,p)=>({ip4:S.ip4,biz:S.biz,pops:{...S.pops,[c]:{...p,bb:{...p.bb,v6:1}}}});
|
||||||
|
// Exactly what going IPv6-only here frees for new customers: the address space counted again with every home here on it.
|
||||||
|
function ip6Free(c){const p=ip6Pop(c);if(!p||!p.bb)return 0;return ip4Use(ip6If(c,p)).free-ip4Use().free;}
|
||||||
|
/* And what it does to the month's IPv4 bill, counted the same way (eye: what broadband earns a month): NAT64 gateways and
|
||||||
|
refunds against the CGNAT boxes and refunds it saves. While no home is behind CGNAT it only adds. */
|
||||||
|
function ip6Mo(c,eye){const p=ip6Pop(c);if(!p||!p.bb)return 0;const m=b=>b.box+b.box64+b.refund;return m(ip4Bill(eye,ip6If(c,p)))-m(ip4Bill(eye));}
|
||||||
|
// Why this city cannot start a swap now ('' when it can).
|
||||||
|
function ip6Why(c){const p=ip6Pop(c);if(!ip4On())return tr('ip4.off');if(!p||!p.bb)return tr('ip6.no_bb');if(p.bb.v6e)return tr('ip6.busy');if(p.bb.v6>=1)return tr('ip6.already');return '';}
|
||||||
|
// Today's routers: an even share of what is left, so the swap ends on its day however the city grows meanwhile.
|
||||||
|
const ip6Left=(b,d)=>Math.max(1,b.v6e-d+1),ip6Slice=(b,d)=>b.d*IP4_BB*(1-(b.v6||0))/ip6Left(b,d)*IP6_CPE;
|
||||||
|
/* Once a day (from ip4Day): every running swap does its share of the homes and pays for their routers. Short of cash,
|
||||||
|
the crews wait a day and the end slides with them, so a swap never pushes the network into the red. */
|
||||||
|
function ip6Day(d){if(!ip4On())return;for(const c in S.pops){const b=S.pops[c].bb;if(!b||!b.v6e)continue;
|
||||||
|
const k=ip6Left(b,d),cost=ip6Slice(b,d);if(cost>Math.max(0,S.cash)){b.v6e++;continue;}
|
||||||
|
S.cash-=cost;const v=b.v6||0;b.v6=k<=1?1:Math.min(1,v+(1-v)/k);
|
||||||
|
if(k<=1){delete b.v6e;toast(tr('ip6.done',{city:esc(CITY[c].name)}),'good',[{l:tr('ip4.section'),act:'ip4Open'}]);}}}
|
||||||
|
/* The day's new homes (d0: demand before it grew): while swapping or done each gets the new router, IP6_CPE like a swapped
|
||||||
|
one, dual stack after a stop. The swap of old routers is a project and waits for cash; a home that signs up today
|
||||||
|
needs its router today, so that is spent like any running cost (homes only join where the service is good, and they
|
||||||
|
pay it back within days). */
|
||||||
|
function ip6Grow(b,d0){if(!ip4On()||!(b.d>d0))return;const v=b.v6||0;
|
||||||
|
if(b.v6e||v>=1){S.cash-=(b.d-d0)*IP4_BB*IP6_CPE;if(v<1)b.v6=1-(1-v)*d0/b.d;}else if(v>0)b.v6=v*d0/b.d;}
|
||||||
|
// Saves: v6 is a share (none at all is no field, so a dual-stack city saves as it always did); v6e a day, gone once done.
|
||||||
|
function ip6Fix(b,day){if(b.v6!==undefined){const v=num(b.v6,0);if(v>0)b.v6=Math.min(1,v);else delete b.v6;}
|
||||||
|
if(b.v6e!==undefined){if(b.v6>=1||!Number.isFinite(b.v6e))delete b.v6e;else b.v6e=int(b.v6e,day,day+3650,day);}}
|
||||||
|
// The city panel's Home broadband: where the city stands, and the swap to start or stop.
|
||||||
|
function ip6Html(c){if(!ip4On())return '';const p=ip6Pop(c),b=p&&p.bb;if(!b)return '';const v=b.v6||0,r=S.ip4.n64||IP4_N640;
|
||||||
|
let h=`<div style="margin-top:8px"><div class="kv"><span>${tr('ip6.title')}</span><b>${v>=1?tr('ip6.every_home'):v>0||b.v6e?tr('ip6.share_homes',{p:pct(v)}):tr('ip6.dual_stack')}</b></div>`;
|
||||||
|
if(b.v6e){const wait=ip6Slice(b,S.day+1)>Math.max(0,S.cash);
|
||||||
|
h+=`<div class="bar me"><i style="width:${Math.min(100,v*100)}%"></i></div><p class="note">${tr('ip6.swapping_home_routers_paid',{cost:fmt$(IP6_CPE),date:dateStr(b.v6e)})}</p>${wait?`<p class="why">${tr('ip6.waiting')}</p>`:''}<div class="btns">${btn(tr('ip6.stop'),'ip6Stop',{city:c},'ghost sm')}</div>`;}
|
||||||
|
else if(v>=1)h+=`<p class="note">${tr('ip6.new_homes_get_a_clat',{cost:fmt$(IP6_CPE),r})}</p>`;
|
||||||
|
else{const n=Math.ceil(ip6Homes(p)),cost=ip6Cost(c),f=Math.max(0,ip6Free(c)),mo=Math.round(ip6Mo(c,(R.rev&&R.rev.eyeballs)||0));
|
||||||
|
// Before the player commits: what the month costs after it too, and that it buys nothing yet while IPv4 still fits.
|
||||||
|
const bill=mo>0?tr('ip6.your_ipv4_bill_goes_up',{price:fmt$(mo)})+(ip4Use().cg?'':' '+tr('ip6.no_home_is_behind_cgnat')):mo<0?tr('ip6.your_ipv4_bill_goes_down',{price:fmt$(-mo)}):'';
|
||||||
|
h+=`<p class="note">${v>0?tr('ip6.part_note',{p:pct(v)}):tr('ip6.pitch',{r})} ${tr('ip6.what',{routers:trn('ip6.n_routers',n,{n:ip4N(n)}),days:ip6Days(c),addr:trn('ip4.n_addresses',f,{n:ip4N(f)})})} ${tr('ip6.homes_that_join_later',{cost:fmt$(IP6_CPE)})}${bill?' '+bill:''}</p>
|
||||||
|
<div class="btns">${btn(tr('ip6.go',{cost:fmt$(cost)}),'ip6Go',{city:c},'sm',S.cash<ip6First(c))}</div>`;}
|
||||||
|
return h+'</div>';}
|
||||||
|
|
@ -17,7 +17,7 @@ function sanitize(s){
|
||||||
{const m=s.monkey&&typeof s.monkey==='object'&&!Array.isArray(s.monkey)?s.monkey:{},on=m.on?1:0,o={next:m.next==null?null:int(m.next,0,1e7,s.day+90),on};
|
{const m=s.monkey&&typeof s.monkey==='object'&&!Array.isArray(s.monkey)?s.monkey:{},on=m.on?1:0,o={next:m.next==null?null:int(m.next,0,1e7,s.day+90),on};
|
||||||
if(on){o.start=int(m.start,0,s.day,s.day);o.until=int(m.until,o.start,o.start+400,s.day+30);o.snip=int(m.snip,0,1e7,s.day+3);o.n=int(m.n,0,1e4,0);o.hurt=int(m.hurt,0,o.n,0);o.c=isCity(m.c)?m.c:isCity(s.home)?s.home:null;}
|
if(on){o.start=int(m.start,0,s.day,s.day);o.until=int(m.until,o.start,o.start+400,s.day+30);o.snip=int(m.snip,0,1e7,s.day+3);o.n=int(m.n,0,1e4,0);o.hurt=int(m.hurt,0,o.n,0);o.c=isCity(m.c)?m.c:isCity(s.home)?s.home:null;}
|
||||||
s.monkey=o;}
|
s.monkey=o;}
|
||||||
for(const c of Object.keys(s.pops)){const p=s.pops[c];if(!isCity(c)||!p||typeof p!=='object'){delete s.pops[c];continue;}p.routers=int(p.routers,1,RMAX,1);if(p.rupDay!==undefined)p.rupDay=num(p.rupDay,-1);if(p.rgen!==undefined)p.rgen=int(p.rgen,0,RG.length-1,0);p.down=num(p.down,0);if(p.bb&&typeof p.bb==='object')p.bb.d=num(p.bb.d,0);else p.bb=null;}
|
for(const c of Object.keys(s.pops)){const p=s.pops[c];if(!isCity(c)||!p||typeof p!=='object'){delete s.pops[c];continue;}p.routers=int(p.routers,1,RMAX,1);if(p.rupDay!==undefined)p.rupDay=num(p.rupDay,-1);if(p.rgen!==undefined)p.rgen=int(p.rgen,0,RG.length-1,0);p.down=num(p.down,0);if(p.bb&&typeof p.bb==='object'){p.bb.d=num(p.bb.d,0);ip6Fix(p.bb,s.day);}else p.bb=null;}
|
||||||
if(!isCity(s.home))s.home=Object.keys(s.pops)[0]||'fra';
|
if(!isCity(s.home))s.home=Object.keys(s.pops)[0]||'fra';
|
||||||
opsSanitize(s);
|
opsSanitize(s);
|
||||||
const tier=v=>int(v,0,PORT.length-1,0),lag=v=>int(v,1,LAG_MAX,1),sid=v=>String(v==null?uid():v).slice(0,40);
|
const tier=v=>int(v,0,PORT.length-1,0),lag=v=>int(v,1,LAG_MAX,1),sid=v=>String(v==null?uid():v).slice(0,40);
|
||||||
|
|
|
||||||
|
|
@ -49,9 +49,10 @@ function* dayPreRun(){
|
||||||
toast(where?tr('day_tick.resolved_what_where_is_back_to',{what:incTitle(i.type),where:esc(where)}):tr('day_tick.resolved_what',{what:incTitle(i.type)}),'good',[],o);}
|
toast(where?tr('day_tick.resolved_what_where_is_back_to',{what:incTitle(i.type),where:esc(where)}):tr('day_tick.resolved_what',{what:incTitle(i.type)}),'good',[],o);}
|
||||||
yield DAY_REST;
|
yield DAY_REST;
|
||||||
// eyeball growth / churn uses last computed service
|
// eyeball growth / churn uses last computed service
|
||||||
for(const c in S.pops){const p=S.pops[c];if(!p.bb)continue;const sf=sfOf(R,c)*((R.bbF&&R.bbF[c])??1),P=eyeP(c);
|
for(const c in S.pops){const p=S.pops[c];if(!p.bb)continue;const sf=sfOf(R,c)*((R.bbF&&R.bbF[c])??1),P=eyeP(c),d0=p.bb.d;
|
||||||
if(sf>=0.9){const g=(CITY[c].be&&!(p.boost>d)?0.35:1)*0.025*(scnRule('boom')?1.5:1)*(p.boost>d?2:1)*sf*(0.7+0.6*(R.peerShare||0))*(CITY[c].reg==='AS'&&!CITY[c].cn?1.6:1);p.bb.d+=g*p.bb.d*(1-p.bb.d/P);}
|
if(sf>=0.9){const g=(CITY[c].be&&!(p.boost>d)?0.35:1)*0.025*(scnRule('boom')?1.5:1)*(p.boost>d?2:1)*sf*(0.7+0.6*(R.peerShare||0))*(CITY[c].reg==='AS'&&!CITY[c].cn?1.6:1);p.bb.d+=g*p.bb.d*(1-p.bb.d/P);}
|
||||||
else p.bb.d=Math.max(Math.min(3,P),p.bb.d*(1-(0.9-sf)*0.04));}
|
else p.bb.d=Math.max(Math.min(3,P),p.bb.d*(1-(0.9-sf)*0.04));
|
||||||
|
if(p.bb.v6||p.bb.v6e)ip6Grow(p.bb,d0);}
|
||||||
return d;}
|
return d;}
|
||||||
function* dayPost(d){
|
function* dayPost(d){
|
||||||
yield* ddosNewsRun();ddosTrack();
|
yield* ddosNewsRun();ddosTrack();
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ Object.assign(ACT,{
|
||||||
if(!w&&!p){toast(tr('customers.nothing_spare_to_sell_on_this'),'bad');sfx('err');return;}const L=l.list||(l.list={w:0,p:0});L.w+=w;L.p+=p;
|
if(!w&&!p){toast(tr('customers.nothing_spare_to_sell_on_this'),'bad');sfx('err');return;}const L=l.list||(l.list={w:0,p:0});L.w+=w;L.p+=p;
|
||||||
toast(tr('broker.listed',{a:CITY[l.a].name,b:CITY[l.b].name}),'good');sfx('click');after();},
|
toast(tr('broker.listed',{a:CITY[l.a].name,b:CITY[l.b].name}),'good');sfx('click');after();},
|
||||||
unlistFiber:({id})=>{const l=S.links.find(x=>x.id===id);if(!l||!l.list)return;delete l.list;sfx('click');after();},
|
unlistFiber:({id})=>{const l=S.links.find(x=>x.id===id);if(!l||!l.list)return;delete l.list;sfx('click');after();},
|
||||||
accept:({id,auto=false})=>{const o=S.offers.find(x=>x.id===id);if(!o)return;if(!ip4Fits(o)){const n=ip4Need(o);toast(tr('ip4.no_space',{name:esc(o.name),p:ip4Cidr(n),n:ip4N(n),free:ip4N(Math.max(0,ip4Use().free))}),'bad',[{l:tr('ip4.section'),act:'ip4Open'}]);sfx('err');return;}const customer=auto?autoOffer(o):offerCustomer(o);if(!customer)return;if(!bHas(o)){toast(tr('customers.you_need_a_pop_in_every'),'bad');return;}
|
accept:({id,auto=false})=>{const o=S.offers.find(x=>x.id===id);if(!o)return;if(!ip4Fits(o)){const n=ip4Need(o),u=ip4Use(),k=ip4Pools(u),v={name:esc(o.name),p:ip4Cidr(n),n:ip4N(n),free:ip4N(Math.max(0,u.free))};toast(k===1?tr('ip4.no_space_v6',v):k?tr('ip4.no_space_both',v):tr('ip4.no_space',v),'bad',[{l:tr('ip4.section'),act:'ip4Open'}]);sfx('err');return;}const customer=auto?autoOffer(o):offerCustomer(o);if(!customer)return;if(!bHas(o)){toast(tr('customers.you_need_a_pop_in_every'),'bad');return;}
|
||||||
if(o.type==='wwave'){const l=S.links.find(x=>x.id===o.link);if(!l||chMax(l)-(l.ch||[]).length-soldSlots(l)-xpSlots(l)<o.slots){toast(tr('customers.not_enough_free_channels_on_that'),'bad');return;}}
|
if(o.type==='wwave'){const l=S.links.find(x=>x.id===o.link);if(!l||chMax(l)-(l.ch||[]).length-soldSlots(l)-xpSlots(l)<o.slots){toast(tr('customers.not_enough_free_channels_on_that'),'bad');return;}}
|
||||||
if(BIZ_T[o.type].event&&S.day>=o.start){toast(tr('customers.too_late_the_event_has_already'),'bad');return;}
|
if(BIZ_T[o.type].event&&S.day>=o.start){toast(tr('customers.too_late_the_event_has_already'),'bad');return;}
|
||||||
// A carrier renting more alien waves on a fiber it already rents grows its contract, like a real order for extra waves,
|
// A carrier renting more alien waves on a fiber it already rents grows its contract, like a real order for extra waves,
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
/* Address space (#150, 33-address-space.js): buy, lease in, lease out, sell, hand back, and the CGNAT ratio. Every block
|
/* Address space (#150, 33-address-space.js): buy, lease in, lease out, sell, hand back, and the CGNAT and NAT64 ratios.
|
||||||
change keeps room for the customers already signed, with every home behind CGNAT. */
|
Every block change keeps room for the customers already signed, with every dual-stack home behind CGNAT. */
|
||||||
const ip4Re=()=>{after();renderBank();};
|
const ip4Re=()=>{after();renderBank();};
|
||||||
function ip4Can(){if(ip4On())return true;toast(tr('ip4.off'),'bad');sfx('err');return false;}
|
function ip4Can(){if(ip4On())return true;toast(tr('ip4.off'),'bad');sfx('err');return false;}
|
||||||
const ip4Blk=id=>S.ip4.b.find(b=>b.id===id);
|
const ip4Blk=id=>S.ip4.b.find(b=>b.id===id);
|
||||||
function ip4Busy(){toast(tr('ip4.in_use'),'bad');sfx('err');}
|
function ip4Busy(){toast(ip4InUse(),'bad');sfx('err');}
|
||||||
// No more blocks than a save keeps (IP4_BLK): a new one is refused with the way out.
|
// No more blocks than a save keeps (IP4_BLK): a new one is refused with the way out.
|
||||||
function ip4Room(){if(!ip4Full())return true;toast(tr('ip4.too_many',{n:IP4_BLK}),'bad');sfx('err');return false;}
|
function ip4Room(){if(!ip4Full())return true;toast(tr('ip4.too_many',{n:IP4_BLK}),'bad');sfx('err');return false;}
|
||||||
Object.assign(ACT,{
|
Object.assign(ACT,{
|
||||||
|
|
@ -25,5 +25,8 @@ Object.assign(ACT,{
|
||||||
S.ip4.b=S.ip4.b.filter(x=>x!==b);sfx('click');ip4Re();},
|
S.ip4.b=S.ip4.b.filter(x=>x!==b);sfx('click');ip4Re();},
|
||||||
// Fewer homes per address needs more addresses: refused when the customers already signed would not fit.
|
// Fewer homes per address needs more addresses: refused when the customers already signed would not fit.
|
||||||
ip4Nat:({v})=>{if(!ip4Can())return;const r=Number(v);if(!IP4_NAT.includes(r)||r===S.ip4.nat)return;const u=ip4Use();
|
ip4Nat:({v})=>{if(!ip4Can())return;const r=Number(v);if(!IP4_NAT.includes(r)||r===S.ip4.nat)return;const u=ip4Use();
|
||||||
if(r<S.ip4.nat&&u.T-u.B<Math.ceil(u.H/r)){ip4Busy();UI._bh=null;renderBank();return;}S.ip4.nat=r;sfx('click');ip4Re();},
|
if(r<S.ip4.nat&&u.T-u.B<u.p6+Math.ceil(u.Hd/r)){ip4Busy();UI._bh=null;renderBank();return;}S.ip4.nat=r;sfx('click');ip4Re();},
|
||||||
|
// The same for the NAT64 pool of the IPv6-only homes (34-ipv6-only.js).
|
||||||
|
ip4Nat64:({v})=>{if(!ip4Can())return;const r=Number(v);if(!IP4_N64.includes(r)||r===S.ip4.n64)return;const u=ip4Use();
|
||||||
|
if(r<S.ip4.n64&&u.T-u.B<Math.ceil(u.H6/r)+Math.ceil(u.Hd/u.r)){ip4Busy();UI._bh=null;renderBank();return;}S.ip4.n64=r;sfx('click');ip4Re();},
|
||||||
});
|
});
|
||||||
|
|
|
||||||
9
src/game/90-actions/55-ipv6-only.js
Normal file
9
src/game/90-actions/55-ipv6-only.js
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
/* IPv6-only broadband (34-ipv6-only.js): start a city's home-router swap, or stop it. The routers are paid for as they go
|
||||||
|
in, so a stop owes nothing and gives nothing back. */
|
||||||
|
Object.assign(ACT,{
|
||||||
|
ip6Go:({city})=>{if(!ip4Can())return;const why=ip6Why(city);if(why){toast(why,'bad');sfx('err');return;}const p=ip6Pop(city);
|
||||||
|
if(S.cash<ip6First(city)){toast(tr('interface.not_enough_cash_wait_for_revenue'),'bad');sfx('err');return;}const n=Math.ceil(ip6Homes(p)),days=ip6Days(city);
|
||||||
|
p.bb.v6e=S.day+days;sfx('build');toast(tr('ip6.started',{city:esc(CITY[city].name),routers:trn('ip6.n_routers',n,{n:ip4N(n)}),days}),'good');after();},
|
||||||
|
ip6Stop:({city})=>{if(!ip4Can())return;const p=ip6Pop(city);if(!p||!p.bb||!p.bb.v6e)return;delete p.bb.v6e;sfx('click');
|
||||||
|
toast(tr('ip6.stopped',{city:esc(CITY[city].name),p:pct(p.bb.v6||0)}),'');after();},
|
||||||
|
});
|
||||||
|
|
@ -33,7 +33,7 @@ function cityPanel(c){
|
||||||
<div class="kv"><span>${tr('common.revenue')}</span><b>${tr('common.price_mo',{price:fmt$(eye*sf*EYE_RATE*arpuOf(c))})}</b></div>
|
<div class="kv"><span>${tr('common.revenue')}</span><b>${tr('common.price_mo',{price:fmt$(eye*sf*EYE_RATE*arpuOf(c))})}</b></div>
|
||||||
<div class="kv"><span>${tr('city_panel.network_wide_peering_ratio')}</span><b>${pct(R.peerShare||0)}</b></div><p class="note">${tr('city_panel.more_traffic_over_peering_pnis_and')}</p>
|
<div class="kv"><span>${tr('city_panel.network_wide_peering_ratio')}</span><b>${pct(R.peerShare||0)}</b></div><p class="note">${tr('city_panel.more_traffic_over_peering_pnis_and')}</p>
|
||||||
${sf<0.9?`<p class="why">${tr('city_panel.customers_are_unhappy_and_leaving')}</p>`:''}
|
${sf<0.9?`<p class="why">${tr('city_panel.customers_are_unhappy_and_leaving')}</p>`:''}
|
||||||
<div class="btns">${p.boost>S.day?`<span class="tag st on">${tr('city_panel.ad_campaign_n_d_left',{n:p.boost-S.day})}</span>`:btn(tr('city_panel.run_ad_campaign_8k_2_growth'),'ad',{city:c},'',S.cash<8000)}</div>`;}
|
<div class="btns">${p.boost>S.day?`<span class="tag st on">${tr('city_panel.ad_campaign_n_d_left',{n:p.boost-S.day})}</span>`:btn(tr('city_panel.run_ad_campaign_8k_2_growth'),'ad',{city:c},'',S.cash<8000)}</div>${ip6Html(c)}`;}
|
||||||
h+=`</section><section><h3>${tr('common.business_customers')}</h3>`;
|
h+=`</section><section><h3>${tr('common.business_customers')}</h3>`;
|
||||||
const bz=S.biz.filter(b=>bCities(b).includes(c));
|
const bz=S.biz.filter(b=>bCities(b).includes(c));
|
||||||
if(!bz.length)h+=`<p class="empty">${tr('city_panel.no_businesses_yet_offers_pop_up')}</p>`;
|
if(!bz.length)h+=`<p class="empty">${tr('city_panel.no_businesses_yet_offers_pop_up')}</p>`;
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ function renderDash(){checkLayer();
|
||||||
<div class="dgrid">${tile(tr('common.traffic_now'),fmtG(R.served),tr('dashboard.of_g_wanted',{g:fmtG(R.demand)}))}${tile(tr('common.peak'),fmtG(S.stats.peak))}${tile(tr('dashboard.delivered_30_days'),(up*100).toFixed(1)+'%',up>=0.999?tr('dashboard.five_nines_ish'):up>=0.99?tr('dashboard.two_nines_and_change'):tr('dashboard.customers_are_upset'))}${tile(tr('common.peering_ratio'),pct(R.peerShare||0),tr('dashboard.caches_pnis_and_ix'))}${tile(tr('dashboard.monthly_p_l'),`<span style="color:${net>=0?'var(--eye)':'var(--bad)'}">${net>=0?'+':''}${fmt$(net)}</span>`,tr('dashboard.in_in_out_out',{in:fmt$(R.revMo),out:fmt$(R.costMo)}))}${tile(tr('common.incidents'),S.stats.incidents,tr('dashboard.n_shrugged_off',{n:S.stats.survived}))}</div>
|
<div class="dgrid">${tile(tr('common.traffic_now'),fmtG(R.served),tr('dashboard.of_g_wanted',{g:fmtG(R.demand)}))}${tile(tr('common.peak'),fmtG(S.stats.peak))}${tile(tr('dashboard.delivered_30_days'),(up*100).toFixed(1)+'%',up>=0.999?tr('dashboard.five_nines_ish'):up>=0.99?tr('dashboard.two_nines_and_change'):tr('dashboard.customers_are_upset'))}${tile(tr('common.peering_ratio'),pct(R.peerShare||0),tr('dashboard.caches_pnis_and_ix'))}${tile(tr('dashboard.monthly_p_l'),`<span style="color:${net>=0?'var(--eye)':'var(--bad)'}">${net>=0?'+':''}${fmt$(net)}</span>`,tr('dashboard.in_in_out_out',{in:fmt$(R.revMo),out:fmt$(R.costMo)}))}${tile(tr('common.incidents'),S.stats.incidents,tr('dashboard.n_shrugged_off',{n:S.stats.survived}))}</div>
|
||||||
<div class="dcols"><div class="panel2"><h3>${tr('dashboard.traffic_by_way_out')}</h3>${svgChart(rows,['c','p','ix','t','l2'],[{k:'dem',col:'var(--text)',dash:true}],v=>fmtCap(Math.round(v)),'traffic')}${chartLegend('traffic',k=>k==='dem'?'':' '+pct((R.egT[k]||0)/tot))}</div>
|
<div class="dcols"><div class="panel2"><h3>${tr('dashboard.traffic_by_way_out')}</h3>${svgChart(rows,['c','p','ix','t','l2'],[{k:'dem',col:'var(--text)',dash:true}],v=>fmtCap(Math.round(v)),'traffic')}${chartLegend('traffic',k=>k==='dem'?'':' '+pct((R.egT[k]||0)/tot))}</div>
|
||||||
<div class="panel2"><h3>${tr('dashboard.money_per_month')}</h3>${svgChart(rows,[],[{k:'rev',col:'#16A866'},{k:'cost',col:'#FF4D5E'}],v=>fmt$(v),'money')}${chartLegend('money')}
|
<div class="panel2"><h3>${tr('dashboard.money_per_month')}</h3>${svgChart(rows,[],[{k:'rev',col:'#16A866'},{k:'cost',col:'#FF4D5E'}],v=>fmt$(v),'money')}${chartLegend('money')}
|
||||||
<h3 style="margin-top:8px">${tr('dashboard.where_the_money_goes')}</h3>${Object.entries(R.cost).filter(([k,v])=>v>0).sort((a,b)=>b[1]-a[1]).map(([k,v])=>`<div class="kv"><span>${{pops:tr('dashboard.pops_and_routers'),links:tr('dashboard.waves_and_fiber'),transit:tr('common.transit'),ix:tr('common.ix_ports'),pni:tr('common.pnis'),caches:tr('common.cache_power'),nni:tr('common.fabric_ports'),optical:tr('dashboard.amp_huts_and_spares'),loans:tr('common.loan_repayments'),revshare:tr('dashboard.investor_revenue_share'),extras:tr('dashboard.licenses_and_scrubbing'),wholesale:tr('dashboard.nearly_broadband_network_wholesale'),levy:tr('dashboard.regional_broadband_levy'),pie:tr('pie.costs_row'),ip4:tr('ip4.costs_row'),sat:tr('satellites.costs_row')}[k]||k}</span><b>${tr('common.price_mo',{price:fmt$(v)})}</b></div>`).join('')}</div></div>`;
|
<h3 style="margin-top:8px">${tr('dashboard.where_the_money_goes')}</h3>${Object.entries(R.cost).filter(([k,v])=>v>0).sort((a,b)=>b[1]-a[1]).map(([k,v])=>`<div class="kv"><span>${{pops:tr('dashboard.pops_and_routers'),links:tr('dashboard.waves_and_fiber'),transit:tr('common.transit'),ix:tr('common.ix_ports'),pni:tr('common.pnis'),caches:tr('common.cache_power'),nni:tr('common.fabric_ports'),optical:tr('dashboard.amp_huts_and_spares'),loans:tr('common.loan_repayments'),revshare:tr('dashboard.investor_revenue_share'),extras:tr('dashboard.licenses_and_scrubbing'),wholesale:tr('dashboard.nearly_broadband_network_wholesale'),levy:tr('dashboard.regional_broadband_levy'),pie:tr('pie.costs_row'),ip4:tr('ip4.leases_cgnat_nat64'),sat:tr('satellites.costs_row')}[k]||k}</span><b>${tr('common.price_mo',{price:fmt$(v)})}</b></div>`).join('')}</div></div>`;
|
||||||
const tT=(R.egT.t||0)||1;
|
const tT=(R.egT.t||0)||1;
|
||||||
const offMix=(UI.chartOff&&UI.chartOff.mix)||{},filt=Object.keys(offMix).length>0;
|
const offMix=(UI.chartOff&&UI.chartOff.mix)||{},filt=Object.keys(offMix).length>0;
|
||||||
// The legend above the table picks which ways in count; "lost" still looks at everything the network gets.
|
// The legend above the table picks which ways in count; "lost" still looks at everything the network gets.
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,29 @@
|
||||||
/* The bank's Address space section (#150, 33-address-space.js): what you hold and who uses it, the CGNAT ratio, your
|
/* The bank's Address space section (#150, 33-address-space.js): what you hold and who uses it (homes in three groups once
|
||||||
blocks, and the transfer market. Phones: the boxes are full width, the dropdowns stack and every button row wraps. */
|
some are IPv6-only), the CGNAT and NAT64 ratios, your blocks, and the transfer market. Phones: the boxes are full
|
||||||
|
width, the dropdowns stack and every button row wraps. */
|
||||||
const ip4Pc=x=>(x*100).toFixed(1).replace(/\.0$/,'')+'%';
|
const ip4Pc=x=>(x*100).toFixed(1).replace(/\.0$/,'')+'%';
|
||||||
function ip4Bank(){if(!S||!ip4On())return '';const I=S.ip4,B=ip4Bill((R.rev&&R.rev.eyeballs)||0),u=B.u,len=ip4LenOk(UI.ip4Len)?UI.ip4Len:IP4_MAX,px=ip4Px(),full=ip4Full();
|
function ip4Bank(){if(!S||!ip4On())return '';const I=S.ip4,B=ip4Bill((R.rev&&R.rev.eyeballs)||0),u=B.u,len=ip4LenOk(UI.ip4Len)?UI.ip4Len:IP4_MAX,px=ip4Px(),full=ip4Full();
|
||||||
const kv=(l,v,bad)=>`<div class="kv"><span>${l}</span><b${bad?' style="color:var(--bad)"':''}>${v}</b></div>`,mo=v=>tr('common.price_mo',{price:fmt$(v)});
|
const kv=(l,v,bad)=>`<div class="kv"><span>${l}</span><b${bad?' style="color:var(--bad)"':''}>${v}</b></div>`,mo=v=>tr('common.price_mo',{price:fmt$(v)});
|
||||||
let h=`<section class="bank-gov bank-ip4"><h3 id="bankIp4" style="font-size:18px;margin-top:14px">🔢 ${tr('ip4.section')}</h3><p class="meta">${tr('ip4.note')}</p>`;
|
let h=`<section class="bank-gov bank-ip4"><h3 id="bankIp4" style="font-size:18px;margin-top:14px">🔢 ${tr('ip4.section')}</h3><p class="meta">${tr('ip4.note')}</p>`;
|
||||||
h+=`<div class="ops-o">${kv(tr('ip4.yours'),ip4N(u.T))}${kv(tr('ip4.business'),ip4N(u.B))}${kv(tr('ip4.homes'),u.cg?tr('ip4.homes_cgnat',{n:ip4N(u.H),p:pct(u.cg/u.H)}):ip4N(u.H))}${kv(tr('ip4.free'),ip4N(Math.max(0,u.free)),u.free<=0)}`;
|
h+=`<div class="ops-o">${kv(tr('ip4.yours'),ip4N(u.T))}${kv(tr('ip4.business'),ip4N(u.B))}`;
|
||||||
if(u.over>0)h+=`<div class="why">${tr('ip4.squeezed',{p:pct(u.over),r:u.r})}</div>`;
|
// Public, behind CGNAT, IPv6-only: the three groups once there is a third.
|
||||||
if(B.lin>0)h+=kv(tr('ip4.leases_in'),mo(B.lin));if(B.box>=1)h+=kv(tr('ip4.cgnat_boxes'),mo(B.box));if(B.refund>=1)h+=kv(tr('ip4.refunds'),mo(B.refund));if(B.lout>0)h+=kv(tr('ip4.leases_out'),'+'+mo(B.lout));
|
h+=u.H6>0?kv(tr('ip4.homes'),ip4N(u.H))+kv(tr('ip4.homes_public'),ip4N(u.H-u.H6-u.cg))+kv(tr('ip4.homes_behind_cgnat'),ip4N(u.cg))+kv(tr('ip4.homes_v6'),tr('ip4.homes_v6_pool',{n:ip4N(u.H6),pool:ip4N(u.p6)}))
|
||||||
|
:kv(tr('ip4.homes'),u.cg?tr('ip4.homes_cgnat',{n:ip4N(u.H),p:pct(u.cg/u.H)}):ip4N(u.H));
|
||||||
|
h+=kv(tr('ip4.free'),ip4N(Math.max(0,u.free)),u.free<=0);
|
||||||
|
if(u.over>0){const k=ip4Pools(u);h+=`<div class="why">${k===1?tr('ip4.squeezed_v6',{p:pct(u.over),r:u.r6}):k?tr('ip4.squeezed_both',{p:pct(u.over),r:u.r,r6:u.r6}):tr('ip4.squeezed',{p:pct(u.over),r:u.r})}</div>`;}
|
||||||
|
if(B.lin>0)h+=kv(tr('ip4.leases_in'),mo(B.lin));if(B.box>=1)h+=kv(tr('ip4.cgnat_boxes'),mo(B.box));if(B.box64>=1)h+=kv(tr('ip4.nat64_gateways'),mo(B.box64));if(B.refund>=1)h+=kv(tr('ip4.refunds'),mo(B.refund));if(B.lout>0)h+=kv(tr('ip4.leases_out'),'+'+mo(B.lout));
|
||||||
|
h+=kv(tr('ip4.v6_share'),pct(1-B.v4));
|
||||||
h+=`<label class="ops-sel" style="margin-top:6px"><span>${tr('ip4.cgnat_ratio')}</span><select data-chg="ip4Nat">${IP4_NAT.map(r=>`<option value="${r}"${r===I.nat?' selected':''}>${trn('ip4.n_homes_per_address',r)}</option>`).join('')}</select></label>
|
h+=`<label class="ops-sel" style="margin-top:6px"><span>${tr('ip4.cgnat_ratio')}</span><select data-chg="ip4Nat">${IP4_NAT.map(r=>`<option value="${r}"${r===I.nat?' selected':''}>${trn('ip4.n_homes_per_address',r)}</option>`).join('')}</select></label>
|
||||||
<p class="meta">${tr('ip4.cgnat_note',{p:ip4Pc(IP4_ANNOY[I.nat])})}</p></div>`;
|
<p class="meta">${tr('ip4.cgnat_note',{p:ip4Pc(IP4_ANNOY[I.nat])})}</p>
|
||||||
h+=`<div class="ops-o"><div class="nm">${tr('ip4.blocks')}</div>`;
|
<label class="ops-sel" style="margin-top:6px"><span>${tr('ip4.nat64_ratio')}</span><select data-chg="ip4Nat64">${IP4_N64.map(r=>`<option value="${r}"${r===u.r6?' selected':''}>${trn('ip4.n_homes_per_address',r)}</option>`).join('')}</select></label>
|
||||||
|
<p class="meta">${tr('ip4.nat64_note',{p:ip4Pc(IP4_ANNOY64[u.r6]*B.v4/IP4_V4)})}</p></div>`;
|
||||||
|
h+=`<div class="ops-o"><div class="nm">${tr('ip4.blocks')}</div>`;const inUse=ip4InUse(u);
|
||||||
for(const b of I.b){const n=ip4Sz(b.len),spare=u.free>=n,held=ip4Held(b),sure=UI.confirm===b.id;
|
for(const b of I.b){const n=ip4Sz(b.len),spare=u.free>=n,held=ip4Held(b),sure=UI.confirm===b.id;
|
||||||
const what=b.k==='in'?tr('ip4.leased_in_mo',{price:fmt$(b.mo||0)}):b.out?tr('ip4.leased_out_mo',{price:fmt$(b.mo||0)}):b.k==='buy'?tr('ip4.bought_on',{date:dateStr(b.d)}):tr('ip4.from_rir');
|
const what=b.k==='in'?tr('ip4.leased_in_mo',{price:fmt$(b.mo||0)}):b.out?tr('ip4.leased_out_mo',{price:fmt$(b.mo||0)}):b.k==='buy'?tr('ip4.bought_on',{date:dateStr(b.d)}):tr('ip4.from_rir');
|
||||||
const btns=b.k==='in'?btn(tr('ip4.give_back'),'ip4Return',{id:b.id},'ghost sm',!spare):b.out?btn(tr('ip4.take_back'),'ip4Back',{id:b.id},'ghost sm')
|
const btns=b.k==='in'?btn(tr('ip4.give_back'),'ip4Return',{id:b.id},'ghost sm',!spare):b.out?btn(tr('ip4.take_back'),'ip4Back',{id:b.id},'ghost sm')
|
||||||
:btn(tr('ip4.lease_out',{price:fmt$(ip4OutMo(b.len))}),'ip4Out',{id:b.id},'sm',!spare)+btn(sure?tr('ip4.really_sell',{price:fmt$(ip4Value(b.len))}):tr('ip4.sell',{price:fmt$(ip4Value(b.len))}),'ip4Sell',{id:b.id},sure?'red sm':'ghost sm',held||!spare);
|
:btn(tr('ip4.lease_out',{price:fmt$(ip4OutMo(b.len))}),'ip4Out',{id:b.id},'sm',!spare)+btn(sure?tr('ip4.really_sell',{price:fmt$(ip4Value(b.len))}):tr('ip4.sell',{price:fmt$(ip4Value(b.len))}),'ip4Sell',{id:b.id},sure?'red sm':'ghost sm',held||!spare);
|
||||||
// Greyed for want of room: say so (a disabled button never gets to show ip4Busy's toast).
|
// Greyed for want of room: say so (a disabled button never gets to show ip4Busy's toast).
|
||||||
h+=`<div class="row"><div class="grow"><div class="nm">/${b.len} · ${trn('ip4.n_addresses',n,{n:ip4N(n)})}</div><div class="meta">${what}${held&&!b.out?' · '+tr('ip4.movable_from',{date:dateStr(b.d+IP4_HOLD)}):''}</div>${!spare&&!b.out?`<div class="why">${tr('ip4.in_use')}</div>`:''}<div class="btns">${btns}</div></div></div>`;}
|
h+=`<div class="row"><div class="grow"><div class="nm">/${b.len} · ${trn('ip4.n_addresses',n,{n:ip4N(n)})}</div><div class="meta">${what}${held&&!b.out?' · '+tr('ip4.movable_from',{date:dateStr(b.d+IP4_HOLD)}):''}</div>${!spare&&!b.out?`<div class="why">${inUse}</div>`:''}<div class="btns">${btns}</div></div></div>`;}
|
||||||
h+=`</div><div class="ops-o"><div class="nm">${tr('ip4.market')}</div><p class="meta">${tr('ip4.market_note',{px:fmt$(px),lin:'$'+(IP4_IN*px/IP4_PX).toFixed(2),lout:'$'+(IP4_OUT*px/IP4_PX).toFixed(2),p:pct(IP4_SELL)})}</p>
|
h+=`</div><div class="ops-o"><div class="nm">${tr('ip4.market')}</div><p class="meta">${tr('ip4.market_note',{px:fmt$(px),lin:'$'+(IP4_IN*px/IP4_PX).toFixed(2),lout:'$'+(IP4_OUT*px/IP4_PX).toFixed(2),p:pct(IP4_SELL)})}</p>
|
||||||
<label class="ops-sel"><span>${tr('ip4.block_size')}</span><select data-chg="ip4Pick">${Array.from({length:IP4_MAX-IP4_MIN+1},(_,i)=>IP4_MAX-i).map(l=>`<option value="${l}"${l===len?' selected':''}>/${l} · ${trn('ip4.n_addresses',ip4Sz(l),{n:ip4N(ip4Sz(l))})}</option>`).join('')}</select></label>
|
<label class="ops-sel"><span>${tr('ip4.block_size')}</span><select data-chg="ip4Pick">${Array.from({length:IP4_MAX-IP4_MIN+1},(_,i)=>IP4_MAX-i).map(l=>`<option value="${l}"${l===len?' selected':''}>/${l} · ${trn('ip4.n_addresses',ip4Sz(l),{n:ip4N(ip4Sz(l))})}</option>`).join('')}</select></label>
|
||||||
${full?`<div class="why">${tr('ip4.too_many',{n:IP4_BLK})}</div>`:''}<div class="btns">${btn(tr('ip4.buy',{price:fmt$(ip4Cost(len))}),'ip4Buy',{len},'pink sm',full||S.cash<ip4Cost(len))}${btn(tr('ip4.lease',{price:fmt$(ip4InMo(len))}),'ip4Lease',{len},'sm',full)}</div></div></section>`;
|
${full?`<div class="why">${tr('ip4.too_many',{n:IP4_BLK})}</div>`:''}<div class="btns">${btn(tr('ip4.buy',{price:fmt$(ip4Cost(len))}),'ip4Buy',{len},'pink sm',full||S.cash<ip4Cost(len))}${btn(tr('ip4.lease',{price:fmt$(ip4InMo(len))}),'ip4Lease',{len},'sm',full)}</div></div></section>`;
|
||||||
|
|
|
||||||
|
|
@ -2692,20 +2692,26 @@
|
||||||
"ip4.cgnat_boxes":"CGNAT boxes",
|
"ip4.cgnat_boxes":"CGNAT boxes",
|
||||||
"ip4.cgnat_note":"More homes per address frees space for customers, but games and port forwarding suffer: {p} of a CGNAT home's bill comes back as refunds.",
|
"ip4.cgnat_note":"More homes per address frees space for customers, but games and port forwarding suffer: {p} of a CGNAT home's bill comes back as refunds.",
|
||||||
"ip4.cgnat_ratio":"CGNAT: homes sharing one address",
|
"ip4.cgnat_ratio":"CGNAT: homes sharing one address",
|
||||||
"ip4.costs_row":"IPv4 leases and CGNAT",
|
|
||||||
"ip4.free":"Free for new customers (homes move behind CGNAT first)",
|
"ip4.free":"Free for new customers (homes move behind CGNAT first)",
|
||||||
"ip4.from_rir":"From the RIR",
|
"ip4.from_rir":"From the RIR",
|
||||||
"ip4.give_back":"Give it back",
|
"ip4.give_back":"Give it back",
|
||||||
"ip4.held":"The RIR won't transfer that block again before {date}.",
|
"ip4.held":"The RIR won't transfer that block again before {date}.",
|
||||||
"ip4.homes":"Broadband homes",
|
"ip4.homes":"Broadband homes",
|
||||||
|
"ip4.homes_behind_cgnat":"Homes behind CGNAT",
|
||||||
"ip4.homes_cgnat":"{n}, {p} behind CGNAT",
|
"ip4.homes_cgnat":"{n}, {p} behind CGNAT",
|
||||||
|
"ip4.homes_public":"Homes with their own address",
|
||||||
|
"ip4.homes_v6":"IPv6-only homes (464XLAT)",
|
||||||
|
"ip4.homes_v6_pool":"{n}, NAT64 pool {pool}",
|
||||||
"ip4.in_use":"Your customers need those addresses: put more homes behind CGNAT or get another block first.",
|
"ip4.in_use":"Your customers need those addresses: put more homes behind CGNAT or get another block first.",
|
||||||
|
"ip4.in_use_both":"Your customers need those addresses: put more homes on each CGNAT or NAT64 address or get another block first.",
|
||||||
|
"ip4.in_use_v6":"Your customers need those addresses: put more IPv6-only homes on each NAT64 address or get another block first.",
|
||||||
"ip4.lease":"Lease {price}/mo",
|
"ip4.lease":"Lease {price}/mo",
|
||||||
"ip4.lease_out":"Lease out +{price}/mo",
|
"ip4.lease_out":"Lease out +{price}/mo",
|
||||||
"ip4.leased_in":"Leased a {p} ({n} addresses) for {price}/mo.",
|
"ip4.leased_in":"Leased a {p} ({n} addresses) for {price}/mo.",
|
||||||
"ip4.leased_in_mo":"Leased in · {price}/mo",
|
"ip4.leased_in_mo":"Leased in · {price}/mo",
|
||||||
"ip4.leased_out":"Your {p} is leased out: +{price}/mo.",
|
"ip4.leased_out":"Your {p} is leased out: +{price}/mo.",
|
||||||
"ip4.leased_out_mo":"Leased out · +{price}/mo",
|
"ip4.leased_out_mo":"Leased out · +{price}/mo",
|
||||||
|
"ip4.leases_cgnat_nat64":"IPv4 leases, CGNAT and NAT64",
|
||||||
"ip4.leases_in":"Blocks leased in",
|
"ip4.leases_in":"Blocks leased in",
|
||||||
"ip4.leases_out":"Blocks leased out",
|
"ip4.leases_out":"Blocks leased out",
|
||||||
"ip4.market":"Transfer market",
|
"ip4.market":"Transfer market",
|
||||||
|
|
@ -2713,8 +2719,13 @@
|
||||||
"ip4.movable_from":"can move again from {date}",
|
"ip4.movable_from":"can move again from {date}",
|
||||||
"ip4.n_addresses":{"one":"{n} address","other":"{n} addresses"},
|
"ip4.n_addresses":{"one":"{n} address","other":"{n} addresses"},
|
||||||
"ip4.n_homes_per_address":{"one":"{n} home per address","other":"{n} homes per address"},
|
"ip4.n_homes_per_address":{"one":"{n} home per address","other":"{n} homes per address"},
|
||||||
|
"ip4.nat64_gateways":"NAT64 gateways",
|
||||||
|
"ip4.nat64_note":"IPv6-only homes have no IPv4 of their own: what still needs it (consoles, IPv4-only VPNs) shares your NAT64 pool, and {p} of their bill comes back as refunds, less each year as the world moves to IPv6. A city goes IPv6-only from its Home broadband.",
|
||||||
|
"ip4.nat64_ratio":"NAT64: IPv6-only homes sharing one address",
|
||||||
"ip4.no_grow":"{name} ({city}) wanted to grow to {bw}, but you had no IPv4 addresses free for it.",
|
"ip4.no_grow":"{name} ({city}) wanted to grow to {bw}, but you had no IPv4 addresses free for it.",
|
||||||
"ip4.no_space":"{name} needs a {p} of IPv4 ({n} addresses), and only {free} are free. Buy or lease a block, or put more homes behind CGNAT.",
|
"ip4.no_space":"{name} needs a {p} of IPv4 ({n} addresses), and only {free} are free. Buy or lease a block, or put more homes behind CGNAT.",
|
||||||
|
"ip4.no_space_both":"{name} needs a {p} of IPv4 ({n} addresses), and only {free} are free. Buy or lease a block, or put more homes on each CGNAT or NAT64 address.",
|
||||||
|
"ip4.no_space_v6":"{name} needs a {p} of IPv4 ({n} addresses), and only {free} are free. Buy or lease a block, or put more IPv6-only homes on each NAT64 address.",
|
||||||
"ip4.note":"IPv6 is free and endless. IPv4 ran out years ago: business customers need public blocks of it, and homes that don't fit share addresses behind CGNAT (IPv6 traffic goes around the box).",
|
"ip4.note":"IPv6 is free and endless. IPv4 ran out years ago: business customers need public blocks of it, and homes that don't fit share addresses behind CGNAT (IPv6 traffic goes around the box).",
|
||||||
"ip4.off":"IPv4 is plentiful under this game's rules.",
|
"ip4.off":"IPv4 is plentiful under this game's rules.",
|
||||||
"ip4.offer_needs":"Needs a {p} of IPv4 ({n} addresses); only {free} free.",
|
"ip4.offer_needs":"Needs a {p} of IPv4 ({n} addresses); only {free} free.",
|
||||||
|
|
@ -2726,11 +2737,39 @@
|
||||||
"ip4.sell":"Sell {price}",
|
"ip4.sell":"Sell {price}",
|
||||||
"ip4.sold":"Sold your {p} for {price}.",
|
"ip4.sold":"Sold your {p} for {price}.",
|
||||||
"ip4.squeezed":"Out of space: {p} of homes don't fit even at {r} homes per address. Their connections break and they want refunds: buy or lease a block.",
|
"ip4.squeezed":"Out of space: {p} of homes don't fit even at {r} homes per address. Their connections break and they want refunds: buy or lease a block.",
|
||||||
|
"ip4.squeezed_both":"Out of space: {p} of homes don't fit even at {r} homes per CGNAT address and {r6} per NAT64 address. Their connections break and they want refunds: buy or lease a block.",
|
||||||
|
"ip4.squeezed_v6":"Out of space: {p} of homes don't fit even at {r} IPv6-only homes per NAT64 address. Their connections break and they want refunds: buy or lease a block.",
|
||||||
"ip4.take_back":"Take it back",
|
"ip4.take_back":"Take it back",
|
||||||
"ip4.toast_cgnat":"<b>Your IPv4 is full.</b> {p} of your homes now share addresses behind CGNAT, and a few gamers have already written in.",
|
"ip4.toast_cgnat":"<b>Your IPv4 is full.</b> {p} of your homes now share addresses behind CGNAT, and a few gamers have already written in.",
|
||||||
"ip4.toast_out":"<b>Out of IPv4.</b> Even at {r} homes per address, CGNAT can't fit everyone: buy or lease a block at the bank.",
|
"ip4.toast_out":"<b>Out of IPv4.</b> Even at {r} homes per address, CGNAT can't fit everyone: buy or lease a block at the bank.",
|
||||||
|
"ip4.toast_out_both":"<b>Out of IPv4.</b> Even at {r} homes per address behind CGNAT and {r6} on NAT64, not every home fits: buy or lease a block at the bank.",
|
||||||
|
"ip4.toast_out_v6":"<b>Out of IPv4.</b> Even at {r} homes per address, your NAT64 pool can't fit every IPv6-only home: buy or lease a block at the bank.",
|
||||||
"ip4.too_many":"You hold {n} IPv4 blocks, the most one network can keep track of. Sell or give back small ones to make room for a bigger block.",
|
"ip4.too_many":"You hold {n} IPv4 blocks, the most one network can keep track of. Sell or give back small ones to make room for a bigger block.",
|
||||||
|
"ip4.v6_share":"IPv6 share of home traffic this year",
|
||||||
"ip4.yours":"Your IPv4 addresses",
|
"ip4.yours":"Your IPv4 addresses",
|
||||||
|
"ip6.already":"Every home here is IPv6-only already.",
|
||||||
|
"ip6.busy":"The swap here is already under way.",
|
||||||
|
"ip6.done":"<b>{city} is IPv6-only.</b> Every home there runs 464XLAT, and what still needs IPv4 shares your NAT64 pool.",
|
||||||
|
"ip6.dual_stack":"Dual stack",
|
||||||
|
"ip6.every_home":"Every home",
|
||||||
|
"ip6.go":"Go IPv6-only {cost}",
|
||||||
|
"ip6.homes_that_join_later":"Homes that join later get one too, at {cost} each.",
|
||||||
|
"ip6.n_routers":{"one":"{n} home router","other":"{n} home routers"},
|
||||||
|
"ip6.new_homes_get_a_clat":"New homes get a CLAT router from the start, at {cost} each, and what still needs IPv4 shares your NAT64 pool, {r} homes per address.",
|
||||||
|
"ip6.no_bb":"Launch broadband here first.",
|
||||||
|
"ip6.no_home_is_behind_cgnat":"No home is behind CGNAT yet: this pays off once your IPv4 runs short.",
|
||||||
|
"ip6.part_note":"The swap stopped at {p} of homes, and new homes come dual stack again.",
|
||||||
|
"ip6.pitch":"Swap the home routers here for ones with a CLAT: the homes run on IPv6 alone and hold no IPv4 of their own, and what still needs IPv4 shares your NAT64 pool, {r} homes per address.",
|
||||||
|
"ip6.share_homes":"{p} of homes",
|
||||||
|
"ip6.started":"Swapping {routers} in {city} for IPv6-only ones: about {days} days.",
|
||||||
|
"ip6.stop":"Stop the swap",
|
||||||
|
"ip6.stopped":"Stopped the swap in {city} at {p} of homes. The routers already swapped stay; new homes come dual stack again.",
|
||||||
|
"ip6.swapping_home_routers_paid":"Swapping home routers, paid as they go in; new homes get the new one from the start, at {cost} each. Done around {date}.",
|
||||||
|
"ip6.title":"IPv6-only (464XLAT)",
|
||||||
|
"ip6.waiting":"Waiting for cash: the crews go on once you can pay for the day's routers.",
|
||||||
|
"ip6.what":"Swaps {routers} in about {days} days, paid as they go in, and frees {addr} for new customers.",
|
||||||
|
"ip6.your_ipv4_bill_goes_down":"Your IPv4 bill goes down by {price}/mo (fewer CGNAT boxes and refunds).",
|
||||||
|
"ip6.your_ipv4_bill_goes_up":"Your IPv4 bill goes up by {price}/mo (NAT64 gateways and refunds).",
|
||||||
"ix_downgrade.pni_downgraded":"The PNI with {net} in {city} is now {port}.",
|
"ix_downgrade.pni_downgraded":"The PNI with {net} in {city} is now {port}.",
|
||||||
"ix_downgrade.port_downgraded_at_ix":"Port at {ix} is now {port}.",
|
"ix_downgrade.port_downgraded_at_ix":"Port at {ix} is now {port}.",
|
||||||
"ix_downgrade.transit_downgraded":"{net} transit in {city} is now {port}.",
|
"ix_downgrade.transit_downgraded":"{net} transit in {city} is now {port}.",
|
||||||
|
|
|
||||||
|
|
@ -269,7 +269,7 @@ test('the address space says what its numbers mean: free counts homes behind CGN
|
||||||
|
|
||||||
test('the AS box on the dashboard lists the blocks you announce, not a made-up count', (t) => {
|
test('the AS box on the dashboard lists the blocks you announce, not a made-up count', (t) => {
|
||||||
const { ev, dom, errors } = game(t);
|
const { ev, dom, errors } = game(t);
|
||||||
const asBox = () => { ev("ACT.dash({});ACT.dashTab({k:'infra'})"); const k = [...dom.window.document.querySelectorAll('.kv')].map(e => e.textContent).find(x => /IPv6/.test(x)); ev('ACT.dashClose()'); return k; };
|
const asBox = () => { ev("ACT.dash({});ACT.dashTab({k:'infra'})"); const k = [...dom.window.document.querySelectorAll('#dashCard .kv')].map(e => e.textContent).find(x => /IPv6/.test(x)); ev('ACT.dashClose()'); return k; };
|
||||||
assert.match(asBox(), /1 × \/21 IPv4, 1 × \/32 IPv6/, 'the starting allocation');
|
assert.match(asBox(), /1 × \/21 IPv4, 1 × \/32 IPv6/, 'the starting allocation');
|
||||||
ev("ACT.ip4Lease({len:22});ACT.ip4Buy({len:24})");
|
ev("ACT.ip4Lease({len:22});ACT.ip4Buy({len:24})");
|
||||||
assert.match(asBox(), /1 × \/21, 1 × \/22, 1 × \/24 IPv4/, 'bought and leased-in blocks are announced too');
|
assert.match(asBox(), /1 × \/21, 1 × \/22, 1 × \/24 IPv4/, 'bought and leased-in blocks are announced too');
|
||||||
|
|
@ -405,7 +405,7 @@ test('saves: garbage is repaired, and the state round-trips', (t) => {
|
||||||
ev('S=sanitize(JSON.parse(JSON.stringify(S)))');
|
ev('S=sanitize(JSON.parse(JSON.stringify(S)))');
|
||||||
assert.equal(ev('JSON.stringify(S.ip4)'), before);
|
assert.equal(ev('JSON.stringify(S.ip4)'), before);
|
||||||
ev(`S.ip4={b:[{id:'a',len:12,k:'rir',d:0},{id:'b',len:24,k:'stolen',d:0},{id:'c',len:24,k:'buy',d:-5,out:'yes',mo:5},{id:'d',len:23,k:'in',d:1e9,mo:-3},null,{id:'e',len:24,k:'rir',d:0,out:true,mo:'x'}],nat:7,w:99};S=sanitize(JSON.parse(JSON.stringify(S)))`);
|
ev(`S.ip4={b:[{id:'a',len:12,k:'rir',d:0},{id:'b',len:24,k:'stolen',d:0},{id:'c',len:24,k:'buy',d:-5,out:'yes',mo:5},{id:'d',len:23,k:'in',d:1e9,mo:-3},null,{id:'e',len:24,k:'rir',d:0,out:true,mo:'x'}],nat:7,w:99};S=sanitize(JSON.parse(JSON.stringify(S)))`);
|
||||||
assert.deepEqual(J(ev, 'S.ip4'), { b: [{ id: 'c', len: 24, k: 'buy', d: 0 }, { id: 'd', len: 23, k: 'in', d: ev('S.day'), mo: 0 }, { id: 'e', len: 24, k: 'rir', d: 0, out: true, mo: 0 }], nat: 16, w: 3 });
|
assert.deepEqual(J(ev, 'S.ip4'), { b: [{ id: 'c', len: 24, k: 'buy', d: 0 }, { id: 'd', len: 23, k: 'in', d: ev('S.day'), mo: 0 }, { id: 'e', len: 24, k: 'rir', d: 0, out: true, mo: 0 }], nat: 16, n64: 128, w: 3 });
|
||||||
ev("S.ip4='nope';S=sanitize(JSON.parse(JSON.stringify(S)))");
|
ev("S.ip4='nope';S=sanitize(JSON.parse(JSON.stringify(S)))");
|
||||||
assert.ok(J(ev, 'S.ip4.b.length') >= 1, 'a broken field is granted afresh');
|
assert.ok(J(ev, 'S.ip4.b.length') >= 1, 'a broken field is granted afresh');
|
||||||
assert.deepEqual(errors, []);
|
assert.deepEqual(errors, []);
|
||||||
|
|
@ -416,7 +416,7 @@ test('the address space works on a phone: one column, wrapping buttons, the drop
|
||||||
ev("window.innerWidth=360;window.innerHeight=740;S.pops.fra.bb.d=250;compute();ACT.ip4Lease({len:24});ACT.ip4Open()");
|
ev("window.innerWidth=360;window.innerHeight=740;S.pops.fra.bb.d=250;compute();ACT.ip4Lease({len:24});ACT.ip4Open()");
|
||||||
const sec = dom.window.document.querySelector('#bankCard .bank-ip4');
|
const sec = dom.window.document.querySelector('#bankCard .bank-ip4');
|
||||||
assert.ok(sec, 'the section is in the bank');
|
assert.ok(sec, 'the section is in the bank');
|
||||||
assert.equal(sec.querySelectorAll('select').length, 2, 'the CGNAT ratio and the block size');
|
assert.equal(sec.querySelectorAll('select').length, 3, 'the CGNAT ratio, the NAT64 ratio and the block size');
|
||||||
for (const s of sec.querySelectorAll('select')) assert.ok(s.closest('.ops-sel'), 'each dropdown in a stacking label');
|
for (const s of sec.querySelectorAll('select')) assert.ok(s.closest('.ops-sel'), 'each dropdown in a stacking label');
|
||||||
for (const b of sec.querySelectorAll('button')) assert.ok(b.closest('.btns'), 'every button in a wrapping row: ' + b.textContent);
|
for (const b of sec.querySelectorAll('button')) assert.ok(b.closest('.btns'), 'every button in a wrapping row: ' + b.textContent);
|
||||||
assert.match(sec.textContent, /2,500, \d+% behind CGNAT/);
|
assert.match(sec.textContent, /2,500, \d+% behind CGNAT/);
|
||||||
|
|
|
||||||
|
|
@ -259,7 +259,8 @@ test('M3: every subsystem that can annoy the player reads a rule', () => {
|
||||||
['soldOut', "rule('market')"], ['hwMul', "rule('market')"], ['leadDays', "rule('lead')"], ['pniLead', 'leadDays'],
|
['soldOut', "rule('market')"], ['hwMul', "rule('market')"], ['leadDays', "rule('lead')"], ['pniLead', 'leadDays'],
|
||||||
['dfBuildDays', 'leadDays'], ['dayPreRun', "rule('clock')"], ['snub', "rule('market')"], ['failureRun', 'shipsOn()'],
|
['dfBuildDays', 'leadDays'], ['dayPreRun', "rule('clock')"], ['snub', "rule('market')"], ['failureRun', 'shipsOn()'],
|
||||||
['upcomingConfs', 'confsOn()'], ['pniLead', 'pniNow()'], ['dayPost', "rule('broke')"], ['dayPost', "rule('moods')"], ['toast', 'quietOn()'],
|
['upcomingConfs', 'confsOn()'], ['pniLead', 'pniNow()'], ['dayPost', "rule('broke')"], ['dayPost', "rule('moods')"], ['toast', 'quietOn()'],
|
||||||
['ip4On', "rule('ip4')"], ['ip4Fits', 'ip4On()'], ['ip4Money', 'ip4On()'], ['ip4Day', 'ip4On()']];
|
['ip4On', "rule('ip4')"], ['ip4Fits', 'ip4On()'], ['ip4Money', 'ip4On()'], ['ip4Day', 'ip4On()'],
|
||||||
|
['ip6Day', 'ip4On()'], ['ip6Grow', 'ip4On()'], ['ip6Why', 'ip4On()'], ['ip6Html', 'ip4On()'], ['ip4Can', 'ip4On()']];
|
||||||
fail('M3', reads.filter(([f, r]) => !ev(`typeof ${f}==='function'&&${f}.toString().includes(${lit(r)})`)).map(([f, r]) => `${f}() does not read ${r}`), 'gate it on the ruleset (src/game/40-progress/30-rules.js)');
|
fail('M3', reads.filter(([f, r]) => !ev(`typeof ${f}==='function'&&${f}.toString().includes(${lit(r)})`)).map(([f, r]) => `${f}() does not read ${r}`), 'gate it on the ruleset (src/game/40-progress/30-rules.js)');
|
||||||
// and in play: no chaos and no market means a quiet year
|
// and in play: no chaos and no market means a quiet year
|
||||||
const g = load();
|
const g = load();
|
||||||
|
|
|
||||||
|
|
@ -227,7 +227,7 @@ test('a dry run prices every command that has a price, and changes nothing', ()
|
||||||
fixInc: { id: 'none' }, confGo: { key: T('catalog', { name: 'conferences' })[0].key }, confSponsor: { key: T('catalog', { name: 'conferences' })[0].key },
|
fixInc: { id: 'none' }, confGo: { key: T('catalog', { name: 'conferences' })[0].key }, confSponsor: { key: T('catalog', { name: 'conferences' })[0].key },
|
||||||
opsHire: { id: ev('Object.keys(INTERNS)[0]') }, opsNewPop: { city: 'nyc' }, pniAll: { net: 'cog', tier: 1 }, seatBuy: { n: 2 }, layShip: { id: df }, seaRush: { id: df },
|
opsHire: { id: ev('Object.keys(INTERNS)[0]') }, opsNewPop: { city: 'nyc' }, pniAll: { net: 'cog', tier: 1 }, seatBuy: { n: 2 }, layShip: { id: df }, seaRush: { id: df },
|
||||||
utilityKit: { city: 'fra' }, utilityCaches: { city: 'fra' }, teDeploy: { script: 'spill at 85%' }, upLinkX: {},
|
utilityKit: { city: 'fra' }, utilityCaches: { city: 'fra' }, teDeploy: { script: 'spill at 85%' }, upLinkX: {},
|
||||||
pieRd: { k: 'reuse' }, pieAnt: { id: 'none' }, ip4Buy: { len: 24 }, ip4Lease: { len: 22 },
|
pieRd: { k: 'reuse' }, pieAnt: { id: 'none' }, ip4Buy: { len: 24 }, ip4Lease: { len: 22 }, ip6Go: { city: 'fra' },
|
||||||
teleBuild: { city: 'fra' }, teleTrk: { city: 'fra' }, buySat: { a: 'fra', b: 'rek', bird: 'is37', g: 1 }, satSize: { id: wave, g: 2 },
|
teleBuild: { city: 'fra' }, teleTrk: { city: 'fra' }, buySat: { a: 'fra', b: 'rek', bird: 'is37', g: 1 }, satSize: { id: wave, g: 2 },
|
||||||
};
|
};
|
||||||
const missing = quoted.filter((n) => !sample[n] && T('schema', { section: 'commands' })[n].args.some((a) => a.required));
|
const missing = quoted.filter((n) => !sample[n] && T('schema', { section: 'commands' })[n].args.some((a) => a.required));
|
||||||
|
|
|
||||||
415
tests/nat64.test.js
Normal file
415
tests/nat64.test.js
Normal file
|
|
@ -0,0 +1,415 @@
|
||||||
|
// IPv6-only broadband with 464XLAT and NAT64, next to CGNAT (src/game/60-features/34-ipv6-only.js, the address space in
|
||||||
|
// 33-address-space.js): a city's home routers are swapped over some days, paid as they go in; its homes then hold no IPv4
|
||||||
|
// of their own, only a share of the NAT64 pool at a wider ratio than CGNAT, and grumble less. Rule ip4, like the rest.
|
||||||
|
const test = require('node:test');
|
||||||
|
const assert = require('node:assert/strict');
|
||||||
|
const { load } = require('./harness');
|
||||||
|
const { lit } = require('../scripts/lib/js-literal');
|
||||||
|
|
||||||
|
// Frankfurt on On-call, plenty of cash, nothing breaking, 1,300 homes on the starting /21.
|
||||||
|
const BASE = "ACT.start({});if(UI.pendGame)ACT.pitchSkip();S.rules=makeRules('oncall');S.cash=1e8;for(const g of GOALS)S.done[g.id]=0;S.lvl=9;S.nextFail=S.nextEvent=1e9;UI.speed=0;S.offers=[];S.biz=[];" +
|
||||||
|
"ACT.launchBB({city:'fra'});S.pops.fra.rgen=3;ACT.buyTransit({city:'fra',net:'lvl',tier:3});S.pops.fra.bb.d=130;compute()";
|
||||||
|
function game(t, opts) {
|
||||||
|
const h = load(opts);
|
||||||
|
t.after(() => h.dom.window.close());
|
||||||
|
h.ev(BASE);
|
||||||
|
return h;
|
||||||
|
}
|
||||||
|
const J = (ev, x) => JSON.parse(ev(`JSON.stringify(${x})`));
|
||||||
|
// Days of the swap without the rest of the day (homes stay put): the day's IPv4 step, as dayPost runs it.
|
||||||
|
const days = (ev, n) => ev(`for(let i=0;i<${n};i++){S.day++;ip4Day(S.day)}compute()`);
|
||||||
|
const host = (ev, id, bw) => ev(`S.biz.push(${lit({ id, city: 'fra', city2: null, reqs: [], name: 'H ' + id, type: 'host', bw, rate: 60, mood: 100, since: 0 })});compute()`);
|
||||||
|
const panel = (ev, dom, c = 'fra') => { ev(`selectCity('${c}');UI.tab='cust';renderPanel()`); return dom.window.document.getElementById('panelBody'); };
|
||||||
|
|
||||||
|
test('going IPv6-only frees exactly what the address math says, the NAT64 pool before dual-stack homes', (t) => {
|
||||||
|
const { ev, errors } = game(t);
|
||||||
|
let u = J(ev, 'ip4Use()');
|
||||||
|
assert.deepEqual([u.T, u.H, u.H6, u.p6, u.cg, u.free], [2048, 1300, 0, 0, 0, 2048 - 82], '1,300 dual-stack homes, all public; free counts them at 1:16');
|
||||||
|
// The city panel promises it: 1,300 homes at 1:128 take 11 addresses instead of 82.
|
||||||
|
assert.equal(ev("ip6Free('fra')"), 82 - 11);
|
||||||
|
ev("ACT.ip6Go({city:'fra'})");
|
||||||
|
days(ev, 37);
|
||||||
|
u = J(ev, 'ip4Use()');
|
||||||
|
assert.deepEqual([u.H, u.H6, u.Hd, u.p6, u.cg, u.free], [1300, 1300, 0, 11, 0, 2048 - 11], 'every home on the NAT64 pool');
|
||||||
|
assert.equal(u.free - (2048 - 82), 71, 'freed exactly what it said');
|
||||||
|
// Two cities: Frankfurt IPv6-only, Amsterdam dual stack, a /23 customer. The pool comes off first, then the dual-stack
|
||||||
|
// homes take what is left and the rest go behind CGNAT.
|
||||||
|
ev("ACT.buildPop({city:'ams'});ACT.launchBB({city:'ams'});S.pops.fra.bb.d=100;S.pops.ams.bb.d=160;compute()");
|
||||||
|
host(ev, 'h1', 80);
|
||||||
|
u = J(ev, 'ip4Use()');
|
||||||
|
assert.deepEqual([u.B, u.H6, u.p6, u.Hd], [512, 1000, 8, 1600]);
|
||||||
|
assert.equal(u.cg, Math.ceil((1600 - (1536 - 8)) * 16 / 15), 'dual-stack homes get what the pool leaves');
|
||||||
|
assert.equal(u.free, 2048 - 512 - 8 - 100);
|
||||||
|
assert.ok(u.H - u.H6 - u.cg + Math.ceil(u.cg / 16) + u.p6 <= 1536, 'public homes, the CGNAT pool and the NAT64 pool fit the space');
|
||||||
|
// What Amsterdam would free is what the address space then frees.
|
||||||
|
const f = ev("ip6Free('ams')"), free0 = u.free;
|
||||||
|
assert.equal(f, 100 - (Math.ceil(2600 / 128) - 8));
|
||||||
|
ev("ACT.ip6Go({city:'ams'})");
|
||||||
|
days(ev, ev("S.pops.ams.bb.v6e-S.day"));
|
||||||
|
assert.equal(J(ev, 'ip4Use()').free, free0 + f);
|
||||||
|
assert.equal(J(ev, 'ip4Use()').cg, 0);
|
||||||
|
assert.deepEqual(errors, []);
|
||||||
|
});
|
||||||
|
|
||||||
|
test('the swap: its cost and days, paid as the routers go in, new homes on the new router, stopped with nothing back', (t) => {
|
||||||
|
const { ev, dom, errors } = game(t);
|
||||||
|
// 1,300 homes: $4 a router, 30 days and one more for every 200 homes.
|
||||||
|
assert.deepEqual([ev("ip6Cost('fra')"), ev("ip6Days('fra')")], [5200, 37]);
|
||||||
|
const cash0 = ev('S.cash');
|
||||||
|
ev("ACT.ip6Go({city:'fra'})");
|
||||||
|
assert.equal(ev('S.pops.fra.bb.v6e'), ev('S.day') + 37);
|
||||||
|
assert.equal(ev('S.cash'), cash0, 'nothing paid up front');
|
||||||
|
assert.match(dom.window.document.getElementById('toasts').textContent, /Swapping 1,300 home routers in Frankfurt for IPv6-only ones: about 37 days/);
|
||||||
|
days(ev, 10);
|
||||||
|
assert.ok(Math.abs(ev('S.pops.fra.bb.v6') - 10 / 37) < 1e-9, 'an even share a day');
|
||||||
|
assert.ok(Math.abs(cash0 - ev('S.cash') - 5200 * 10 / 37) < 1e-4, 'paid for the routers that went in');
|
||||||
|
// Homes that join during the swap get the new router from the start, at the same price, paid the day they join.
|
||||||
|
let c = ev('S.cash');
|
||||||
|
ev('ip6Grow(Object.assign(S.pops.fra.bb,{d:260}),130)');
|
||||||
|
assert.ok(Math.abs(ev('S.pops.fra.bb.v6') - (1 - (27 / 37) / 2)) < 1e-9);
|
||||||
|
assert.ok(Math.abs(c - ev('S.cash') - 1300 * 4) < 1e-6, '1,300 new homes, 1,300 routers');
|
||||||
|
ev('S.pops.fra.bb.d=130;S.pops.fra.bb.v6=10/37;S.cash=' + c);
|
||||||
|
// Stopped: the swapped homes stay, nothing comes back, nothing more is paid.
|
||||||
|
const cash1 = ev('S.cash');
|
||||||
|
ev("ACT.ip6Stop({city:'fra'})");
|
||||||
|
assert.equal(ev('S.pops.fra.bb.v6e'), undefined);
|
||||||
|
assert.equal(ev('S.cash'), cash1);
|
||||||
|
days(ev, 30);
|
||||||
|
assert.deepEqual([ev('S.cash'), ev('S.pops.fra.bb.v6')], [cash1, 10 / 37]);
|
||||||
|
assert.match(dom.window.document.getElementById('toasts').textContent, /Stopped the swap in Frankfurt at 27% of homes/);
|
||||||
|
// After a stop, new homes are dual stack again, and cost nothing.
|
||||||
|
ev('ip6Grow(Object.assign(S.pops.fra.bb,{d:260}),130)');
|
||||||
|
assert.ok(Math.abs(ev('S.pops.fra.bb.v6') - 5 / 37) < 1e-9);
|
||||||
|
assert.equal(ev('S.cash'), cash1);
|
||||||
|
// Resumed: the rest, at the same price a router, and it finishes on its day.
|
||||||
|
const left = ev('2600*(1-S.pops.fra.bb.v6)');
|
||||||
|
assert.equal(ev("ip6Cost('fra')"), Math.round(left * 4 / 100) * 100);
|
||||||
|
assert.equal(ev("ip6Days('fra')"), 30 + Math.ceil(left / 200));
|
||||||
|
const cash2 = ev('S.cash'), n = ev("ip6Days('fra')");
|
||||||
|
ev("ACT.ip6Go({city:'fra'})");
|
||||||
|
days(ev, n - 1);
|
||||||
|
assert.ok(ev('S.pops.fra.bb.v6') < 1);
|
||||||
|
days(ev, 1);
|
||||||
|
assert.deepEqual([ev('S.pops.fra.bb.v6'), ev('S.pops.fra.bb.v6e')], [1, undefined]);
|
||||||
|
assert.ok(Math.abs(cash2 - ev('S.cash') - left * 4) < 1e-4, 'the whole rest, router by router');
|
||||||
|
assert.match(dom.window.document.getElementById('toasts').textContent, /Frankfurt is IPv6-only/);
|
||||||
|
// Done: new homes come IPv6-only and pay for their router, even short of cash (a new home needs one today), and the
|
||||||
|
// swap cannot start again.
|
||||||
|
c = ev('S.cash');
|
||||||
|
ev('ip6Grow(Object.assign(S.pops.fra.bb,{d:400}),260)');
|
||||||
|
assert.equal(ev('S.pops.fra.bb.v6'), 1);
|
||||||
|
assert.ok(Math.abs(c - ev('S.cash') - 1400 * 4) < 1e-6);
|
||||||
|
ev('S.cash=100;ip6Grow(Object.assign(S.pops.fra.bb,{d:410}),400)');
|
||||||
|
assert.deepEqual([ev('S.pops.fra.bb.v6'), ev('S.pops.fra.bb.v6e'), Math.round(ev('S.cash'))], [1, undefined, 100 - 400], 'still IPv6-only, not a stopped swap');
|
||||||
|
ev('S.cash=1e8');
|
||||||
|
ev("document.getElementById('toasts').innerHTML='';ACT.ip6Go({city:'fra'})");
|
||||||
|
assert.match(dom.window.document.getElementById('toasts').textContent, /already/);
|
||||||
|
assert.deepEqual(errors, []);
|
||||||
|
});
|
||||||
|
|
||||||
|
test('the swap waits while cash is short, and the real day runs it with the city growing', (t) => {
|
||||||
|
const { ev, dom, errors } = game(t);
|
||||||
|
// Starting needs only the first day's routers on hand ($5,200 over 37 days), not the whole swap.
|
||||||
|
ev('S.cash=Math.ceil(ip6First("fra"))-1');
|
||||||
|
assert.equal(panel(ev, dom).querySelector('[data-act="ip6Go"]').disabled, true);
|
||||||
|
ev("ACT.ip6Go({city:'fra'})");
|
||||||
|
assert.equal(ev('S.pops.fra.bb.v6e'), undefined, 'not even a day of routers: no start');
|
||||||
|
ev('S.cash=Math.ceil(ip6First("fra"))');
|
||||||
|
assert.ok(ev('S.cash') < ev('ip6Cost("fra")') / 10);
|
||||||
|
assert.equal(panel(ev, dom).querySelector('[data-act="ip6Go"]').disabled, false);
|
||||||
|
ev("ACT.ip6Go({city:'fra'});S.cash=50");
|
||||||
|
const e = ev('S.pops.fra.bb.v6e');
|
||||||
|
days(ev, 3);
|
||||||
|
assert.deepEqual([ev('S.pops.fra.bb.v6') || 0, ev('S.pops.fra.bb.v6e'), ev('S.cash')], [0, e + 3, 50], 'no router it cannot pay for: the end slides');
|
||||||
|
assert.match(panel(ev, dom).textContent, /Waiting for cash/);
|
||||||
|
ev('S.cash=1e8');
|
||||||
|
// The whole day, homes and all: the share only rises, and the swap ends on its day.
|
||||||
|
ev('for(let i=0;i<20;i++)dayTick()');
|
||||||
|
const v = ev('S.pops.fra.bb.v6');
|
||||||
|
assert.ok(v > 20 / 37 - 0.01 && v < 1, 'about 20 of 37 days done: ' + v);
|
||||||
|
ev('while(S.pops.fra.bb.v6e)dayTick()');
|
||||||
|
assert.equal(ev('S.pops.fra.bb.v6'), 1);
|
||||||
|
assert.equal(ev('S.day'), e + 3);
|
||||||
|
const d = ev('S.pops.fra.bb.d');
|
||||||
|
ev('for(let i=0;i<30;i++)dayTick()');
|
||||||
|
assert.ok(ev('S.pops.fra.bb.d') !== d && ev('S.pops.fra.bb.v6') === 1, 'homes come and go, all IPv6-only');
|
||||||
|
assert.deepEqual(errors, []);
|
||||||
|
});
|
||||||
|
|
||||||
|
test('a city that goes IPv6-only the day it launches pays a router for every home it grows into', (t) => {
|
||||||
|
const { ev, errors } = game(t);
|
||||||
|
// A fresh launch: 180 homes, so the swap itself is cheap.
|
||||||
|
ev("S.pops.fra.bb.d=bbStart('fra');compute()");
|
||||||
|
assert.deepEqual([ev('S.pops.fra.bb.d*10'), ev("ip6Cost('fra')")], [180, 700]);
|
||||||
|
ev("ACT.ip6Go({city:'fra'})");
|
||||||
|
// A year of real days: count every dollar the swap and the new homes' routers take.
|
||||||
|
ev("window.__paid=0;window.__shrank=false;for(const f of ['ip6Grow','ip6Day']){const g=window[f];window[f]=(...a)=>{const c=S.cash;g(...a);__paid+=c-S.cash;};}");
|
||||||
|
ev('for(let i=0;i<365;i++){const d=S.pops.fra.bb.d;dayTick();if(S.pops.fra.bb.d<d)__shrank=true;}');
|
||||||
|
const homes = ev('S.pops.fra.bb.d*10');
|
||||||
|
assert.ok(homes > 5000 && ev('__shrank') === false, 'it grew all year: ' + homes);
|
||||||
|
assert.equal(ev('S.pops.fra.bb.v6'), 1);
|
||||||
|
assert.ok(Math.abs(ev('__paid') - homes * 4) < 1e-3, `a router for each of its ${homes} homes, as a city switching now would pay: ${ev('__paid')}`);
|
||||||
|
assert.deepEqual(errors, []);
|
||||||
|
});
|
||||||
|
|
||||||
|
test('before the swap, the city panel says what it does to the monthly IPv4 bill', (t) => {
|
||||||
|
const { ev, dom, errors } = game(t);
|
||||||
|
// Day 0: every home has a public address and there is no IPv4 bill; going IPv6-only adds NAT64 gateways and refunds.
|
||||||
|
const eye = 'R.rev.eyeballs';
|
||||||
|
const mo = ev(`ip6Mo('fra',${eye})`), before = ev('R.cost.ip4') || 0;
|
||||||
|
assert.equal(before, 0);
|
||||||
|
assert.ok(mo > 300 && mo < 400, 'gateways for 130 Gbps and 1% of the bill back: ' + mo);
|
||||||
|
assert.match(panel(ev, dom).textContent, new RegExp(`Your IPv4 bill goes up by \\$${Math.round(mo)}/mo \\(NAT64 gateways and refunds\\)\\. No home is behind CGNAT yet: this pays off once your IPv4 runs short\\.`));
|
||||||
|
assert.match(panel(ev, dom).textContent, /Homes that join later get one too, at \$4 each\./);
|
||||||
|
// Exactly what the bill does once it is done.
|
||||||
|
ev('S.pops.fra.bb.v6=1;compute()');
|
||||||
|
assert.ok(Math.abs(ev('R.cost.ip4') - mo) <= 0.5, 'the bill moves by what the panel said');
|
||||||
|
// Squeezed into a /24 at 1:64, most homes are behind CGNAT: going IPv6-only saves money, and says so.
|
||||||
|
ev("delete S.pops.fra.bb.v6;S.ip4.b=[{id:'x',len:24,k:'rir',d:0}];S.ip4.nat=64;compute()");
|
||||||
|
const save = ev(`ip6Mo('fra',${eye})`), cost = ev('R.cost.ip4');
|
||||||
|
assert.ok(save < 0, 'CGNAT boxes and refunds it no longer pays: ' + save);
|
||||||
|
const txt = panel(ev, dom).textContent;
|
||||||
|
assert.match(txt, new RegExp(`Your IPv4 bill goes down by \\$${Math.round(-save)}/mo \\(fewer CGNAT boxes and refunds\\)\\.`));
|
||||||
|
assert.doesNotMatch(txt, /No home is behind CGNAT yet/);
|
||||||
|
ev('S.pops.fra.bb.v6=1;compute()');
|
||||||
|
assert.ok(Math.abs(ev('R.cost.ip4') - (cost + save)) <= 1, 'the bill moves by what the panel said');
|
||||||
|
assert.deepEqual(errors, []);
|
||||||
|
});
|
||||||
|
|
||||||
|
test('out of space: the advice names the sharing that is left to stretch, CGNAT, NAT64 or both', (t) => {
|
||||||
|
const { ev, dom, errors } = game(t);
|
||||||
|
const toasts = () => dom.window.document.getElementById('toasts').textContent;
|
||||||
|
const bank = () => { ev('ACT.ip4Open()'); const s = dom.window.document.querySelector('#bankCard .bank-ip4').textContent; ev('ACT.bankClose()'); return s; };
|
||||||
|
// 10,000 homes, every one IPv6-only, on a /24 a host customer takes whole: only the NAT64 pool is short.
|
||||||
|
ev("S.pops.fra.bb.d=1000;S.pops.fra.bb.v6=1;S.ip4.b=[{id:'x',len:24,k:'rir',d:0}];compute()");
|
||||||
|
host(ev, 'h', 64);
|
||||||
|
let u = J(ev, 'ip4Use()');
|
||||||
|
assert.deepEqual([u.H6, u.Hd, u.cg, u.p6, u.over], [10000, 0, 0, 79, 1]);
|
||||||
|
ev('ip4Day(S.day)');
|
||||||
|
assert.match(toasts(), /Out of IPv4\.\s*Even at 128 homes per address, your NAT64 pool can't fit every IPv6-only home/);
|
||||||
|
assert.doesNotMatch(toasts(), /CGNAT/);
|
||||||
|
assert.match(bank(), /don't fit even at 128 IPv6-only homes per NAT64 address/);
|
||||||
|
// Raising the CGNAT ratio would free nothing, so the advice does not suggest it.
|
||||||
|
ev("document.getElementById('toasts').innerHTML='';S.offers=[{id:'o1',city:'fra',city2:null,reqs:[],name:'Offer',type:'dia',bw:10,rate:60}];ACT.accept({id:'o1'})");
|
||||||
|
assert.match(toasts(), /put more IPv6-only homes on each NAT64 address\./);
|
||||||
|
ev("document.getElementById('toasts').innerHTML='';ip4Busy()");
|
||||||
|
assert.match(toasts(), /put more IPv6-only homes on each NAT64 address or get another block first/);
|
||||||
|
// Half the homes dual stack: both ratios help, and both are named.
|
||||||
|
ev("S.pops.fra.bb.v6=0.5;S.ip4.w=0;compute();document.getElementById('toasts').innerHTML='';ip4Day(S.day)");
|
||||||
|
u = J(ev, 'ip4Use()');
|
||||||
|
assert.ok(u.H6 > 0 && u.Hd > 0 && u.over > 0);
|
||||||
|
assert.match(toasts(), /Even at 16 homes per address behind CGNAT and 128 on NAT64, not every home fits/);
|
||||||
|
assert.match(bank(), /don't fit even at 16 homes per CGNAT address and 128 per NAT64 address/);
|
||||||
|
ev("document.getElementById('toasts').innerHTML='';ip4Busy()");
|
||||||
|
assert.match(toasts(), /put more homes on each CGNAT or NAT64 address or get another block first/);
|
||||||
|
// No IPv6-only homes: CGNAT, as it always said.
|
||||||
|
ev("delete S.pops.fra.bb.v6;S.ip4.w=0;compute();document.getElementById('toasts').innerHTML='';ip4Day(S.day);ip4Busy()");
|
||||||
|
assert.match(toasts(), /Even at 16 homes per address, CGNAT can't fit everyone/);
|
||||||
|
assert.match(toasts(), /put more homes behind CGNAT or get another block first/);
|
||||||
|
assert.match(bank(), /don't fit even at 16 homes per address\./);
|
||||||
|
assert.deepEqual(errors, []);
|
||||||
|
});
|
||||||
|
|
||||||
|
test('the CGNAT ratio and the warnings count only the dual-stack homes, after the NAT64 pool', (t) => {
|
||||||
|
const { ev, errors } = game(t);
|
||||||
|
// 1,300 homes, every one IPv6-only, on a /24 with a host customer on a /25: 128 addresses left, the pool takes 11.
|
||||||
|
ev("S.pops.fra.bb.v6=1;S.ip4.b=[{id:'x',len:24,k:'rir',d:0}];compute()");
|
||||||
|
host(ev, 'h', 32);
|
||||||
|
let u = J(ev, 'ip4Use()');
|
||||||
|
assert.deepEqual([u.T - u.B, u.p6, u.Hd], [128, 11, 0]);
|
||||||
|
// No home is behind CGNAT, so a narrower CGNAT ratio needs no room (counting all 1,300 homes, 1:8 would need 163).
|
||||||
|
ev("ACT.ip4Nat({v:'8'})");
|
||||||
|
assert.equal(ev('S.ip4.nat'), 8);
|
||||||
|
// Homes behind CGNAT: the warning rearms once the dual-stack homes fit public again next to the pool, though all the
|
||||||
|
// homes together would not.
|
||||||
|
ev("S.biz=[];S.ip4.nat=16;S.pops.fra.bb.v6=0;S.ip4.w=0;compute();ip4Day(S.day)");
|
||||||
|
assert.equal(ev('S.ip4.w'), 1, 'homes behind CGNAT');
|
||||||
|
ev('S.pops.fra.bb.v6=0.85;compute();ip4Day(S.day)');
|
||||||
|
u = J(ev, 'ip4Use()');
|
||||||
|
assert.ok(u.T - u.B - u.p6 >= u.Hd * 1.05 && u.T - u.B < u.H * 1.05, JSON.stringify(u));
|
||||||
|
assert.equal(ev('S.ip4.w'), 0, 'room to spare for the dual-stack homes: it rearms');
|
||||||
|
// Out of space (the host back, 1:8): it rearms once the pool and the CGNAT homes fit with room, whatever all the homes
|
||||||
|
// at 1:8 would take.
|
||||||
|
host(ev, 'h2', 32);
|
||||||
|
ev('S.ip4.nat=8;S.pops.fra.bb.v6=0;compute();ip4Day(S.day)');
|
||||||
|
assert.ok(J(ev, 'ip4Use()').over > 0 && (ev('S.ip4.w') & 2) === 2, 'out of space at 1:8');
|
||||||
|
ev('S.pops.fra.bb.v6=1;compute();ip4Day(S.day)');
|
||||||
|
u = J(ev, 'ip4Use()');
|
||||||
|
assert.ok(u.T - u.B >= u.need * 1.1 && u.T - u.B < Math.ceil(u.H / u.r) * 1.1, JSON.stringify(u));
|
||||||
|
assert.equal(ev('S.ip4.w') & 2, 0, 'the pool fits with room: it rearms');
|
||||||
|
assert.deepEqual(errors, []);
|
||||||
|
});
|
||||||
|
|
||||||
|
test('NAT64 refunds: well under CGNAT at the same ratio, never zero, smaller as the world goes IPv6', (t) => {
|
||||||
|
const { ev, errors } = game(t);
|
||||||
|
assert.deepEqual(J(ev, '[IP4_N64,IP4_N640]'), [[64, 128, 256], 128]);
|
||||||
|
assert.ok(J(ev, 'IP4_N64.every(r=>IP4_ANNOY64[r]>0&&IP4_ANNOY64[r]<IP4_ANNOY[64]/2)'), 'every NAT64 ratio grumbles, less than half of CGNAT at its widest');
|
||||||
|
assert.ok(ev('IP4_ANNOY64[64]') < ev('IP4_ANNOY[64]') && ev('IP4_ANNOY64[128]') < ev('IP4_ANNOY[16]'), 'at the same ratio, and default against default');
|
||||||
|
// Frankfurt squeezed into a /24 at 1:64: most homes behind CGNAT. Then the same homes IPv6-only at 1:64.
|
||||||
|
ev("S.ip4.b=[{id:'x',len:24,k:'rir',d:0}];ACT.ip4Nat({v:'64'});compute()");
|
||||||
|
const eye = ev('R.rev.eyeballs');
|
||||||
|
let b = J(ev, 'ip4Bill(R.rev.eyeballs)');
|
||||||
|
assert.ok(b.u.cg > 1000 && b.u.H6 === 0);
|
||||||
|
const cgHome = b.refund / b.u.cg;
|
||||||
|
assert.ok(Math.abs(cgHome - eye / 1300 * 0.04) < 1e-9);
|
||||||
|
ev("ACT.ip4Nat64({v:'64'});S.pops.fra.bb.v6=1;compute()");
|
||||||
|
b = J(ev, 'ip4Bill(R.rev.eyeballs)');
|
||||||
|
assert.deepEqual([b.u.cg, b.u.H6, b.u.p6, b.u.over], [0, 1300, Math.ceil(1300 / 64), 0]);
|
||||||
|
const v6Home = b.refund / b.u.H6;
|
||||||
|
assert.ok(v6Home > 0 && v6Home < cgHome / 5, `an IPv6-only home ${v6Home} against one behind CGNAT ${cgHome}`);
|
||||||
|
assert.ok(Math.abs(b.refund - eye * 0.006) < 1e-9);
|
||||||
|
assert.equal(ev('R.cost.ip4'), Math.round(b.box + b.box64 + b.refund), 'the gateways and refunds are on the bill');
|
||||||
|
assert.ok(Math.abs(b.box64 - 130 * 0.55 * 2) < 1e-9, 'NAT64 costs what CGNAT does per Gbps of IPv4 it carries');
|
||||||
|
// Ten years on: less IPv4 to translate, fewer refunds; CGNAT's grumbling per home stays.
|
||||||
|
ev('S.day=3652;compute()');
|
||||||
|
const late = J(ev, 'ip4Bill(R.rev.eyeballs)');
|
||||||
|
assert.ok(late.refund / ev('R.rev.eyeballs') < 0.006 && late.refund > 0);
|
||||||
|
assert.ok(late.box64 < b.box64);
|
||||||
|
ev("S.pops.fra.bb.v6=0;compute()");
|
||||||
|
const lateCg = J(ev, 'ip4Bill(R.rev.eyeballs)');
|
||||||
|
assert.ok(Math.abs(lateCg.refund / lateCg.u.cg - ev('R.rev.eyeballs') / 1300 * 0.04) < 1e-9);
|
||||||
|
// A narrower NAT64 ratio is refused when the signed customers would not fit; a wider one never is.
|
||||||
|
ev("S.pops.fra.bb.v6=1;S.ip4.b=[{id:'x',len:24,k:'rir',d:0}];S.biz=[];ACT.ip4Nat64({v:'256'});compute()");
|
||||||
|
assert.equal(ev('S.ip4.n64'), 256);
|
||||||
|
host(ev, 'big', 40); // a /24: nothing left
|
||||||
|
ev("ACT.ip4Nat64({v:'64'})");
|
||||||
|
assert.equal(ev('S.ip4.n64'), 256, 'needs 21 addresses it does not have');
|
||||||
|
ev('S.biz=[];compute();ACT.ip4Nat64({v:"64"})');
|
||||||
|
assert.equal(ev('S.ip4.n64'), 64);
|
||||||
|
assert.deepEqual(errors, []);
|
||||||
|
});
|
||||||
|
|
||||||
|
test('the world goes IPv6: 55% IPv4 on day 0, two points less a year, down to a floor', (t) => {
|
||||||
|
const { ev, dom, errors } = game(t);
|
||||||
|
assert.equal(ev('ip4V4(0)'), 0.55);
|
||||||
|
assert.equal(ev('ip4V4()'), ev('ip4V4(S.day)'));
|
||||||
|
const ys = [0, 1, 2, 5, 10, 20, 40].map((y) => ev(`ip4V4(${y * 365.2425})`));
|
||||||
|
for (let i = 1; i < ys.length; i++) assert.ok(ys[i] <= ys[i - 1], 'never back up: ' + ys);
|
||||||
|
assert.ok(Math.abs(ys[1] - 0.53) < 1e-9 && Math.abs(ys[4] - 0.35) < 1e-9, 'two points a year: ' + ys);
|
||||||
|
assert.equal(ys[6], 0.2, 'a floor: some things never leave IPv4');
|
||||||
|
assert.ok(Math.abs(ev('ip4V4(181)') - ev('ip4V4(180)')) < 1e-4, 'a gentle slope, no jumps');
|
||||||
|
// CGNAT gets cheaper with it: the same homes behind it, ten years apart.
|
||||||
|
ev("S.ip4.b=[{id:'x',len:24,k:'rir',d:0}];compute()");
|
||||||
|
const box0 = J(ev, 'ip4Bill(0)').box;
|
||||||
|
ev('S.day=3652;compute()');
|
||||||
|
assert.ok(Math.abs(J(ev, 'ip4Bill(0)').box - box0 * ev('ip4V4(3652)') / 0.55) < 1e-9);
|
||||||
|
// The address space says how far the world has come.
|
||||||
|
ev('ACT.ip4Open()');
|
||||||
|
assert.match(dom.window.document.querySelector('#bankCard .bank-ip4').textContent, /IPv6 share of home traffic this year65%/);
|
||||||
|
assert.deepEqual(errors, []);
|
||||||
|
});
|
||||||
|
|
||||||
|
test('rule off means no effect: no button, no swap, no pool, no bill', (t) => {
|
||||||
|
const { ev, dom, errors } = game(t);
|
||||||
|
ev("S.rules=makeRules('freeze');compute()");
|
||||||
|
assert.equal(ev('ip4On()'), false);
|
||||||
|
const p = panel(ev, dom);
|
||||||
|
assert.doesNotMatch(p.textContent, /IPv6-only|464XLAT/);
|
||||||
|
assert.equal(p.querySelector('[data-act="ip6Go"]'), null);
|
||||||
|
ev("ACT.ip6Go({city:'fra'})");
|
||||||
|
assert.equal(ev('S.pops.fra.bb.v6e'), undefined, 'refused');
|
||||||
|
assert.match(dom.window.document.getElementById('toasts').textContent, /IPv4 is plentiful/);
|
||||||
|
// Even with the fields in place (a scenario that dropped the rule), nothing moves and nothing is billed.
|
||||||
|
ev('S.pops.fra.bb.v6=0.5;S.pops.fra.bb.v6e=S.day+10;compute()');
|
||||||
|
const cash = ev('S.cash');
|
||||||
|
ev('for(let i=0;i<5;i++){S.day++;ip4Day(S.day);ip6Day(S.day)}ip6Grow(Object.assign(S.pops.fra.bb,{d:200}),130);compute()');
|
||||||
|
assert.deepEqual([ev('S.pops.fra.bb.v6'), ev('S.cash'), ev('R.cost.ip4')], [0.5, cash, undefined]);
|
||||||
|
ev("ACT.ip6Stop({city:'fra'});ACT.ip4Nat64({v:'64'})");
|
||||||
|
assert.deepEqual([ev('!!S.pops.fra.bb.v6e'), ev('S.ip4.n64')], [true, 128]);
|
||||||
|
assert.deepEqual(errors, []);
|
||||||
|
});
|
||||||
|
|
||||||
|
test('saves: an old one loads unchanged, a swap in progress round-trips, garbage is repaired', (t) => {
|
||||||
|
const { ev, errors } = game(t);
|
||||||
|
ev("ACT.buildPop({city:'ams'});ACT.launchBB({city:'ams'});compute()");
|
||||||
|
// An old save: no NAT64 ratio, no IPv6-only homes. Its homes and its money are what they were.
|
||||||
|
ev('delete S.ip4.n64;window.__m=[R.revMo,R.costMo]');
|
||||||
|
const bbs = 'JSON.stringify(Object.entries(S.pops).map(([c,p])=>[c,p.bb]))', pops = ev(bbs);
|
||||||
|
ev('S=migrate(JSON.parse(JSON.stringify(S)));compute()');
|
||||||
|
assert.equal(ev(bbs), pops, 'no new field in any city');
|
||||||
|
assert.equal(ev('S.ip4.n64'), 128);
|
||||||
|
assert.deepEqual([ev('R.revMo'), ev('R.costMo')], J(ev, '__m'));
|
||||||
|
// Mid-swap: every field as it was.
|
||||||
|
ev("ACT.ip6Go({city:'fra'})");
|
||||||
|
days(ev, 5);
|
||||||
|
ev("ACT.ip4Nat64({v:'256'})");
|
||||||
|
const before = ev('JSON.stringify([S.pops,S.ip4])');
|
||||||
|
ev('S=sanitize(JSON.parse(JSON.stringify(S)))');
|
||||||
|
assert.equal(ev('JSON.stringify([S.pops,S.ip4])'), before);
|
||||||
|
// Garbage.
|
||||||
|
const fix = (bb) => J(ev, `(()=>{S.pops.ams.bb=${lit(bb)};S=sanitize(JSON.parse(JSON.stringify(S)));return S.pops.ams.bb;})()`);
|
||||||
|
const day = ev('S.day');
|
||||||
|
assert.deepEqual(fix({ d: 50, v6: 'x', v6e: 'soon' }), { d: 50 });
|
||||||
|
assert.deepEqual(fix({ d: 50, v6: -1 }), { d: 50 });
|
||||||
|
assert.deepEqual(fix({ d: 50, v6: 5, v6e: day + 9 }), { d: 50, v6: 1 }, 'done is done');
|
||||||
|
assert.deepEqual(fix({ d: 50, v6: 0.25, v6e: -40 }), { d: 50, v6: 0.25, v6e: day }, 'a past end: it finishes on the next day');
|
||||||
|
assert.deepEqual(fix({ d: 50, v6e: 1e12 }), { d: 50, v6e: day + 3650 });
|
||||||
|
ev("S.ip4.n64=7;S=sanitize(JSON.parse(JSON.stringify(S)))");
|
||||||
|
assert.equal(ev('S.ip4.n64'), 128);
|
||||||
|
// A POP closed and built again starts dual stack: its homes and their routers left with it.
|
||||||
|
ev("S.pops.ams.bb={d:50,v6:1};decommission(['ams']);ACT.buildPop({city:'ams'});ACT.launchBB({city:'ams'})");
|
||||||
|
assert.equal(ev('S.pops.ams.bb.v6'), undefined);
|
||||||
|
assert.deepEqual(errors, []);
|
||||||
|
});
|
||||||
|
|
||||||
|
test('the agent prices the swap and says why it cannot start', (t) => {
|
||||||
|
const { ev, errors } = game(t, { agent: true });
|
||||||
|
assert.deepEqual(J(ev, "API_CMD.ip6Go.quote({city:'fra'})"), { setup: 5200, days: 37, monthly: Math.round(ev("ip6Mo('fra',R.rev.eyeballs)")), blocked: [] });
|
||||||
|
assert.ok(J(ev, "API_CMD.ip6Go.quote({city:'fra'})").monthly > 0, 'nothing behind CGNAT yet: it only adds');
|
||||||
|
ev("ACT.ip6Go({city:'fra'})");
|
||||||
|
assert.match(J(ev, "API_CMD.ip6Go.quote({city:'fra'})").blocked[0], /already under way/);
|
||||||
|
assert.match(J(ev, "API_CMD.ip6Go.quote({city:'nyc'})").blocked[0], /Launch broadband here first/);
|
||||||
|
assert.deepEqual(errors, []);
|
||||||
|
});
|
||||||
|
|
||||||
|
test('on a phone: the swap in the city sheet and the NAT64 ratio in the bank, portrait and landscape', (t) => {
|
||||||
|
const { ev, dom, errors } = game(t);
|
||||||
|
for (const [w, hgt] of [[360, 740], [740, 360]]) {
|
||||||
|
ev(`window.innerWidth=${w};window.innerHeight=${hgt};S.pops.fra.bb={d:130};compute()`);
|
||||||
|
assert.equal(ev('isPhone()'), true);
|
||||||
|
let p = panel(ev, dom);
|
||||||
|
const go = p.querySelector('[data-act="ip6Go"]');
|
||||||
|
assert.ok(go && go.closest('.btns'), 'the button in a wrapping row');
|
||||||
|
assert.match(go.textContent, /Go IPv6-only \$5\.2k/);
|
||||||
|
assert.match(p.textContent, /Swaps 1,300 home routers in about 37 days, paid as they go in, and frees 71 addresses for new customers\./);
|
||||||
|
ev("ACT.ip6Go({city:'fra'})");
|
||||||
|
days(ev, 3);
|
||||||
|
p = panel(ev, dom);
|
||||||
|
assert.ok(p.querySelector('[data-act="ip6Stop"]').closest('.btns'));
|
||||||
|
assert.match(p.textContent, /IPv6-only \(464XLAT\)8% of homes/);
|
||||||
|
ev('ACT.ip4Open()');
|
||||||
|
const sec = dom.window.document.querySelector('#bankCard .bank-ip4');
|
||||||
|
const sel = sec.querySelector('select[data-chg="ip4Nat64"]');
|
||||||
|
assert.ok(sel && sel.closest('.ops-sel'), 'the NAT64 ratio stacks like the CGNAT one');
|
||||||
|
assert.deepEqual([...sel.options].map((o) => [o.value, o.selected]), [['64', false], ['128', true], ['256', false]]);
|
||||||
|
for (const b of sec.querySelectorAll('button')) assert.ok(b.closest('.btns'), 'every button in a wrapping row: ' + b.textContent);
|
||||||
|
// The three groups once some homes are IPv6-only: 1,300 homes, 3/37 of them on NAT64 (a pool of one address).
|
||||||
|
assert.match(sec.textContent, /Broadband homes1,300Homes with their own address1,194Homes behind CGNAT0IPv6-only homes \(464XLAT\)106, NAT64 pool 1/);
|
||||||
|
ev('ACT.bankClose()');
|
||||||
|
}
|
||||||
|
assert.deepEqual(errors, []);
|
||||||
|
});
|
||||||
|
|
||||||
|
test('no raw labels: the swap, the address space and the news, in every language', (t) => {
|
||||||
|
for (const lang of ['en', 'de', 'es', 'fr', 'it', 'pt']) {
|
||||||
|
const { ev, dom, errors } = load(lang === 'en' ? {} : { lang });
|
||||||
|
ev(BASE);
|
||||||
|
const doc = dom.window.document;
|
||||||
|
let txt = '';
|
||||||
|
const look = () => { txt += doc.getElementById('panelBody').textContent + doc.getElementById('toasts').textContent; };
|
||||||
|
ev("ACT.buildPop({city:'ams'});ACT.launchBB({city:'ams'});S.pops.ams.bb.d=1;S.ip4.b=[{id:'x',len:24,k:'rir',d:0}];compute()");
|
||||||
|
panel(ev, dom); look();
|
||||||
|
ev("ACT.ip6Go({city:'fra'})"); days(ev, 2); ev('S.cash=0'); panel(ev, dom); look();
|
||||||
|
ev("S.cash=1e8;ACT.ip6Stop({city:'fra'})"); panel(ev, dom); look();
|
||||||
|
ev("ACT.ip6Go({city:'fra'});ACT.ip6Go({city:'fra'})"); days(ev, 40); panel(ev, dom); look();
|
||||||
|
ev("ACT.ip6Go({city:'fra'});ACT.ip6Go({city:'bos'})"); look();
|
||||||
|
ev("ACT.ip4Open()");
|
||||||
|
txt += doc.getElementById('bankCard').textContent;
|
||||||
|
ev("ACT.bankClose();ACT.dash({});ACT.dashTab({k:'overview'})");
|
||||||
|
txt += doc.getElementById('dashCard').textContent;
|
||||||
|
assert.match(txt, /464XLAT/, lang);
|
||||||
|
assert.doesNotMatch(txt, /\bip[46]\.[a-z0-9_]+|\{[a-z]+\}|undefined|NaN/, lang);
|
||||||
|
assert.deepEqual(errors, [], lang);
|
||||||
|
dom.window.close();
|
||||||
|
}
|
||||||
|
});
|
||||||
Loading…
Add table
Add a link
Reference in a new issue