Skip to content

po4yka/RIPDPI / docs/design/rds

ripdpi-design

Verified

Use this skill to generate well-branded interfaces and assets for RIPDPI (an Android-native, Compose-first VPN and DPI-bypass app), either for production or throwaway prototypes/mocks/etc. Contains essential design guidelines, colors, type, fonts, brand-ship icons, and an interactive UI kit of every public composable from the live ui/components tree.

FileKindSize
COVERAGE.mdmarkdown23.0 KB
README.mdmarkdown19.6 KB
SKILL.mdskill md4.0 KB
assets/ic_launcher.pngbinary9.7 KB
assets/ic_launcher.svgother3.0 KB
assets/icons/ic_article_outline.svgother315 B
assets/icons/ic_launcher_foreground_ripdpi_clean.svgother3.0 KB
assets/icons/ic_launcher_foreground_ripdpi_cracked.svgother6.6 KB
assets/icons/ic_launcher_foreground_ripdpi_disintegrate.svgother9.5 KB
assets/icons/ic_launcher_foreground_ripdpi_glitch.svgother8.4 KB
assets/icons/ic_launcher_foreground_ripdpi_rubble.svgother7.8 KB
assets/icons/ic_launcher_foreground_ripdpi_stitch.svgother13.3 KB
assets/icons/ic_launcher_monochrome_ripdpi.svgother3.0 KB
assets/icons/ic_notification.svgother270 B
assets/icons/ic_settings_outline.svgother1.0 KB
assets/icons/ic_stop_outline.svgother153 B
assets/icons/ic_tune_outline.svgother244 B
assets/icons/ic_vpn_key_outline.svgother296 B
assets/icons/ripdpi_wordmark.svgother34.6 KB
assets/raw/ic_article_outline.xmlconfig552 B
assets/raw/ic_launcher_foreground_ripdpi_clean.xmlconfig3.4 KB
assets/raw/ic_launcher_foreground_ripdpi_cracked.xmlconfig7.0 KB
assets/raw/ic_launcher_foreground_ripdpi_disintegrate.xmlconfig10.1 KB
assets/raw/ic_launcher_foreground_ripdpi_glitch.xmlconfig8.7 KB
assets/raw/ic_launcher_foreground_ripdpi_rubble.xmlconfig8.4 KB
assets/raw/ic_launcher_foreground_ripdpi_stitch.xmlconfig13.5 KB
assets/raw/ic_launcher_monochrome_ripdpi.xmlconfig3.4 KB
assets/raw/ic_notification.xmlconfig3.4 KB
assets/raw/ic_settings_outline.xmlconfig1.2 KB
assets/raw/ic_stop_outline.xmlconfig338 B
assets/raw/ic_tune_outline.xmlconfig429 B
assets/raw/ic_vpn_key_outline.xmlconfig481 B
colors_and_type.cssother12.2 KB
diagnostic-reports-index.htmlother4.8 KB
fonts/geist_mono_bold.ttfbinary146.8 KB
fonts/geist_mono_medium.ttfbinary145.7 KB
fonts/geist_mono_regular.ttfbinary144.9 KB
fonts/geist_sans_bold.ttfbinary125.7 KB
fonts/geist_sans_medium.ttfbinary124.6 KB
fonts/geist_sans_regular.ttfbinary123.0 KB
mobile-diagnostic-report.htmlother12.0 KB
mobile-elements-showcase.htmlother19.3 KB
mobile-vpn-connection.htmlother12.2 KB
preview/a11y-color-contrast.htmlother8.3 KB
preview/a11y-focus-rings.htmlother6.5 KB
preview/android-crash-screen.htmlother2.3 KB
preview/android-customization.htmlother3.0 KB
preview/android-glance-widget.htmlother4.0 KB
preview/android-history.htmlother2.3 KB
preview/android-nav-bar.htmlother1.6 KB
preview/android-nav-rail.htmlother3.2 KB
preview/android-notif-foreground.htmlother3.4 KB
preview/android-notif-heads-up.htmlother2.5 KB
preview/android-notif-lock-screen.htmlother2.3 KB
preview/android-permission-rationale.htmlother3.0 KB
preview/android-qs-tile.htmlother2.3 KB
preview/android-scanner.htmlother1.9 KB
preview/android-splash.htmlother1.4 KB
preview/android-split-columns.htmlother2.1 KB
preview/android-status-bar.htmlother2.9 KB
preview/android-vpn-permission.htmlother2.0 KB
preview/brand-launcher-variants.htmlother4.7 KB
preview/brand-mark.htmlother3.4 KB
preview/color-anchors.htmlother2.0 KB
preview/color-destructive.htmlother1.9 KB
preview/color-edges.htmlother3.4 KB
preview/color-info.htmlother1.8 KB
preview/color-neutrals.htmlother3.3 KB
preview/color-restricted.htmlother1.9 KB
preview/color-success.htmlother1.8 KB
preview/color-warning.htmlother1.8 KB
preview/components-accordion.htmlother6.2 KB
preview/components-actuator-states.htmlother8.8 KB
preview/components-actuator.htmlother6.6 KB
preview/components-analysis-progress.htmlother2.1 KB
preview/components-bottom-nav.htmlother2.1 KB
preview/components-bottom-sheet.htmlother2.0 KB
preview/components-brand-badge.htmlother2.6 KB
preview/components-buttons.htmlother2.5 KB
preview/components-card.htmlother2.1 KB
preview/components-chips.htmlother1.6 KB
preview/components-cidr-input.htmlother5.0 KB
preview/components-combobox.htmlother6.8 KB
preview/components-command-palette.htmlother7.3 KB
preview/components-dialog.htmlother2.1 KB
preview/components-diff-viewer.htmlother6.6 KB
preview/components-dropdown.htmlother2.6 KB
preview/components-empty-state.htmlother1.5 KB
preview/components-filter-bar.htmlother5.9 KB
preview/components-heartbeat-indicator.htmlother6.4 KB
preview/components-icon-buttons.htmlother3.9 KB
preview/components-json-tree.htmlother7.7 KB
preview/components-kbd-shortcut.htmlother4.2 KB
preview/components-live-counter.htmlother7.3 KB
preview/components-log-row.htmlother2.5 KB
preview/components-log-stream.htmlother7.5 KB
preview/components-metric-pill.htmlother1.7 KB
preview/components-page-indicators.htmlother1.4 KB
preview/components-preset-card.htmlother2.0 KB
preview/components-progress-bar.htmlother4.8 KB
preview/components-section-header.htmlother1.7 KB
preview/components-segmented.htmlother4.3 KB
preview/components-settings-row.htmlother2.0 KB
preview/components-shimmer.htmlother3.9 KB
preview/components-slider.htmlother6.6 KB
preview/components-snackbar.htmlother3.0 KB
preview/components-spinner.htmlother1.8 KB
preview/components-stage-progress.htmlother1.9 KB
preview/components-stale-data-badge.htmlother5.8 KB
preview/components-status-indicator.htmlother1.9 KB
preview/components-stepper.htmlother7.0 KB
preview/components-switch.htmlother1.8 KB
preview/components-tabs.htmlother4.6 KB
preview/components-text-action.htmlother2.2 KB
preview/components-text-field.htmlother1.8 KB
preview/components-toggle-alternatives.htmlother2.4 KB
preview/components-tooltip.htmlother2.0 KB
preview/components-top-app-bar.htmlother2.3 KB
preview/components-warning-banner.htmlother3.1 KB
preview/diagnostic-censorship-signature.htmlother8.1 KB
preview/diagnostic-dns-resolvers.htmlother10.1 KB
preview/diagnostic-hop-trace.htmlother7.1 KB
preview/diagnostic-mtu-scan.htmlother7.4 KB
preview/diagnostic-port-matrix.htmlother7.5 KB
preview/diagnostic-report-summary.htmlother5.2 KB
preview/gesture-long-press-menu.htmlother6.9 KB
preview/gesture-pull-to-refresh.htmlother8.5 KB
preview/gesture-swipe-actions.htmlother7.4 KB
preview/icon-set.htmlother2.9 KB
preview/motion-connection-states.htmlother7.5 KB
preview/motion-data-ticker.htmlother5.5 KB
preview/motion-easing-curves.htmlother4.6 KB
preview/motion-page-transitions.htmlother6.0 KB
preview/motion-probe-pulse.htmlother5.4 KB
preview/motion-reduced-motion.htmlother6.7 KB
preview/motion-skeleton-shimmer.htmlother5.8 KB
preview/motion-toast-choreography.htmlother8.4 KB
preview/motion-tokens.htmlother2.8 KB
preview/onboarding-coach-mark.htmlother7.6 KB
preview/onboarding-tour-cards.htmlother5.6 KB
preview/preview.cssother1.9 KB
preview/radii.htmlother3.8 KB
preview/share-bottom-sheet.htmlother5.6 KB
preview/share-link-preview.htmlother5.1 KB
preview/share-qr-code.htmlother5.2 KB
preview/share-result-viewer.htmlother3.5 KB
preview/share-stats-card.htmlother3.5 KB
preview/spacing-scale.htmlother3.6 KB
preview/strokes.htmlother1.3 KB
preview/touch-targets.htmlother1.9 KB
preview/type-body.htmlother1.4 KB
preview/type-brand.htmlother1.1 KB
preview/type-display.htmlother1.4 KB
preview/type-mono.htmlother1.4 KB
preview/type-section-title.htmlother1.3 KB
preview/vpn-awg-editor.htmlother12.6 KB
preview/vpn-block-check.htmlother3.5 KB
preview/vpn-confirm-disconnect.htmlother2.4 KB
preview/vpn-data-transparency.htmlother3.9 KB
preview/vpn-degradation-strip.htmlother5.5 KB
preview/vpn-detection-check.htmlother3.7 KB
preview/vpn-dns-picker.htmlother3.4 KB
preview/vpn-export-consent.htmlother3.6 KB
preview/vpn-first-run-test.htmlother5.1 KB
preview/vpn-handshake-timeline.htmlother9.7 KB
preview/vpn-identity-card.htmlother2.8 KB
preview/vpn-in-app-browser.htmlother3.9 KB
preview/vpn-kill-switch.htmlother3.7 KB
preview/vpn-latency-graph.htmlother2.9 KB
preview/vpn-network-change.htmlother2.9 KB
preview/vpn-oom-recovery.htmlother2.4 KB
preview/vpn-pcap-viewer.htmlother3.1 KB
preview/vpn-per-app-routing.htmlother3.9 KB
preview/vpn-permission-summary.htmlother3.4 KB
preview/vpn-presets-gallery.htmlother3.3 KB
preview/vpn-probe-live.htmlother3.0 KB
preview/vpn-profile-switcher.htmlother2.9 KB
preview/vpn-quick-vs-advanced.htmlother3.0 KB
preview/vpn-reconnect-toast.htmlother5.9 KB
preview/vpn-relay-picker.htmlother4.0 KB
preview/vpn-replay-failure.htmlother3.6 KB
preview/vpn-session-card.htmlother7.2 KB
preview/vpn-snooze.htmlother2.9 KB
preview/vpn-state-history.htmlother9.2 KB
preview/vpn-state-machine.htmlother11.4 KB
preview/vpn-strategy-ab.htmlother5.0 KB
preview/vpn-strategy-editor.htmlother4.2 KB
preview/vpn-strategy-import.htmlother3.6 KB
preview/vpn-strategy-probe-wizard.htmlother3.8 KB
preview/vpn-throughput-graph.htmlother3.5 KB
preview/whats-new-card.htmlother6.1 KB
ui_kits/android/MobileDiagnosticReport.jsxother33.4 KB
ui_kits/android/MobileElements.jsxother34.1 KB
ui_kits/android/MobileVpnConnection.jsxother36.6 KB
ui_kits/android/README.mdmarkdown3.5 KB
ui_kits/android/RipDpiComponents.jsxother27.1 KB
ui_kits/android/RipDpiScreens.jsxother17.7 KB
ui_kits/android/android-frame.jsxother9.2 KB
ui_kits/android/index.htmlother14.2 KB

ui_kits/android/MobileDiagnosticReport.jsx

View on GitHub
/* ui_kits/android/MobileDiagnosticReport.jsx
   Mobile adoption of the 6 RIPDPI diagnostic-report preview elements.
   Composed entirely out of existing RipDpi kit primitives (RipDpiCard,
   MetricPill, StatusIndicator, RipDpiChip, RipDpiButton, SectionHeader,
   Hairline, WarningBanner) plus a handful of view-specific bits.

   Source elements:
     preview/diagnostic-report-summary.html
     preview/diagnostic-hop-trace.html
     preview/diagnostic-mtu-scan.html
     preview/diagnostic-port-matrix.html
     preview/diagnostic-censorship-signature.html
     preview/diagnostic-dns-resolvers.html
*/

// ─────────────────────────────────────────────────────────────
// 1. Report summary
// ─────────────────────────────────────────────────────────────
function MobileReportSummary({ onFindStrategy, onExport }) {
  const { c } = useTheme();
  const kpis = [
    { k: 'RTT p50',       v: '32 ms',   delta: '+8 ms vs baseline', dir: 'up'   },
    { k: 'Loss',          v: '4.1%',    delta: '+3.2 pp',           dir: 'up',   tone: 'warn' },
    { k: 'Path MTU',      v: '1380',    delta: '−120 from link',    dir: 'flat' },
    { k: 'Exit ASN',      v: 'AS13335', delta: 'Cloudflare · NL',   dir: 'flat' },
    { k: 'DPI signature', v: 'SNI',     delta: '2 of 4 stages',     dir: 'up',   tone: 'bad'  },
    { k: 'Leaks',         v: '3 / 5',   delta: 'IPv6, TZ, ASN',     dir: 'up',   tone: 'warn' },
  ];
  return (
    <RipDpiCard variant="status">
      <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'flex-start', gap: 12 }}>
        <div style={{ display: 'flex', flexDirection: 'column', gap: 4, minWidth: 0 }}>
          <div style={{ font: `400 11px/14px ${RDP.type.mono}`, letterSpacing: 0.4, textTransform: 'uppercase', color: c.mutedForeground }}>
            Scan · 18:42 UTC · #4f7a
          </div>
          <div style={{ font: `500 22px/28px ${RDP.type.sans}`, color: c.foreground }}>
            Network somewhat restricted
          </div>
          <div style={{ font: `400 12px/16px ${RDP.type.mono}`, color: c.mutedForeground }}>
            Wi-Fi · AS12389 · MOW
          </div>
        </div>
        <MetricPill tone="warning"
          icon={<span style={{ display:'inline-block', width:0,height:0,borderLeft:'4px solid transparent',borderRight:'4px solid transparent',borderBottom:'7px solid currentColor' }}/>}
          label="WARNING"
        />
      </div>

      <div style={{
        marginTop: 8,
        display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 0,
        background: c.card, border: `0.5px solid ${c.divider}`, borderRadius: RDP.radius.md,
        overflow: 'hidden',
      }}>
        {kpis.map((k, i) => {
          const rightEdge = i % 2 === 1;
          const bottomEdge = i >= 4;
          const tone = k.tone === 'bad' ? c.destructive : k.tone === 'warn' ? c.warning : c.foreground;
          const deltaColor = k.dir === 'up' && k.tone ? (k.tone === 'bad' ? c.destructive : c.warning) : c.mutedForeground;
          return (
            <div key={k.k} style={{
              padding: '10px 12px',
              borderRight: rightEdge ? 'none' : `0.5px solid ${c.divider}`,
              borderBottom: bottomEdge ? 'none' : `0.5px solid ${c.divider}`,
              background: c.card,
            }}>
              <div style={{ font: `400 10px/14px ${RDP.type.mono}`, letterSpacing: 0.5, textTransform: 'uppercase', color: c.mutedForeground }}>{k.k}</div>
              <div style={{ font: `500 16px/20px ${RDP.type.mono}`, color: tone, fontVariantNumeric: 'tabular-nums', marginTop: 2 }}>{k.v}</div>
              <div style={{ font: `400 10px/14px ${RDP.type.mono}`, color: deltaColor, marginTop: 2 }}>{k.delta}</div>
            </div>
          );
        })}
      </div>

      <div style={{ display: 'flex', gap: 6, alignItems: 'center', marginTop: 4, flexWrap: 'wrap' }}>
        <span style={{ font: `400 11px/14px ${RDP.type.mono}`, letterSpacing: 0.4, textTransform: 'uppercase', color: c.mutedForeground, marginRight: 2 }}>Stages</span>
        <MetricPill label="DNS" tone="success" />
        <MetricPill label="TCP" tone="success" />
        <MetricPill label="TLS" tone="danger" />
        <MetricPill label="QUIC" tone="warning" />
      </div>

      <div style={{ display: 'flex', gap: 8, marginTop: 8 }}>
        <RipDpiButton text="Export pcap" variant="outline" onClick={onExport} style={{ flex: 1 }} />
        <RipDpiButton text="Find a strategy" onClick={onFindStrategy} style={{ flex: 1 }} />
      </div>
    </RipDpiCard>
  );
}

// ─────────────────────────────────────────────────────────────
// 2. Hop trace
// ─────────────────────────────────────────────────────────────
function MobileHopTrace() {
  const { c } = useTheme();
  const hops = [
    { i: 1,  ip: '192.168.1.1',    asn: '_gateway · LAN',                     rtt: '1 ms',   bar: 0.02, kind: 'you' },
    { i: 2,  ip: '10.40.12.1',     asn: 'AS12389 · ROSTELECOM',               rtt: '8 ms',   bar: 0.08 },
    { i: 3,  ip: '10.40.0.49',     asn: 'AS12389 · ROSTELECOM',               rtt: '12 ms',  bar: 0.12 },
    { i: 4,  ip: '* * *',          asn: 'No response · 3 probes',             rtt: 'timeout', timeout: true },
    { i: 5,  ip: '87.245.232.182', asn: 'AS12389 · ROSTELECOM',               rtt: '42 ms',  bar: 0.48, warn: true, tag: { text: 'RST injected', tone: 'bad' } },
    { i: 6,  ip: '194.85.41.10',   asn: 'AS3216 · SOVAM',                     rtt: '38 ms',  bar: 0.42 },
    { i: 7,  ip: '213.248.92.121', asn: 'AS1299 · ARELION · STO',             rtt: '58 ms',  bar: 0.62 },
    { i: 8,  ip: '* * *',          asn: 'No response · 3 probes',             rtt: 'timeout', timeout: true },
    { i: 9,  ip: '141.101.65.232', asn: 'AS13335 · CLOUDFLARE',               rtt: '82 ms',  bar: 0.78, tag: { text: 'tunnel-entry', tone: 'info' } },
    { i: 10, ip: '1.1.1.1',        asn: 'AS13335 · CLOUDFLARE · AMS',         rtt: '168 ms', bar: 1.00, kind: 'exit', tag: { text: 'exit', tone: 'ok' } },
  ];
  return (
    <RipDpiCard>
      <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'baseline' }}>
        <span style={{ font: `500 14px/20px ${RDP.type.sans}` }}>Hop trace · 1.1.1.1</span>
        <span style={{ font: `400 11px/14px ${RDP.type.mono}`, color: c.mutedForeground }}>10 hops · <span style={{ color: c.foreground }}>168 ms</span></span>
      </div>

      <div style={{ marginTop: 4 }}>
        {hops.map((h, i) => {
          const isLast = i === hops.length - 1;
          const isFirst = i === 0;
          const rttColor = h.timeout ? c.destructive : h.warn ? c.warning : c.foreground;
          const barColor = h.timeout ? null : h.warn ? c.warning : c.foreground;
          return (
            <div key={h.i} style={{
              display: 'grid', gridTemplateColumns: '24px 1fr auto',
              gap: 10, alignItems: 'center', padding: '8px 0',
              borderTop: isFirst ? 'none' : `0.5px solid ${c.divider}`,
            }}>
              {/* rail */}
              <div style={{ position: 'relative', height: 36, display: 'grid', placeItems: 'center' }}>
                <span style={{ position: 'absolute', left: 11, top: isFirst ? '50%' : 0, bottom: isLast ? '50%' : 0, width: 2, background: c.outlineVariant }}/>
                {h.kind === 'you' ? (
                  <span style={{ position: 'relative', zIndex: 1, width: 12, height: 12, borderRadius: 9999, background: c.card, border: `2px solid ${c.foreground}`, boxShadow: `0 0 0 2px ${c.card}` }}/>
                ) : h.kind === 'exit' ? (
                  <span style={{ position: 'relative', zIndex: 1, width: 11, height: 11, background: c.foreground, transform: 'rotate(45deg)', borderRadius: 2, boxShadow: `0 0 0 2px ${c.card}` }}/>
                ) : (
                  <span style={{ position: 'relative', zIndex: 1, width: 10, height: 10, borderRadius: 9999,
                    background: h.timeout ? c.destructive : h.warn ? c.warning : c.foreground,
                    boxShadow: `0 0 0 2px ${c.card}` }}/>
                )}
              </div>

              {/* who */}
              <div style={{ display: 'flex', flexDirection: 'column', gap: 2, minWidth: 0 }}>
                <div style={{ display: 'flex', alignItems: 'center', gap: 8, font: `400 13px/16px ${RDP.type.mono}`,
                              color: h.timeout ? c.mutedForeground : c.foreground }}>
                  <span style={{ color: c.mutedForeground, fontSize: 10, minWidth: 14 }}>{String(h.i).padStart(2,'0')}</span>
                  <span style={{ overflow:'hidden', textOverflow:'ellipsis', whiteSpace:'nowrap' }}>{h.ip}</span>
                </div>
                <div style={{ font: `400 10.5px/14px ${RDP.type.mono}`, color: c.mutedForeground, marginLeft: 22, overflow:'hidden', textOverflow:'ellipsis', whiteSpace:'nowrap' }}>
                  {h.asn}
                </div>
                {h.tag && (
                  <div style={{ marginLeft: 22, marginTop: 2 }}>
                    <span style={{
                      display: 'inline-block',
                      font: `400 9.5px/12px ${RDP.type.mono}`, letterSpacing: 0.3,
                      padding: '1px 6px', borderRadius: 3,
                      background: h.tag.tone === 'bad' ? c.destructiveContainer : h.tag.tone === 'info' ? c.infoContainer : c.successContainer,
                      color: h.tag.tone === 'bad' ? c.destructive : h.tag.tone === 'info' ? c.info : c.success,
                    }}>{h.tag.text}</span>
                  </div>
                )}
              </div>

              {/* rtt + bar */}
              <div style={{ display: 'flex', flexDirection: 'column', alignItems: 'flex-end', gap: 4, minWidth: 60 }}>
                <span style={{ font: `500 12px/14px ${RDP.type.mono}`, color: rttColor, fontVariantNumeric: 'tabular-nums' }}>{h.rtt}</span>
                <span style={{ width: 60, height: 4, background: h.timeout ? 'transparent' : c.muted, borderRadius: 2, overflow: 'hidden',
                              backgroundImage: h.timeout ? `repeating-linear-gradient(135deg, ${c.destructiveContainer} 0 4px, transparent 4px 8px)` : 'none' }}>
                  {!h.timeout && (
                    <span style={{ display: 'block', height: '100%', width: `${h.bar * 100}%`, background: barColor, borderRadius: 2 }}/>
                  )}
                </span>
              </div>
            </div>
          );
        })}
      </div>
    </RipDpiCard>
  );
}

// ─────────────────────────────────────────────────────────────
// 3. Path-MTU scan
// ─────────────────────────────────────────────────────────────
function MobileMtuScan() {
  const { c } = useTheme();
  const gatePct = 87.0; // (1380 - 576) / (1500 - 576)
  const rows = [
    { i: 1, size: 1500, frag: 'DF',   echo: 'no echo · ICMP frag-needed at 7', stat: 'Too big', tone: 'bad' },
    { i: 2, size: 1400, frag: 'DF',   echo: 'no echo · timeout 800 ms',        stat: 'Too big', tone: 'bad' },
    { i: 3, size: 1380, frag: 'DF',   echo: 'echo 38 ms',                      stat: 'OK · gate', tone: 'ok',  gate: true },
    { i: 4, size: 1280, frag: 'DF',   echo: 'echo 36 ms',                      stat: 'OK',       tone: 'ok' },
    { i: 5, size: 1500, frag: 'FRAG', echo: 'echo 41 ms · split 2 fragments',  stat: 'Frag OK',  tone: 'warn' },
  ];
  return (
    <RipDpiCard>
      <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'flex-end' }}>
        <div>
          <div style={{ font: `500 14px/20px ${RDP.type.sans}` }}>Path-MTU scan</div>
          <div style={{ font: `400 11px/14px ${RDP.type.mono}`, color: c.mutedForeground, marginTop: 2 }}>cloudflare-dns.com · DF set</div>
        </div>
        <div style={{ textAlign: 'right' }}>
          <div style={{ font: `500 26px/28px ${RDP.type.mono}`, fontVariantNumeric: 'tabular-nums' }}>1380<span style={{ font: `400 11px/14px ${RDP.type.mono}`, color: c.mutedForeground, marginLeft: 4 }}>b</span></div>
          <div style={{ font: `400 9.5px/12px ${RDP.type.mono}`, letterSpacing: 0.4, textTransform: 'uppercase', color: c.mutedForeground, marginTop: 2 }}>Effective MTU</div>
        </div>
      </div>

      {/* Scale */}
      <div style={{ position: 'relative', margin: '24px 4px 30px' }}>
        <div style={{ position: 'relative' }}>
          {/* Pin */}
          <div style={{ position: 'absolute', bottom: 'calc(100% + 6px)', left: `${gatePct}%`, transform: 'translateX(-50%)',
                        font: `500 10px/1 ${RDP.type.mono}`, color: c.background, background: c.foreground,
                        padding: '2px 7px', borderRadius: 4, whiteSpace: 'nowrap', fontVariantNumeric: 'tabular-nums' }}>
            1380 b
            <span style={{ position: 'absolute', left: '50%', top: '100%', transform: 'translateX(-50%)',
                           width: 0, height: 0, borderLeft: '3px solid transparent', borderRight: '3px solid transparent', borderTop: `4px solid ${c.foreground}` }}/>
          </div>

          {/* Track */}
          <div style={{ height: 10, borderRadius: 3, background: c.muted, position: 'relative', overflow: 'hidden' }}>
            <span style={{ position: 'absolute', left: 0, top: 0, bottom: 0, width: `${gatePct}%`, background: c.foreground }}/>
            <span style={{ position: 'absolute', left: `${gatePct}%`, right: 0, top: 0, bottom: 0,
                           background: `repeating-linear-gradient(135deg, ${c.destructiveContainer} 0 4px, transparent 4px 8px)` }}/>
          </div>
          {/* Gate marker */}
          <span style={{ position: 'absolute', top: -4, bottom: -4, left: `${gatePct}%`, width: 2, background: c.foreground }}/>

          {/* Ticks */}
          <div style={{ position: 'absolute', left: 0, right: 0, top: 'calc(100% + 8px)', height: 14 }}>
            {[
              { p: 0,    n: '576'  },
              { p: 45.9, n: '1000' },
              { p: 76.2, n: '1280' },
              { p: 100,  n: '1500' },
            ].map(t => (
              <span key={t.p} style={{ position: 'absolute', left: `${t.p}%`, transform: 'translateX(-50%)',
                                       font: `400 9.5px/12px ${RDP.type.mono}`, color: c.mutedForeground, fontVariantNumeric: 'tabular-nums' }}>
                <span style={{ position: 'absolute', left: '50%', top: -6, transform: 'translateX(-50%)', width: 1, height: 4, background: c.outlineVariant }}/>
                {t.n}
              </span>
            ))}
          </div>
          <div style={{ position: 'absolute', left: 0, right: 0, top: 'calc(100% + 24px)', height: 12 }}>
            <span style={{ position: 'absolute', left: 0, font: `400 9px/12px ${RDP.type.mono}`, letterSpacing: 0.4, textTransform: 'uppercase', color: c.mutedForeground }}>Pass</span>
            <span style={{ position: 'absolute', right: 0, font: `400 9px/12px ${RDP.type.mono}`, letterSpacing: 0.4, textTransform: 'uppercase', color: c.destructive }}>Drop</span>
          </div>
        </div>
      </div>

      {/* Ladder */}
      <div style={{ marginTop: 8 }}>
        {rows.map((r, i) => {
          const isGate = r.gate;
          const fragBg = r.frag === 'FRAG' ? c.warningContainer : c.accent;
          const fragFg = r.frag === 'FRAG' ? c.warning : c.mutedForeground;
          const statColor = r.tone === 'ok' ? c.success : r.tone === 'bad' ? c.destructive : c.warning;
          return (
            <div key={i} style={{
              display: 'grid', gridTemplateColumns: '18px 50px 38px 1fr auto',
              gap: 8, alignItems: 'center', padding: '7px 8px',
              borderTop: i === 0 ? 'none' : `0.5px solid ${c.divider}`,
              background: isGate ? c.muted : 'transparent',
              borderRadius: isGate ? 6 : 0,
              margin: isGate ? '0 -8px' : 0,
              paddingLeft: isGate ? 16 : 8, paddingRight: isGate ? 16 : 8,
            }}>
              <span style={{ font: `400 10.5px/14px ${RDP.type.mono}`, color: c.mutedForeground, textAlign: 'right' }}>{r.i}</span>
              <span style={{ font: `500 13px/16px ${RDP.type.mono}`, fontVariantNumeric: 'tabular-nums' }}>{r.size}</span>
              <span style={{ font: `400 9px/12px ${RDP.type.mono}`, letterSpacing: 0.3, padding: '1px 5px', borderRadius: 3, background: fragBg, color: fragFg, textAlign: 'center' }}>{r.frag}</span>
              <span style={{ font: `400 10.5px/14px ${RDP.type.mono}`, color: c.mutedForeground, overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}>{r.echo}</span>
              <span style={{ font: `400 10px/12px ${RDP.type.mono}`, letterSpacing: 0.4, textTransform: 'uppercase', color: statColor }}>{r.stat}</span>
            </div>
          );
        })}
      </div>
    </RipDpiCard>
  );
}

// ─────────────────────────────────────────────────────────────
// 4. Port matrix — mobile recomposition: per-target accordion-style rows
// ─────────────────────────────────────────────────────────────
function MobilePortMatrix() {
  const { c } = useTheme();
  const targets = [
    { name: '1.1.1.1',         asn: 'AS13335 · TCP', ports: [
      { p: 22,   v: '—',  tone: 'bad' },
      { p: 53,   v: '8',  tone: 'ok' },
      { p: 80,   v: '12', tone: 'ok' },
      { p: 443,  v: '14', tone: 'ok' },
      { p: 853,  v: '18', tone: 'ok' },
      { p: 8443, v: '22', tone: 'ok' },
    ]},
    { name: '8.8.8.8',         asn: 'AS15169 · TCP', ports: [
      { p: 22,   v: '—',   tone: 'bad' },
      { p: 53,   v: '11',  tone: 'ok' },
      { p: 80,   v: '14',  tone: 'ok' },
      { p: 443,  v: '280', tone: 'warn' },
      { p: 853,  v: '22',  tone: 'ok' },
      { p: 8443, v: '24',  tone: 'ok' },
    ]},
    { name: '9.9.9.9',         asn: 'AS19281 · TCP', ports: [
      { p: 22,   v: '—',   tone: 'bad' },
      { p: 53,   v: '18',  tone: 'ok' },
      { p: 80,   v: '22',  tone: 'ok' },
      { p: 443,  v: '—',   tone: 'bad' },
      { p: 853,  v: '412', tone: 'warn' },
      { p: 8443, v: '—',   tone: 'bad' },
    ]},
    { name: 'smtp.fastmail',   asn: 'AS49224 · TCP', ports: [
      { p: 80,   v: '58', tone: 'ok' },
      { p: 143,  v: '88', tone: 'ok' },
      { p: 443,  v: '72', tone: 'ok' },
      { p: 465,  v: '68', tone: 'ok' },
      { p: 587,  v: '68', tone: 'ok' },
      { p: 993,  v: '82', tone: 'ok' },
    ]},
    { name: 'tunnel.relay',    asn: 'AS13335 · UDP', ports: [
      { p: 53,   v: '38', tone: 'ok' },
      { p: 123,  v: '42', tone: 'ok' },
      { p: 443,  v: '42', tone: 'ok' },
      { p: 1194, v: '—',  tone: 'bad' },
    ]},
  ];
  const fill = (tone) => tone === 'ok' ? c.success : tone === 'warn' ? c.warning : tone === 'bad' ? c.destructive : c.muted;

  return (
    <RipDpiCard>
      <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
        <span style={{ font: `500 14px/20px ${RDP.type.sans}` }}>Port reachability</span>
        <span style={{ display: 'inline-flex', gap: 10, font: `400 9.5px/12px ${RDP.type.mono}`, letterSpacing: 0.3, textTransform: 'uppercase', color: c.mutedForeground }}>
          {[
            ['Open',    c.success],
            ['Slow',    c.warning],
            ['Blocked', c.destructive],
          ].map(([lab, col]) => (
            <span key={lab} style={{ display: 'inline-flex', alignItems: 'center', gap: 4 }}>
              <span style={{ width: 8, height: 8, borderRadius: 2, background: col }}/>{lab}
            </span>
          ))}
        </span>
      </div>

      <div style={{ marginTop: 4 }}>
        {targets.map((t, ti) => (
          <div key={t.name} style={{ padding: '12px 0', borderTop: ti === 0 ? 'none' : `0.5px solid ${c.divider}` }}>
            <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'baseline' }}>
              <span style={{ font: `500 13px/16px ${RDP.type.mono}`, color: c.foreground }}>{t.name}</span>
              <span style={{ font: `400 10.5px/14px ${RDP.type.mono}`, color: c.mutedForeground }}>{t.asn}</span>
            </div>
            <div style={{ display: 'grid', gridTemplateColumns: 'repeat(6, 1fr)', gap: 6, marginTop: 8 }}>
              {t.ports.map(p => (
                <div key={p.p} style={{
                  borderRadius: 6,
                  padding: '8px 4px',
                  background: fill(p.tone),
                  color: '#fff',
                  display: 'flex', flexDirection: 'column', alignItems: 'center', gap: 2,
                  minHeight: 44,
                }}>
                  <span style={{ font: `400 10px/12px ${RDP.type.mono}`, opacity: 0.85 }}>:{p.p}</span>
                  <span style={{ font: `500 13px/14px ${RDP.type.mono}`, fontVariantNumeric: 'tabular-nums' }}>{p.v}{p.v !== '—' ? <span style={{ font: `400 9px/10px ${RDP.type.mono}`, opacity: 0.7, marginLeft: 2 }}>ms</span> : null}</span>
                </div>
              ))}
            </div>
          </div>
        ))}
      </div>

      {/* Summary */}
      <div style={{ display: 'grid', gridTemplateColumns: 'repeat(3, 1fr)', gap: 8, marginTop: 12, paddingTop: 12, borderTop: `0.5px solid ${c.divider}` }}>
        {[
          ['Open',    '22 / 28', c.success],
          ['Slow',    '2',       c.warning],
          ['Blocked', '4',       c.destructive],
        ].map(([k, v, col]) => (
          <div key={k} style={{ background: c.muted, padding: '8px 10px', borderRadius: 8 }}>
            <div style={{ font: `400 9.5px/12px ${RDP.type.mono}`, letterSpacing: 0.4, textTransform: 'uppercase', color: c.mutedForeground }}>{k}</div>
            <div style={{ font: `500 15px/18px ${RDP.type.mono}`, color: col, fontVariantNumeric: 'tabular-nums', marginTop: 3 }}>{v}</div>
          </div>
        ))}
      </div>
    </RipDpiCard>
  );
}

// ─────────────────────────────────────────────────────────────
// 5. Censorship signatures
// ─────────────────────────────────────────────────────────────
function MobileSignatures() {
  const { c } = useTheme();
  const sigs = [
    {
      icon: 'SNI', tone: 'bad', name: 'SNI-based blocking', code: 'tls.sni', conf: 0.94,
      desc: 'ClientHello with the target SNI is dropped silently. The same target completes when SNI is rewritten.',
      evidence: [
        { ts: '0.247s', msg: 'tls.client_hello sni=', em: 'youtube.com', tail: ' → no ServerHello (3 attempts)' },
        { ts: '0.812s', msg: 'tls.client_hello sni=', em: 'echo.local',  tail: ' · same 5-tuple → ServerHello 88 ms' },
      ],
    },
    {
      icon: 'RST', tone: 'bad', name: 'TCP reset injection', code: 'tcp.rst', conf: 0.97,
      desc: 'RST arrives before the upstream could have responded. TTL mismatch points to a middlebox between hop 4 and hop 5.',
    },
    {
      icon: 'DNS', tone: 'bad', name: 'DNS response forgery', code: 'dns.poison', conf: 0.91,
      desc: 'Plain-UDP DNS returns an answer that differs from DoH and DoT for the same name.',
    },
    {
      icon: 'QoS', tone: 'warn', name: 'QUIC throttling', code: 'udp.qos', conf: 0.62,
      desc: 'UDP/443 throughput collapses to ≈64 KiB/s after first 2 MiB; TCP/443 to the same host sustains.',
    },
    {
      icon: 'ECH', tone: 'ok', name: 'Encrypted ClientHello accepted', code: 'tls.ech', conf: 0.88,
      desc: 'ECH-wrapped handshake reaches origin; outer SNI is rewritten on path but does not affect the inner handshake.',
    },
  ];
  return (
    <div style={{ display: 'flex', flexDirection: 'column', gap: 12 }}>
      <SectionHeader>Interference signatures · 3 high-confidence</SectionHeader>
      {sigs.map(s => {
        const accent = s.tone === 'bad' ? c.destructive : s.tone === 'warn' ? c.warning : c.success;
        const accentBg = s.tone === 'bad' ? c.destructiveContainer : s.tone === 'warn' ? c.warningContainer : c.successContainer;
        return (
          <RipDpiCard key={s.code}>
            <div style={{ display: 'flex', gap: 12, alignItems: 'flex-start' }}>
              <span style={{ width: 32, height: 32, borderRadius: 6, background: accentBg, color: accent,
                             display: 'grid', placeItems: 'center', font: `500 10.5px/1 ${RDP.type.mono}`, letterSpacing: 0.4, flexShrink: 0 }}>
                {s.icon}
              </span>
              <div style={{ flex: 1, minWidth: 0 }}>
                <div style={{ display: 'flex', alignItems: 'center', gap: 6, flexWrap: 'wrap' }}>
                  <span style={{ font: `500 14px/18px ${RDP.type.sans}` }}>{s.name}</span>
                  <span style={{ font: `400 10px/14px ${RDP.type.mono}`, padding: '1px 6px', borderRadius: 3, background: c.muted, color: c.mutedForeground }}>{s.code}</span>
                </div>
                <div style={{ display: 'flex', alignItems: 'center', gap: 8, marginTop: 6 }}>
                  <span style={{ font: `500 14px/18px ${RDP.type.mono}`, color: accent, fontVariantNumeric: 'tabular-nums' }}>{s.conf.toFixed(2)}</span>
                  <span style={{ flex: 1, height: 4, background: c.muted, borderRadius: 2, overflow: 'hidden' }}>
                    <span style={{ display: 'block', height: '100%', width: `${s.conf * 100}%`, background: accent }}/>
                  </span>
                  <span style={{ font: `400 9.5px/12px ${RDP.type.mono}`, letterSpacing: 0.4, textTransform: 'uppercase', color: c.mutedForeground }}>
                    {s.tone === 'ok' ? 'Bypassed' : 'Confidence'}
                  </span>
                </div>
              </div>
            </div>
            <div style={{ font: `400 13px/19px ${RDP.type.sans}`, color: c.mutedForeground }}>{s.desc}</div>
            {s.evidence && (
              <div style={{ padding: '8px 10px', background: c.muted, borderLeft: `2px solid ${accent}`, borderRadius: '0 6px 6px 0' }}>
                {s.evidence.map((e, i) => (
                  <div key={i} style={{ display: 'flex', gap: 8, font: `400 11px/16px ${RDP.type.mono}` }}>
                    <span style={{ color: c.mutedForeground, flexShrink: 0 }}>{e.ts}</span>
                    <span style={{ color: c.foreground, overflow: 'hidden', textOverflow: 'ellipsis' }}>
                      {e.msg}<span style={{ color: c.destructive }}>{e.em}</span>{e.tail}
                    </span>
                  </div>
                ))}
              </div>
            )}
          </RipDpiCard>
        );
      })}
    </div>
  );
}

// ─────────────────────────────────────────────────────────────
// 6. DNS resolvers
// ─────────────────────────────────────────────────────────────
function MobileDnsResolvers() {
  const { c } = useTheme();
  const resolvers = [
    { name: 'cloudflare-dns.com',   addr: '1.1.1.1 · 2606:4700:4700::1111', tx: 'DoH',    txTone: 'info',  rtt: '14 ms',    rttTone: 'ok',   pct: 99.8, pctTone: 'ok',   primary: true,  flags: [{t:'ECH', tone:'info'}, {t:'0-RTT'}], action: 'Probe' },
    { name: 'quad9.net',            addr: '9.9.9.9 · 2620:fe::fe',          tx: 'DoT',    txTone: 'neutral', rtt: '142 ms', rttTone: 'warn', pct: 94.2, pctTone: 'warn',                  flags: [{t:'slow p95', tone:'warn'}, {t:'filter'}], action: 'Probe' },
    { name: 'dns.adguard-dns.com',  addr: '94.140.14.14 · 2a10:50c0::ad1:ff', tx: 'DoQ',  txTone: 'success', rtt: '28 ms',  rttTone: 'ok',   pct: 99.4, pctTone: 'ok',                    flags: [{t:'block-ads'}],                action: 'Probe' },
    { name: 'system',               addr: '192.168.1.1 · ISP-assigned',     tx: 'UDP/53', txTone: 'mono',    rtt: 'timeout',rttTone: 'bad',  pct: 62.1, pctTone: 'bad',                   flags: [{t:'poison', tone:'bad'}, {t:'cleartext', tone:'bad'}], action: 'Probe' },
    { name: 'dns.google',           addr: '8.8.8.8 · 2001:4860:4860::8888', tx: 'DoH',    txTone: 'info',    rtt: '22 ms',  rttTone: 'ok',   pct: 99.6, pctTone: 'ok',                    flags: [{t:'ECH', tone:'info'}],         action: 'Promote', actionPrimary: true },
  ];
  const txStyle = (tone) => {
    if (tone === 'info')    return { bg: c.infoContainer,    fg: c.info };
    if (tone === 'success') return { bg: c.successContainer, fg: c.success };
    if (tone === 'mono')    return { bg: c.muted,            fg: c.mutedForeground };
    return                         { bg: c.accent,           fg: c.foreground };
  };
  const flagStyle = (tone) => {
    if (tone === 'bad')  return { bg: c.destructiveContainer, fg: c.destructive };
    if (tone === 'warn') return { bg: c.warningContainer,     fg: c.warning };
    if (tone === 'info') return { bg: c.infoContainer,        fg: c.info };
    return                      { bg: c.muted,                fg: c.foreground };
  };
  const sentinel = (tone) => tone === 'ok' ? c.success : tone === 'warn' ? c.warning : c.destructive;
  const barFill  = (tone) => tone === 'ok' ? c.success : tone === 'warn' ? c.warning : c.destructive;

  return (
    <div style={{ display: 'flex', flexDirection: 'column', gap: 12 }}>
      <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'baseline' }}>
        <SectionHeader>DNS resolver health · last 5 m</SectionHeader>
        <span style={{ font: `400 11px/14px ${RDP.type.mono}`, color: c.mutedForeground }}><span style={{ color: c.foreground }}>312</span> queries</span>
      </div>

      {resolvers.map(r => {
        const tx = txStyle(r.txTone);
        return (
          <RipDpiCard key={r.name}>
            <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'flex-start', gap: 8 }}>
              <div style={{ display: 'flex', flexDirection: 'column', gap: 3, minWidth: 0, flex: 1 }}>
                <div style={{ display: 'flex', alignItems: 'center', gap: 8 }}>
                  <span style={{ width: 8, height: 8, borderRadius: 9999, background: sentinel(r.rttTone), flexShrink: 0 }}/>
                  <span style={{ font: `500 14px/18px ${RDP.type.sans}`, overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}>{r.name}</span>
                  {r.primary && (
                    <span style={{ font: `400 9px/12px ${RDP.type.mono}`, padding: '1px 5px', borderRadius: 3, background: c.infoContainer, color: c.info, letterSpacing: 0.4, flexShrink: 0 }}>PRIMARY</span>
                  )}
                </div>
                <div style={{ font: `400 10.5px/14px ${RDP.type.mono}`, color: c.mutedForeground, overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}>{r.addr}</div>
              </div>
              <span style={{ font: `400 10px/12px ${RDP.type.mono}`, letterSpacing: 0.4, textTransform: 'uppercase', padding: '3px 7px', borderRadius: 3, background: tx.bg, color: tx.fg, flexShrink: 0 }}>{r.tx}</span>
            </div>

            <div style={{ display: 'grid', gridTemplateColumns: 'auto 1fr auto', gap: 10, alignItems: 'center', marginTop: 6 }}>
              <span style={{ font: `500 13px/16px ${RDP.type.mono}`, color: r.rttTone === 'ok' ? c.foreground : r.rttTone === 'warn' ? c.warning : c.destructive, fontVariantNumeric: 'tabular-nums', minWidth: 56 }}>{r.rtt}</span>
              <span style={{ height: 6, background: c.muted, borderRadius: 3, overflow: 'hidden' }}>
                <span style={{ display: 'block', height: '100%', width: `${r.pct}%`, background: barFill(r.pctTone), borderRadius: 3 }}/>
              </span>
              <span style={{ font: `500 12px/14px ${RDP.type.mono}`, color: r.pctTone === 'ok' ? c.foreground : r.pctTone === 'warn' ? c.warning : c.destructive, fontVariantNumeric: 'tabular-nums', minWidth: 44, textAlign: 'right' }}>{r.pct}%</span>
            </div>

            <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', gap: 8, marginTop: 4 }}>
              <div style={{ display: 'flex', gap: 4, flexWrap: 'wrap', flex: 1 }}>
                {r.flags.map((f, i) => {
                  const fs = flagStyle(f.tone);
                  return <span key={i} style={{ font: `400 10.5px/14px ${RDP.type.mono}`, padding: '2px 7px', borderRadius: 4, background: fs.bg, color: fs.fg }}>{f.t}</span>;
                })}
              </div>
              <RipDpiButton text={r.action} variant={r.actionPrimary ? 'primary' : 'outline'} style={{ minHeight: 36, padding: '6px 14px', fontSize: 12 }}/>
            </div>
          </RipDpiCard>
        );
      })}

      <WarningBanner
        tone="info"
        title="Promote dns.google as primary"
        message="system is poisoning answers on cleartext UDP/53. Promote dns.google or keep cloudflare-dns.com to remove the leak."
      />
    </div>
  );
}

Object.assign(window, {
  MobileReportSummary, MobileHopTrace, MobileMtuScan,
  MobilePortMatrix, MobileSignatures, MobileDnsResolvers,
});
brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).Stars: 322kUpdated Claude CodeCodexVerifiedInstall
brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).Stars: 198kUpdated Claude CodeCodexVerifiedInstall