mirror of
https://github.com/lissy93/networking-toolbox.git
synced 2026-11-29 16:40:46 +03:00
New pages
This commit is contained in:
1 parent
bf0ff73bf4
commit
ce789cc8bf
25 files changed
+12064
-30
No files matched your search
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,874 @@
|
||||
<script lang="ts">
|
||||
import { tooltip } from '$lib/actions/tooltip.js';
|
||||
import Icon from './Icon.svelte';
|
||||
|
||||
let listA = $state(`192.168.0.0/16
|
||||
10.0.0.0/8
|
||||
172.16.0.0/12`);
|
||||
let listB = $state(`192.168.0.0/16
|
||||
10.0.0.0/8
|
||||
192.168.100.0/24
|
||||
172.16.5.0/24`);
|
||||
let result = $state<{
|
||||
success: boolean;
|
||||
error?: string;
|
||||
added: string[];
|
||||
removed: string[];
|
||||
unchanged: string[];
|
||||
normalizedA: string[];
|
||||
normalizedB: string[];
|
||||
summary: {
|
||||
totalA: number;
|
||||
totalB: number;
|
||||
addedCount: number;
|
||||
removedCount: number;
|
||||
unchangedCount: number;
|
||||
};
|
||||
} | null>(null);
|
||||
let copiedStates = $state<Record<string, boolean>>({});
|
||||
let selectedExample = $state<string | null>(null);
|
||||
let userModified = $state(false);
|
||||
|
||||
const examples = [
|
||||
{
|
||||
label: 'Network Addition',
|
||||
listA: `192.168.1.0/24
|
||||
10.0.0.0/16`,
|
||||
listB: `192.168.1.0/24
|
||||
10.0.0.0/16
|
||||
172.16.0.0/24`,
|
||||
description: 'Added 172.16.0.0/24'
|
||||
},
|
||||
{
|
||||
label: 'Network Removal',
|
||||
listA: `192.168.0.0/16
|
||||
10.0.0.0/8
|
||||
172.16.0.0/12`,
|
||||
listB: `192.168.0.0/16
|
||||
10.0.0.0/8`,
|
||||
description: 'Removed 172.16.0.0/12'
|
||||
},
|
||||
{
|
||||
label: 'Mixed Changes',
|
||||
listA: `192.168.1.0/24
|
||||
10.0.0.0/16
|
||||
172.16.1.0/24`,
|
||||
listB: `192.168.1.0/24
|
||||
10.0.1.0/24
|
||||
172.16.2.0/24`,
|
||||
description: 'Swapped subnets'
|
||||
}
|
||||
];
|
||||
|
||||
function loadExample(example: typeof examples[0]) {
|
||||
listA = example.listA;
|
||||
listB = example.listB;
|
||||
selectedExample = example.label;
|
||||
userModified = false;
|
||||
performComparison();
|
||||
}
|
||||
|
||||
function parseIP(ip: string): number {
|
||||
return ip.split('.').reduce((acc, octet) => (acc << 8) + parseInt(octet), 0) >>> 0;
|
||||
}
|
||||
|
||||
function ipToString(ip: number): string {
|
||||
return [
|
||||
(ip >>> 24) & 0xff,
|
||||
(ip >>> 16) & 0xff,
|
||||
(ip >>> 8) & 0xff,
|
||||
ip & 0xff
|
||||
].join('.');
|
||||
}
|
||||
|
||||
function normalizeCIDR(cidr: string): string {
|
||||
if (!cidr.includes('/')) {
|
||||
// Single IP, convert to /32
|
||||
return `${cidr}/32`;
|
||||
}
|
||||
|
||||
const [ipStr, prefixStr] = cidr.split('/');
|
||||
const prefixLength = parseInt(prefixStr);
|
||||
|
||||
if (prefixLength < 0 || prefixLength > 32) {
|
||||
throw new Error(`Invalid prefix length: /${prefixLength}`);
|
||||
}
|
||||
|
||||
// Calculate network address
|
||||
const ip = parseIP(ipStr);
|
||||
const mask = 0xffffffff << (32 - prefixLength);
|
||||
const networkAddress = ip & mask;
|
||||
|
||||
return `${ipToString(networkAddress)}/${prefixLength}`;
|
||||
}
|
||||
|
||||
function parseAndNormalizeList(input: string): string[] {
|
||||
if (!input.trim()) return [];
|
||||
|
||||
const lines = input.trim().split('\n').filter(line => line.trim());
|
||||
const normalized = new Set<string>();
|
||||
|
||||
for (const line of lines) {
|
||||
const trimmed = line.trim();
|
||||
if (!trimmed) continue;
|
||||
|
||||
try {
|
||||
if (trimmed.includes('-')) {
|
||||
// IP range - convert to CIDR blocks
|
||||
const [startStr, endStr] = trimmed.split('-').map(s => s.trim());
|
||||
const startIP = parseIP(startStr);
|
||||
const endIP = parseIP(endStr);
|
||||
|
||||
if (startIP > endIP) {
|
||||
throw new Error(`Invalid range: start IP is greater than end IP in ${trimmed}`);
|
||||
}
|
||||
|
||||
// Convert range to CIDR blocks (simplified - assumes aligned blocks)
|
||||
let current = startIP;
|
||||
while (current <= endIP) {
|
||||
// Find the largest CIDR block that fits
|
||||
let prefixLength = 32;
|
||||
let blockSize = 1;
|
||||
|
||||
// Find largest power of 2 that fits
|
||||
for (let p = 0; p <= 32; p++) {
|
||||
const size = Math.pow(2, 32 - p);
|
||||
if (current % size === 0 && current + size - 1 <= endIP) {
|
||||
prefixLength = p;
|
||||
blockSize = size;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
normalized.add(`${ipToString(current)}/${prefixLength}`);
|
||||
current += blockSize;
|
||||
}
|
||||
} else if (trimmed.match(/^\d+\.\d+\.\d+\.\d+(\/\d+)?$/)) {
|
||||
// CIDR or single IP
|
||||
normalized.add(normalizeCIDR(trimmed));
|
||||
} else {
|
||||
throw new Error(`Invalid format: ${trimmed}`);
|
||||
}
|
||||
} catch (error) {
|
||||
throw new Error(`Error processing "${trimmed}": ${error instanceof Error ? error.message : 'Unknown error'}`);
|
||||
}
|
||||
}
|
||||
|
||||
// Sort by network address
|
||||
return Array.from(normalized).sort((a, b) => {
|
||||
const aNetwork = parseIP(a.split('/')[0]);
|
||||
const bNetwork = parseIP(b.split('/')[0]);
|
||||
if (aNetwork !== bNetwork) {
|
||||
return aNetwork - bNetwork;
|
||||
}
|
||||
// If same network, sort by prefix length (more specific first)
|
||||
const aPrefix = parseInt(a.split('/')[1]);
|
||||
const bPrefix = parseInt(b.split('/')[1]);
|
||||
return bPrefix - aPrefix;
|
||||
});
|
||||
}
|
||||
|
||||
function performComparison() {
|
||||
try {
|
||||
const normalizedA = parseAndNormalizeList(listA);
|
||||
const normalizedB = parseAndNormalizeList(listB);
|
||||
|
||||
const setA = new Set(normalizedA);
|
||||
const setB = new Set(normalizedB);
|
||||
|
||||
const added = normalizedB.filter(item => !setA.has(item));
|
||||
const removed = normalizedA.filter(item => !setB.has(item));
|
||||
const unchanged = normalizedA.filter(item => setB.has(item));
|
||||
|
||||
result = {
|
||||
success: true,
|
||||
added: added,
|
||||
removed: removed,
|
||||
unchanged: unchanged,
|
||||
normalizedA: normalizedA,
|
||||
normalizedB: normalizedB,
|
||||
summary: {
|
||||
totalA: normalizedA.length,
|
||||
totalB: normalizedB.length,
|
||||
addedCount: added.length,
|
||||
removedCount: removed.length,
|
||||
unchangedCount: unchanged.length
|
||||
}
|
||||
};
|
||||
} catch (error) {
|
||||
result = {
|
||||
success: false,
|
||||
error: error instanceof Error ? error.message : 'Unknown error occurred',
|
||||
added: [],
|
||||
removed: [],
|
||||
unchanged: [],
|
||||
normalizedA: [],
|
||||
normalizedB: [],
|
||||
summary: {
|
||||
totalA: 0,
|
||||
totalB: 0,
|
||||
addedCount: 0,
|
||||
removedCount: 0,
|
||||
unchangedCount: 0
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
function handleInputChange() {
|
||||
userModified = true;
|
||||
selectedExample = null;
|
||||
performComparison();
|
||||
}
|
||||
|
||||
async function copyToClipboard(text: string, id: string) {
|
||||
try {
|
||||
await navigator.clipboard.writeText(text);
|
||||
copiedStates[id] = true;
|
||||
setTimeout(() => {
|
||||
copiedStates[id] = false;
|
||||
}, 2000);
|
||||
} catch (err) {
|
||||
console.error('Failed to copy text: ', err);
|
||||
}
|
||||
}
|
||||
|
||||
async function copyCategory(items: string[], category: string) {
|
||||
if (!items.length) return;
|
||||
|
||||
const text = items.join('\n');
|
||||
await copyToClipboard(text, `category-${category}`);
|
||||
}
|
||||
|
||||
function swapLists() {
|
||||
const temp = listA;
|
||||
listA = listB;
|
||||
listB = temp;
|
||||
userModified = true;
|
||||
selectedExample = null;
|
||||
performComparison();
|
||||
}
|
||||
|
||||
// Calculate on component load
|
||||
performComparison();
|
||||
</script>
|
||||
|
||||
<div class="card">
|
||||
<header class="card-header">
|
||||
<h2>CIDR Compare</h2>
|
||||
<p>Compare two lists of networks to identify changes for auditing</p>
|
||||
</header>
|
||||
|
||||
<!-- Examples -->
|
||||
<section class="examples-section">
|
||||
<h4>Quick Examples</h4>
|
||||
<div class="examples-grid">
|
||||
{#each examples as example}
|
||||
<button
|
||||
class="example-card {selectedExample === example.label ? 'active' : ''}"
|
||||
onclick={() => loadExample(example)}
|
||||
>
|
||||
<div class="example-label">{example.label}</div>
|
||||
<div class="example-preview">{example.description}</div>
|
||||
</button>
|
||||
{/each}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Input Section -->
|
||||
<section class="input-section">
|
||||
<div class="input-header">
|
||||
<h3>Network Lists</h3>
|
||||
<button
|
||||
class="swap-button"
|
||||
onclick={swapLists}
|
||||
use:tooltip={"Swap List A and List B"}
|
||||
>
|
||||
<Icon name="swap" size="sm" />
|
||||
Swap
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="input-grid">
|
||||
<div class="input-group">
|
||||
<label
|
||||
for="list-a"
|
||||
use:tooltip="{"Original or 'before' state - CIDR blocks, IP ranges, or individual IPs"}"
|
||||
>
|
||||
<Icon name="list" size="sm" />
|
||||
List A (Before)
|
||||
</label>
|
||||
<textarea
|
||||
id="list-a"
|
||||
bind:value={listA}
|
||||
oninput={handleInputChange}
|
||||
placeholder="192.168.0.0/16 10.0.0.0/8 172.16.1.0-172.16.1.255"
|
||||
rows="8"
|
||||
></textarea>
|
||||
</div>
|
||||
|
||||
<div class="input-group">
|
||||
<label
|
||||
for="list-b"
|
||||
use:tooltip="{"Updated or 'after' state - CIDR blocks, IP ranges, or individual IPs"}"
|
||||
>
|
||||
<Icon name="list-check" size="sm" />
|
||||
List B (After)
|
||||
</label>
|
||||
<textarea
|
||||
id="list-b"
|
||||
bind:value={listB}
|
||||
oninput={handleInputChange}
|
||||
placeholder="192.168.0.0/16 10.0.0.0/8 192.168.100.0/24"
|
||||
rows="8"
|
||||
></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Results Section -->
|
||||
{#if result}
|
||||
<section class="results-section">
|
||||
{#if result.success}
|
||||
<!-- Summary -->
|
||||
<div class="comparison-summary">
|
||||
<h3>Comparison Summary</h3>
|
||||
<div class="summary-grid">
|
||||
<div class="summary-card">
|
||||
<div class="summary-icon added">
|
||||
<Icon name="plus-circle" />
|
||||
</div>
|
||||
<div class="summary-content">
|
||||
<div class="summary-number">{result.summary.addedCount}</div>
|
||||
<div class="summary-label">Added</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="summary-card">
|
||||
<div class="summary-icon removed">
|
||||
<Icon name="minus-circle" />
|
||||
</div>
|
||||
<div class="summary-content">
|
||||
<div class="summary-number">{result.summary.removedCount}</div>
|
||||
<div class="summary-label">Removed</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="summary-card">
|
||||
<div class="summary-icon unchanged">
|
||||
<Icon name="check-circle" />
|
||||
</div>
|
||||
<div class="summary-content">
|
||||
<div class="summary-number">{result.summary.unchangedCount}</div>
|
||||
<div class="summary-label">Unchanged</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="list-totals">
|
||||
<span class="total-item">
|
||||
List A: {result.summary.totalA} items
|
||||
</span>
|
||||
<span class="total-item">
|
||||
List B: {result.summary.totalB} items
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Changes Categories -->
|
||||
<div class="changes-grid">
|
||||
<!-- Added -->
|
||||
<div class="change-category added">
|
||||
<div class="category-header">
|
||||
<h4>
|
||||
<Icon name="plus-circle" size="sm" />
|
||||
Added Networks ({result.added.length})
|
||||
</h4>
|
||||
{#if result.added.length > 0}
|
||||
<button
|
||||
class="copy-category {copiedStates['category-added'] ? 'copied' : ''}"
|
||||
onclick={() => result && copyCategory(result.added, 'added')}
|
||||
>
|
||||
<Icon name={copiedStates['category-added'] ? 'check-circle' : 'copy'} size="xs" />
|
||||
</button>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
{#if result.added.length > 0}
|
||||
<div class="networks-list">
|
||||
{#each result.added as network}
|
||||
<div class="network-item added">
|
||||
<code class="network-cidr">{network}</code>
|
||||
<button
|
||||
class="copy-button {copiedStates[`added-${network}`] ? 'copied' : ''}"
|
||||
onclick={() => copyToClipboard(network, `added-${network}`)}
|
||||
>
|
||||
<Icon name={copiedStates[`added-${network}`] ? 'check-circle' : 'copy'} size="xs" />
|
||||
</button>
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
{:else}
|
||||
<div class="empty-category">
|
||||
<Icon name="check" />
|
||||
<span>No networks added</span>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<!-- Removed -->
|
||||
<div class="change-category removed">
|
||||
<div class="category-header">
|
||||
<h4>
|
||||
<Icon name="minus-circle" size="sm" />
|
||||
Removed Networks ({result.removed.length})
|
||||
</h4>
|
||||
{#if result.removed.length > 0}
|
||||
<button
|
||||
class="copy-category {copiedStates['category-removed'] ? 'copied' : ''}"
|
||||
onclick={() => result && copyCategory(result.removed, 'removed')}
|
||||
>
|
||||
<Icon name={copiedStates['category-removed'] ? '192.168.0.0/16' : 'copy'} size="xs" />
|
||||
</button>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
{#if result.removed.length > 0}
|
||||
<div class="networks-list">
|
||||
{#each result.removed as network}
|
||||
<div class="network-item removed">
|
||||
<code class="network-cidr">{network}</code>
|
||||
<button
|
||||
class="copy-button {copiedStates[`removed-${network}`] ? 'copied' : ''}"
|
||||
onclick={() => copyToClipboard(network, `removed-${network}`)}
|
||||
>
|
||||
<Icon name={copiedStates[`removed-${network}`] ? 'check-circle' : 'copy'} size="xs" />
|
||||
</button>
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
{:else}
|
||||
<div class="empty-category">
|
||||
<Icon name="check" />
|
||||
<span>No networks removed</span>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<!-- Unchanged -->
|
||||
<div class="change-category unchanged">
|
||||
<div class="category-header">
|
||||
<h4>
|
||||
<Icon name="check-circle" size="sm" />
|
||||
Unchanged Networks ({result.unchanged.length})
|
||||
</h4>
|
||||
{#if result.unchanged.length > 0}
|
||||
<button
|
||||
class="copy-category {copiedStates['category-unchanged'] ? 'copied' : ''}"
|
||||
onclick={() => copyCategory(result.unchanged, 'unchanged')}
|
||||
>
|
||||
<Icon name={copiedStates['category-unchanged'] ? 'check-circle' : 'copy'} size="xs" />
|
||||
</button>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
{#if result.unchanged.length > 0}
|
||||
<div class="networks-list">
|
||||
{#each result.unchanged as network}
|
||||
<div class="network-item unchanged">
|
||||
<code class="network-cidr">{network}</code>
|
||||
<button
|
||||
class="copy-button {copiedStates[`unchanged-${network}`] ? 'copied' : ''}"
|
||||
onclick={() => copyToClipboard(network, `unchanged-${network}`)}
|
||||
>
|
||||
<Icon name={copiedStates[`unchanged-${network}`] ? 'check-circle' : 'copy'} size="xs" />
|
||||
</button>
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
{:else}
|
||||
<div class="empty-category">
|
||||
<Icon name="alert-circle" />
|
||||
<span>No networks remained unchanged</span>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{:else}
|
||||
<div class="error-message">
|
||||
<Icon name="alert-triangle" />
|
||||
<h4>Comparison Error</h4>
|
||||
<p>{result.error || 'Unknown error occurred'}</p>
|
||||
</div>
|
||||
{/if}
|
||||
</section>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<style lang="scss">
|
||||
.examples-section {
|
||||
margin-bottom: var(--spacing-lg);
|
||||
|
||||
h4 {
|
||||
margin-bottom: var(--spacing-md);
|
||||
color: var(--color-info-light);
|
||||
}
|
||||
}
|
||||
|
||||
.examples-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
||||
gap: var(--spacing-sm);
|
||||
}
|
||||
|
||||
.example-card {
|
||||
padding: var(--spacing-sm);
|
||||
background-color: var(--bg-secondary);
|
||||
border: 1px solid var(--border-primary);
|
||||
border-radius: var(--radius-md);
|
||||
cursor: pointer;
|
||||
transition: all var(--transition-fast);
|
||||
text-align: left;
|
||||
|
||||
&:hover {
|
||||
background-color: var(--surface-hover);
|
||||
border-color: var(--color-primary);
|
||||
}
|
||||
|
||||
&.active {
|
||||
background-color: var(--surface-hover);
|
||||
border-color: var(--color-primary);
|
||||
box-shadow: var(--shadow-sm);
|
||||
}
|
||||
}
|
||||
|
||||
.example-label {
|
||||
font-weight: 600;
|
||||
color: var(--text-primary);
|
||||
margin-bottom: var(--spacing-xs);
|
||||
}
|
||||
|
||||
.example-preview {
|
||||
font-size: var(--font-size-xs);
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
.input-section {
|
||||
margin-bottom: var(--spacing-lg);
|
||||
}
|
||||
|
||||
.input-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: var(--spacing-md);
|
||||
|
||||
h3 {
|
||||
margin: 0;
|
||||
color: var(--text-primary);
|
||||
}
|
||||
}
|
||||
|
||||
.swap-button {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--spacing-xs);
|
||||
padding: var(--spacing-sm) var(--spacing-md);
|
||||
background-color: var(--bg-secondary);
|
||||
border: 1px solid var(--border-primary);
|
||||
border-radius: var(--radius-md);
|
||||
color: var(--text-primary);
|
||||
cursor: pointer;
|
||||
transition: all var(--transition-fast);
|
||||
|
||||
&:hover {
|
||||
background-color: var(--surface-hover);
|
||||
border-color: var(--color-primary);
|
||||
}
|
||||
}
|
||||
|
||||
.input-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: var(--spacing-md);
|
||||
}
|
||||
|
||||
.input-group label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--spacing-xs);
|
||||
margin-bottom: var(--spacing-sm);
|
||||
font-weight: 600;
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.results-section {
|
||||
border-top: 1px solid var(--border-secondary);
|
||||
padding-top: var(--spacing-lg);
|
||||
}
|
||||
|
||||
.comparison-summary {
|
||||
margin-bottom: var(--spacing-xl);
|
||||
|
||||
h3 {
|
||||
color: var(--color-info-light);
|
||||
margin-bottom: var(--spacing-md);
|
||||
}
|
||||
}
|
||||
|
||||
.summary-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
|
||||
gap: var(--spacing-md);
|
||||
margin-bottom: var(--spacing-md);
|
||||
}
|
||||
|
||||
.summary-card {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--spacing-md);
|
||||
background-color: var(--bg-secondary);
|
||||
border: 1px solid var(--border-primary);
|
||||
border-radius: var(--radius-md);
|
||||
padding: var(--spacing-md);
|
||||
}
|
||||
|
||||
.summary-icon {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: 50%;
|
||||
|
||||
&.added {
|
||||
background-color: var(--color-success);
|
||||
color: var(--bg-primary);
|
||||
}
|
||||
|
||||
&.removed {
|
||||
background-color: var(--color-error);
|
||||
color: var(--bg-primary);
|
||||
}
|
||||
|
||||
&.unchanged {
|
||||
background-color: var(--color-info);
|
||||
color: var(--bg-primary);
|
||||
}
|
||||
}
|
||||
|
||||
.summary-content {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.summary-number {
|
||||
font-size: var(--font-size-xl);
|
||||
font-weight: 700;
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.summary-label {
|
||||
font-size: var(--font-size-sm);
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
.list-totals {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: var(--spacing-lg);
|
||||
padding-top: var(--spacing-md);
|
||||
border-top: 1px solid var(--border-secondary);
|
||||
font-family: var(--font-mono);
|
||||
font-size: var(--font-size-sm);
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
.changes-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
||||
gap: var(--spacing-lg);
|
||||
}
|
||||
|
||||
.change-category {
|
||||
background-color: var(--bg-secondary);
|
||||
border-radius: var(--radius-lg);
|
||||
padding: var(--spacing-lg);
|
||||
|
||||
&.added {
|
||||
border: 1px solid var(--color-success);
|
||||
}
|
||||
|
||||
&.removed {
|
||||
border: 1px solid var(--color-error);
|
||||
}
|
||||
|
||||
&.unchanged {
|
||||
border: 1px solid var(--color-info);
|
||||
}
|
||||
}
|
||||
|
||||
.category-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: var(--spacing-md);
|
||||
|
||||
h4 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--spacing-xs);
|
||||
margin: 0;
|
||||
color: var(--text-primary);
|
||||
}
|
||||
}
|
||||
|
||||
.copy-category {
|
||||
background: none;
|
||||
border: none;
|
||||
color: var(--text-secondary);
|
||||
cursor: pointer;
|
||||
padding: var(--spacing-xs);
|
||||
border-radius: var(--radius-sm);
|
||||
transition: all var(--transition-fast);
|
||||
|
||||
&:hover {
|
||||
background-color: var(--surface-hover);
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
&.copied {
|
||||
color: var(--color-success);
|
||||
}
|
||||
}
|
||||
|
||||
.networks-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--spacing-xs);
|
||||
}
|
||||
|
||||
.network-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: var(--spacing-sm);
|
||||
border-radius: var(--radius-md);
|
||||
transition: all var(--transition-fast);
|
||||
|
||||
&.added {
|
||||
background-color: var(--color-success);
|
||||
color: var(--bg-primary);
|
||||
|
||||
.network-cidr {
|
||||
background-color: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
}
|
||||
|
||||
&.removed {
|
||||
background-color: var(--color-error);
|
||||
color: var(--bg-primary);
|
||||
|
||||
.network-cidr {
|
||||
background-color: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
}
|
||||
|
||||
&.unchanged {
|
||||
background-color: var(--bg-tertiary);
|
||||
border: 1px solid var(--border-secondary);
|
||||
}
|
||||
|
||||
&:hover {
|
||||
transform: translateX(2px);
|
||||
}
|
||||
}
|
||||
|
||||
.network-cidr {
|
||||
font-family: var(--font-mono);
|
||||
font-size: var(--font-size-sm);
|
||||
font-weight: 600;
|
||||
padding: 2px var(--spacing-xs);
|
||||
border-radius: var(--radius-sm);
|
||||
background-color: var(--bg-tertiary);
|
||||
}
|
||||
|
||||
.copy-button {
|
||||
background: none;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
padding: var(--spacing-xs);
|
||||
border-radius: var(--radius-sm);
|
||||
transition: all var(--transition-fast);
|
||||
color: inherit;
|
||||
opacity: 0.7;
|
||||
|
||||
&:hover {
|
||||
opacity: 1;
|
||||
background-color: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
&.copied {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.empty-category {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--spacing-xs);
|
||||
padding: var(--spacing-md);
|
||||
color: var(--text-secondary);
|
||||
font-style: italic;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.error-message {
|
||||
text-align: center;
|
||||
padding: var(--spacing-lg);
|
||||
background-color: var(--bg-secondary);
|
||||
border: 1px solid var(--color-error);
|
||||
border-radius: var(--radius-md);
|
||||
|
||||
:global(.icon) {
|
||||
font-size: 1.5rem;
|
||||
color: var(--color-error);
|
||||
margin-bottom: var(--spacing-sm);
|
||||
}
|
||||
|
||||
h4 {
|
||||
color: var(--color-error-light);
|
||||
margin-bottom: var(--spacing-sm);
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.input-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.examples-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.summary-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.changes-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.list-totals {
|
||||
flex-direction: column;
|
||||
gap: var(--spacing-sm);
|
||||
}
|
||||
|
||||
.input-header {
|
||||
flex-direction: column;
|
||||
gap: var(--spacing-sm);
|
||||
align-items: stretch;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,749 @@
|
||||
<script lang="ts">
|
||||
import { tooltip } from '$lib/actions/tooltip.js';
|
||||
import Icon from './Icon.svelte';
|
||||
|
||||
let input = $state(`192.168.0.0/22
|
||||
10.0.0.0-10.0.0.255`);
|
||||
let targetPrefix = $state(24);
|
||||
let result = $state<{
|
||||
success: boolean;
|
||||
error?: string;
|
||||
subnets: string[];
|
||||
totalSubnets: number;
|
||||
totalAddresses: number;
|
||||
inputSummary: {
|
||||
totalInputs: number;
|
||||
totalInputAddresses: number;
|
||||
};
|
||||
} | null>(null);
|
||||
let copiedStates = $state<Record<string, boolean>>({});
|
||||
let selectedExample = $state<string | null>(null);
|
||||
let userModified = $state(false);
|
||||
|
||||
const examples = [
|
||||
{
|
||||
label: 'Break /22 into /24s',
|
||||
input: '192.168.0.0/22',
|
||||
targetPrefix: 24
|
||||
},
|
||||
{
|
||||
label: 'Decompose Range to /28s',
|
||||
input: '10.0.0.0-10.0.0.255',
|
||||
targetPrefix: 28
|
||||
},
|
||||
{
|
||||
label: 'Multiple Blocks to /26s',
|
||||
input: `172.16.0.0/24
|
||||
172.16.2.0/25`,
|
||||
targetPrefix: 26
|
||||
}
|
||||
];
|
||||
|
||||
function loadExample(example: typeof examples[0]) {
|
||||
input = example.input;
|
||||
targetPrefix = example.targetPrefix;
|
||||
selectedExample = example.label;
|
||||
userModified = false;
|
||||
performDeaggregation();
|
||||
}
|
||||
|
||||
function parseIP(ip: string): number {
|
||||
return ip.split('.').reduce((acc, octet) => (acc << 8) + parseInt(octet), 0) >>> 0;
|
||||
}
|
||||
|
||||
function ipToString(ip: number): string {
|
||||
return [
|
||||
(ip >>> 24) & 0xff,
|
||||
(ip >>> 16) & 0xff,
|
||||
(ip >>> 8) & 0xff,
|
||||
ip & 0xff
|
||||
].join('.');
|
||||
}
|
||||
|
||||
function parseCIDR(cidr: string): { network: number; prefixLength: number; size: number } {
|
||||
const [networkStr, prefixStr] = cidr.split('/');
|
||||
const prefixLength = parseInt(prefixStr);
|
||||
const network = parseIP(networkStr) & (0xffffffff << (32 - prefixLength));
|
||||
const size = Math.pow(2, 32 - prefixLength);
|
||||
return { network, prefixLength, size };
|
||||
}
|
||||
|
||||
function parseRange(range: string): { start: number; end: number } {
|
||||
const [startStr, endStr] = range.split('-');
|
||||
return {
|
||||
start: parseIP(startStr.trim()),
|
||||
end: parseIP(endStr.trim())
|
||||
};
|
||||
}
|
||||
|
||||
function deaggregateBlock(network: number, size: number, targetPrefix: number): string[] | { error: string } {
|
||||
const targetSize = Math.pow(2, 32 - targetPrefix);
|
||||
const subnets: string[] = [];
|
||||
|
||||
if (targetSize > size) {
|
||||
// Target prefix is larger than the block, return the block as-is if it aligns
|
||||
const currentPrefix = 32 - Math.log2(size);
|
||||
if (Number.isInteger(currentPrefix) && network % size === 0) {
|
||||
subnets.push(`${ipToString(network)}/${currentPrefix}`);
|
||||
}
|
||||
return subnets;
|
||||
}
|
||||
|
||||
// Calculate how many subnets this would generate
|
||||
const subnetCount = size / targetSize;
|
||||
|
||||
// Safety limit to prevent browser crashes (max 10,000 subnets per block)
|
||||
if (subnetCount > 10000) {
|
||||
const sourcePrefix = 32 - Math.log2(size);
|
||||
return {
|
||||
error: `Block ${ipToString(network)}/${sourcePrefix} would generate ${subnetCount.toLocaleString()} subnets of /${targetPrefix}. This exceeds the safety limit of 10,000 subnets per block to prevent browser crashes.`
|
||||
};
|
||||
}
|
||||
|
||||
// Generate subnets of target size
|
||||
for (let addr = network; addr < network + size; addr += targetSize) {
|
||||
subnets.push(`${ipToString(addr)}/${targetPrefix}`);
|
||||
}
|
||||
|
||||
return subnets;
|
||||
}
|
||||
|
||||
function performDeaggregation() {
|
||||
try {
|
||||
if (!input.trim()) {
|
||||
result = null;
|
||||
return;
|
||||
}
|
||||
|
||||
const lines = input.trim().split('\n').filter(line => line.trim());
|
||||
const allSubnets: string[] = [];
|
||||
let totalInputAddresses = 0;
|
||||
const seenSubnets = new Set<string>();
|
||||
|
||||
for (const line of lines) {
|
||||
const trimmed = line.trim();
|
||||
if (!trimmed) continue;
|
||||
|
||||
let network: number;
|
||||
let size: number;
|
||||
|
||||
if (trimmed.includes('/')) {
|
||||
// CIDR notation
|
||||
try {
|
||||
const parsed = parseCIDR(trimmed);
|
||||
network = parsed.network;
|
||||
size = parsed.size;
|
||||
totalInputAddresses += size;
|
||||
} catch (error) {
|
||||
throw new Error(`Invalid CIDR: ${trimmed}`);
|
||||
}
|
||||
} else if (trimmed.includes('-')) {
|
||||
// IP range
|
||||
try {
|
||||
const { start, end } = parseRange(trimmed);
|
||||
if (start > end) {
|
||||
throw new Error(`Invalid range: start IP is greater than end IP in ${trimmed}`);
|
||||
}
|
||||
network = start;
|
||||
size = end - start + 1;
|
||||
totalInputAddresses += size;
|
||||
} catch (error) {
|
||||
throw new Error(`Invalid range: ${trimmed}`);
|
||||
}
|
||||
} else if (trimmed.match(/^\d+\.\d+\.\d+\.\d+$/)) {
|
||||
// Single IP
|
||||
network = parseIP(trimmed);
|
||||
size = 1;
|
||||
totalInputAddresses += 1;
|
||||
} else {
|
||||
throw new Error(`Invalid input format: ${trimmed}`);
|
||||
}
|
||||
|
||||
// Deaggregate this block
|
||||
const blockResult = deaggregateBlock(network, size, targetPrefix);
|
||||
|
||||
// Check if it returned an error
|
||||
if ('error' in blockResult) {
|
||||
throw new Error(blockResult.error);
|
||||
}
|
||||
|
||||
// Add unique subnets
|
||||
for (const subnet of blockResult) {
|
||||
if (!seenSubnets.has(subnet)) {
|
||||
seenSubnets.add(subnet);
|
||||
allSubnets.push(subnet);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Overall safety check for total subnets
|
||||
if (allSubnets.length > 25000) {
|
||||
throw new Error(`Total would generate ${allSubnets.length.toLocaleString()} subnets. This exceeds the safety limit of 25,000 total subnets to prevent browser performance issues.`);
|
||||
}
|
||||
|
||||
// Sort subnets by network address
|
||||
allSubnets.sort((a, b) => {
|
||||
const aNet = parseIP(a.split('/')[0]);
|
||||
const bNet = parseIP(b.split('/')[0]);
|
||||
return aNet - bNet;
|
||||
});
|
||||
|
||||
const targetSize = Math.pow(2, 32 - targetPrefix);
|
||||
const totalAddresses = allSubnets.length * targetSize;
|
||||
|
||||
result = {
|
||||
success: true,
|
||||
subnets: allSubnets,
|
||||
totalSubnets: allSubnets.length,
|
||||
totalAddresses: totalAddresses,
|
||||
inputSummary: {
|
||||
totalInputs: lines.length,
|
||||
totalInputAddresses: totalInputAddresses
|
||||
}
|
||||
};
|
||||
} catch (error) {
|
||||
result = {
|
||||
success: false,
|
||||
error: error instanceof Error ? error.message : 'Unknown error occurred',
|
||||
subnets: [],
|
||||
totalSubnets: 0,
|
||||
totalAddresses: 0,
|
||||
inputSummary: {
|
||||
totalInputs: 0,
|
||||
totalInputAddresses: 0
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
function handleInputChange() {
|
||||
userModified = true;
|
||||
selectedExample = null;
|
||||
performDeaggregation();
|
||||
}
|
||||
|
||||
async function copyToClipboard(text: string, id: string) {
|
||||
try {
|
||||
await navigator.clipboard.writeText(text);
|
||||
copiedStates[id] = true;
|
||||
setTimeout(() => {
|
||||
copiedStates[id] = false;
|
||||
}, 2000);
|
||||
} catch (err) {
|
||||
console.error('Failed to copy text: ', err);
|
||||
}
|
||||
}
|
||||
|
||||
async function copyAllSubnets() {
|
||||
if (!result?.subnets.length) return;
|
||||
|
||||
const allText = result.subnets.join('\n');
|
||||
await copyToClipboard(allText, 'all-subnets');
|
||||
}
|
||||
|
||||
// Calculate on component load
|
||||
performDeaggregation();
|
||||
</script>
|
||||
|
||||
<div class="card">
|
||||
<header class="card-header">
|
||||
<h2>CIDR Deaggregate</h2>
|
||||
<p>Decompose CIDR blocks and ranges into uniform target prefix subnets</p>
|
||||
</header>
|
||||
|
||||
<!-- Examples -->
|
||||
<section class="examples-section">
|
||||
<h4>Quick Examples</h4>
|
||||
<div class="examples-grid">
|
||||
{#each examples as example}
|
||||
<button
|
||||
class="example-card {selectedExample === example.label ? 'active' : ''}"
|
||||
onclick={() => loadExample(example)}
|
||||
>
|
||||
<div class="example-label">{example.label}</div>
|
||||
<div class="example-preview">
|
||||
Target: /{example.targetPrefix}
|
||||
</div>
|
||||
</button>
|
||||
{/each}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Input Section -->
|
||||
<section class="input-section">
|
||||
<div class="input-grid">
|
||||
<div class="input-group">
|
||||
<label
|
||||
for="input"
|
||||
use:tooltip="{"Enter CIDR blocks, IP ranges, or individual IPs - one per line"}"
|
||||
>
|
||||
Input Networks/Ranges
|
||||
</label>
|
||||
<textarea
|
||||
id="input"
|
||||
bind:value={input}
|
||||
oninput={handleInputChange}
|
||||
placeholder="192.168.0.0/22 10.0.0.0-10.0.255.255 172.16.1.1"
|
||||
rows="6"
|
||||
required
|
||||
></textarea>
|
||||
</div>
|
||||
|
||||
<div class="input-group">
|
||||
<label
|
||||
for="target-prefix"
|
||||
use:tooltip={"Target prefix length for uniform decomposition (e.g., 24 for /24 subnets)"}
|
||||
>
|
||||
Target Prefix Length
|
||||
</label>
|
||||
<div class="prefix-input-wrapper">
|
||||
<input
|
||||
id="target-prefix"
|
||||
type="number"
|
||||
bind:value={targetPrefix}
|
||||
oninput={handleInputChange}
|
||||
min="1"
|
||||
max="32"
|
||||
required
|
||||
/>
|
||||
<span class="prefix-hint">/{targetPrefix}</span>
|
||||
</div>
|
||||
<div class="prefix-info">
|
||||
{#if targetPrefix}
|
||||
{@const addresses = Math.pow(2, 32 - targetPrefix)}
|
||||
Each /{targetPrefix} subnet = {addresses.toLocaleString()} addresses
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Results Section -->
|
||||
{#if result}
|
||||
<section class="results-section">
|
||||
{#if result.success}
|
||||
<div class="results-header">
|
||||
<h3>Deaggregated Subnets</h3>
|
||||
<div class="results-actions">
|
||||
<div class="results-summary">
|
||||
<span class="metric">
|
||||
<Icon name="network" size="sm" />
|
||||
{result.totalSubnets} subnets
|
||||
</span>
|
||||
<span class="metric">
|
||||
<Icon name="database" size="sm" />
|
||||
{result.totalAddresses.toLocaleString()} addresses
|
||||
</span>
|
||||
</div>
|
||||
{#if result.subnets.length > 0}
|
||||
<button
|
||||
class="copy-all-button {copiedStates['all-subnets'] ? 'copied' : ''}"
|
||||
onclick={copyAllSubnets}
|
||||
>
|
||||
<Icon name={copiedStates['all-subnets'] ? 'check' : 'copy'} size="sm" />
|
||||
{copiedStates['all-subnets'] ? 'Copied!' : 'Copy All'}
|
||||
</button>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Input Summary -->
|
||||
<div class="input-summary">
|
||||
<div class="summary-item">
|
||||
<span class="summary-label">Input:</span>
|
||||
<span class="summary-value">
|
||||
{result.inputSummary.totalInputs} items, {result.inputSummary.totalInputAddresses.toLocaleString()} addresses
|
||||
</span>
|
||||
</div>
|
||||
<div class="summary-item">
|
||||
<span class="summary-label">Output:</span>
|
||||
<span class="summary-value">
|
||||
{result.totalSubnets} /{targetPrefix} subnets, {result.totalAddresses.toLocaleString()} addresses
|
||||
</span>
|
||||
</div>
|
||||
{#if result.totalAddresses !== result.inputSummary.totalInputAddresses}
|
||||
<div class="summary-item">
|
||||
<span class="summary-label">Note:</span>
|
||||
<span class="summary-value address-diff">
|
||||
{result.totalAddresses > result.inputSummary.totalInputAddresses ? 'Expanded' : 'Reduced'} by {Math.abs(result.totalAddresses - result.inputSummary.totalInputAddresses).toLocaleString()} addresses
|
||||
(due to alignment to /{targetPrefix} boundaries)
|
||||
</span>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
{#if result.subnets.length > 0}
|
||||
<div class="subnets-grid">
|
||||
{#each result.subnets as subnet, index}
|
||||
{@const subnetSize = Math.pow(2, 32 - targetPrefix)}
|
||||
<div class="subnet-card">
|
||||
<div class="subnet-header">
|
||||
<code class="subnet-cidr">{subnet}</code>
|
||||
<button
|
||||
class="copy-button {copiedStates[`subnet-${index}`] ? 'copied' : ''}"
|
||||
onclick={() => copyToClipboard(subnet, `subnet-${index}`)}
|
||||
aria-label="Copy CIDR block"
|
||||
>
|
||||
<Icon name={copiedStates[`subnet-${index}`] ? 'check' : 'copy'} size="xs" />
|
||||
</button>
|
||||
</div>
|
||||
<div class="subnet-info">
|
||||
<span class="address-count">
|
||||
{subnetSize.toLocaleString()} addresses
|
||||
</span>
|
||||
{#if subnetSize >= 256}
|
||||
<span class="subnet-size">
|
||||
{subnetSize >= 65536 ? `${(subnetSize / 65536).toFixed(0)}×/16` :
|
||||
subnetSize >= 256 ? `${(subnetSize / 256).toFixed(0)}×/24` : ''}
|
||||
</span>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
{:else}
|
||||
<div class="no-subnets">
|
||||
<Icon name="alert-circle" />
|
||||
<h4>No Subnets Generated</h4>
|
||||
<p>The target prefix length may be too large for the input networks, or the input is empty.</p>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{:else}
|
||||
<div class="error-message">
|
||||
<Icon name="alert-triangle" />
|
||||
<h4>Deaggregation Error</h4>
|
||||
<p>{result.error || 'Unknown error occurred'}</p>
|
||||
</div>
|
||||
{/if}
|
||||
</section>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<style lang="scss">
|
||||
.examples-section {
|
||||
margin-bottom: var(--spacing-lg);
|
||||
|
||||
h4 {
|
||||
margin-bottom: var(--spacing-md);
|
||||
color: var(--color-info-light);
|
||||
}
|
||||
}
|
||||
|
||||
.examples-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
||||
gap: var(--spacing-sm);
|
||||
}
|
||||
|
||||
.example-card {
|
||||
padding: var(--spacing-sm);
|
||||
background-color: var(--bg-secondary);
|
||||
border: 1px solid var(--border-primary);
|
||||
border-radius: var(--radius-md);
|
||||
cursor: pointer;
|
||||
transition: all var(--transition-fast);
|
||||
text-align: left;
|
||||
|
||||
&:hover {
|
||||
background-color: var(--surface-hover);
|
||||
border-color: var(--color-primary);
|
||||
}
|
||||
|
||||
&.active {
|
||||
background-color: var(--surface-hover);
|
||||
border-color: var(--color-primary);
|
||||
box-shadow: var(--shadow-sm);
|
||||
}
|
||||
}
|
||||
|
||||
.example-label {
|
||||
font-weight: 600;
|
||||
color: var(--text-primary);
|
||||
margin-bottom: var(--spacing-xs);
|
||||
}
|
||||
|
||||
.example-preview {
|
||||
font-family: var(--font-mono);
|
||||
font-size: var(--font-size-xs);
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
.input-section {
|
||||
margin-bottom: var(--spacing-lg);
|
||||
}
|
||||
|
||||
.input-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 300px;
|
||||
gap: var(--spacing-md);
|
||||
}
|
||||
|
||||
.prefix-input-wrapper {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
input {
|
||||
padding-right: 3rem;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.prefix-hint {
|
||||
position: absolute;
|
||||
right: var(--spacing-md);
|
||||
color: var(--text-secondary);
|
||||
font-family: var(--font-mono);
|
||||
font-size: var(--font-size-sm);
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
|
||||
.prefix-info {
|
||||
margin-top: var(--spacing-xs);
|
||||
font-size: var(--font-size-xs);
|
||||
color: var(--text-secondary);
|
||||
font-family: var(--font-mono);
|
||||
}
|
||||
|
||||
.results-section {
|
||||
border-top: 1px solid var(--border-secondary);
|
||||
padding-top: var(--spacing-lg);
|
||||
}
|
||||
|
||||
.results-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
margin-bottom: var(--spacing-lg);
|
||||
gap: var(--spacing-md);
|
||||
|
||||
h3 {
|
||||
color: var(--color-success-light);
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.results-actions {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-end;
|
||||
gap: var(--spacing-sm);
|
||||
}
|
||||
|
||||
.results-summary {
|
||||
display: flex;
|
||||
gap: var(--spacing-md);
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.metric {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--spacing-xs);
|
||||
font-size: var(--font-size-sm);
|
||||
color: var(--text-secondary);
|
||||
|
||||
:global(.icon) {
|
||||
color: var(--color-info);
|
||||
}
|
||||
}
|
||||
|
||||
.copy-all-button {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--spacing-xs);
|
||||
padding: var(--spacing-sm) var(--spacing-md);
|
||||
background-color: var(--bg-secondary);
|
||||
border: 1px solid var(--border-primary);
|
||||
border-radius: var(--radius-md);
|
||||
color: var(--text-primary);
|
||||
cursor: pointer;
|
||||
transition: all var(--transition-fast);
|
||||
|
||||
&:hover {
|
||||
background-color: var(--surface-hover);
|
||||
border-color: var(--color-primary);
|
||||
}
|
||||
|
||||
&.copied {
|
||||
background-color: var(--color-success);
|
||||
color: var(--bg-primary);
|
||||
border-color: var(--color-success);
|
||||
}
|
||||
}
|
||||
|
||||
.input-summary {
|
||||
background-color: var(--bg-secondary);
|
||||
border: 1px solid var(--border-secondary);
|
||||
border-radius: var(--radius-md);
|
||||
padding: var(--spacing-md);
|
||||
margin-bottom: var(--spacing-lg);
|
||||
font-family: var(--font-mono);
|
||||
font-size: var(--font-size-sm);
|
||||
}
|
||||
|
||||
.summary-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: var(--spacing-xs);
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.summary-label {
|
||||
color: var(--text-secondary);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.summary-value {
|
||||
color: var(--text-primary);
|
||||
|
||||
&.address-diff {
|
||||
color: var(--color-warning-light);
|
||||
}
|
||||
}
|
||||
|
||||
.subnets-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
|
||||
gap: var(--spacing-md);
|
||||
}
|
||||
|
||||
.subnet-card {
|
||||
background-color: var(--bg-secondary);
|
||||
border: 1px solid var(--border-primary);
|
||||
border-radius: var(--radius-md);
|
||||
padding: var(--spacing-md);
|
||||
transition: all var(--transition-fast);
|
||||
|
||||
&:hover {
|
||||
border-color: var(--color-primary);
|
||||
box-shadow: var(--shadow-sm);
|
||||
}
|
||||
}
|
||||
|
||||
.subnet-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: var(--spacing-sm);
|
||||
}
|
||||
|
||||
.subnet-cidr {
|
||||
font-family: var(--font-mono);
|
||||
font-size: var(--font-size-md);
|
||||
font-weight: 600;
|
||||
color: var(--color-primary-light);
|
||||
background-color: var(--bg-tertiary);
|
||||
padding: var(--spacing-xs);
|
||||
border-radius: var(--radius-sm);
|
||||
}
|
||||
|
||||
.copy-button {
|
||||
background: none;
|
||||
border: none;
|
||||
color: var(--text-secondary);
|
||||
cursor: pointer;
|
||||
padding: var(--spacing-xs);
|
||||
border-radius: var(--radius-sm);
|
||||
transition: all var(--transition-fast);
|
||||
|
||||
&:hover {
|
||||
background-color: var(--surface-hover);
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
&.copied {
|
||||
color: var(--color-success);
|
||||
}
|
||||
}
|
||||
|
||||
.subnet-info {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: var(--spacing-sm);
|
||||
}
|
||||
|
||||
.address-count {
|
||||
font-size: var(--font-size-sm);
|
||||
color: var(--text-secondary);
|
||||
font-family: var(--font-mono);
|
||||
}
|
||||
|
||||
.subnet-size {
|
||||
font-size: var(--font-size-xs);
|
||||
color: var(--color-info);
|
||||
font-family: var(--font-mono);
|
||||
background-color: var(--bg-tertiary);
|
||||
padding: 2px var(--spacing-xs);
|
||||
border-radius: var(--radius-sm);
|
||||
}
|
||||
|
||||
.no-subnets {
|
||||
text-align: center;
|
||||
padding: var(--spacing-xl);
|
||||
color: var(--text-secondary);
|
||||
|
||||
:global(.icon) {
|
||||
font-size: 2rem;
|
||||
color: var(--color-warning);
|
||||
margin-bottom: var(--spacing-md);
|
||||
}
|
||||
|
||||
h4 {
|
||||
color: var(--text-primary);
|
||||
margin-bottom: var(--spacing-sm);
|
||||
}
|
||||
}
|
||||
|
||||
.error-message {
|
||||
text-align: center;
|
||||
padding: var(--spacing-lg);
|
||||
background-color: var(--bg-secondary);
|
||||
border: 1px solid var(--color-error);
|
||||
border-radius: var(--radius-md);
|
||||
|
||||
:global(.icon) {
|
||||
font-size: 1.5rem;
|
||||
color: var(--color-error);
|
||||
margin-bottom: var(--spacing-sm);
|
||||
}
|
||||
|
||||
h4 {
|
||||
color: var(--color-error-light);
|
||||
margin-bottom: var(--spacing-sm);
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.input-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.examples-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.subnets-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.results-header {
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
.results-actions {
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
.results-summary {
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,834 @@
|
||||
<script lang="ts">
|
||||
import { computeCIDRDifference, type DiffResult } from '$lib/utils/cidr-diff.js';
|
||||
import { tooltip } from '$lib/actions/tooltip.js';
|
||||
import Icon from './Icon.svelte';
|
||||
|
||||
let pools = $state(`192.168.0.0/16
|
||||
10.0.0.0/8`);
|
||||
let allocations = $state(`192.168.1.0/24
|
||||
192.168.10.0/24
|
||||
10.0.0.0/16`);
|
||||
let targetPrefix = $state<number | null>(null);
|
||||
let result = $state<{
|
||||
success: boolean;
|
||||
error?: string;
|
||||
availableBlocks: string[];
|
||||
totalBlocks: number;
|
||||
totalAddresses: number;
|
||||
stats?: DiffResult['stats'];
|
||||
visualization?: DiffResult['visualization'];
|
||||
} | null>(null);
|
||||
let copiedStates = $state<Record<string, boolean>>({});
|
||||
let selectedExample = $state<string | null>(null);
|
||||
let userModified = $state(false);
|
||||
|
||||
const examples = [
|
||||
{
|
||||
label: 'Office Network Gaps',
|
||||
pools: '192.168.0.0/16',
|
||||
allocations: `192.168.1.0/24
|
||||
192.168.10.0/24
|
||||
192.168.100.0/24`,
|
||||
targetPrefix: 24
|
||||
},
|
||||
{
|
||||
label: 'Large Pool Analysis',
|
||||
pools: '10.0.0.0/8',
|
||||
allocations: `10.0.0.0/16
|
||||
10.1.0.0/16
|
||||
10.255.0.0/16`,
|
||||
targetPrefix: null
|
||||
},
|
||||
{
|
||||
label: 'Multi-Pool Setup',
|
||||
pools: `172.16.0.0/12
|
||||
192.168.0.0/16`,
|
||||
allocations: `172.16.1.0/24
|
||||
192.168.100.0/24`,
|
||||
targetPrefix: 28
|
||||
}
|
||||
];
|
||||
|
||||
function loadExample(example: typeof examples[0]) {
|
||||
pools = example.pools;
|
||||
allocations = example.allocations;
|
||||
targetPrefix = example.targetPrefix;
|
||||
selectedExample = example.label;
|
||||
userModified = false;
|
||||
calculateGaps();
|
||||
}
|
||||
|
||||
function calculateGaps() {
|
||||
try {
|
||||
if (!pools.trim()) {
|
||||
result = null;
|
||||
return;
|
||||
}
|
||||
|
||||
// Use CIDR diff to get all available blocks (A - B = pools - allocations)
|
||||
const diffResult = computeCIDRDifference(pools, allocations || '', 'detailed');
|
||||
|
||||
// Check for errors
|
||||
if (diffResult.errors.length > 0) {
|
||||
result = {
|
||||
success: false,
|
||||
error: diffResult.errors.join('; '),
|
||||
availableBlocks: [],
|
||||
totalBlocks: 0,
|
||||
totalAddresses: 0
|
||||
};
|
||||
return;
|
||||
}
|
||||
|
||||
// Combine IPv4 and IPv6 results
|
||||
const allBlocks = [...diffResult.ipv4, ...diffResult.ipv6];
|
||||
|
||||
// Filter by target prefix if specified
|
||||
let filteredBlocks = allBlocks;
|
||||
if (targetPrefix !== null) {
|
||||
filteredBlocks = allBlocks.filter(block => {
|
||||
// Extract prefix length from CIDR notation
|
||||
const match = block.match(/\/(\d+)$/);
|
||||
if (!match) return false;
|
||||
const prefixLength = parseInt(match[1]);
|
||||
return prefixLength <= targetPrefix; // Can be subdivided to target prefix
|
||||
});
|
||||
}
|
||||
|
||||
// Calculate total addresses
|
||||
const totalAddresses = filteredBlocks.reduce((sum, block) => {
|
||||
const match = block.match(/\/(\d+)$/);
|
||||
if (!match) return sum;
|
||||
const prefixLength = parseInt(match[1]);
|
||||
const version = block.includes(':') ? 6 : 4;
|
||||
const totalBits = version === 4 ? 32 : 128;
|
||||
return sum + Math.pow(2, totalBits - prefixLength);
|
||||
}, 0);
|
||||
|
||||
result = {
|
||||
success: true,
|
||||
availableBlocks: filteredBlocks,
|
||||
totalBlocks: filteredBlocks.length,
|
||||
totalAddresses: totalAddresses,
|
||||
stats: diffResult.stats,
|
||||
visualization: diffResult.visualization
|
||||
};
|
||||
} catch (error) {
|
||||
result = {
|
||||
success: false,
|
||||
error: error instanceof Error ? error.message : 'Unknown error occurred',
|
||||
availableBlocks: [],
|
||||
totalBlocks: 0,
|
||||
totalAddresses: 0
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
function handleInputChange() {
|
||||
userModified = true;
|
||||
selectedExample = null;
|
||||
calculateGaps();
|
||||
}
|
||||
|
||||
async function copyToClipboard(text: string, id: string) {
|
||||
try {
|
||||
await navigator.clipboard.writeText(text);
|
||||
copiedStates[id] = true;
|
||||
setTimeout(() => {
|
||||
copiedStates[id] = false;
|
||||
}, 2000);
|
||||
} catch (err) {
|
||||
console.error('Failed to copy text: ', err);
|
||||
}
|
||||
}
|
||||
|
||||
// Visualization helper functions
|
||||
function getBlockPosition(start: bigint, totalRange: { start: bigint; end: bigint }): number {
|
||||
const rangeSize = totalRange.end - totalRange.start;
|
||||
const blockOffset = start - totalRange.start;
|
||||
return Number((blockOffset * 10000n) / rangeSize) / 100;
|
||||
}
|
||||
|
||||
function getBlockWidth(start: bigint, end: bigint, totalRange: { start: bigint; end: bigint }): number {
|
||||
const rangeSize = totalRange.end - totalRange.start;
|
||||
const blockSize = end - start + 1n;
|
||||
return Number((blockSize * 10000n) / rangeSize) / 100;
|
||||
}
|
||||
|
||||
function formatAddress(addr: bigint, version: 4 | 6): string {
|
||||
if (version === 4) {
|
||||
// Convert bigint to IPv4 dotted decimal
|
||||
const num = Number(addr);
|
||||
return [
|
||||
(num >>> 24) & 0xff,
|
||||
(num >>> 16) & 0xff,
|
||||
(num >>> 8) & 0xff,
|
||||
num & 0xff
|
||||
].join('.');
|
||||
} else {
|
||||
// Convert bigint to IPv6 (simplified)
|
||||
const hex = addr.toString(16).padStart(32, '0');
|
||||
return [0,1,2,3,4,5,6,7]
|
||||
.map(i => hex.substr(i * 4, 4))
|
||||
.join(':')
|
||||
.replace(/(:0{1,3})+/g, ':')
|
||||
.replace(/^:|:$/g, '')
|
||||
.replace(/::/g, '::');
|
||||
}
|
||||
}
|
||||
|
||||
// Calculate on component load
|
||||
calculateGaps();
|
||||
</script>
|
||||
|
||||
<div class="card">
|
||||
<header class="card-header">
|
||||
<h2>Free Space Finder</h2>
|
||||
<p>Discover all available address blocks within network pools</p>
|
||||
</header>
|
||||
|
||||
<!-- Examples -->
|
||||
<section class="examples-section">
|
||||
<h4>Quick Examples</h4>
|
||||
<div class="examples-grid">
|
||||
{#each examples as example}
|
||||
<button
|
||||
class="example-card {selectedExample === example.label ? 'active' : ''}"
|
||||
onclick={() => loadExample(example)}
|
||||
>
|
||||
<div class="example-label">{example.label}</div>
|
||||
<div class="example-preview">
|
||||
{example.pools.split('\n')[0]}
|
||||
{example.pools.includes('\n') ? '...' : ''}
|
||||
</div>
|
||||
</button>
|
||||
{/each}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Input Section -->
|
||||
<section class="input-section">
|
||||
<div class="input-grid">
|
||||
<div class="input-group">
|
||||
<label
|
||||
for="pools"
|
||||
use:tooltip="{"Enter network pools - one CIDR block per line (e.g., 192.168.0.0/16)"}"
|
||||
>
|
||||
Network Pools
|
||||
</label>
|
||||
<textarea
|
||||
id="pools"
|
||||
bind:value={pools}
|
||||
oninput={handleInputChange}
|
||||
placeholder="192.168.0.0/16 10.0.0.0/8"
|
||||
rows="4"
|
||||
required
|
||||
></textarea>
|
||||
</div>
|
||||
|
||||
<div class="input-group">
|
||||
<label
|
||||
for="allocations"
|
||||
use:tooltip={"Enter allocated/used blocks - one CIDR block per line"}
|
||||
>
|
||||
Allocated Blocks
|
||||
</label>
|
||||
<textarea
|
||||
id="allocations"
|
||||
bind:value={allocations}
|
||||
oninput={handleInputChange}
|
||||
placeholder="192.168.1.0/24 192.168.10.0/24"
|
||||
rows="4"
|
||||
></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="filter-section">
|
||||
<div class="input-group">
|
||||
<label
|
||||
for="target-prefix"
|
||||
use:tooltip={"Filter results to show only blocks that can accommodate the target prefix length"}
|
||||
>
|
||||
Target Prefix Length (Optional)
|
||||
</label>
|
||||
<div class="prefix-input-wrapper">
|
||||
<input
|
||||
id="target-prefix"
|
||||
type="number"
|
||||
bind:value={targetPrefix}
|
||||
oninput={handleInputChange}
|
||||
min="1"
|
||||
max="32"
|
||||
placeholder="e.g., 24"
|
||||
/>
|
||||
<span class="prefix-hint">/{targetPrefix || 'xx'}</span>
|
||||
<button
|
||||
class="clear-filter"
|
||||
onclick={() => { targetPrefix = null; handleInputChange(); }}
|
||||
aria-label="Clear filter"
|
||||
>
|
||||
<Icon name="x" size="xs" />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Results Section -->
|
||||
{#if result}
|
||||
<section class="results-section">
|
||||
{#if result.success}
|
||||
<div class="results-header">
|
||||
<h3>Available Free Space</h3>
|
||||
<div class="results-summary">
|
||||
<span class="metric">
|
||||
<Icon name="free-blocks" size="sm" />
|
||||
{result.totalBlocks} free blocks
|
||||
</span>
|
||||
<span class="metric">
|
||||
<Icon name="network" size="sm" />
|
||||
{result.totalAddresses.toLocaleString()} addresses
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{#if result.availableBlocks.length > 0}
|
||||
<div class="free-blocks-grid">
|
||||
{#each result.availableBlocks as block, index}
|
||||
{@const blockAddresses = (() => {
|
||||
const match = block.match(/\/(\d+)$/);
|
||||
if (!match) return 0;
|
||||
const prefixLength = parseInt(match[1]);
|
||||
const version = block.includes(':') ? 6 : 4;
|
||||
const totalBits = version === 4 ? 32 : 128;
|
||||
return Math.pow(2, totalBits - prefixLength);
|
||||
})()}
|
||||
<div class="free-block-card">
|
||||
<div class="block-header">
|
||||
<code class="block-cidr">{block}</code>
|
||||
<button
|
||||
class="copy-button {copiedStates[`block-${index}`] ? 'copied' : ''}"
|
||||
onclick={() => copyToClipboard(block, `block-${index}`)}
|
||||
aria-label="Copy CIDR block"
|
||||
>
|
||||
<Icon name={copiedStates[`block-${index}`] ? 'check' : 'copy'} size="xs" />
|
||||
</button>
|
||||
</div>
|
||||
<div class="block-info">
|
||||
<span class="address-count">
|
||||
{blockAddresses.toLocaleString()} addresses
|
||||
</span>
|
||||
{#if targetPrefix && blockAddresses >= Math.pow(2, 32 - targetPrefix)}
|
||||
<span class="can-fit">
|
||||
<Icon name="check-circle" size="xs" />
|
||||
Can fit /{targetPrefix}
|
||||
</span>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
{:else}
|
||||
<div class="no-gaps">
|
||||
<Icon name="alert-circle" />
|
||||
<h4>No Available Space</h4>
|
||||
<p>All address space in the pools is allocated or there are no pools defined.</p>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<!-- Address Space Visualization -->
|
||||
{#if result.availableBlocks.length > 0 && result.visualization}
|
||||
<div class="visualization-section">
|
||||
<h4>Address Space Visualization</h4>
|
||||
<div class="visualization-container">
|
||||
<div class="viz-legend">
|
||||
<div class="legend-item">
|
||||
<div class="legend-color pools"></div>
|
||||
<span>Network Pools</span>
|
||||
</div>
|
||||
<div class="legend-item">
|
||||
<div class="legend-color allocated"></div>
|
||||
<span>Allocated Space</span>
|
||||
</div>
|
||||
<div class="legend-item">
|
||||
<div class="legend-color available"></div>
|
||||
<span>Available Space</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="address-blocks">
|
||||
<!-- Pool blocks (background) -->
|
||||
{#each result.visualization.setA as pool}
|
||||
<div
|
||||
class="address-block pool-block"
|
||||
style="left: {getBlockPosition(pool.start, result.visualization.totalRange)}%; width: {getBlockWidth(pool.start, pool.end, result.visualization.totalRange)}%"
|
||||
title="Pool: {pool.cidr || `${formatAddress(pool.start, result.visualization.version)}-${formatAddress(pool.end, result.visualization.version)}`}"
|
||||
>
|
||||
</div>
|
||||
{/each}
|
||||
|
||||
<!-- Allocated blocks -->
|
||||
{#each result.visualization.setB as allocation}
|
||||
<div
|
||||
class="address-block allocated-block"
|
||||
style="left: {getBlockPosition(allocation.start, result.visualization.totalRange)}%; width: {getBlockWidth(allocation.start, allocation.end, result.visualization.totalRange)}%"
|
||||
title="Allocated: {allocation.cidr || `${formatAddress(allocation.start, result.visualization.version)}-${formatAddress(allocation.end, result.visualization.version)}`}"
|
||||
>
|
||||
</div>
|
||||
{/each}
|
||||
|
||||
<!-- Available blocks (result) -->
|
||||
{#each result.visualization.result as available}
|
||||
<div
|
||||
class="address-block available-block"
|
||||
style="left: {getBlockPosition(available.start, result.visualization.totalRange)}%; width: {getBlockWidth(available.start, available.end, result.visualization.totalRange)}%"
|
||||
title="Available: {available.cidr}"
|
||||
>
|
||||
<span class="block-label">{available.cidr}</span>
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
|
||||
<div class="address-scale">
|
||||
<span class="scale-start">{formatAddress(result.visualization.totalRange.start, result.visualization.version)}</span>
|
||||
<span class="scale-end">{formatAddress(result.visualization.totalRange.end, result.visualization.version)}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{:else}
|
||||
<div class="error-message">
|
||||
<Icon name="alert-triangle" />
|
||||
<h4>Calculation Error</h4>
|
||||
<p>{result.error || 'Unknown error occurred'}</p>
|
||||
</div>
|
||||
{/if}
|
||||
</section>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<style lang="scss">
|
||||
.examples-section {
|
||||
margin-bottom: var(--spacing-lg);
|
||||
|
||||
h3 {
|
||||
margin-bottom: var(--spacing-md);
|
||||
color: var(--color-info-light);
|
||||
}
|
||||
}
|
||||
|
||||
.examples-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
||||
gap: var(--spacing-sm);
|
||||
}
|
||||
|
||||
.example-card {
|
||||
padding: var(--spacing-sm);
|
||||
background-color: var(--bg-secondary);
|
||||
border: 1px solid var(--border-primary);
|
||||
border-radius: var(--radius-md);
|
||||
cursor: pointer;
|
||||
transition: all var(--transition-fast);
|
||||
text-align: left;
|
||||
|
||||
&:hover {
|
||||
background-color: var(--surface-hover);
|
||||
border-color: var(--color-primary);
|
||||
}
|
||||
|
||||
&.active {
|
||||
background-color: var(--surface-hover);
|
||||
border-color: var(--color-primary);
|
||||
box-shadow: var(--shadow-sm);
|
||||
}
|
||||
}
|
||||
|
||||
.example-label {
|
||||
font-weight: 600;
|
||||
color: var(--text-primary);
|
||||
margin-bottom: var(--spacing-xs);
|
||||
}
|
||||
|
||||
.example-preview {
|
||||
font-family: var(--font-mono);
|
||||
font-size: var(--font-size-xs);
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
.input-section {
|
||||
margin-bottom: var(--spacing-lg);
|
||||
}
|
||||
|
||||
.input-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: var(--spacing-md);
|
||||
margin-bottom: var(--spacing-md);
|
||||
}
|
||||
|
||||
.filter-section {
|
||||
border-top: 1px solid var(--border-secondary);
|
||||
padding-top: var(--spacing-md);
|
||||
}
|
||||
|
||||
.prefix-input-wrapper {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
max-width: 200px;
|
||||
|
||||
input {
|
||||
padding-right: 3rem;
|
||||
}
|
||||
|
||||
.prefix-hint {
|
||||
position: absolute;
|
||||
right: 2.5rem;
|
||||
color: var(--text-secondary);
|
||||
font-family: var(--font-mono);
|
||||
font-size: var(--font-size-sm);
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.clear-filter {
|
||||
position: absolute;
|
||||
right: var(--spacing-xs);
|
||||
background: none;
|
||||
border: none;
|
||||
color: var(--text-secondary);
|
||||
cursor: pointer;
|
||||
padding: var(--spacing-xs);
|
||||
border-radius: var(--radius-sm);
|
||||
transition: all var(--transition-fast);
|
||||
|
||||
&:hover {
|
||||
background-color: var(--surface-hover);
|
||||
color: var(--text-primary);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.results-section {
|
||||
border-top: 1px solid var(--border-secondary);
|
||||
padding-top: var(--spacing-lg);
|
||||
}
|
||||
|
||||
.results-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: var(--spacing-lg);
|
||||
flex-wrap: wrap;
|
||||
gap: var(--spacing-md);
|
||||
|
||||
h3 {
|
||||
color: var(--color-success-light);
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.results-summary {
|
||||
display: flex;
|
||||
gap: var(--spacing-md);
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.metric {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--spacing-xs);
|
||||
font-size: var(--font-size-sm);
|
||||
color: var(--text-secondary);
|
||||
|
||||
:global(.icon) {
|
||||
color: var(--color-info);
|
||||
}
|
||||
}
|
||||
|
||||
.free-blocks-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
||||
gap: var(--spacing-md);
|
||||
}
|
||||
|
||||
.free-block-card {
|
||||
background-color: var(--bg-secondary);
|
||||
border: 1px solid var(--border-primary);
|
||||
border-radius: var(--radius-md);
|
||||
padding: var(--spacing-md);
|
||||
transition: all var(--transition-fast);
|
||||
|
||||
&:hover {
|
||||
border-color: var(--color-success);
|
||||
box-shadow: var(--shadow-sm);
|
||||
}
|
||||
}
|
||||
|
||||
.block-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: var(--spacing-sm);
|
||||
}
|
||||
|
||||
.block-cidr {
|
||||
font-family: var(--font-mono);
|
||||
font-size: var(--font-size-md);
|
||||
font-weight: 600;
|
||||
color: var(--color-success-light);
|
||||
background-color: var(--bg-tertiary);
|
||||
padding: var(--spacing-xs);
|
||||
border-radius: var(--radius-sm);
|
||||
}
|
||||
|
||||
.copy-button {
|
||||
background: none;
|
||||
border: none;
|
||||
color: var(--text-secondary);
|
||||
cursor: pointer;
|
||||
padding: var(--spacing-xs);
|
||||
border-radius: var(--radius-sm);
|
||||
transition: all var(--transition-fast);
|
||||
|
||||
&:hover {
|
||||
background-color: var(--surface-hover);
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
&.copied {
|
||||
color: var(--color-success);
|
||||
}
|
||||
}
|
||||
|
||||
.block-info {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: var(--spacing-sm);
|
||||
}
|
||||
|
||||
.address-count {
|
||||
font-size: var(--font-size-sm);
|
||||
color: var(--text-secondary);
|
||||
font-family: var(--font-mono);
|
||||
}
|
||||
|
||||
.can-fit {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--spacing-xs);
|
||||
font-size: var(--font-size-xs);
|
||||
color: var(--color-success);
|
||||
font-weight: 500;
|
||||
|
||||
:global(.icon) {
|
||||
color: var(--color-success);
|
||||
}
|
||||
}
|
||||
|
||||
.no-gaps {
|
||||
text-align: center;
|
||||
padding: var(--spacing-xl);
|
||||
color: var(--text-secondary);
|
||||
|
||||
:global(.icon) {
|
||||
font-size: 2rem;
|
||||
color: var(--color-warning);
|
||||
margin-bottom: var(--spacing-md);
|
||||
}
|
||||
|
||||
h4 {
|
||||
color: var(--text-primary);
|
||||
margin-bottom: var(--spacing-sm);
|
||||
}
|
||||
}
|
||||
|
||||
.error-message {
|
||||
text-align: center;
|
||||
padding: var(--spacing-lg);
|
||||
background-color: var(--bg-secondary);
|
||||
border: 1px solid var(--color-error);
|
||||
border-radius: var(--radius-md);
|
||||
|
||||
:global(.icon) {
|
||||
font-size: 1.5rem;
|
||||
color: var(--color-error);
|
||||
margin-bottom: var(--spacing-sm);
|
||||
}
|
||||
|
||||
h4 {
|
||||
color: var(--color-error-light);
|
||||
margin-bottom: var(--spacing-sm);
|
||||
}
|
||||
}
|
||||
|
||||
.visualization-toggle {
|
||||
margin-top: var(--spacing-lg);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.toggle-viz {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: var(--spacing-sm);
|
||||
padding: var(--spacing-sm) var(--spacing-md);
|
||||
background-color: var(--bg-secondary);
|
||||
border: 1px solid var(--border-primary);
|
||||
border-radius: var(--radius-md);
|
||||
color: var(--text-primary);
|
||||
cursor: pointer;
|
||||
transition: all var(--transition-fast);
|
||||
|
||||
&:hover {
|
||||
background-color: var(--surface-hover);
|
||||
border-color: var(--color-primary);
|
||||
}
|
||||
|
||||
&.active {
|
||||
background-color: var(--color-primary);
|
||||
color: var(--bg-primary);
|
||||
}
|
||||
}
|
||||
|
||||
.visualization-section {
|
||||
margin-top: var(--spacing-lg);
|
||||
padding: var(--spacing-lg);
|
||||
background-color: var(--bg-secondary);
|
||||
border: 1px solid var(--border-primary);
|
||||
border-radius: var(--radius-lg);
|
||||
|
||||
h4 {
|
||||
color: var(--color-info-light);
|
||||
margin-bottom: var(--spacing-md);
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.visualization-container {
|
||||
.viz-legend {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: var(--spacing-lg);
|
||||
margin-bottom: var(--spacing-lg);
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.legend-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--spacing-xs);
|
||||
font-size: var(--font-size-sm);
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
.legend-color {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
border-radius: var(--radius-sm);
|
||||
border: 1px solid var(--border-secondary);
|
||||
|
||||
&.pools {
|
||||
background-color: var(--color-info);
|
||||
opacity: 0.3;
|
||||
}
|
||||
|
||||
&.allocated {
|
||||
background-color: var(--color-error);
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
&.available {
|
||||
background-color: var(--color-success);
|
||||
}
|
||||
}
|
||||
|
||||
.address-blocks {
|
||||
position: relative;
|
||||
height: 60px;
|
||||
background-color: var(--bg-tertiary);
|
||||
border: 1px solid var(--border-secondary);
|
||||
border-radius: var(--radius-md);
|
||||
margin-bottom: var(--spacing-md);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.address-block {
|
||||
position: absolute;
|
||||
height: 100%;
|
||||
border-radius: var(--radius-sm);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: var(--font-size-xs);
|
||||
font-family: var(--font-mono);
|
||||
cursor: pointer;
|
||||
transition: opacity var(--transition-fast);
|
||||
|
||||
&:hover {
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
&.pool-block {
|
||||
background-color: var(--color-info);
|
||||
opacity: 0.3;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
&.allocated-block {
|
||||
background-color: var(--color-error);
|
||||
opacity: 0.7;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
&.available-block {
|
||||
background-color: var(--color-success);
|
||||
z-index: 3;
|
||||
color: var(--bg-primary);
|
||||
font-weight: 600;
|
||||
|
||||
.block-label {
|
||||
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.address-scale {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: var(--font-size-xs);
|
||||
font-family: var(--font-mono);
|
||||
color: var(--text-secondary);
|
||||
padding: 0 var(--spacing-xs);
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.input-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.examples-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.free-blocks-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.results-header {
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
.results-summary {
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,912 @@
|
||||
<script lang="ts">
|
||||
import { tooltip } from '$lib/actions/tooltip.js';
|
||||
import Icon from './Icon.svelte';
|
||||
|
||||
let input = $state('192.168.1.0/28');
|
||||
let maxDisplayLimit = $state(1000);
|
||||
let includeNetwork = $state(true);
|
||||
let includeBroadcast = $state(true);
|
||||
let result = $state<{
|
||||
success: boolean;
|
||||
error?: string;
|
||||
addresses: string[];
|
||||
totalCount: number;
|
||||
displayCount: number;
|
||||
truncated: boolean;
|
||||
networkInfo: {
|
||||
type: 'cidr' | 'range' | 'single';
|
||||
network?: string;
|
||||
broadcast?: string;
|
||||
firstUsable?: string;
|
||||
lastUsable?: string;
|
||||
totalHosts?: number;
|
||||
};
|
||||
} | null>(null);
|
||||
let isGenerating = $state(false);
|
||||
let copiedStates = $state<Record<string, boolean>>({});
|
||||
let selectedExample = $state<string | null>(null);
|
||||
let userModified = $state(false);
|
||||
|
||||
// Safety limits to prevent browser crashes
|
||||
const ABSOLUTE_MAX_DISPLAY = 10000;
|
||||
const ABSOLUTE_MAX_GENERATION = 100000;
|
||||
|
||||
const examples = [
|
||||
{
|
||||
label: 'Small Subnet /28',
|
||||
input: '192.168.1.0/28',
|
||||
description: '16 addresses'
|
||||
},
|
||||
{
|
||||
label: 'Point-to-Point /30',
|
||||
input: '10.0.0.0/30',
|
||||
description: '4 addresses'
|
||||
},
|
||||
{
|
||||
label: 'IP Range',
|
||||
input: '172.16.1.1-172.16.1.10',
|
||||
description: '10 addresses'
|
||||
},
|
||||
{
|
||||
label: 'Class C /24',
|
||||
input: '192.168.0.0/24',
|
||||
description: '256 addresses'
|
||||
},
|
||||
{
|
||||
label: 'IPv6 /126',
|
||||
input: '2001:db8::/126',
|
||||
description: '4 addresses'
|
||||
}
|
||||
];
|
||||
|
||||
function loadExample(example: typeof examples[0]) {
|
||||
input = example.input;
|
||||
selectedExample = example.label;
|
||||
userModified = false;
|
||||
enumerateIPs();
|
||||
}
|
||||
|
||||
function parseIP(ip: string): number {
|
||||
return ip.split('.').reduce((acc, octet) => (acc << 8) + parseInt(octet), 0) >>> 0;
|
||||
}
|
||||
|
||||
function ipToString(ip: number): string {
|
||||
return [
|
||||
(ip >>> 24) & 0xff,
|
||||
(ip >>> 16) & 0xff,
|
||||
(ip >>> 8) & 0xff,
|
||||
ip & 0xff
|
||||
].join('.');
|
||||
}
|
||||
|
||||
function parseIPv6(ip: string): bigint {
|
||||
// Simplified IPv6 parsing for basic cases
|
||||
const parts = ip.split(':');
|
||||
let result = 0n;
|
||||
|
||||
for (let i = 0; i < 8; i++) {
|
||||
if (i < parts.length && parts[i]) {
|
||||
const hexValue = parseInt(parts[i], 16);
|
||||
result = (result << 16n) + BigInt(hexValue);
|
||||
} else {
|
||||
result = result << 16n;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
function ipv6ToString(ip: bigint): string {
|
||||
const parts = [];
|
||||
for (let i = 0; i < 8; i++) {
|
||||
const part = (ip >> BigInt((7 - i) * 16)) & 0xffffn;
|
||||
parts.push(part.toString(16));
|
||||
}
|
||||
return parts.join(':');
|
||||
}
|
||||
|
||||
function parseCIDR(cidr: string): { network: number; size: number; prefixLength: number } {
|
||||
const [networkStr, prefixStr] = cidr.split('/');
|
||||
const prefixLength = parseInt(prefixStr);
|
||||
const network = parseIP(networkStr) & (0xffffffff << (32 - prefixLength));
|
||||
const size = Math.pow(2, 32 - prefixLength);
|
||||
return { network, prefixLength, size };
|
||||
}
|
||||
|
||||
function parseIPv6CIDR(cidr: string): { network: bigint; size: bigint; prefixLength: number } {
|
||||
const [networkStr, prefixStr] = cidr.split('/');
|
||||
const prefixLength = parseInt(prefixStr);
|
||||
const network = parseIPv6(networkStr) & (0xffffffffffffffffffffffffffffffffn << BigInt(128 - prefixLength));
|
||||
const size = 2n ** BigInt(128 - prefixLength);
|
||||
return { network, prefixLength, size };
|
||||
}
|
||||
|
||||
function parseRange(range: string): { start: number; end: number; count: number } {
|
||||
const [startStr, endStr] = range.split('-').map(s => s.trim());
|
||||
const start = parseIP(startStr);
|
||||
const end = parseIP(endStr);
|
||||
return { start, end, count: end - start + 1 };
|
||||
}
|
||||
|
||||
function estimateMemoryUsage(count: number): string {
|
||||
// Rough estimate: each IP string ~15 bytes + overhead
|
||||
const bytesPerIP = 20;
|
||||
const totalBytes = count * bytesPerIP;
|
||||
|
||||
if (totalBytes < 1024) return `${totalBytes} B`;
|
||||
if (totalBytes < 1024 * 1024) return `${Math.round(totalBytes / 1024)} KB`;
|
||||
return `${Math.round(totalBytes / (1024 * 1024))} MB`;
|
||||
}
|
||||
|
||||
async function enumerateIPs() {
|
||||
if (!input.trim()) {
|
||||
result = null;
|
||||
return;
|
||||
}
|
||||
|
||||
isGenerating = true;
|
||||
|
||||
try {
|
||||
const trimmed = input.trim();
|
||||
let addresses: string[] = [];
|
||||
let totalCount = 0;
|
||||
let networkInfo: any = {};
|
||||
|
||||
// Determine input type
|
||||
if (trimmed.includes('/')) {
|
||||
// CIDR notation
|
||||
if (trimmed.includes(':')) {
|
||||
// IPv6 CIDR
|
||||
const { network, size, prefixLength } = parseIPv6CIDR(trimmed);
|
||||
|
||||
if (size > BigInt(ABSOLUTE_MAX_GENERATION)) {
|
||||
throw new Error(`IPv6 /${prefixLength} would generate ${size.toLocaleString()} addresses. Maximum allowed: ${ABSOLUTE_MAX_GENERATION.toLocaleString()}`);
|
||||
}
|
||||
|
||||
totalCount = Number(size);
|
||||
networkInfo = {
|
||||
type: 'cidr' as const,
|
||||
network: ipv6ToString(network),
|
||||
totalHosts: totalCount
|
||||
};
|
||||
|
||||
// Generate IPv6 addresses
|
||||
const displayLimit = Math.min(maxDisplayLimit, ABSOLUTE_MAX_DISPLAY, totalCount);
|
||||
for (let i = 0n; i < BigInt(displayLimit); i++) {
|
||||
addresses.push(ipv6ToString(network + i));
|
||||
}
|
||||
} else {
|
||||
// IPv4 CIDR
|
||||
const { network, size, prefixLength } = parseCIDR(trimmed);
|
||||
|
||||
if (size > ABSOLUTE_MAX_GENERATION) {
|
||||
throw new Error(`/${prefixLength} would generate ${size.toLocaleString()} addresses. Maximum allowed: ${ABSOLUTE_MAX_GENERATION.toLocaleString()}`);
|
||||
}
|
||||
|
||||
totalCount = size;
|
||||
const broadcast = network + size - 1;
|
||||
|
||||
networkInfo = {
|
||||
type: 'cidr' as const,
|
||||
network: ipToString(network),
|
||||
broadcast: ipToString(broadcast),
|
||||
firstUsable: size > 2 ? ipToString(network + 1) : ipToString(network),
|
||||
lastUsable: size > 2 ? ipToString(broadcast - 1) : ipToString(broadcast),
|
||||
totalHosts: Math.max(0, size - 2)
|
||||
};
|
||||
|
||||
// Generate addresses based on inclusion options
|
||||
let startAddr = network;
|
||||
let endAddr = network + size;
|
||||
|
||||
if (!includeNetwork && size > 1) startAddr += 1;
|
||||
if (!includeBroadcast && size > 1) endAddr -= 1;
|
||||
|
||||
const displayLimit = Math.min(maxDisplayLimit, ABSOLUTE_MAX_DISPLAY, endAddr - startAddr);
|
||||
for (let i = 0; i < displayLimit; i++) {
|
||||
addresses.push(ipToString(startAddr + i));
|
||||
}
|
||||
}
|
||||
} else if (trimmed.includes('-')) {
|
||||
// IP range
|
||||
const { start, end, count } = parseRange(trimmed);
|
||||
|
||||
if (count > ABSOLUTE_MAX_GENERATION) {
|
||||
throw new Error(`Range would generate ${count.toLocaleString()} addresses. Maximum allowed: ${ABSOLUTE_MAX_GENERATION.toLocaleString()}`);
|
||||
}
|
||||
|
||||
totalCount = count;
|
||||
networkInfo = {
|
||||
type: 'range' as const,
|
||||
firstUsable: ipToString(start),
|
||||
lastUsable: ipToString(end)
|
||||
};
|
||||
|
||||
const displayLimit = Math.min(maxDisplayLimit, ABSOLUTE_MAX_DISPLAY, count);
|
||||
for (let i = 0; i < displayLimit; i++) {
|
||||
addresses.push(ipToString(start + i));
|
||||
}
|
||||
} else {
|
||||
// Single IP
|
||||
addresses = [trimmed];
|
||||
totalCount = 1;
|
||||
networkInfo = { type: 'single' as const };
|
||||
}
|
||||
|
||||
// Add small delay for UX (shows loading state)
|
||||
await new Promise(resolve => setTimeout(resolve, 100));
|
||||
|
||||
result = {
|
||||
success: true,
|
||||
addresses,
|
||||
totalCount,
|
||||
displayCount: addresses.length,
|
||||
truncated: addresses.length < totalCount,
|
||||
networkInfo
|
||||
};
|
||||
|
||||
} catch (error) {
|
||||
result = {
|
||||
success: false,
|
||||
error: error instanceof Error ? error.message : 'Unknown error occurred',
|
||||
addresses: [],
|
||||
totalCount: 0,
|
||||
displayCount: 0,
|
||||
truncated: false,
|
||||
networkInfo: { type: 'single' as const }
|
||||
};
|
||||
} finally {
|
||||
isGenerating = false;
|
||||
}
|
||||
}
|
||||
|
||||
function handleInputChange() {
|
||||
userModified = true;
|
||||
selectedExample = null;
|
||||
enumerateIPs();
|
||||
}
|
||||
|
||||
async function copyToClipboard(text: string, id: string) {
|
||||
try {
|
||||
await navigator.clipboard.writeText(text);
|
||||
copiedStates[id] = true;
|
||||
setTimeout(() => {
|
||||
copiedStates[id] = false;
|
||||
}, 2000);
|
||||
} catch (err) {
|
||||
console.error('Failed to copy text: ', err);
|
||||
}
|
||||
}
|
||||
|
||||
async function exportToCSV() {
|
||||
if (!result?.addresses.length) return;
|
||||
|
||||
// For large datasets, generate on-the-fly to avoid memory issues
|
||||
let csvContent = 'ip_address\n';
|
||||
|
||||
if (result.totalCount <= 10000) {
|
||||
// Small dataset - include all addresses
|
||||
for (const ip of result.addresses) {
|
||||
csvContent += `${ip}\n`;
|
||||
}
|
||||
} else {
|
||||
// Large dataset - this would need chunked generation
|
||||
// For now, just export what's displayed
|
||||
csvContent += '# Note: Only displaying first ' + result.addresses.length + ' addresses\n';
|
||||
for (const ip of result.addresses) {
|
||||
csvContent += `${ip}\n`;
|
||||
}
|
||||
}
|
||||
|
||||
const blob = new Blob([csvContent], { type: 'text/csv' });
|
||||
const url = URL.createObjectURL(blob);
|
||||
const a = document.createElement('a');
|
||||
a.href = url;
|
||||
a.download = `ip-enumerate-${Date.now()}.csv`;
|
||||
document.body.appendChild(a);
|
||||
a.click();
|
||||
document.body.removeChild(a);
|
||||
URL.revokeObjectURL(url);
|
||||
}
|
||||
|
||||
async function exportToJSON() {
|
||||
if (!result?.addresses.length) return;
|
||||
|
||||
const jsonData = {
|
||||
input: input,
|
||||
timestamp: new Date().toISOString(),
|
||||
totalCount: result.totalCount,
|
||||
displayCount: result.displayCount,
|
||||
truncated: result.truncated,
|
||||
networkInfo: result.networkInfo,
|
||||
addresses: result.addresses
|
||||
};
|
||||
|
||||
const blob = new Blob([JSON.stringify(jsonData, null, 2)], { type: 'application/json' });
|
||||
const url = URL.createObjectURL(blob);
|
||||
const a = document.createElement('a');
|
||||
a.href = url;
|
||||
a.download = `ip-enumerate-${Date.now()}.json`;
|
||||
document.body.appendChild(a);
|
||||
a.click();
|
||||
document.body.removeChild(a);
|
||||
URL.revokeObjectURL(url);
|
||||
}
|
||||
|
||||
// Generate on component load
|
||||
enumerateIPs();
|
||||
</script>
|
||||
|
||||
<div class="container">
|
||||
<!-- Input Card with everything -->
|
||||
<div class="card main-input-card">
|
||||
<header class="card-header">
|
||||
<h2>IP Enumerate</h2>
|
||||
<p>Safely enumerate all IP addresses in CIDR blocks and ranges</p>
|
||||
</header>
|
||||
|
||||
<input
|
||||
type="text"
|
||||
bind:value={input}
|
||||
oninput={handleInputChange}
|
||||
placeholder="192.168.1.0/28 or 10.0.0.1-10.0.0.10"
|
||||
class="network-input"
|
||||
/>
|
||||
|
||||
<div class="options-row">
|
||||
<div class="limit-control">
|
||||
<label>Max Display</label>
|
||||
<input
|
||||
type="number"
|
||||
bind:value={maxDisplayLimit}
|
||||
oninput={handleInputChange}
|
||||
min="1"
|
||||
max={ABSOLUTE_MAX_DISPLAY}
|
||||
class="limit-input"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="checkbox-group">
|
||||
<label class="checkbox-option">
|
||||
<input type="checkbox" bind:checked={includeNetwork} onchange={handleInputChange} />
|
||||
<span class="checkmark"></span>
|
||||
Network
|
||||
</label>
|
||||
<label class="checkbox-option">
|
||||
<input type="checkbox" bind:checked={includeBroadcast} onchange={handleInputChange} />
|
||||
<span class="checkmark"></span>
|
||||
Broadcast
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Quick Examples -->
|
||||
<div class="examples-section">
|
||||
<details class="examples-details">
|
||||
<summary class="examples-summary">
|
||||
<Icon name="chevron-right" size="sm" />
|
||||
<h4>Quick Examples</h4>
|
||||
</summary>
|
||||
<div class="examples-list">
|
||||
{#each examples as example}
|
||||
<button
|
||||
class="example-item {selectedExample === example.label ? 'active' : ''}"
|
||||
onclick={() => loadExample(example)}
|
||||
>
|
||||
<div class="example-label">{example.label}</div>
|
||||
<code class="example-input">{example.input}</code>
|
||||
<div class="example-desc">{example.description}</div>
|
||||
</button>
|
||||
{/each}
|
||||
</div>
|
||||
</details>
|
||||
</div>
|
||||
|
||||
<!-- Safety Warning -->
|
||||
<div class="safety-warning">
|
||||
<Icon name="alert-triangle" size="sm" />
|
||||
<div>
|
||||
<strong>Safety:</strong> Max {ABSOLUTE_MAX_DISPLAY.toLocaleString()} displayed, {ABSOLUTE_MAX_GENERATION.toLocaleString()} generated
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Loading -->
|
||||
{#if isGenerating}
|
||||
<div class="card loading-card">
|
||||
<div class="loading-content">
|
||||
<Icon name="loader" size="lg" />
|
||||
<span>Generating IP addresses...</span>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<!-- Results -->
|
||||
{#if result && !isGenerating}
|
||||
<div class="results-grid">
|
||||
{#if result.success}
|
||||
<!-- Summary Card -->
|
||||
<div class="card summary-card">
|
||||
<div class="card-header">
|
||||
<h3>
|
||||
<Icon name="list" size="sm" />
|
||||
Results
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div class="export-actions">
|
||||
<button class="export-btn" onclick={exportToJSON}>
|
||||
<Icon name="json-file" size="sm" />
|
||||
JSON
|
||||
</button>
|
||||
<button class="export-btn" onclick={exportToCSV}>
|
||||
<Icon name="csv-file" size="sm" />
|
||||
CSV
|
||||
</button>
|
||||
<button
|
||||
class="copy-btn {copiedStates['all-addresses'] ? 'copied' : ''}"
|
||||
onclick={() => copyToClipboard((result?.addresses || []).join('\n'), 'all-addresses')}
|
||||
>
|
||||
<Icon name={copiedStates['all-addresses'] ? 'check' : 'copy'} size="sm" />
|
||||
Copy All
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="summary-stats">
|
||||
<div class="stat">
|
||||
<span class="stat-value">{result.totalCount.toLocaleString()}</span>
|
||||
<span class="stat-label">Total</span>
|
||||
</div>
|
||||
<div class="stat">
|
||||
<span class="stat-value">{result.displayCount.toLocaleString()}</span>
|
||||
<span class="stat-label">Shown</span>
|
||||
</div>
|
||||
<div class="stat">
|
||||
<span class="stat-value">{estimateMemoryUsage(result.displayCount)}</span>
|
||||
<span class="stat-label">Memory</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{#if result.networkInfo.network}
|
||||
<div class="network-info">
|
||||
<div class="info-item">
|
||||
<span>Network:</span>
|
||||
<code>{result.networkInfo.network}</code>
|
||||
</div>
|
||||
{#if result.networkInfo.broadcast}
|
||||
<div class="info-item">
|
||||
<span>Broadcast:</span>
|
||||
<code>{result.networkInfo.broadcast}</code>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<!-- Addresses Card -->
|
||||
<div class="card addresses-card">
|
||||
<div class="card-header">
|
||||
<h3>
|
||||
<Icon name="target" size="sm" />
|
||||
IP Addresses
|
||||
</h3>
|
||||
{#if result.truncated}
|
||||
<span class="truncated-notice">Showing {result.displayCount.toLocaleString()} of {result.totalCount.toLocaleString()}</span>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<div class="addresses-list">
|
||||
{#each result.addresses as address, index}
|
||||
<div class="address-item">
|
||||
<span class="address-index">{index + 1}</span>
|
||||
<code class="address-code">{address}</code>
|
||||
<button
|
||||
class="copy-btn-small {copiedStates[address] ? 'copied' : ''}"
|
||||
onclick={() => copyToClipboard(address, address)}
|
||||
>
|
||||
<Icon name={copiedStates[address] ? 'check' : 'copy'} size="xs" />
|
||||
</button>
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{:else}
|
||||
<div class="card error-card">
|
||||
<div class="error-content">
|
||||
<Icon name="alert-triangle" size="lg" />
|
||||
<h3>Error</h3>
|
||||
<p>{result.error}</p>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<style lang="scss">
|
||||
.container {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.card {
|
||||
background: var(--bg-secondary);
|
||||
border: 1px solid var(--border-primary);
|
||||
border-radius: var(--radius-lg);
|
||||
padding: var(--spacing-lg);
|
||||
}
|
||||
|
||||
.main-input-card {
|
||||
margin-bottom: var(--spacing-xl);
|
||||
|
||||
.card-header {
|
||||
margin-bottom: var(--spacing-lg);
|
||||
|
||||
h2 {
|
||||
margin-bottom: var(--spacing-sm);
|
||||
font-size: var(--font-size-xl);
|
||||
}
|
||||
|
||||
p {
|
||||
color: var(--text-secondary);
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.safety-warning {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--spacing-sm);
|
||||
padding: var(--spacing-md);
|
||||
background: rgba(var(--color-warning-rgb), 0.1);
|
||||
border: 1px solid var(--color-warning);
|
||||
border-radius: var(--radius-md);
|
||||
color: var(--color-warning);
|
||||
font-size: var(--font-size-sm);
|
||||
margin: var(--spacing-lg) auto 0;
|
||||
}
|
||||
|
||||
.network-input {
|
||||
width: 100%;
|
||||
padding: var(--spacing-md);
|
||||
margin-bottom: var(--spacing-lg);
|
||||
font-size: var(--font-size-lg);
|
||||
font-family: var(--font-mono);
|
||||
border: 2px solid var(--border-primary);
|
||||
border-radius: var(--radius-md);
|
||||
background: var(--bg-primary);
|
||||
}
|
||||
|
||||
.options-row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
gap: var(--spacing-lg);
|
||||
margin-bottom: var(--spacing-lg);
|
||||
|
||||
@media (max-width: 768px) {
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
}
|
||||
}
|
||||
|
||||
.examples-section {
|
||||
border-top: 1px solid var(--border-secondary);
|
||||
padding-top: var(--spacing-lg);
|
||||
}
|
||||
|
||||
.limit-control {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--spacing-xs);
|
||||
|
||||
label {
|
||||
font-size: var(--font-size-sm);
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
.limit-input {
|
||||
width: 100px;
|
||||
padding: var(--spacing-xs);
|
||||
border: 1px solid var(--border-primary);
|
||||
border-radius: var(--radius-sm);
|
||||
background: var(--bg-primary);
|
||||
}
|
||||
}
|
||||
|
||||
.checkbox-group {
|
||||
display: flex;
|
||||
gap: var(--spacing-md);
|
||||
|
||||
@media (max-width: 768px) {
|
||||
justify-content: space-around;
|
||||
}
|
||||
}
|
||||
|
||||
.checkbox-option {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--spacing-xs);
|
||||
cursor: pointer;
|
||||
|
||||
input[type="checkbox"] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.checkmark {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
border: 2px solid var(--border-primary);
|
||||
border-radius: var(--radius-sm);
|
||||
background: var(--bg-primary);
|
||||
position: relative;
|
||||
|
||||
&::after {
|
||||
content: '✓';
|
||||
position: absolute;
|
||||
top: -2px;
|
||||
left: 1px;
|
||||
font-size: 12px;
|
||||
color: var(--color-primary);
|
||||
opacity: 0;
|
||||
transition: opacity var(--transition-fast);
|
||||
}
|
||||
}
|
||||
|
||||
input[type="checkbox"]:checked + .checkmark {
|
||||
background: var(--color-primary);
|
||||
border-color: var(--color-primary);
|
||||
|
||||
&::after {
|
||||
opacity: 1;
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.examples-details {
|
||||
summary {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--spacing-xs);
|
||||
cursor: pointer;
|
||||
list-style: none;
|
||||
|
||||
&::-webkit-details-marker {
|
||||
display: none;
|
||||
}
|
||||
|
||||
:global(.icon) {
|
||||
transition: transform var(--transition-fast);
|
||||
}
|
||||
|
||||
h3 {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&[open] summary :global(.icon) {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
}
|
||||
|
||||
.examples-list {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
||||
gap: var(--spacing-sm);
|
||||
margin-top: var(--spacing-md);
|
||||
}
|
||||
|
||||
.example-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--spacing-xs);
|
||||
padding: var(--spacing-sm);
|
||||
border: 1px solid var(--border-secondary);
|
||||
border-radius: var(--radius-md);
|
||||
background: var(--bg-primary);
|
||||
cursor: pointer;
|
||||
transition: all var(--transition-fast);
|
||||
|
||||
&:hover,
|
||||
&.active {
|
||||
border-color: var(--color-primary);
|
||||
background: var(--surface-hover);
|
||||
}
|
||||
|
||||
.example-label {
|
||||
font-weight: 600;
|
||||
font-size: var(--font-size-sm);
|
||||
}
|
||||
|
||||
.example-input {
|
||||
font-family: var(--font-mono);
|
||||
font-size: var(--font-size-xs);
|
||||
color: var(--color-primary);
|
||||
background: var(--bg-tertiary);
|
||||
padding: 2px var(--spacing-xs);
|
||||
border-radius: var(--radius-sm);
|
||||
}
|
||||
|
||||
.example-desc {
|
||||
font-size: var(--font-size-xs);
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.loading-card {
|
||||
text-align: center;
|
||||
.loading-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: var(--spacing-md);
|
||||
}
|
||||
}
|
||||
|
||||
.results-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 2fr;
|
||||
gap: var(--spacing-lg);
|
||||
|
||||
@media (max-width: 768px) {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
.summary-card {
|
||||
.export-actions {
|
||||
display: flex;
|
||||
gap: var(--spacing-sm);
|
||||
margin-bottom: var(--spacing-lg);
|
||||
justify-content: center;
|
||||
|
||||
@media (max-width: 768px) {
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
|
||||
.export-btn,
|
||||
.copy-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--spacing-xs);
|
||||
padding: var(--spacing-xs) var(--spacing-sm);
|
||||
border: 1px solid var(--border-primary);
|
||||
border-radius: var(--radius-sm);
|
||||
background: var(--bg-primary);
|
||||
font-size: var(--font-size-sm);
|
||||
cursor: pointer;
|
||||
transition: all var(--transition-fast);
|
||||
|
||||
&:hover {
|
||||
background: var(--surface-hover);
|
||||
}
|
||||
|
||||
&.copied {
|
||||
color: var(--color-success);
|
||||
}
|
||||
}
|
||||
|
||||
.summary-stats {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
|
||||
gap: var(--spacing-md);
|
||||
margin: var(--spacing-lg) 0;
|
||||
}
|
||||
|
||||
.stat {
|
||||
text-align: center;
|
||||
|
||||
.stat-value {
|
||||
display: block;
|
||||
font-size: var(--font-size-lg);
|
||||
font-weight: 700;
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.stat-label {
|
||||
font-size: var(--font-size-xs);
|
||||
color: var(--text-secondary);
|
||||
text-transform: uppercase;
|
||||
}
|
||||
}
|
||||
|
||||
.network-info {
|
||||
border-top: 1px solid var(--border-secondary);
|
||||
padding-top: var(--spacing-md);
|
||||
|
||||
.info-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: var(--spacing-xs);
|
||||
|
||||
span {
|
||||
font-size: var(--font-size-sm);
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
code {
|
||||
font-family: var(--font-mono);
|
||||
background: var(--bg-tertiary);
|
||||
padding: 2px var(--spacing-xs);
|
||||
border-radius: var(--radius-sm);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.addresses-card {
|
||||
.truncated-notice {
|
||||
font-size: var(--font-size-xs);
|
||||
color: var(--color-warning);
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.addresses-list {
|
||||
max-height: 400px;
|
||||
overflow-y: auto;
|
||||
border: 1px solid var(--border-secondary);
|
||||
border-radius: var(--radius-md);
|
||||
background: var(--bg-primary);
|
||||
}
|
||||
|
||||
.address-item {
|
||||
display: grid;
|
||||
grid-template-columns: auto 1fr auto;
|
||||
align-items: center;
|
||||
gap: var(--spacing-sm);
|
||||
padding: var(--spacing-xs) var(--spacing-sm);
|
||||
border-bottom: 1px solid var(--border-secondary);
|
||||
|
||||
&:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background: var(--surface-hover);
|
||||
}
|
||||
|
||||
.address-index {
|
||||
font-size: var(--font-size-xs);
|
||||
color: var(--text-secondary);
|
||||
width: 40px;
|
||||
}
|
||||
|
||||
.address-code {
|
||||
font-family: var(--font-mono);
|
||||
font-size: var(--font-size-sm);
|
||||
}
|
||||
|
||||
.copy-btn-small {
|
||||
padding: var(--spacing-xs);
|
||||
border: none;
|
||||
background: none;
|
||||
cursor: pointer;
|
||||
color: var(--text-secondary);
|
||||
transition: color var(--transition-fast);
|
||||
|
||||
&:hover {
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
&.copied {
|
||||
color: var(--color-success);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.error-card {
|
||||
.error-content {
|
||||
text-align: center;
|
||||
color: var(--color-error);
|
||||
|
||||
h3 {
|
||||
margin: var(--spacing-md) 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,946 @@
|
||||
<script lang="ts">
|
||||
import { tooltip } from '$lib/actions/tooltip.js';
|
||||
import Icon from './Icon.svelte';
|
||||
|
||||
let input = $state('2001:db8::1234:5678');
|
||||
let result = $state<{
|
||||
success: boolean;
|
||||
error?: string;
|
||||
unicastAddress: string;
|
||||
solicitedNodeAddress: string;
|
||||
details: {
|
||||
normalizedUnicast: string;
|
||||
last24Bits: string;
|
||||
multicastPrefix: string;
|
||||
explanation: string[];
|
||||
};
|
||||
} | null>(null);
|
||||
let copiedStates = $state<Record<string, boolean>>({});
|
||||
let selectedExample = $state<string | null>(null);
|
||||
let userModified = $state(false);
|
||||
|
||||
const examples = [
|
||||
{
|
||||
label: 'Standard Unicast',
|
||||
address: '2001:db8::1234:5678',
|
||||
description: 'Regular IPv6 unicast address'
|
||||
},
|
||||
{
|
||||
label: 'Link-Local',
|
||||
address: 'fe80::1234:5678:9abc:def0',
|
||||
description: 'Link-local unicast address'
|
||||
},
|
||||
{
|
||||
label: 'Compressed Form',
|
||||
address: '2001:db8::1',
|
||||
description: 'Heavily compressed address'
|
||||
},
|
||||
{
|
||||
label: 'Full Form',
|
||||
address: '2001:0db8:0000:0000:0000:0000:1234:5678',
|
||||
description: 'Uncompressed IPv6 address'
|
||||
},
|
||||
{
|
||||
label: 'Interface ID Only',
|
||||
address: '::1234:5678:9abc:def0',
|
||||
description: 'Only interface identifier specified'
|
||||
}
|
||||
];
|
||||
|
||||
function loadExample(example: typeof examples[0]) {
|
||||
input = example.address;
|
||||
selectedExample = example.label;
|
||||
userModified = false;
|
||||
calculateSolicitedNode();
|
||||
}
|
||||
|
||||
function expandIPv6(address: string): string {
|
||||
// Remove zone ID if present
|
||||
const cleanAddress = address.split('%')[0];
|
||||
|
||||
// Handle :: compression
|
||||
let expanded = cleanAddress;
|
||||
if (cleanAddress.includes('::')) {
|
||||
const parts = cleanAddress.split('::');
|
||||
const leftParts = parts[0] ? parts[0].split(':') : [];
|
||||
const rightParts = parts[1] ? parts[1].split(':') : [];
|
||||
|
||||
const totalParts = leftParts.length + rightParts.length;
|
||||
const missingParts = 8 - totalParts;
|
||||
|
||||
const middleParts = Array(missingParts).fill('0000');
|
||||
const allParts = [...leftParts, ...middleParts, ...rightParts];
|
||||
expanded = allParts.join(':');
|
||||
}
|
||||
|
||||
// Pad each group to 4 characters
|
||||
return expanded
|
||||
.split(':')
|
||||
.map(group => group.padStart(4, '0'))
|
||||
.join(':');
|
||||
}
|
||||
|
||||
function isValidIPv6(address: string): boolean {
|
||||
try {
|
||||
const expanded = expandIPv6(address);
|
||||
const groups = expanded.split(':');
|
||||
|
||||
if (groups.length !== 8) return false;
|
||||
|
||||
for (const group of groups) {
|
||||
if (group.length !== 4) return false;
|
||||
if (!/^[0-9a-fA-F]{4}$/.test(group)) return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function calculateSolicitedNodeMulticast(unicastAddress: string): string {
|
||||
const expanded = expandIPv6(unicastAddress);
|
||||
const groups = expanded.split(':');
|
||||
|
||||
// Get the last 24 bits (last 3 hex digits of the last two groups)
|
||||
const secondLastGroup = groups[6]; // e.g., "1234"
|
||||
const lastGroup = groups[7]; // e.g., "5678"
|
||||
|
||||
// Take last digit of second-last group and all digits of last group
|
||||
const last24Bits = secondLastGroup.slice(-1) + lastGroup; // "45678"
|
||||
|
||||
// Solicited-node multicast prefix is ff02::1:ff00:0/104
|
||||
const solicitedNodePrefix = 'ff02:0000:0000:0000:0000:0001:ff';
|
||||
|
||||
// Insert the 24 bits into the last group
|
||||
const lastTwoHex = last24Bits.slice(0, 2); // "45"
|
||||
const lastFourHex = last24Bits.slice(1); // "5678"
|
||||
|
||||
return `${solicitedNodePrefix}${lastTwoHex}:${lastFourHex}`;
|
||||
}
|
||||
|
||||
function calculateSolicitedNode() {
|
||||
if (!input.trim()) {
|
||||
result = null;
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
const trimmed = input.trim();
|
||||
|
||||
// Basic format validation
|
||||
if (!trimmed.includes(':')) {
|
||||
throw new Error('IPv6 addresses must contain colons (:)');
|
||||
}
|
||||
|
||||
// Validate IPv6 format
|
||||
if (!isValidIPv6(trimmed)) {
|
||||
throw new Error('Invalid IPv6 address format');
|
||||
}
|
||||
|
||||
// Check if it's already a multicast address
|
||||
const expanded = expandIPv6(trimmed);
|
||||
const firstGroup = expanded.split(':')[0];
|
||||
if (firstGroup.toLowerCase().startsWith('ff')) {
|
||||
throw new Error('Input is already a multicast address. Please provide a unicast IPv6 address.');
|
||||
}
|
||||
|
||||
const normalizedUnicast = expandIPv6(trimmed);
|
||||
const solicitedNodeAddress = calculateSolicitedNodeMulticast(trimmed);
|
||||
const groups = normalizedUnicast.split(':');
|
||||
const last24Bits = groups[6].slice(-1) + groups[7];
|
||||
|
||||
const explanation = [
|
||||
`1. Take the last 24 bits of the unicast address: ${groups[6]}:${groups[7]} → ${last24Bits}`,
|
||||
`2. Prepend the solicited-node multicast prefix: ff02::1:ff`,
|
||||
`3. Insert the 24 bits: ff02::1:ff${last24Bits.slice(0, 2)}:${last24Bits.slice(1)}`,
|
||||
`4. Result: ${solicitedNodeAddress.toLowerCase()}`
|
||||
];
|
||||
|
||||
result = {
|
||||
success: true,
|
||||
unicastAddress: trimmed,
|
||||
solicitedNodeAddress: solicitedNodeAddress.toLowerCase(),
|
||||
details: {
|
||||
normalizedUnicast,
|
||||
last24Bits,
|
||||
multicastPrefix: 'ff02::1:ff',
|
||||
explanation
|
||||
}
|
||||
};
|
||||
|
||||
} catch (error) {
|
||||
result = {
|
||||
success: false,
|
||||
error: error instanceof Error ? error.message : 'Unknown error occurred',
|
||||
unicastAddress: input,
|
||||
solicitedNodeAddress: '',
|
||||
details: {
|
||||
normalizedUnicast: '',
|
||||
last24Bits: '',
|
||||
multicastPrefix: '',
|
||||
explanation: []
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
function handleInputChange() {
|
||||
userModified = true;
|
||||
selectedExample = null;
|
||||
calculateSolicitedNode();
|
||||
}
|
||||
|
||||
async function copyToClipboard(text: string, id: string) {
|
||||
try {
|
||||
await navigator.clipboard.writeText(text);
|
||||
copiedStates[id] = true;
|
||||
setTimeout(() => {
|
||||
copiedStates[id] = false;
|
||||
}, 2000);
|
||||
} catch (err) {
|
||||
console.error('Failed to copy text: ', err);
|
||||
}
|
||||
}
|
||||
|
||||
// Calculate on component load
|
||||
calculateSolicitedNode();
|
||||
</script>
|
||||
|
||||
<div class="card">
|
||||
<header class="card-header">
|
||||
<h1>IPv6 Solicited-Node Multicast</h1>
|
||||
<p>Compute solicited-node multicast addresses from IPv6 unicast for Neighbor Discovery Protocol</p>
|
||||
</header>
|
||||
|
||||
<!-- Educational Overview -->
|
||||
<section class="overview-section">
|
||||
<div class="overview-content">
|
||||
<div class="overview-item">
|
||||
<Icon name="info" size="sm" />
|
||||
<div>
|
||||
<strong>Purpose:</strong> Solicited-node multicast addresses enable efficient IPv6 Neighbor Discovery by targeting specific network nodes instead of all nodes.
|
||||
</div>
|
||||
</div>
|
||||
<div class="overview-item">
|
||||
<Icon name="target" size="sm" />
|
||||
<div>
|
||||
<strong>Format:</strong> <code>ff02::1:ffXX:XXXX</code> where XX:XXXX are the last 24 bits of the unicast address.
|
||||
</div>
|
||||
</div>
|
||||
<div class="overview-item">
|
||||
<Icon name="network" size="sm" />
|
||||
<div>
|
||||
<strong>Usage:</strong> Used in NDP Neighbor Solicitation messages for address resolution and duplicate address detection.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Examples -->
|
||||
<section class="examples-section">
|
||||
<details class="examples-details">
|
||||
<summary class="examples-summary">
|
||||
<Icon name="chevron-right" size="sm" />
|
||||
<h3>Quick Examples</h3>
|
||||
</summary>
|
||||
<div class="examples-grid">
|
||||
{#each examples as example}
|
||||
<button
|
||||
class="example-card {selectedExample === example.label ? 'active' : ''}"
|
||||
onclick={() => loadExample(example)}
|
||||
>
|
||||
<div class="example-label">{example.label}</div>
|
||||
<code class="example-address">{example.address}</code>
|
||||
<div class="example-description">{example.description}</div>
|
||||
</button>
|
||||
{/each}
|
||||
</div>
|
||||
</details>
|
||||
</section>
|
||||
|
||||
<!-- Input Section -->
|
||||
<section class="input-section">
|
||||
<div class="input-group">
|
||||
<label
|
||||
for="ipv6-input"
|
||||
use:tooltip={"Enter a valid IPv6 unicast address (not multicast) to calculate its solicited-node multicast address"}
|
||||
>
|
||||
<Icon name="globe-2" size="sm" />
|
||||
IPv6 Unicast Address
|
||||
</label>
|
||||
<input
|
||||
id="ipv6-input"
|
||||
type="text"
|
||||
bind:value={input}
|
||||
oninput={handleInputChange}
|
||||
placeholder="2001:db8::1234:5678"
|
||||
class="ipv6-input {result?.success === true ? 'valid' : result?.success === false ? 'invalid' : ''}"
|
||||
spellcheck="false"
|
||||
/>
|
||||
<div class="input-hint">
|
||||
Enter any valid IPv6 unicast address in any format (compressed or full)
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Results -->
|
||||
{#if result && input.trim()}
|
||||
<section class="results-section">
|
||||
{#if result.success}
|
||||
<div class="results-header">
|
||||
<h3>
|
||||
<Icon name="check-circle" size="sm" />
|
||||
Solicited-Node Calculation
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<!-- Main Result -->
|
||||
<div class="result-main">
|
||||
<div class="result-item">
|
||||
<div class="result-label">
|
||||
<Icon name="globe-2" size="sm" />
|
||||
Unicast Address
|
||||
</div>
|
||||
<div class="result-content">
|
||||
<code class="result-value unicast">{result.details.normalizedUnicast}</code>
|
||||
<button
|
||||
class="copy-button {copiedStates['unicast'] ? 'copied' : ''}"
|
||||
onclick={() => copyToClipboard(result.details.normalizedUnicast, 'unicast')}
|
||||
>
|
||||
<Icon name={copiedStates['unicast'] ? 'check' : 'copy'} size="sm" />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="arrow-down">
|
||||
<Icon name="arrow-down" size="lg" />
|
||||
</div>
|
||||
|
||||
<div class="result-item highlight">
|
||||
<div class="result-label">
|
||||
<Icon name="users" size="sm" />
|
||||
Solicited-Node Multicast
|
||||
</div>
|
||||
<div class="result-content">
|
||||
<code class="result-value multicast">{result.solicitedNodeAddress}</code>
|
||||
<button
|
||||
class="copy-button {copiedStates['multicast'] ? 'copied' : ''}"
|
||||
onclick={() => copyToClipboard(result.solicitedNodeAddress, 'multicast')}
|
||||
>
|
||||
<Icon name={copiedStates['multicast'] ? 'check' : 'copy'} size="sm" />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Calculation Steps -->
|
||||
<div class="calculation-steps">
|
||||
<h4>
|
||||
<Icon name="list-ordered" size="sm" />
|
||||
Calculation Steps
|
||||
</h4>
|
||||
<div class="steps-list">
|
||||
{#each result.details.explanation as step, index}
|
||||
<div class="step-item">
|
||||
<div class="step-number">{index + 1}</div>
|
||||
<div class="step-content">{step}</div>
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Technical Details -->
|
||||
<div class="technical-details">
|
||||
<h4>
|
||||
<Icon name="settings" size="sm" />
|
||||
Technical Details
|
||||
</h4>
|
||||
<div class="details-grid">
|
||||
<div class="detail-item">
|
||||
<span class="detail-label">Last 24 bits:</span>
|
||||
<code class="detail-value">{result.details.last24Bits}</code>
|
||||
</div>
|
||||
<div class="detail-item">
|
||||
<span class="detail-label">Multicast prefix:</span>
|
||||
<code class="detail-value">{result.details.multicastPrefix}</code>
|
||||
</div>
|
||||
<div class="detail-item">
|
||||
<span class="detail-label">Address scope:</span>
|
||||
<span class="detail-value">Link-local multicast (ff02)</span>
|
||||
</div>
|
||||
<div class="detail-item">
|
||||
<span class="detail-label">Multicast flag:</span>
|
||||
<span class="detail-value">Well-known (0)</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{:else}
|
||||
<div class="error-result">
|
||||
<Icon name="alert-triangle" size="lg" />
|
||||
<h4>Invalid IPv6 Address</h4>
|
||||
<p>{result.error}</p>
|
||||
<div class="error-help">
|
||||
<strong>Valid formats include:</strong>
|
||||
<ul>
|
||||
<li>Full form: 2001:0db8:0000:0000:0000:0000:1234:5678</li>
|
||||
<li>Compressed: 2001:db8::1234:5678</li>
|
||||
<li>Link-local: fe80::1234:5678:9abc:def0</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</section>
|
||||
{/if}
|
||||
|
||||
<!-- Educational Content -->
|
||||
<section class="education-section">
|
||||
<div class="education-grid">
|
||||
<div class="education-card">
|
||||
<h4>
|
||||
<Icon name="book-open" size="sm" />
|
||||
What is NDP?
|
||||
</h4>
|
||||
<p>
|
||||
Neighbor Discovery Protocol (NDP) is IPv6's equivalent to IPv4's ARP. It's used for address resolution,
|
||||
router discovery, and duplicate address detection on local network segments.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="education-card">
|
||||
<h4>
|
||||
<Icon name="zap" size="sm" />
|
||||
Why Solicited-Node?
|
||||
</h4>
|
||||
<p>
|
||||
Instead of broadcasting to all nodes (like ARP), IPv6 uses solicited-node multicast to efficiently
|
||||
target only nodes that might have the specific address, reducing network traffic.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="education-card">
|
||||
<h4>
|
||||
<Icon name="shield" size="sm" />
|
||||
Address Collision
|
||||
</h4>
|
||||
<p>
|
||||
Multiple unicast addresses can map to the same solicited-node multicast address. This is acceptable
|
||||
since nodes will ignore solicitations for addresses they don't own.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="education-card">
|
||||
<h4>
|
||||
<Icon name="layers" size="sm" />
|
||||
Multicast Membership
|
||||
</h4>
|
||||
<p>
|
||||
Every IPv6 node automatically joins the solicited-node multicast group for each of its unicast
|
||||
addresses, enabling it to receive neighbor solicitations.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<style lang="scss">
|
||||
.overview-section {
|
||||
margin-bottom: var(--spacing-xl);
|
||||
padding: var(--spacing-lg);
|
||||
background-color: var(--bg-secondary);
|
||||
border-radius: var(--radius-lg);
|
||||
border: 1px solid var(--border-primary);
|
||||
}
|
||||
|
||||
.overview-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--spacing-md);
|
||||
}
|
||||
|
||||
.overview-item {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: var(--spacing-sm);
|
||||
color: var(--text-secondary);
|
||||
|
||||
code {
|
||||
background-color: var(--bg-tertiary);
|
||||
color: var(--color-primary-light);
|
||||
padding: 2px var(--spacing-xs);
|
||||
border-radius: var(--radius-sm);
|
||||
font-family: var(--font-mono);
|
||||
}
|
||||
|
||||
strong {
|
||||
color: var(--text-primary);
|
||||
}
|
||||
}
|
||||
|
||||
.examples-section {
|
||||
margin-bottom: var(--spacing-xl);
|
||||
}
|
||||
|
||||
.examples-details {
|
||||
border: 1px solid var(--border-secondary);
|
||||
border-radius: var(--radius-md);
|
||||
background-color: var(--bg-secondary);
|
||||
|
||||
&[open] {
|
||||
.examples-summary :global(.icon) {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.examples-summary {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--spacing-xs);
|
||||
padding: var(--spacing-md);
|
||||
cursor: pointer;
|
||||
list-style: none;
|
||||
user-select: none;
|
||||
transition: all var(--transition-fast);
|
||||
|
||||
&:hover {
|
||||
background-color: var(--surface-hover);
|
||||
}
|
||||
|
||||
&::-webkit-details-marker {
|
||||
display: none;
|
||||
}
|
||||
|
||||
:global(.icon) {
|
||||
transition: transform var(--transition-fast);
|
||||
color: var(--color-primary);
|
||||
}
|
||||
|
||||
h3 {
|
||||
margin: 0;
|
||||
color: var(--color-info-light);
|
||||
font-size: var(--font-size-md);
|
||||
}
|
||||
}
|
||||
|
||||
.examples-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
||||
gap: var(--spacing-sm);
|
||||
padding: var(--spacing-md);
|
||||
}
|
||||
|
||||
.example-card {
|
||||
padding: var(--spacing-md);
|
||||
background-color: var(--bg-secondary);
|
||||
border: 1px solid var(--border-primary);
|
||||
border-radius: var(--radius-md);
|
||||
cursor: pointer;
|
||||
transition: all var(--transition-fast);
|
||||
text-align: left;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--spacing-xs);
|
||||
|
||||
&:hover {
|
||||
background-color: var(--surface-hover);
|
||||
border-color: var(--color-primary);
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
&.active {
|
||||
background-color: var(--surface-hover);
|
||||
border-color: var(--color-primary);
|
||||
box-shadow: var(--shadow-md);
|
||||
}
|
||||
}
|
||||
|
||||
.example-label {
|
||||
font-weight: 600;
|
||||
color: var(--text-primary);
|
||||
font-size: var(--font-size-sm);
|
||||
}
|
||||
|
||||
.example-address {
|
||||
font-family: var(--font-mono);
|
||||
font-size: var(--font-size-xs);
|
||||
color: var(--color-primary-light);
|
||||
background-color: var(--bg-tertiary);
|
||||
padding: var(--spacing-xs);
|
||||
border-radius: var(--radius-sm);
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.example-description {
|
||||
font-size: var(--font-size-xs);
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
.input-section {
|
||||
margin-bottom: var(--spacing-xl);
|
||||
}
|
||||
|
||||
.input-group {
|
||||
label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--spacing-xs);
|
||||
margin-bottom: var(--spacing-sm);
|
||||
font-weight: 600;
|
||||
color: var(--text-primary);
|
||||
font-size: var(--font-size-md);
|
||||
}
|
||||
}
|
||||
|
||||
.ipv6-input {
|
||||
width: 100%;
|
||||
padding: var(--spacing-md) var(--spacing-lg);
|
||||
font-size: var(--font-size-lg);
|
||||
font-family: var(--font-mono);
|
||||
border: 2px solid var(--border-primary);
|
||||
border-radius: var(--radius-lg);
|
||||
background-color: var(--bg-secondary);
|
||||
color: var(--text-primary);
|
||||
transition: all var(--transition-fast);
|
||||
|
||||
&:focus {
|
||||
outline: none;
|
||||
border-color: var(--color-primary);
|
||||
box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.1);
|
||||
}
|
||||
|
||||
&.valid {
|
||||
border-color: var(--color-success);
|
||||
}
|
||||
|
||||
&.invalid {
|
||||
border-color: var(--color-error);
|
||||
}
|
||||
}
|
||||
|
||||
.input-hint {
|
||||
margin-top: var(--spacing-xs);
|
||||
font-size: var(--font-size-sm);
|
||||
color: var(--text-secondary);
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.results-section {
|
||||
border-top: 1px solid var(--border-secondary);
|
||||
padding-top: var(--spacing-xl);
|
||||
margin-bottom: var(--spacing-xl);
|
||||
}
|
||||
|
||||
.results-header {
|
||||
margin-bottom: var(--spacing-lg);
|
||||
|
||||
h3 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--spacing-xs);
|
||||
color: var(--color-success-light);
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.result-main {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: var(--spacing-lg);
|
||||
margin-bottom: var(--spacing-xl);
|
||||
}
|
||||
|
||||
.result-item {
|
||||
width: 100%;
|
||||
max-width: 600px;
|
||||
padding: var(--spacing-lg);
|
||||
background-color: var(--bg-secondary);
|
||||
border: 1px solid var(--border-primary);
|
||||
border-radius: var(--radius-lg);
|
||||
|
||||
&.highlight {
|
||||
border-color: var(--color-success);
|
||||
background-color: var(--color-success);
|
||||
color: var(--bg-primary);
|
||||
}
|
||||
}
|
||||
|
||||
.result-label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--spacing-xs);
|
||||
font-weight: 600;
|
||||
margin-bottom: var(--spacing-md);
|
||||
font-size: var(--font-size-md);
|
||||
|
||||
.result-item.highlight & {
|
||||
color: var(--bg-primary);
|
||||
}
|
||||
}
|
||||
|
||||
.result-content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: var(--spacing-md);
|
||||
}
|
||||
|
||||
.result-value {
|
||||
font-family: var(--font-mono);
|
||||
font-size: var(--font-size-lg);
|
||||
font-weight: 600;
|
||||
padding: var(--spacing-sm) var(--spacing-md);
|
||||
background-color: var(--bg-tertiary);
|
||||
border-radius: var(--radius-md);
|
||||
word-break: break-all;
|
||||
flex: 1;
|
||||
|
||||
&.unicast {
|
||||
color: var(--color-primary-light);
|
||||
}
|
||||
|
||||
&.multicast {
|
||||
background-color: rgba(255, 255, 255, 0.1);
|
||||
color: var(--bg-primary);
|
||||
}
|
||||
}
|
||||
|
||||
.copy-button {
|
||||
background: none;
|
||||
border: none;
|
||||
color: var(--text-secondary);
|
||||
cursor: pointer;
|
||||
padding: var(--spacing-sm);
|
||||
border-radius: var(--radius-md);
|
||||
transition: all var(--transition-fast);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--spacing-xs);
|
||||
|
||||
&:hover {
|
||||
background-color: var(--surface-hover);
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
&.copied {
|
||||
color: var(--color-success);
|
||||
}
|
||||
|
||||
.result-item.highlight & {
|
||||
color: var(--bg-primary);
|
||||
|
||||
&:hover {
|
||||
background-color: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.arrow-down {
|
||||
color: var(--color-primary);
|
||||
animation: bounce 2s infinite;
|
||||
}
|
||||
|
||||
@keyframes bounce {
|
||||
0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
|
||||
40% { transform: translateY(-10px); }
|
||||
60% { transform: translateY(-5px); }
|
||||
}
|
||||
|
||||
.calculation-steps {
|
||||
margin-bottom: var(--spacing-xl);
|
||||
padding: var(--spacing-lg);
|
||||
background-color: var(--bg-secondary);
|
||||
border-radius: var(--radius-lg);
|
||||
|
||||
h4 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--spacing-xs);
|
||||
color: var(--color-info-light);
|
||||
margin-bottom: var(--spacing-lg);
|
||||
}
|
||||
}
|
||||
|
||||
.steps-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--spacing-md);
|
||||
}
|
||||
|
||||
.step-item {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: var(--spacing-md);
|
||||
}
|
||||
|
||||
.step-number {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
background-color: var(--color-primary);
|
||||
color: var(--bg-primary);
|
||||
border-radius: 50%;
|
||||
font-weight: 600;
|
||||
font-size: var(--font-size-sm);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.step-content {
|
||||
font-family: var(--font-mono);
|
||||
font-size: var(--font-size-sm);
|
||||
color: var(--text-secondary);
|
||||
line-height: 1.5;
|
||||
padding-top: var(--spacing-xs);
|
||||
}
|
||||
|
||||
.technical-details {
|
||||
padding: var(--spacing-lg);
|
||||
background-color: var(--bg-secondary);
|
||||
border-radius: var(--radius-lg);
|
||||
margin-bottom: var(--spacing-xl);
|
||||
|
||||
h4 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--spacing-xs);
|
||||
color: var(--color-info-light);
|
||||
margin-bottom: var(--spacing-md);
|
||||
}
|
||||
}
|
||||
|
||||
.details-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
||||
gap: var(--spacing-md);
|
||||
}
|
||||
|
||||
.detail-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: var(--spacing-sm);
|
||||
background-color: var(--bg-tertiary);
|
||||
border-radius: var(--radius-md);
|
||||
}
|
||||
|
||||
.detail-label {
|
||||
color: var(--text-secondary);
|
||||
font-weight: 600;
|
||||
font-size: var(--font-size-sm);
|
||||
}
|
||||
|
||||
.detail-value {
|
||||
color: var(--text-primary);
|
||||
font-family: var(--font-mono);
|
||||
font-size: var(--font-size-sm);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.error-result {
|
||||
text-align: center;
|
||||
padding: var(--spacing-xl);
|
||||
background-color: var(--bg-secondary);
|
||||
border: 1px solid var(--color-error);
|
||||
border-radius: var(--radius-lg);
|
||||
color: var(--color-error-light);
|
||||
|
||||
:global(.icon) {
|
||||
color: var(--color-error);
|
||||
margin-bottom: var(--spacing-md);
|
||||
}
|
||||
|
||||
h4 {
|
||||
margin-bottom: var(--spacing-md);
|
||||
}
|
||||
|
||||
p {
|
||||
margin-bottom: var(--spacing-lg);
|
||||
}
|
||||
}
|
||||
|
||||
.error-help {
|
||||
text-align: left;
|
||||
background-color: var(--bg-tertiary);
|
||||
padding: var(--spacing-md);
|
||||
border-radius: var(--radius-md);
|
||||
color: var(--text-secondary);
|
||||
|
||||
ul {
|
||||
margin-top: var(--spacing-sm);
|
||||
padding-left: var(--spacing-lg);
|
||||
|
||||
li {
|
||||
margin-bottom: var(--spacing-xs);
|
||||
font-family: var(--font-mono);
|
||||
font-size: var(--font-size-sm);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.education-section {
|
||||
border-top: 1px solid var(--border-secondary);
|
||||
padding-top: var(--spacing-xl);
|
||||
}
|
||||
|
||||
.education-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
|
||||
gap: var(--spacing-lg);
|
||||
}
|
||||
|
||||
.education-card {
|
||||
padding: var(--spacing-lg);
|
||||
background-color: var(--bg-secondary);
|
||||
border: 1px solid var(--border-primary);
|
||||
border-radius: var(--radius-lg);
|
||||
|
||||
h4 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--spacing-xs);
|
||||
color: var(--color-info-light);
|
||||
margin-bottom: var(--spacing-md);
|
||||
font-size: var(--font-size-md);
|
||||
}
|
||||
|
||||
p {
|
||||
color: var(--text-secondary);
|
||||
line-height: 1.6;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.examples-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.details-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.education-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.result-content {
|
||||
flex-direction: column;
|
||||
gap: var(--spacing-sm);
|
||||
}
|
||||
|
||||
.step-item {
|
||||
flex-direction: column;
|
||||
gap: var(--spacing-sm);
|
||||
}
|
||||
|
||||
.detail-item {
|
||||
flex-direction: column;
|
||||
gap: var(--spacing-xs);
|
||||
align-items: stretch;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
File diff suppressed because it is too large.
Load diff
@@ -104,48 +104,77 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path opacity=".4" d="M105.4 105.4C92.9 117.9 92.9 138.1 105.4 150.6L274.7 320C289.8 304.9 304.9 289.8 320 274.7L150.6 105.4C138.1 92.9 117.8 92.9 105.3 105.4zM320 365.3L434.7 480L384 480C366.3 480 352 494.3 352 512C352 529.7 366.3 544 384 544L512 544C529.7 544 544 529.7 544 512L544 384C544 366.3 529.7 352 512 352C494.3 352 480 366.3 480 384L480 434.7L365.3 320L320 365.3z"/><path d="M352 128C352 110.3 366.3 96 384 96L512 96C529.7 96 544 110.3 544 128L544 256C544 273.7 529.7 288 512 288C494.3 288 480 273.7 480 256L480 205.3L150.6 534.7C138.1 547.2 117.8 547.2 105.3 534.7C92.8 522.2 92.8 501.9 105.3 489.4L434.7 160L384 160C366.3 160 352 145.7 352 128z"/></svg>
|
||||
{:else if name === 'ula-generator'}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path opacity=".4" d="M64 472L64 552C64 565.3 74.7 576 88 576L168 576C181.3 576 192 565.3 192 552L192 512L232 512C245.3 512 256 501.3 256 488L256 448L296 448C302.4 448 308.5 445.5 313 441L346.3 407.7L232.3 293.7L71 455C66.5 459.5 64 465.6 64 472z"/><path d="M232.3 293.7L346.3 407.7C363.2 413.1 381.3 416 400 416C497.2 416 576 337.2 576 240C576 142.8 497.2 64 400 64C302.8 64 224 142.8 224 240C224 258.7 226.9 276.8 232.3 293.7zM400 200C400 177.9 417.9 160 440 160C462.1 160 480 177.9 480 200C480 222.1 462.1 240 440 240C417.9 240 400 222.1 400 200z"/></svg>
|
||||
{:else if name === 'ipv6-nat64'}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.0.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d=""/><path d="M344 88C344 74.7 333.3 64 320 64C306.7 64 296 74.7 296 88L296 144L192 144L192 120C192 106.7 181.3 96 168 96C154.7 96 144 106.7 144 120L144 144L128.2 144C128.1 144 127.9 144 127.8 144L112 144L112 120C112 106.7 101.3 96 88 96C74.7 96 64 106.7 64 120L64 168C64 181.3 74.7 192 88 192L119.6 192L296 331.6L296 552C296 565.3 306.7 576 320 576C333.3 576 344 565.3 344 552L344 331.6L520.3 192L552 192C565.3 192 576 181.3 576 168L576 120C576 106.7 565.3 96 552 96C538.7 96 528 106.7 528 120L528 144L512.2 144C512.1 144 511.9 144 511.8 144L496 144L496 120C496 106.7 485.3 96 472 96C458.7 96 448 106.7 448 120L448 144L344 144L344 88zM443 192L344 270.4L344 192L443 192zM296 270.4L197 192L296 192L296 270.4z"/></svg>
|
||||
{:else if name === 'ipv6-teredo'}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.0.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M143.8 312L296.1 312L296.1 514.3C209.6 465.7 164.7 385.9 143.8 312zM344 123.6L503 191C508.9 193.5 512.1 198.8 512 203.8C511.9 221.7 510.4 242.2 506.9 264.1L344 264L344 123.6z"/><path d="M137.1 191C131.2 193.5 128 198.8 128.1 203.8C128.2 221.7 129.7 242.2 133.2 264.1L296.1 264.1L296.1 123.7L137.1 191.1zM143.8 312C164.7 385.9 209.7 465.7 296.1 514.3L296.1 312L143.8 312zM344 312L344 514.4C430.5 465.8 475.4 386 496.3 312L344 312zM506.9 264C510.4 242.1 511.9 221.7 512 203.7C512 198.7 508.9 193.5 503 190.9L344 123.5L344 263.9L506.9 263.9zM333.4 66.9L521.8 146.8C543.8 156.1 560.2 177.8 560.1 204C559.6 303.2 518.8 484.7 346.5 567.2C329.8 575.2 310.4 575.2 293.7 567.2C121.3 484.7 80.5 303.2 80.1 204C80 177.8 96.4 156.1 118.4 146.8L306.7 66.9C310.9 65 315.4 64 320 64C324.6 64 329.2 65 333.4 66.9z"/></svg>
|
||||
{:else if name === 'ipv6-solicited-node'}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.0.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M112 144L208 144L208 240L112 240L112 144zM304 400L400 400L400 496L304 496L304 400zM432 144L528 144L528 240L432 240L432 144z"/><path d="M112 144L112 240L208 240L208 144L112 144zM64 144C64 117.5 85.5 96 112 96L208 96C234.5 96 256 117.5 256 144L256 168L384 168L384 144C384 117.5 405.5 96 432 96L528 96C554.5 96 576 117.5 576 144L576 240C576 266.5 554.5 288 528 288L432 288C405.5 288 384 266.5 384 240L384 216L256 216L256 240C256 250.4 252.7 260.1 247 268L310 352L400 352C426.5 352 448 373.5 448 400L448 496C448 522.5 426.5 544 400 544L304 544C277.5 544 256 522.5 256 496L256 400C256 389.6 259.3 379.9 265 372L202 288L112 288C85.5 288 64 266.5 64 240L64 144zM304 400L304 496L400 496L400 400L304 400zM528 144L432 144L432 240L528 240L528 144z"/></svg>
|
||||
{:else if name === 'cidr-gaps'}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path opacity=".4" d=""/><path d="M80 184L80 456C80 469.3 69.3 480 56 480C42.7 480 32 469.3 32 456L32 184C32 170.7 42.7 160 56 160C69.3 160 80 170.7 80 184zM608 184L608 456C608 469.3 597.3 480 584 480C570.7 480 560 469.3 560 456L560 184C560 170.7 570.7 160 584 160C597.3 160 608 170.7 608 184zM505 303C514.4 312.4 514.4 327.6 505 336.9L433 408.9C423.6 418.3 408.4 418.3 399.1 408.9C389.8 399.5 389.7 384.3 399.1 375L430.1 344L210 344L241 375C250.4 384.4 250.4 399.6 241 408.9C231.6 418.2 216.4 418.3 207.1 408.9L135.1 336.9C125.7 327.5 125.7 312.3 135.1 303L207.1 231C216.5 221.6 231.7 221.6 241 231C250.3 240.4 250.4 255.6 241 264.9L210 295.9L430.1 295.9L399.1 264.9C389.7 255.5 389.7 240.3 399.1 231C408.5 221.7 423.7 221.6 433 231L505 303z"/></svg>
|
||||
{:else if name === 'cidr-deaggregate'}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path opacity=".4" d="M80.1 211.9L80.1 272L320.1 272L320.1 144L148 144L80.1 211.9z"/><path d="M456.2 32C456.2 18.7 445.5 8 432.2 8C418.9 8 408.2 18.7 408.2 32L408.2 80C408.2 93.3 418.9 104 432.2 104C445.5 104 456.2 93.3 456.2 80L456.2 32zM432.2 312C418.9 312 408.2 322.7 408.2 336L408.2 384C408.2 397.3 418.9 408 432.2 408C445.5 408 456.2 397.3 456.2 384L456.2 336C456.2 322.7 445.5 312 432.2 312zM632.2 208C632.2 194.7 621.5 184 608.2 184L560.2 184C546.9 184 536.2 194.7 536.2 208C536.2 221.3 546.9 232 560.2 232L608.2 232C621.5 232 632.2 221.3 632.2 208zM573.6 66.6C564.2 57.2 549 57.2 539.7 66.6L505.7 100.5C496.3 109.9 496.3 125.1 505.7 134.4C515.1 143.7 530.3 143.8 539.6 134.4L573.5 100.5C582.9 91.1 582.9 75.9 573.5 66.6zM539.7 281.6C530.3 272.2 515.1 272.2 505.8 281.6C496.5 291 496.4 306.2 505.8 315.5L539.7 349.4C549.1 358.8 564.3 358.8 573.6 349.4C582.9 340 583 324.8 573.6 315.5L539.7 281.6zM80.1 272L80.1 211.9L148 144L320.1 144L320.1 272L80.1 272zM32.1 205.3L32.1 288C32.1 305.7 46.4 320 64.1 320L200.1 320L200.1 584C200.1 597.3 210.8 608 224.1 608C237.4 608 248.1 597.3 248.1 584L248.1 320L336.1 320C353.8 320 368.1 305.7 368.1 288L368.1 128C368.1 110.3 353.8 96 336.1 96L141.3 96C132.8 96 124.7 99.4 118.7 105.4L41.5 182.6C35.5 188.6 32.1 196.7 32.1 205.2z"/></svg>
|
||||
{:else if name === 'ip-validator'}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.0.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M80 400C80 453 123 496 176 496L480 496C524.2 496 560 460.2 560 416C560 378.5 534.2 347 499.4 338.3C491.9 336.4 485.8 331.1 482.9 324C480 316.9 480.8 308.7 484.9 302.2C491.9 291 496.1 278 496.1 264C496.1 224.2 463.9 192 424.1 192C413.1 192 402.7 194.5 393.3 199C382.8 204 370.2 200.7 363.4 191.2C343.1 162.6 309.7 144 272.1 144C210.2 144 160.1 194.1 160.1 256C160.1 264.4 161.1 272.6 162.8 280.5C165.5 292.6 158.5 304.8 146.7 308.6C108 321 80.1 357.3 80.1 400zM230.8 389.5C221.6 380 221.8 364.8 231.4 355.6C241 346.4 256.1 346.7 265.3 356.2L291.8 383.6L377.4 265.9C385.2 255.2 400.2 252.8 410.9 260.6C421.6 268.4 424 283.4 416.2 294.1L313.8 434.9C309.6 440.6 303.1 444.3 296 444.7C288.9 445.1 282 442.5 277.1 437.4L230.7 389.4z"/><path d="M272 96C319.1 96 361.4 116.4 390.7 148.8C401.3 145.7 412.5 144 424 144C490.3 144 544 197.7 544 264C544 277.3 541.7 290 537.8 301.8C579.5 322.9 608 366 608 416C608 486.7 550.7 544 480 544L176 544C96.5 544 32 479.5 32 400C32 343.2 64.9 294.1 112.7 270.7C112.3 265.9 112 261 112 256C112 167.6 183.6 96 272 96zM272 144C210.1 144 160 194.1 160 256C160 264.4 161 272.6 162.7 280.5C165.4 292.6 158.4 304.8 146.6 308.6C107.9 321 80 357.3 80 400C80 453 123 496 176 496L480 496C524.2 496 560 460.2 560 416C560 378.5 534.2 347 499.4 338.3C491.9 336.4 485.8 331.1 482.9 324C480 316.9 480.8 308.7 484.9 302.2C491.9 291 496.1 278 496.1 264C496.1 224.2 463.9 192 424.1 192C413.1 192 402.7 194.5 393.3 199C382.8 204 370.2 200.7 363.4 191.2C343.1 162.6 309.7 144 272.1 144zM377.4 265.9C385.2 255.2 400.2 252.8 410.9 260.6C421.6 268.4 424 283.4 416.2 294.1L313.8 434.9C309.6 440.6 303.1 444.3 296 444.7C288.9 445.1 282 442.5 277.1 437.4L230.7 389.4C221.5 379.9 221.7 364.7 231.3 355.5C240.9 346.3 256 346.6 265.2 356.1L291.7 383.5L377.3 265.8z"/></svg>
|
||||
{:else if name === 'ip-regex-generator'}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.0.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M52.8 464L587.2 464C578.7 482.9 559.7 496 537.6 496L102.4 496C80.3 496 61.3 482.9 52.8 464zM112 160C112 151.2 119.2 144 128 144L512 144C520.8 144 528 151.2 528 160L528 368L112 368L112 160zM199 247C189.6 256.4 189.6 271.6 199 280.9L247 328.9C256.4 338.3 271.6 338.3 280.9 328.9C290.2 319.5 290.3 304.3 280.9 295L249.9 264L280.9 233C290.3 223.6 290.3 208.4 280.9 199.1C271.5 189.8 256.3 189.7 247 199.1L199 247.1zM359 199C349.6 208.4 349.6 223.6 359 232.9L390 263.9L359 294.9C349.6 304.3 349.6 319.5 359 328.8C368.4 338.1 383.6 338.2 392.9 328.8L440.9 280.8C450.3 271.4 450.3 256.2 440.9 246.9L392.9 198.9C383.5 189.5 368.3 189.5 359 198.9z"/><path d="M128 144L512 144C520.8 144 528 151.2 528 160L528 368L576 368L576 160C576 124.7 547.3 96 512 96L128 96C92.7 96 64 124.7 64 160L64 368L112 368L112 160C112 151.2 119.2 144 128 144zM52.8 464L587.2 464C578.7 482.9 559.7 496 537.6 496L102.4 496C80.3 496 61.3 482.9 52.8 464zM25.6 416C11.5 416 0 427.5 0 441.6C0 498.2 45.8 544 102.4 544L537.6 544C594.2 544 640 498.2 640 441.6C640 427.5 628.5 416 614.4 416L25.6 416zM281 233C290.4 223.6 290.4 208.4 281 199.1C271.6 189.8 256.4 189.7 247.1 199.1L199.1 247.1C189.7 256.5 189.7 271.7 199.1 281L247.1 329C256.5 338.4 271.7 338.4 281 329C290.3 319.6 290.4 304.4 281 295.1L250 264.1L281 233.1zM393 199C383.6 189.6 368.4 189.6 359.1 199C349.8 208.4 349.7 223.6 359.1 232.9L390.1 263.9L359.1 294.9C349.7 304.3 349.7 319.5 359.1 328.8C368.5 338.1 383.7 338.2 393 328.8L441 280.8C450.4 271.4 450.4 256.2 441 246.9L393 198.9z"/></svg>
|
||||
{:else if name === 'ptr-generator'}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.0.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M208 136L208 416L284.8 313.6C289.3 307.6 296.4 304 304 304L432 304L208 136z"/><path d="M198.4 68.8C191.1 63.3 181.4 62.5 173.3 66.5C165.2 70.5 160 78.9 160 88L160 488C160 498.3 166.6 507.5 176.4 510.8C186.2 514.1 197 510.7 203.2 502.4L299.9 373.4L394.5 562.7C400.4 574.6 414.8 579.4 426.7 573.4C438.6 567.4 443.4 553.1 437.4 541.2L342.7 351.9L503.9 351.9C514.2 351.9 523.4 345.3 526.7 335.5C530 325.7 526.6 314.9 518.3 308.7L198.4 68.8zM208 416L208 136L432 304L304 304C296.4 304 289.3 307.6 284.8 313.6L208 416z"/></svg>
|
||||
{:else if name === 'cidr-allocator'}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.0.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M112 320C112 434.9 205.1 528 320 528C424 528 510.2 451.7 525.6 352L344 352C327.8 352 313.2 345.1 303 334.1L302.4 334.1L302.4 333.5C293.4 323.6 288 310.4 288 296L288 114.4C188.3 129.8 112 216 112 320z"/><path d="M525.6 352L344 352C313.1 352 288 326.9 288 296L288 114.4C188.3 129.8 112 216 112 320C112 434.9 205.1 528 320 528C424 528 510.2 451.7 525.6 352zM527.4 304C519.6 201.9 438.1 120.4 336 112.6L336 296C336 300.4 339.6 304 344 304L527.4 304zM64 320C64 178.6 178.6 64 320 64C461.4 64 576 178.6 576 320C576 461.4 461.4 576 320 576C178.6 576 64 461.4 64 320z"/></svg>
|
||||
{:else if name === 'ip-enumerate'}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.0.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M144 144L144 240L240 240L240 144L144 144zM400 400L400 496L496 496L496 400L400 400z"/><path d="M240 144L240 240L144 240L144 144L240 144zM144 96C117.5 96 96 117.5 96 144L96 240C96 266.5 117.5 288 144 288L168 288L168 384C168 432.6 207.4 472 256 472L352 472L352 496C352 522.5 373.5 544 400 544L496 544C522.5 544 544 522.5 544 496L544 400C544 373.5 522.5 352 496 352L400 352C373.5 352 352 373.5 352 400L352 424L256 424C233.9 424 216 406.1 216 384L216 288L240 288C266.5 288 288 266.5 288 240L288 144C288 117.5 266.5 96 240 96L144 96zM496 400L496 496L400 496L400 400L496 400z"/></svg>
|
||||
{:else if name === 'cidr-compare'}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path opacity=".4" d="M112 176L112 240L176 240L176 176L112 176zM112 400L112 464L240 464L240 400L112 400z"/><path d="M328 96C341.3 96 352 106.7 352 120L352 128L528 128C554.5 128 576 149.5 576 176L576 240C576 266.5 554.5 288 528 288L352 288L352 296C352 309.3 341.3 320 328 320C314.7 320 304 309.3 304 296L304 288L112 288C85.5 288 64 266.5 64 240L64 176C64 149.5 85.5 128 112 128L304 128L304 120C304 106.7 314.7 96 328 96zM224 176L224 240L304 240L304 176L224 176zM352 176L352 240L528 240L528 176L352 176zM176 176L112 176L112 240L176 240L176 176zM424 320C437.3 320 448 330.7 448 344L448 352L528 352C554.5 352 576 373.5 576 400L576 464C576 490.5 554.5 512 528 512L448 512L448 520C448 533.3 437.3 544 424 544C410.7 544 400 533.3 400 520L400 512L112 512C85.5 512 64 490.5 64 464L64 400C64 373.5 85.5 352 112 352L400 352L400 344C400 330.7 410.7 320 424 320zM288 400L288 464L400 464L400 400L288 400zM448 400L448 464L528 464L528 400L448 400zM240 400L112 400L112 464L240 464L240 400z"/></svg>
|
||||
|
||||
<!-- Reference Guides -->
|
||||
|
||||
{:else if name === 'json-file'}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.0.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M176 128L176 512C176 520.8 183.2 528 192 528L448 528C456.8 528 464 520.8 464 512L464 272L376 272C336.2 272 304 239.8 304 200L304 112L192 112C183.2 112 176 119.2 176 128zM208.8 387L228 364.6L228 352C228 332.1 244.1 316 264 316L280 316C291 316 300 325 300 336C300 347 291 356 280 356L268 356L268 366.1C268 373.6 265.6 380.9 261.3 387L259.3 389.5L250.3 400L259.3 410.5L261.3 413C265.6 419.1 268 426.4 268 433.9L268 444L280 444C291 444 300 453 300 464C300 475 291 484 280 484L264 484C244.1 484 228 467.9 228 448L228 435.4L208.8 413.1C202.4 405.6 202.4 394.5 208.8 387zM340 336C340 325 349 316 360 316L376 316C395.9 316 412 332.1 412 352L412 364.6L431.2 387C437.6 394.5 437.6 405.6 431.2 413.1L412 435.4L412 448C412 467.9 395.9 484 376 484L360 484C349 484 340 475 340 464C340 453 349 444 360 444L372 444L372 433.9C372 426.4 374.4 419.1 378.7 413L380.7 410.5L389.7 400L380.7 389.5L378.7 387C374.4 380.9 372 373.6 372 366.1L372 356L360 356C349 356 340 347 340 336z"/><path d="M331.8 64.3C346.4 65.8 360.2 72.2 370.7 82.7L493.3 205.2C505.3 217.2 512 233.5 512 250.4L512 511.9L511.7 518.4C508.6 548.5 484.7 572.5 454.6 575.5L448.1 575.8L192.1 575.8L185.6 575.5C153.2 572.4 128 545.1 128 512L128 128C128 94.9 153.2 67.6 185.5 64.3L192 64L325.5 64L331.8 64.3zM192 112C183.2 112 176 119.2 176 128L176 512C176 520.8 183.2 528 192 528L448 528C456.8 528 464 520.8 464 512L464 272L376 272C336.2 272 304 239.8 304 200L304 112L192 112zM280 316C291 316 300 325 300 336C300 347 291 356 280 356L268 356L268 366.1C268 373.6 265.6 380.9 261.3 387L259.3 389.5L250.3 400L259.3 410.5L261.3 413C265.6 419.1 268 426.4 268 433.9L268 444L280 444C291 444 300 453 300 464C300 475 291 484 280 484L264 484C244.1 484 228 467.9 228 448L228 435.4L208.8 413.1C202.4 405.6 202.4 394.5 208.8 387L228 364.6L228 352C228 332.1 244.1 316 264 316L280 316zM376 316C395.9 316 412 332.1 412 352L412 364.6L431.2 387C437.6 394.5 437.6 405.6 431.2 413.1L412 435.4L412 448C412 467.9 395.9 484 376 484L360 484C349 484 340 475 340 464C340 453 349 444 360 444L372 444L372 433.9C372 426.4 374.4 419.1 378.7 413L380.7 410.5L389.7 400L380.7 389.5L378.7 387C374.4 380.9 372 373.6 372 366.1L372 356L360 356C349 356 340 347 340 336C340 325 349 316 360 316L376 316zM352 200C352 213.3 362.7 224 376 224L444.1 224L352 131.9L352 200z"/></svg>
|
||||
{:else if name === 'csv-file'}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.0.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M112 128C112 119.2 119.2 112 128 112L240 112L240 200C240 239.8 272.2 272 312 272L400 272L400 400L272 400C236.7 400 208 428.7 208 464L208 528L128 528C119.2 528 112 520.8 112 512L112 128z"/><path d="M240 112L128 112C119.2 112 112 119.2 112 128L112 512C112 520.8 119.2 528 128 528L208 528L208 576L128 576C92.7 576 64 547.3 64 512L64 128C64 92.7 92.7 64 128 64L261.5 64C278.5 64 294.8 70.7 306.8 82.7L429.3 205.3C441.3 217.3 448 233.6 448 250.6L448 400.1L400 400.1L400 272.1L312 272.1C272.2 272.1 240 239.9 240 200.1L240 112.1zM380.1 224L288 131.9L288 200C288 213.3 298.7 224 312 224L380.1 224zM296 444L312 444C336.3 444 356 463.7 356 488L356 496C356 507 347 516 336 516C325 516 316 507 316 496L316 488C316 485.8 314.2 484 312 484L296 484C293.8 484 292 485.8 292 488L292 568C292 570.2 293.8 572 296 572L312 572C314.2 572 316 570.2 316 568L316 560C316 549 325 540 336 540C347 540 356 549 356 560L356 568C356 592.3 336.3 612 312 612L296 612C271.7 612 252 592.3 252 568L252 488C252 463.7 271.7 444 296 444zM432 444L456 444C467 444 476 453 476 464C476 475 467 484 456 484L432 484C425.4 484 420 489.4 420 496C420 502.6 425.4 508 432 508C460.7 508 484 531.3 484 560C484 588.7 460.7 612 432 612L400 612C389 612 380 603 380 592C380 581 389 572 400 572L432 572C438.6 572 444 566.6 444 560C444 553.4 438.6 548 432 548C403.3 548 380 524.7 380 496C380 467.3 403.3 444 432 444zM528 444C539 444 548 453 548 464L548 495.6C548 515.2 552.1 534.5 560 552.3C567.9 534.5 572 515.2 572 495.6L572 464C572 453 581 444 592 444C603 444 612 453 612 464L612 495.6C612 531.1 601.5 565.9 581.8 595.4L576.7 603.1C573 608.7 566.7 612 560.1 612C553.5 612 547.2 608.7 543.5 603.1L538.4 595.4C518.7 565.8 508.2 531.1 508.2 495.6L508.2 464C508.2 453 517.2 444 528.2 444z"/></svg>
|
||||
|
||||
|
||||
<!-- Reference Guides -->
|
||||
{:else if name === 'ref-cidr'}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M144.7 537.3C172.9 405.6 184.9 349.8 205 256L270.5 256C226.2 462.9 225.7 465.1 207.3 550.7C203.6 568 186.6 579 169.3 575.3C152 571.6 141 554.6 144.7 537.3zM218.7 192L240.7 89.3C244.4 72 261.4 61 278.7 64.7C296 68.4 307 85.4 303.3 102.7L284.2 192L218.7 192zM336.7 537.3L355.8 448L421.3 448L399.3 550.7C395.6 568 378.6 579 361.3 575.3C344 571.6 333 554.6 336.7 537.3zM369.6 384C413.9 177.1 414.4 174.9 432.7 89.3C436.4 72 453.4 61 470.7 64.7C488 68.4 499 85.4 495.3 102.7C467.1 234.4 455.1 290.2 435 384L369.5 384z"/><path d="M340.6 192L410.7 192L397 256L137.2 256C119.5 256 105.2 241.7 105.2 224C105.2 206.3 119.5 192 137.2 192L340.6 192zM544 256L462.4 256L476.1 192L543.9 192C561.6 192 575.9 206.3 575.9 224C575.9 241.7 561.6 256 543.9 256zM96 384L177.6 384L163.9 448L96.1 448C78.4 448 64.1 433.7 64.1 416C64.1 398.3 78.4 384 96.1 384zM299.4 448L229.3 448L243 384L502.8 384C520.5 384 534.8 398.3 534.8 416C534.8 433.7 520.5 448 502.8 448L299.4 448z"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path opacity=".4" d="M144.7 537.3C172.9 405.6 184.9 349.8 205 256L270.5 256C226.2 462.9 225.7 465.1 207.3 550.7C203.6 568 186.6 579 169.3 575.3C152 571.6 141 554.6 144.7 537.3zM218.7 192L240.7 89.3C244.4 72 261.4 61 278.7 64.7C296 68.4 307 85.4 303.3 102.7L284.2 192L218.7 192zM336.7 537.3L355.8 448L421.3 448L399.3 550.7C395.6 568 378.6 579 361.3 575.3C344 571.6 333 554.6 336.7 537.3zM369.6 384C413.9 177.1 414.4 174.9 432.7 89.3C436.4 72 453.4 61 470.7 64.7C488 68.4 499 85.4 495.3 102.7C467.1 234.4 455.1 290.2 435 384L369.5 384z"/><path d="M340.6 192L410.7 192L397 256L137.2 256C119.5 256 105.2 241.7 105.2 224C105.2 206.3 119.5 192 137.2 192L340.6 192zM544 256L462.4 256L476.1 192L543.9 192C561.6 192 575.9 206.3 575.9 224C575.9 241.7 561.6 256 543.9 256zM96 384L177.6 384L163.9 448L96.1 448C78.4 448 64.1 433.7 64.1 416C64.1 398.3 78.4 384 96.1 384zM299.4 448L229.3 448L243 384L502.8 384C520.5 384 534.8 398.3 534.8 416C534.8 433.7 520.5 448 502.8 448L299.4 448z"/></svg>
|
||||
{:else if name === 'ref-vlsm'}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M64 176C64 237.9 114.1 288 176 288C190.3 288 203.9 285.3 216.5 280.5L256 320L320 256L280.5 216.5C285.4 203.9 288 190.3 288 176C288 114.1 237.9 64 176 64C114.1 64 64 114.1 64 176zM224 176C224 202.5 202.5 224 176 224C149.5 224 128 202.5 128 176C128 149.5 149.5 128 176 128C202.5 128 224 149.5 224 176zM320 384L460.8 524.8C489.1 553.1 534.9 553.1 563.2 524.8C570.3 517.7 570.3 506.3 563.2 499.2L384 320L320 384z"/><path d="M280.5 423.5L563.2 140.8C570.3 133.7 570.3 122.3 563.2 115.2C534.9 86.9 489.1 86.9 460.8 115.2L216.5 359.5C203.9 354.6 190.3 352 176 352C114.1 352 64 402.1 64 464C64 525.9 114.1 576 176 576C237.9 576 288 525.9 288 464C288 449.7 285.3 436.1 280.5 423.5zM128 464C128 437.5 149.5 416 176 416C202.5 416 224 437.5 224 464C224 490.5 202.5 512 176 512C149.5 512 128 490.5 128 464z"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path opacity=".4" d="M64 176C64 237.9 114.1 288 176 288C190.3 288 203.9 285.3 216.5 280.5L256 320L320 256L280.5 216.5C285.4 203.9 288 190.3 288 176C288 114.1 237.9 64 176 64C114.1 64 64 114.1 64 176zM224 176C224 202.5 202.5 224 176 224C149.5 224 128 202.5 128 176C128 149.5 149.5 128 176 128C202.5 128 224 149.5 224 176zM320 384L460.8 524.8C489.1 553.1 534.9 553.1 563.2 524.8C570.3 517.7 570.3 506.3 563.2 499.2L384 320L320 384z"/><path d="M280.5 423.5L563.2 140.8C570.3 133.7 570.3 122.3 563.2 115.2C534.9 86.9 489.1 86.9 460.8 115.2L216.5 359.5C203.9 354.6 190.3 352 176 352C114.1 352 64 402.1 64 464C64 525.9 114.1 576 176 576C237.9 576 288 525.9 288 464C288 449.7 285.3 436.1 280.5 423.5zM128 464C128 437.5 149.5 416 176 416C202.5 416 224 437.5 224 464C224 490.5 202.5 512 176 512C149.5 512 128 490.5 128 464z"/></svg>
|
||||
{:else if name === 'ref-supernetting'}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M64 320C64 329.4 69.4 337.9 77.9 341.8C132.8 367.2 205.7 400.9 296.5 442.8C311.4 449.7 328.6 449.7 343.5 442.8C434.3 400.8 507.2 367.2 562.1 341.8C570.6 337.9 576 329.4 576 320C576 310.6 570.6 302.1 562.1 298.2L470.7 256C428.3 275.6 385.9 295.2 343.5 314.8C328.6 321.7 311.4 321.7 296.5 314.8C254.1 295.2 211.7 275.6 169.3 256L77.9 298.2C69.4 302.1 64 310.6 64 320z"/><path d="M343.5 69.2C328.6 62.3 311.4 62.3 296.5 69.2L77.9 170.2C69.4 174.1 64 182.6 64 192C64 201.4 69.4 209.9 77.9 213.8L296.5 314.8C311.4 321.7 328.6 321.7 343.5 314.8L562.1 213.8C570.6 209.9 576 201.4 576 192C576 182.6 570.6 174.1 562.1 170.2L343.5 69.2zM77.9 426.2C69.4 430.1 64 438.6 64 448C64 457.4 69.4 465.9 77.9 469.8L296.5 570.8C311.4 577.7 328.6 577.7 343.5 570.8L562.1 469.8C570.6 465.9 576 457.4 576 448C576 438.6 570.6 430.1 562.1 426.2L470.7 384L343.5 442.8C328.6 449.7 311.4 449.7 296.5 442.8L169.3 384L77.9 426.2z"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path opacity=".4" d="M64 320C64 329.4 69.4 337.9 77.9 341.8C132.8 367.2 205.7 400.9 296.5 442.8C311.4 449.7 328.6 449.7 343.5 442.8C434.3 400.8 507.2 367.2 562.1 341.8C570.6 337.9 576 329.4 576 320C576 310.6 570.6 302.1 562.1 298.2L470.7 256C428.3 275.6 385.9 295.2 343.5 314.8C328.6 321.7 311.4 321.7 296.5 314.8C254.1 295.2 211.7 275.6 169.3 256L77.9 298.2C69.4 302.1 64 310.6 64 320z"/><path d="M343.5 69.2C328.6 62.3 311.4 62.3 296.5 69.2L77.9 170.2C69.4 174.1 64 182.6 64 192C64 201.4 69.4 209.9 77.9 213.8L296.5 314.8C311.4 321.7 328.6 321.7 343.5 314.8L562.1 213.8C570.6 209.9 576 201.4 576 192C576 182.6 570.6 174.1 562.1 170.2L343.5 69.2zM77.9 426.2C69.4 430.1 64 438.6 64 448C64 457.4 69.4 465.9 77.9 469.8L296.5 570.8C311.4 577.7 328.6 577.7 343.5 570.8L562.1 469.8C570.6 465.9 576 457.4 576 448C576 438.6 570.6 430.1 562.1 426.2L470.7 384L343.5 442.8C328.6 449.7 311.4 449.7 296.5 442.8L169.3 384L77.9 426.2z"/></svg>
|
||||
{:else if name === 'ref-ipv6-address-types'}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M65.1 296C74.5 195.5 141.9 111.8 233.6 78.9C201.7 131.6 180 211 176.5 296L65.1 296zM65.1 344L176.5 344C180 429 201.7 508.4 233.6 561.1C141.9 528.2 74.5 444.5 65.1 344zM224.5 296C227.4 231.4 241.7 171.6 262 127.7C273.4 103 285.8 85.4 297.2 74.7C303.3 68.9 308.4 65.8 312.4 64.1C317.4 64 322.5 64 327.5 64.1C331.5 65.7 336.5 68.9 342.7 74.7C354.1 85.5 366.5 103 377.9 127.7C398.2 171.6 412.5 231.4 415.4 296L224.5 296zM224.5 344L415.4 344C412.5 408.6 398.2 468.4 377.9 512.3C366.5 537 354.1 554.6 342.7 565.3C336.6 571.1 331.5 574.2 327.5 575.9C322.5 576 317.4 576 312.4 575.9C308.4 574.2 303.4 571.1 297.2 565.3C285.8 554.5 273.4 537 262 512.3C241.7 468.4 227.4 408.6 224.5 344zM406.4 78.9C498.1 111.8 565.5 195.5 574.9 296L463.5 296C460 211 438.3 131.6 406.4 78.9zM406.4 561C438.3 508.4 460 429 463.5 344L574.9 344C565.6 444.5 498.1 528.2 406.4 561.1z"/><path d="M378 512.3C398.3 468.4 412.6 408.6 415.5 344L224.6 344C227.5 408.6 241.8 468.4 262.1 512.3C273.5 537 285.9 554.6 297.3 565.3C303.4 571.1 308.5 574.2 312.5 575.9C284.9 575.1 258.4 569.9 233.7 561.1C201.8 508.4 180.1 429 176.6 344L65.1 344C64.4 336.1 64 328.1 64 320C64 311.9 64.4 303.9 65.1 296L176.5 296C180 211 201.8 131.6 233.6 78.9C258.3 70 284.8 64.9 312.4 64.1C308.4 65.7 303.4 68.9 297.2 74.7C285.8 85.5 273.4 103 262 127.7C241.7 171.6 227.4 231.4 224.5 296L415.4 296C412.5 231.4 398.2 171.6 377.9 127.7C366.5 103 354.1 85.4 342.7 74.7C336.5 68.9 331.5 65.8 327.5 64.1C355.1 64.9 381.6 70.1 406.3 78.9C438.2 131.6 459.9 211 463.4 296L574.8 296C576.3 311.7 576.3 328.3 574.8 344L463.4 344C459.9 429 438.1 508.4 406.3 561.1C381.6 570 355.1 575.1 327.5 575.9C331.5 574.3 336.5 571.1 342.7 565.3C354.1 554.5 366.5 537 377.9 512.3z"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path opacity=".4" d="M65.1 296C74.5 195.5 141.9 111.8 233.6 78.9C201.7 131.6 180 211 176.5 296L65.1 296zM65.1 344L176.5 344C180 429 201.7 508.4 233.6 561.1C141.9 528.2 74.5 444.5 65.1 344zM224.5 296C227.4 231.4 241.7 171.6 262 127.7C273.4 103 285.8 85.4 297.2 74.7C303.3 68.9 308.4 65.8 312.4 64.1C317.4 64 322.5 64 327.5 64.1C331.5 65.7 336.5 68.9 342.7 74.7C354.1 85.5 366.5 103 377.9 127.7C398.2 171.6 412.5 231.4 415.4 296L224.5 296zM224.5 344L415.4 344C412.5 408.6 398.2 468.4 377.9 512.3C366.5 537 354.1 554.6 342.7 565.3C336.6 571.1 331.5 574.2 327.5 575.9C322.5 576 317.4 576 312.4 575.9C308.4 574.2 303.4 571.1 297.2 565.3C285.8 554.5 273.4 537 262 512.3C241.7 468.4 227.4 408.6 224.5 344zM406.4 78.9C498.1 111.8 565.5 195.5 574.9 296L463.5 296C460 211 438.3 131.6 406.4 78.9zM406.4 561C438.3 508.4 460 429 463.5 344L574.9 344C565.6 444.5 498.1 528.2 406.4 561.1z"/><path d="M378 512.3C398.3 468.4 412.6 408.6 415.5 344L224.6 344C227.5 408.6 241.8 468.4 262.1 512.3C273.5 537 285.9 554.6 297.3 565.3C303.4 571.1 308.5 574.2 312.5 575.9C284.9 575.1 258.4 569.9 233.7 561.1C201.8 508.4 180.1 429 176.6 344L65.1 344C64.4 336.1 64 328.1 64 320C64 311.9 64.4 303.9 65.1 296L176.5 296C180 211 201.8 131.6 233.6 78.9C258.3 70 284.8 64.9 312.4 64.1C308.4 65.7 303.4 68.9 297.2 74.7C285.8 85.5 273.4 103 262 127.7C241.7 171.6 227.4 231.4 224.5 296L415.4 296C412.5 231.4 398.2 171.6 377.9 127.7C366.5 103 354.1 85.4 342.7 74.7C336.5 68.9 331.5 65.8 327.5 64.1C355.1 64.9 381.6 70.1 406.3 78.9C438.2 131.6 459.9 211 463.4 296L574.8 296C576.3 311.7 576.3 328.3 574.8 344L463.4 344C459.9 429 438.1 508.4 406.3 561.1C381.6 570 355.1 575.1 327.5 575.9C331.5 574.3 336.5 571.1 342.7 565.3C354.1 554.5 366.5 537 377.9 512.3z"/></svg>
|
||||
{:else if name === 'ref-ipv6-prefix-lens'}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M96 448C96 501 139 544 192 544C245 544 288 501 288 448C288 395 245 352 192 352C139 352 96 395 96 448zM352 192C352 245 395 288 448 288C501 288 544 245 544 192C544 139 501 96 448 96C395 96 352 139 352 192z"/><path d="M192 96C139 96 96 139 96 192C96 245 139 288 192 288C245 288 288 245 288 192C288 139 245 96 192 96zM448 352C395 352 352 395 352 448C352 501 395 544 448 544C501 544 544 501 544 448C544 395 501 352 448 352z"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path opacity=".4" d="M96 448C96 501 139 544 192 544C245 544 288 501 288 448C288 395 245 352 192 352C139 352 96 395 96 448zM352 192C352 245 395 288 448 288C501 288 544 245 544 192C544 139 501 96 448 96C395 96 352 139 352 192z"/><path d="M192 96C139 96 96 139 96 192C96 245 139 288 192 288C245 288 288 245 288 192C288 139 245 96 192 96zM448 352C395 352 352 395 352 448C352 501 395 544 448 544C501 544 544 501 544 448C544 395 501 352 448 352z"/></svg>
|
||||
{:else if name === 'ref-ipv4-in-ipv6'}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M96 183.4C105.4 188.8 116.3 192 128 192C139.7 192 150.6 188.9 160 183.4L160 288L288 288L288 183.4C297.4 188.8 308.3 192 320 192C331.7 192 342.6 188.9 352 183.4L352 288L480 288L480 183.4C489.4 188.8 500.3 192 512 192C523.7 192 534.6 188.9 544 183.4L544 320C544 337.7 529.7 352 512 352L352 352L352 456.6C342.6 451.2 331.7 448 320 448C308.3 448 297.4 451.1 288 456.6L288 352L160 352L160 456.6C150.6 451.2 139.7 448 128 448C116.3 448 105.4 451.1 96 456.6L96 183.5z"/><path d="M128 576C92.7 576 64 547.3 64 512C64 476.7 92.7 448 128 448C163.3 448 192 476.7 192 512C192 547.3 163.3 576 128 576zM320 576C284.7 576 256 547.3 256 512C256 476.7 284.7 448 320 448C355.3 448 384 476.7 384 512C384 547.3 355.3 576 320 576zM128 192C92.7 192 64 163.3 64 128C64 92.7 92.7 64 128 64C163.3 64 192 92.7 192 128C192 163.3 163.3 192 128 192zM320 192C284.7 192 256 163.3 256 128C256 92.7 284.7 64 320 64C355.3 64 384 92.7 384 128C384 163.3 355.3 192 320 192zM512 192C476.7 192 448 163.3 448 128C448 92.7 476.7 64 512 64C547.3 64 576 92.7 576 128C576 163.3 547.3 192 512 192z"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path opacity=".4" d="M96 183.4C105.4 188.8 116.3 192 128 192C139.7 192 150.6 188.9 160 183.4L160 288L288 288L288 183.4C297.4 188.8 308.3 192 320 192C331.7 192 342.6 188.9 352 183.4L352 288L480 288L480 183.4C489.4 188.8 500.3 192 512 192C523.7 192 534.6 188.9 544 183.4L544 320C544 337.7 529.7 352 512 352L352 352L352 456.6C342.6 451.2 331.7 448 320 448C308.3 448 297.4 451.1 288 456.6L288 352L160 352L160 456.6C150.6 451.2 139.7 448 128 448C116.3 448 105.4 451.1 96 456.6L96 183.5z"/><path d="M128 576C92.7 576 64 547.3 64 512C64 476.7 92.7 448 128 448C163.3 448 192 476.7 192 512C192 547.3 163.3 576 128 576zM320 576C284.7 576 256 547.3 256 512C256 476.7 284.7 448 320 448C355.3 448 384 476.7 384 512C384 547.3 355.3 576 320 576zM128 192C92.7 192 64 163.3 64 128C64 92.7 92.7 64 128 64C163.3 64 192 92.7 192 128C192 163.3 163.3 192 128 192zM320 192C284.7 192 256 163.3 256 128C256 92.7 284.7 64 320 64C355.3 64 384 92.7 384 128C384 163.3 355.3 192 320 192zM512 192C476.7 192 448 163.3 448 128C448 92.7 476.7 64 512 64C547.3 64 576 92.7 576 128C576 163.3 547.3 192 512 192z"/></svg>
|
||||
{:else if name === 'ref-ipv6-privacy-address'}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M64 320C64 337.7 78.3 352 96 352L160 352L160 466.7L134.6 441.3C122.1 428.8 101.8 428.8 89.3 441.3C76.8 453.8 76.8 474.1 89.3 486.6L169.3 566.6C181.8 579.1 202.1 579.1 214.6 566.6L294.6 486.6C307.1 474.1 307.1 453.8 294.6 441.3C282.1 428.8 261.8 428.8 249.3 441.3L223.9 466.7L223.9 352L368.9 352C373.1 318.1 390.6 288.4 415.9 268.1L415.9 173.3L441.3 198.7C453.8 211.2 474.1 211.2 486.6 198.7C499.1 186.2 499.1 165.9 486.6 153.4L406.6 73.4C394.1 60.9 373.8 60.9 361.3 73.4L281.3 153.4C268.8 165.9 268.8 186.2 281.3 198.7C293.8 211.2 314.1 211.2 326.6 198.7L352 173.3L352 288L96 288C78.3 288 64 302.3 64 320zM160 96L160 240L224 240L224 96C224 78.3 209.7 64 192 64C174.3 64 160 78.3 160 96z"/><path d="M464 416L464 368.1C464 350.4 478.3 336.1 496 336.1C513.7 336.1 528 350.4 528 368.1L528 416L464 416zM416 418.7C397.4 425.3 384 443.1 384 464L384 560C384 586.5 405.5 608 432 608L560 608C586.5 608 608 586.5 608 560L608 464C608 443.1 594.6 425.3 576 418.7L576 368.1C576 323.9 540.2 288.1 496 288.1C451.8 288.1 416 323.9 416 368.1L416 418.7z"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path opacity=".4" d="M64 320C64 337.7 78.3 352 96 352L160 352L160 466.7L134.6 441.3C122.1 428.8 101.8 428.8 89.3 441.3C76.8 453.8 76.8 474.1 89.3 486.6L169.3 566.6C181.8 579.1 202.1 579.1 214.6 566.6L294.6 486.6C307.1 474.1 307.1 453.8 294.6 441.3C282.1 428.8 261.8 428.8 249.3 441.3L223.9 466.7L223.9 352L368.9 352C373.1 318.1 390.6 288.4 415.9 268.1L415.9 173.3L441.3 198.7C453.8 211.2 474.1 211.2 486.6 198.7C499.1 186.2 499.1 165.9 486.6 153.4L406.6 73.4C394.1 60.9 373.8 60.9 361.3 73.4L281.3 153.4C268.8 165.9 268.8 186.2 281.3 198.7C293.8 211.2 314.1 211.2 326.6 198.7L352 173.3L352 288L96 288C78.3 288 64 302.3 64 320zM160 96L160 240L224 240L224 96C224 78.3 209.7 64 192 64C174.3 64 160 78.3 160 96z"/><path d="M464 416L464 368.1C464 350.4 478.3 336.1 496 336.1C513.7 336.1 528 350.4 528 368.1L528 416L464 416zM416 418.7C397.4 425.3 384 443.1 384 464L384 560C384 586.5 405.5 608 432 608L560 608C586.5 608 608 586.5 608 560L608 464C608 443.1 594.6 425.3 576 418.7L576 368.1C576 323.9 540.2 288.1 496 288.1C451.8 288.1 416 323.9 416 368.1L416 418.7z"/></svg>
|
||||
{:else if name === 'ref-special-blocks'}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M96 160C96 124.7 124.7 96 160 96L480 96C515.3 96 544 124.7 544 160L544 480C544 515.3 515.3 544 480 544L160 544C124.7 544 96 515.3 96 480L96 160zM144 168C144 181.3 154.7 192 168 192C181.3 192 192 181.3 192 168C192 154.7 181.3 144 168 144C154.7 144 144 154.7 144 168zM144 472C144 485.3 154.7 496 168 496C181.3 496 192 485.3 192 472C192 458.7 181.3 448 168 448C154.7 448 144 458.7 144 472zM448 168C448 181.3 458.7 192 472 192C485.3 192 496 181.3 496 168C496 154.7 485.3 144 472 144C458.7 144 448 154.7 448 168zM448 472C448 485.3 458.7 496 472 496C485.3 496 496 485.3 496 472C496 458.7 485.3 448 472 448C458.7 448 448 458.7 448 472z"/><path d="M168 192C181.3 192 192 181.3 192 168C192 154.7 181.3 144 168 144C154.7 144 144 154.7 144 168C144 181.3 154.7 192 168 192zM472 192C485.3 192 496 181.3 496 168C496 154.7 485.3 144 472 144C458.7 144 448 154.7 448 168C448 181.3 458.7 192 472 192zM192 472C192 458.7 181.3 448 168 448C154.7 448 144 458.7 144 472C144 485.3 154.7 496 168 496C181.3 496 192 485.3 192 472zM472 496C485.3 496 496 485.3 496 472C496 458.7 485.3 448 472 448C458.7 448 448 458.7 448 472C448 485.3 458.7 496 472 496z"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path opacity=".4" d="M96 160C96 124.7 124.7 96 160 96L480 96C515.3 96 544 124.7 544 160L544 480C544 515.3 515.3 544 480 544L160 544C124.7 544 96 515.3 96 480L96 160zM144 168C144 181.3 154.7 192 168 192C181.3 192 192 181.3 192 168C192 154.7 181.3 144 168 144C154.7 144 144 154.7 144 168zM144 472C144 485.3 154.7 496 168 496C181.3 496 192 485.3 192 472C192 458.7 181.3 448 168 448C154.7 448 144 458.7 144 472zM448 168C448 181.3 458.7 192 472 192C485.3 192 496 181.3 496 168C496 154.7 485.3 144 472 144C458.7 144 448 154.7 448 168zM448 472C448 485.3 458.7 496 472 496C485.3 496 496 485.3 496 472C496 458.7 485.3 448 472 448C458.7 448 448 458.7 448 472z"/><path d="M168 192C181.3 192 192 181.3 192 168C192 154.7 181.3 144 168 144C154.7 144 144 154.7 144 168C144 181.3 154.7 192 168 192zM472 192C485.3 192 496 181.3 496 168C496 154.7 485.3 144 472 144C458.7 144 448 154.7 448 168C448 181.3 458.7 192 472 192zM192 472C192 458.7 181.3 448 168 448C154.7 448 144 458.7 144 472C144 485.3 154.7 496 168 496C181.3 496 192 485.3 192 472zM472 496C485.3 496 496 485.3 496 472C496 458.7 485.3 448 472 448C458.7 448 448 458.7 448 472C448 485.3 458.7 496 472 496z"/></svg>
|
||||
{:else if name === 'ref-public-vs-private'}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M0 448C0 518.7 57.3 576 128 576C187.6 576 237.8 535.2 252 480L448 480C465.7 480 480 465.7 480 448L480 384C480 366.3 465.7 352 448 352C430.3 352 416 366.3 416 384L416 416L384 416L384 384C384 366.3 369.7 352 352 352C334.3 352 320 366.3 320 384L320 416L252 416C237.8 360.8 187.7 320 128 320C57.3 320 0 377.3 0 448zM192 448C192 483.3 163.3 512 128 512C92.7 512 64 483.3 64 448C64 412.7 92.7 384 128 384C163.3 384 192 412.7 192 448z"/><path d="M512 128C547.3 128 576 156.7 576 192C576 227.3 547.3 256 512 256C476.7 256 448 227.3 448 192C448 156.7 476.7 128 512 128zM512 320C582.7 320 640 262.7 640 192C640 121.3 582.7 64 512 64C452.4 64 402.2 104.8 388 160L192 160C174.3 160 160 174.3 160 192L160 256C160 273.7 174.3 288 192 288C209.7 288 224 273.7 224 256L224 224L256 224L256 256C256 273.7 270.3 288 288 288C305.7 288 320 273.7 320 256L320 224L388 224C402.2 279.2 452.3 320 512 320z"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path opacity=".4" d="M0 448C0 518.7 57.3 576 128 576C187.6 576 237.8 535.2 252 480L448 480C465.7 480 480 465.7 480 448L480 384C480 366.3 465.7 352 448 352C430.3 352 416 366.3 416 384L416 416L384 416L384 384C384 366.3 369.7 352 352 352C334.3 352 320 366.3 320 384L320 416L252 416C237.8 360.8 187.7 320 128 320C57.3 320 0 377.3 0 448zM192 448C192 483.3 163.3 512 128 512C92.7 512 64 483.3 64 448C64 412.7 92.7 384 128 384C163.3 384 192 412.7 192 448z"/><path d="M512 128C547.3 128 576 156.7 576 192C576 227.3 547.3 256 512 256C476.7 256 448 227.3 448 192C448 156.7 476.7 128 512 128zM512 320C582.7 320 640 262.7 640 192C640 121.3 582.7 64 512 64C452.4 64 402.2 104.8 388 160L192 160C174.3 160 160 174.3 160 192L160 256C160 273.7 174.3 288 192 288C209.7 288 224 273.7 224 256L224 224L256 224L256 256C256 273.7 270.3 288 288 288C305.7 288 320 273.7 320 256L320 224L388 224C402.2 279.2 452.3 320 512 320z"/></svg>
|
||||
{:else if name === 'ref-carrier-nat'}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M64 320C64 302.3 78.3 288 96 288L544 288C561.7 288 576 302.3 576 320C576 337.7 561.7 352 544 352L96 352C78.3 352 64 337.7 64 320z"/><path d="M425.4 73.4L329.4 169.4C316.9 181.9 316.9 202.2 329.4 214.7C341.9 227.2 362.2 227.2 374.7 214.7L416.1 173.3L416.1 288L480.1 288L480.1 173.3L521.5 214.7C534 227.2 554.3 227.2 566.8 214.7C579.3 202.2 579.3 181.9 566.8 169.4L470.8 73.4C458.3 60.9 438 60.9 425.5 73.4zM480 544L480 352L416 352L416 544C416 561.7 430.3 576 448 576C465.7 576 480 561.7 480 544zM169.4 566.6C181.9 579.1 202.2 579.1 214.7 566.6L310.7 470.6C323.2 458.1 323.2 437.8 310.7 425.3C298.2 412.8 277.9 412.8 265.4 425.3L224 466.7L224 352L160 352L160 466.7L118.6 425.3C106.1 412.8 85.8 412.8 73.3 425.3C60.8 437.8 60.8 458.1 73.3 470.6L169.3 566.6zM160 288L224 288L224 96C224 78.3 209.7 64 192 64C174.3 64 160 78.3 160 96L160 288z"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path opacity=".4" d="M64 320C64 302.3 78.3 288 96 288L544 288C561.7 288 576 302.3 576 320C576 337.7 561.7 352 544 352L96 352C78.3 352 64 337.7 64 320z"/><path d="M425.4 73.4L329.4 169.4C316.9 181.9 316.9 202.2 329.4 214.7C341.9 227.2 362.2 227.2 374.7 214.7L416.1 173.3L416.1 288L480.1 288L480.1 173.3L521.5 214.7C534 227.2 554.3 227.2 566.8 214.7C579.3 202.2 579.3 181.9 566.8 169.4L470.8 73.4C458.3 60.9 438 60.9 425.5 73.4zM480 544L480 352L416 352L416 544C416 561.7 430.3 576 448 576C465.7 576 480 561.7 480 544zM169.4 566.6C181.9 579.1 202.2 579.1 214.7 566.6L310.7 470.6C323.2 458.1 323.2 437.8 310.7 425.3C298.2 412.8 277.9 412.8 265.4 425.3L224 466.7L224 352L160 352L160 466.7L118.6 425.3C106.1 412.8 85.8 412.8 73.3 425.3C60.8 437.8 60.8 458.1 73.3 470.6L169.3 566.6zM160 288L224 288L224 96C224 78.3 209.7 64 192 64C174.3 64 160 78.3 160 96L160 288z"/></svg>
|
||||
{:else if name === 'ref-link-local-apia'}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M33.1 296L144.5 296C148 210.4 170.1 130.9 202.4 78.7C110.3 111.3 42.5 195.2 33.1 296zM33.1 344C42.5 444.8 110.3 528.7 202.4 561.3C170.1 509.1 148 429.6 144.5 344L33.1 344zM192.5 296L383.4 296C380.6 231.5 366.3 172.1 346 128.6C334.6 104.2 322.3 86.8 310.9 76.2C299.7 65.7 292 64 288 64C284 64 276.3 65.7 265.1 76.2C253.7 86.8 241.4 104.2 230 128.6C209.7 172.1 195.4 231.5 192.5 296zM192.5 344C195.4 408.5 209.7 467.9 230 511.4C241.4 535.9 253.7 553.2 265.1 563.8C276.3 574.3 284 576 288 576C292 576 299.7 574.3 310.9 563.8C315.1 559.9 319.5 555 323.9 549.2C311.2 523.5 304 494.6 304 464C304 418.6 319.8 376.9 346.1 344L192.5 344zM373.6 78.7C404.3 128.4 425.8 202.6 430.9 283.4C451.2 276.1 473.2 272.1 496.1 272.1C511.4 272.1 526.3 273.9 540.5 277.3C524.9 185 459.9 109.4 373.7 78.8z"/><path d="M496 608C575.5 608 640 543.5 640 464C640 384.5 575.5 320 496 320C416.5 320 352 384.5 352 464C352 543.5 416.5 608 496 608zM425.4 443.1C418.8 449 408.7 448.5 402.8 441.9C396.9 435.3 397.4 425.2 404 419.3C428.4 397.4 460.6 384 496 384C531.4 384 563.7 397.4 588 419.3C594.6 425.2 595.1 435.3 589.2 441.9C583.3 448.5 573.2 449 566.6 443.1C547.9 426.2 523.2 416 496 416C468.8 416 444.1 426.2 425.4 443.1zM496 508C507 508 516 517 516 528C516 539 507 548 496 548C485 548 476 539 476 528C476 517 485 508 496 508zM496 480C483.9 480 472.8 484.6 464.5 492.1C457.9 498 447.8 497.5 441.9 491C436 484.5 436.5 474.3 443 468.4C457 455.7 475.6 448 496 448C516.4 448 535 455.7 549 468.4C555.6 474.3 556.1 484.4 550.1 491C544.1 497.6 534.1 498.1 527.5 492.1C519.2 484.6 508.1 480 496 480z"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path opacity=".4" d="M33.1 296L144.5 296C148 210.4 170.1 130.9 202.4 78.7C110.3 111.3 42.5 195.2 33.1 296zM33.1 344C42.5 444.8 110.3 528.7 202.4 561.3C170.1 509.1 148 429.6 144.5 344L33.1 344zM192.5 296L383.4 296C380.6 231.5 366.3 172.1 346 128.6C334.6 104.2 322.3 86.8 310.9 76.2C299.7 65.7 292 64 288 64C284 64 276.3 65.7 265.1 76.2C253.7 86.8 241.4 104.2 230 128.6C209.7 172.1 195.4 231.5 192.5 296zM192.5 344C195.4 408.5 209.7 467.9 230 511.4C241.4 535.9 253.7 553.2 265.1 563.8C276.3 574.3 284 576 288 576C292 576 299.7 574.3 310.9 563.8C315.1 559.9 319.5 555 323.9 549.2C311.2 523.5 304 494.6 304 464C304 418.6 319.8 376.9 346.1 344L192.5 344zM373.6 78.7C404.3 128.4 425.8 202.6 430.9 283.4C451.2 276.1 473.2 272.1 496.1 272.1C511.4 272.1 526.3 273.9 540.5 277.3C524.9 185 459.9 109.4 373.7 78.8z"/><path d="M496 608C575.5 608 640 543.5 640 464C640 384.5 575.5 320 496 320C416.5 320 352 384.5 352 464C352 543.5 416.5 608 496 608zM425.4 443.1C418.8 449 408.7 448.5 402.8 441.9C396.9 435.3 397.4 425.2 404 419.3C428.4 397.4 460.6 384 496 384C531.4 384 563.7 397.4 588 419.3C594.6 425.2 595.1 435.3 589.2 441.9C583.3 448.5 573.2 449 566.6 443.1C547.9 426.2 523.2 416 496 416C468.8 416 444.1 426.2 425.4 443.1zM496 508C507 508 516 517 516 528C516 539 507 548 496 548C485 548 476 539 476 528C476 517 485 508 496 508zM496 480C483.9 480 472.8 484.6 464.5 492.1C457.9 498 447.8 497.5 441.9 491C436 484.5 436.5 474.3 443 468.4C457 455.7 475.6 448 496 448C516.4 448 535 455.7 549 468.4C555.6 474.3 556.1 484.4 550.1 491C544.1 497.6 534.1 498.1 527.5 492.1C519.2 484.6 508.1 480 496 480z"/></svg>
|
||||
{:else if name === 'ref-multicast-basics'}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M48 224C48 275.3 62.2 323.4 87 364.4C93.9 375.7 108.6 379.4 120 372.5C131.4 365.6 135 350.9 128.1 339.5C107.7 305.9 96 266.3 96 224C96 181.7 107.7 142.1 128.1 108.4C135 97.1 131.3 82.3 120 75.4C108.7 68.5 93.8 72.2 87 83.6C62.2 124.6 48 172.7 48 224zM144 224C144 258.9 154.2 291.6 171.8 319C179 330.2 193.8 333.4 205 326.2C216.2 319 219.4 304.2 212.2 293C199.4 273.1 192 249.4 192 224C192 198.6 199.4 174.9 212.2 155C219.4 143.8 216.1 129 205 121.8C193.9 114.6 179 117.9 171.8 129C154.2 156.4 144 189 144 224zM427.8 155C440.6 174.9 448 198.6 448 224C448 249.4 440.6 273.1 427.8 293C420.6 304.2 423.9 319 435 326.2C446.1 333.4 461 330.1 468.2 319C485.8 291.6 496 259 496 224C496 189 485.8 156.4 468.2 129C461 117.8 446.2 114.6 435 121.8C423.8 129 420.6 143.8 427.8 155zM511.9 108.4C532.3 142.1 544 181.7 544 224C544 266.3 532.3 305.9 511.9 339.6C505 350.9 508.7 365.7 520 372.6C531.3 379.5 546.1 375.8 553 364.5C577.8 323.5 592 275.4 592 224.1C592 172.8 577.8 124.6 553 83.6C546.1 72.3 531.4 68.6 520 75.5C508.6 82.4 505 97.1 511.9 108.5z"/><path d="M352 279.4C371.1 268.3 384 247.7 384 224C384 188.7 355.3 160 320 160C284.7 160 256 188.7 256 224C256 247.7 268.9 268.4 288 279.4L288 544C288 561.7 302.3 576 320 576C337.7 576 352 561.7 352 544L352 279.4z"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path opacity=".4" d="M48 224C48 275.3 62.2 323.4 87 364.4C93.9 375.7 108.6 379.4 120 372.5C131.4 365.6 135 350.9 128.1 339.5C107.7 305.9 96 266.3 96 224C96 181.7 107.7 142.1 128.1 108.4C135 97.1 131.3 82.3 120 75.4C108.7 68.5 93.8 72.2 87 83.6C62.2 124.6 48 172.7 48 224zM144 224C144 258.9 154.2 291.6 171.8 319C179 330.2 193.8 333.4 205 326.2C216.2 319 219.4 304.2 212.2 293C199.4 273.1 192 249.4 192 224C192 198.6 199.4 174.9 212.2 155C219.4 143.8 216.1 129 205 121.8C193.9 114.6 179 117.9 171.8 129C154.2 156.4 144 189 144 224zM427.8 155C440.6 174.9 448 198.6 448 224C448 249.4 440.6 273.1 427.8 293C420.6 304.2 423.9 319 435 326.2C446.1 333.4 461 330.1 468.2 319C485.8 291.6 496 259 496 224C496 189 485.8 156.4 468.2 129C461 117.8 446.2 114.6 435 121.8C423.8 129 420.6 143.8 427.8 155zM511.9 108.4C532.3 142.1 544 181.7 544 224C544 266.3 532.3 305.9 511.9 339.6C505 350.9 508.7 365.7 520 372.6C531.3 379.5 546.1 375.8 553 364.5C577.8 323.5 592 275.4 592 224.1C592 172.8 577.8 124.6 553 83.6C546.1 72.3 531.4 68.6 520 75.5C508.6 82.4 505 97.1 511.9 108.5z"/><path d="M352 279.4C371.1 268.3 384 247.7 384 224C384 188.7 355.3 160 320 160C284.7 160 256 188.7 256 224C256 247.7 268.9 268.4 288 279.4L288 544C288 561.7 302.3 576 320 576C337.7 576 352 561.7 352 544L352 279.4z"/></svg>
|
||||
{:else if name === 'ref-reverse-dns'}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M128 128L128 192C128 209.7 142.3 224 160 224L368 224C412.2 224 448 259.8 448 304C448 348.2 412.2 384 368 384L240 384L240 512L368 512C482.9 512 576 418.9 576 304C576 189.1 482.9 96 368 96L160 96C142.3 96 128 110.3 128 128z"/><path d="M240 560C240 572.9 232.2 584.6 220.3 589.6C208.4 594.6 194.6 591.8 185.4 582.7L73.4 470.7L71.2 468.3C61 455.7 61.7 437.2 73.4 425.5L185.4 313.5C194.6 304.3 208.3 301.6 220.3 306.6C232.3 311.6 240 323.1 240 336L240 560z"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path opacity=".4" d="M128 128L128 192C128 209.7 142.3 224 160 224L368 224C412.2 224 448 259.8 448 304C448 348.2 412.2 384 368 384L240 384L240 512L368 512C482.9 512 576 418.9 576 304C576 189.1 482.9 96 368 96L160 96C142.3 96 128 110.3 128 128z"/><path d="M240 560C240 572.9 232.2 584.6 220.3 589.6C208.4 594.6 194.6 591.8 185.4 582.7L73.4 470.7L71.2 468.3C61 455.7 61.7 437.2 73.4 425.5L185.4 313.5C194.6 304.3 208.3 301.6 220.3 306.6C232.3 311.6 240 323.1 240 336L240 560z"/></svg>
|
||||
{:else if name === 'ref-reverse-zones'}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M256 224L256 384L384 384L384 224C384 206.3 398.3 192 416 192L480 192C497.7 192 512 177.7 512 160L512 96C512 78.3 497.7 64 480 64L416 64C327.6 64 256 135.6 256 224z"/><path d="M297.4 566.6C309.9 579.1 330.2 579.1 342.7 566.6L470.7 438.6C479.9 429.4 482.6 415.7 477.6 403.7C472.6 391.7 460.9 384 448 384L192 384C179.1 384 167.4 391.8 162.4 403.8C157.4 415.8 160.2 429.5 169.3 438.7L297.3 566.7z"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path opacity=".4" d="M256 224L256 384L384 384L384 224C384 206.3 398.3 192 416 192L480 192C497.7 192 512 177.7 512 160L512 96C512 78.3 497.7 64 480 64L416 64C327.6 64 256 135.6 256 224z"/><path d="M297.4 566.6C309.9 579.1 330.2 579.1 342.7 566.6L470.7 438.6C479.9 429.4 482.6 415.7 477.6 403.7C472.6 391.7 460.9 384 448 384L192 384C179.1 384 167.4 391.8 162.4 403.8C157.4 415.8 160.2 429.5 169.3 438.7L297.3 566.7z"/></svg>
|
||||
{:else if name === 'ref-icmp'}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M319.1 64C333.9 63.6 347 73.3 350.9 87.6L424.9 358.8L442.6 323.4C453.4 301.7 475.6 288 499.8 288L576 288C593.7 288 608 302.3 608 320C608 337.7 593.7 352 576 352L499.8 352L444.6 462.3C438.7 474.2 426 481.1 412.8 479.8C399.6 478.5 388.6 469.2 385.1 456.4L323.7 231.3L255.3 550.7C252.2 565.1 239.8 575.5 225.1 576C210.4 576.5 197.3 566.9 193.3 552.8L135.9 352L64 352C46.3 352 32 337.7 32 320C32 302.3 46.3 288 64 288L135.9 288C164.5 288 189.6 306.9 197.4 334.4L219.6 412L288.7 89.3C291.8 74.9 304.4 64.4 319.1 64z"/><path d=""/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path opacity=".4" d="M319.1 64C333.9 63.6 347 73.3 350.9 87.6L424.9 358.8L442.6 323.4C453.4 301.7 475.6 288 499.8 288L576 288C593.7 288 608 302.3 608 320C608 337.7 593.7 352 576 352L499.8 352L444.6 462.3C438.7 474.2 426 481.1 412.8 479.8C399.6 478.5 388.6 469.2 385.1 456.4L323.7 231.3L255.3 550.7C252.2 565.1 239.8 575.5 225.1 576C210.4 576.5 197.3 566.9 193.3 552.8L135.9 352L64 352C46.3 352 32 337.7 32 320C32 302.3 46.3 288 64 288L135.9 288C164.5 288 189.6 306.9 197.4 334.4L219.6 412L288.7 89.3C291.8 74.9 304.4 64.4 319.1 64z"/><path d=""/></svg>
|
||||
{:else if name === 'ref-arp-vs-ndp'}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M128 208L128 422.7C137.8 418.4 148.6 416 160 416C171.4 416 182.2 418.4 192 422.7L192 208C192 190.3 206.3 176 224 176L248 176L248 200C248 209.7 253.8 218.5 262.8 222.2C271.8 225.9 282.1 223.9 289 217L345 161C354.4 151.6 354.4 136.4 345 127.1L289 71C282.1 64.1 271.8 62.1 262.8 65.8C253.8 69.5 248 78.3 248 88L248 112L224 112C171 112 128 155 128 208zM295 479C285.6 488.4 285.6 503.6 295 512.9L351 568.9C357.9 575.8 368.2 577.8 377.2 574.1C386.2 570.4 392 561.7 392 552L392 528L416 528C469 528 512 485 512 432L512 217.3C502.2 221.6 491.4 224 480 224C468.6 224 457.8 221.6 448 217.3L448 432C448 449.7 433.7 464 416 464L392 464L392 440C392 430.3 386.2 421.5 377.2 417.8C368.2 414.1 357.9 416.1 351 423L295 479z"/><path d="M504 144C504 157.3 493.3 168 480 168C466.7 168 456 157.3 456 144C456 130.7 466.7 120 480 120C493.3 120 504 130.7 504 144zM400 144C400 188.2 435.8 224 480 224C524.2 224 560 188.2 560 144C560 99.8 524.2 64 480 64C435.8 64 400 99.8 400 144zM184 496C184 509.3 173.3 520 160 520C146.7 520 136 509.3 136 496C136 482.7 146.7 472 160 472C173.3 472 184 482.7 184 496zM80 496C80 540.2 115.8 576 160 576C204.2 576 240 540.2 240 496C240 451.8 204.2 416 160 416C115.8 416 80 451.8 80 496z"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path opacity=".4" d="M128 208L128 422.7C137.8 418.4 148.6 416 160 416C171.4 416 182.2 418.4 192 422.7L192 208C192 190.3 206.3 176 224 176L248 176L248 200C248 209.7 253.8 218.5 262.8 222.2C271.8 225.9 282.1 223.9 289 217L345 161C354.4 151.6 354.4 136.4 345 127.1L289 71C282.1 64.1 271.8 62.1 262.8 65.8C253.8 69.5 248 78.3 248 88L248 112L224 112C171 112 128 155 128 208zM295 479C285.6 488.4 285.6 503.6 295 512.9L351 568.9C357.9 575.8 368.2 577.8 377.2 574.1C386.2 570.4 392 561.7 392 552L392 528L416 528C469 528 512 485 512 432L512 217.3C502.2 221.6 491.4 224 480 224C468.6 224 457.8 221.6 448 217.3L448 432C448 449.7 433.7 464 416 464L392 464L392 440C392 430.3 386.2 421.5 377.2 417.8C368.2 414.1 357.9 416.1 351 423L295 479z"/><path d="M504 144C504 157.3 493.3 168 480 168C466.7 168 456 157.3 456 144C456 130.7 466.7 120 480 120C493.3 120 504 130.7 504 144zM400 144C400 188.2 435.8 224 480 224C524.2 224 560 188.2 560 144C560 99.8 524.2 64 480 64C435.8 64 400 99.8 400 144zM184 496C184 509.3 173.3 520 160 520C146.7 520 136 509.3 136 496C136 482.7 146.7 472 160 472C173.3 472 184 482.7 184 496zM80 496C80 540.2 115.8 576 160 576C204.2 576 240 540.2 240 496C240 451.8 204.2 416 160 416C115.8 416 80 451.8 80 496z"/></svg>
|
||||
{:else if name === 'ref-asn'}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M64 368C64 481.3 145.5 531.9 164.2 542.1C166.7 543.5 169.5 544 172.3 544C183.2 544 192 535.1 192 524.3C192 516.8 187.7 509.9 182.2 504.8C172.8 496 160 478.4 160 448.1C160 395.1 203 352.1 256 352.1L352 352.1L352 192.1L240 192.1C142.8 192 64 270.8 64 368z"/><path d="M352 112C352 99.1 359.8 87.4 371.8 82.4C383.8 77.4 397.5 80.2 406.7 89.3L566.7 249.3C579.2 261.8 579.2 282.1 566.7 294.6L406.7 454.6C397.5 463.8 383.8 466.5 371.8 461.5C359.8 456.5 352 444.9 352 432L352 112z"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path opacity=".4" d="M64 368C64 481.3 145.5 531.9 164.2 542.1C166.7 543.5 169.5 544 172.3 544C183.2 544 192 535.1 192 524.3C192 516.8 187.7 509.9 182.2 504.8C172.8 496 160 478.4 160 448.1C160 395.1 203 352.1 256 352.1L352 352.1L352 192.1L240 192.1C142.8 192 64 270.8 64 368z"/><path d="M352 112C352 99.1 359.8 87.4 371.8 82.4C383.8 77.4 397.5 80.2 406.7 89.3L566.7 249.3C579.2 261.8 579.2 282.1 566.7 294.6L406.7 454.6C397.5 463.8 383.8 466.5 371.8 461.5C359.8 456.5 352 444.9 352 432L352 112z"/></svg>
|
||||
{:else if name === 'ref-ports'}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M96 416L96 480C96 515.3 124.7 544 160 544L480 544C515.3 544 544 515.3 544 480L544 416C544 380.7 515.3 352 480 352L160 352C124.7 352 96 380.7 96 416zM400 448C400 461.3 389.3 472 376 472C362.7 472 352 461.3 352 448C352 434.7 362.7 424 376 424C389.3 424 400 434.7 400 448zM432 192C432 205.3 442.7 216 456 216C469.3 216 480 205.3 480 192C480 178.7 469.3 168 456 168C442.7 168 432 178.7 432 192zM480 448C480 461.3 469.3 472 456 472C442.7 472 432 461.3 432 448C432 434.7 442.7 424 456 424C469.3 424 480 434.7 480 448z"/><path d="M160 96C124.7 96 96 124.7 96 160L96 224C96 259.3 124.7 288 160 288L480 288C515.3 288 544 259.3 544 224L544 160C544 124.7 515.3 96 480 96L160 96zM376 168C389.3 168 400 178.7 400 192C400 205.3 389.3 216 376 216C362.7 216 352 205.3 352 192C352 178.7 362.7 168 376 168zM432 192C432 178.7 442.7 168 456 168C469.3 168 480 178.7 480 192C480 205.3 469.3 216 456 216C442.7 216 432 205.3 432 192zM456 472C469.3 472 480 461.3 480 448C480 434.7 469.3 424 456 424C442.7 424 432 434.7 432 448C432 461.3 442.7 472 456 472z"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path opacity=".4" d="M96 416L96 480C96 515.3 124.7 544 160 544L480 544C515.3 544 544 515.3 544 480L544 416C544 380.7 515.3 352 480 352L160 352C124.7 352 96 380.7 96 416zM400 448C400 461.3 389.3 472 376 472C362.7 472 352 461.3 352 448C352 434.7 362.7 424 376 424C389.3 424 400 434.7 400 448zM432 192C432 205.3 442.7 216 456 216C469.3 216 480 205.3 480 192C480 178.7 469.3 168 456 168C442.7 168 432 178.7 432 192zM480 448C480 461.3 469.3 472 456 472C442.7 472 432 461.3 432 448C432 434.7 442.7 424 456 424C469.3 424 480 434.7 480 448z"/><path d="M160 96C124.7 96 96 124.7 96 160L96 224C96 259.3 124.7 288 160 288L480 288C515.3 288 544 259.3 544 224L544 160C544 124.7 515.3 96 480 96L160 96zM376 168C389.3 168 400 178.7 400 192C400 205.3 389.3 216 376 216C362.7 216 352 205.3 352 192C352 178.7 362.7 168 376 168zM432 192C432 178.7 442.7 168 456 168C469.3 168 480 178.7 480 192C480 205.3 469.3 216 456 216C442.7 216 432 205.3 432 192zM456 472C469.3 472 480 461.3 480 448C480 434.7 469.3 424 456 424C442.7 424 432 434.7 432 448C432 461.3 442.7 472 456 472z"/></svg>
|
||||
{:else if name === 'ref-wildcard-masks'}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M32 221.7C32 229.6 35.1 237.1 40.7 242.7L176 377.9L176 496C176 502.4 178.5 508.5 183 513L237.3 567.3C242.9 572.9 250.4 576 258.3 576C274.7 576 288 562.7 288 546.3L288 377.9L304 361.9L304 301.8L194.2 192L61.7 192C45.3 192 32 205.3 32 221.7z"/><path d="M237.7 96C221.3 96 208 109.3 208 125.7C208 133.6 211.1 141.1 216.7 146.7L352 281.9L352 400C352 406.4 354.5 412.5 359 417L413.3 471.3C418.9 476.9 426.4 480 434.3 480C450.7 480 464 466.7 464 450.3L464 281.9L599.3 146.6C604.9 141 608 133.5 608 125.6C608 109.2 594.7 95.9 578.3 95.9L237.7 96z"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path opacity=".4" d="M32 221.7C32 229.6 35.1 237.1 40.7 242.7L176 377.9L176 496C176 502.4 178.5 508.5 183 513L237.3 567.3C242.9 572.9 250.4 576 258.3 576C274.7 576 288 562.7 288 546.3L288 377.9L304 361.9L304 301.8L194.2 192L61.7 192C45.3 192 32 205.3 32 221.7z"/><path d="M237.7 96C221.3 96 208 109.3 208 125.7C208 133.6 211.1 141.1 216.7 146.7L352 281.9L352 400C352 406.4 354.5 412.5 359 417L413.3 471.3C418.9 476.9 426.4 480 434.3 480C450.7 480 464 466.7 464 450.3L464 281.9L599.3 146.6C604.9 141 608 133.5 608 125.6C608 109.2 594.7 95.9 578.3 95.9L237.7 96z"/></svg>
|
||||
{:else if name === 'ref-mtu-mss'}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M80 184C160 229.3 240 274.7 320 320C349.3 303.4 381.6 285.1 416.9 265.1L196.2 140.9L176.1 129.6L80 184zM224.8 101.9L451.7 229.6L465.7 237.4L560 184L351.5 65.9C332 54.8 308 54.8 288.4 65.9L224.8 101.9z"/><path d="M351.5 574.1L527.5 474.4C547.6 463 560 441.8 560 418.7L560 184L320 320L80 184L80 418.7C80 441.7 92.4 463 112.4 474.4L288.4 574.1C308 585.2 331.9 585.2 351.5 574.1z"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path opacity=".4" d="M80 184C160 229.3 240 274.7 320 320C349.3 303.4 381.6 285.1 416.9 265.1L196.2 140.9L176.1 129.6L80 184zM224.8 101.9L451.7 229.6L465.7 237.4L560 184L351.5 65.9C332 54.8 308 54.8 288.4 65.9L224.8 101.9z"/><path d="M351.5 574.1L527.5 474.4C547.6 463 560 441.8 560 418.7L560 184L320 320L80 184L80 418.7C80 441.7 92.4 463 112.4 474.4L288.4 574.1C308 585.2 331.9 585.2 351.5 574.1z"/></svg>
|
||||
{:else if name === 'plus'}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path opacity=".4" d=""/><path d="M344 88C344 74.7 333.3 64 320 64C306.7 64 296 74.7 296 88L296 296L88 296C74.7 296 64 306.7 64 320C64 333.3 74.7 344 88 344L296 344L296 552C296 565.3 306.7 576 320 576C333.3 576 344 565.3 344 552L344 344L552 344C565.3 344 576 333.3 576 320C576 306.7 565.3 296 552 296L344 296L344 88z"/></svg>
|
||||
{:else if name === 'trash'}
|
||||
@@ -166,6 +195,16 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path opacity=".4" d="M112 320C112 434.9 205.1 528 320 528C434.9 528 528 434.9 528 320C528 205.1 434.9 112 320 112C205.1 112 112 205.1 112 320zM173.3 255C165 244.6 166.7 229.5 177 221.3L257 157.3C267.4 149 282.5 150.7 290.7 161C298.9 171.3 297.3 186.5 287 194.7L207 258.7C196.6 267 181.5 265.3 173.3 255zM184.8 317.8C181.6 304.9 189.4 291.9 202.3 288.7L266.3 272.7C279.2 269.5 292.2 277.3 295.4 290.2C298.6 303.1 290.8 316.1 277.9 319.3L213.9 335.3C201 338.5 188 330.7 184.8 317.8zM191 383C200.4 373.6 215.6 373.6 224.9 383L229.7 387.8C238.7 396.8 252.4 399 263.7 393.3C289.9 380.2 321.3 383 344.8 400.6L372.7 421.6C374.8 423.2 377.4 424 380 424C384 424 387.8 422 390 418.7L412.1 386.4C419.6 375.5 434.5 372.7 445.5 380.2C456.5 387.7 459.2 402.6 451.7 413.6L429.6 445.9C418.4 462.3 399.8 472.1 380 472.1C367 472.1 354.3 467.9 343.9 460.1L316 439C307.1 432.3 295.1 431.2 285.2 436.2C255.4 451.1 219.4 445.3 195.8 421.7L191 417C181.6 407.6 181.6 392.4 191 383.1zM352 272C352 236.7 373.5 208 400 208C426.5 208 448 236.7 448 272C448 307.3 426.5 336 400 336C373.5 336 352 307.3 352 272z"/><path d="M320 112C434.9 112 528 205.1 528 320C528 434.9 434.9 528 320 528C205.1 528 112 434.9 112 320C112 205.1 205.1 112 320 112zM320 576C461.4 576 576 461.4 576 320C576 178.6 461.4 64 320 64C178.6 64 64 178.6 64 320C64 461.4 178.6 576 320 576zM448 272C448 236.7 426.5 208 400 208C373.5 208 352 236.7 352 272C352 307.3 373.5 336 400 336C426.5 336 448 307.3 448 272zM277.8 319.3C290.7 316.1 298.5 303.1 295.3 290.2C292.1 277.3 279.1 269.5 266.2 272.7L202.2 288.7C189.3 291.9 181.5 304.9 184.7 317.8C187.9 330.7 200.9 338.5 213.8 335.3L277.8 319.3zM290.7 161C282.4 150.6 267.3 149 257 157.3L177 221.3C166.6 229.6 165 244.7 173.3 255C181.6 265.3 196.7 267 207 258.7L287 194.7C297.4 186.4 299 171.3 290.7 161zM451.8 413.6C459.3 402.7 456.5 387.7 445.6 380.2C434.7 372.7 419.7 375.5 412.2 386.4L390.1 418.7C387.8 422 384.1 424 380.1 424C377.5 424 374.9 423.1 372.8 421.6L344.9 400.6C321.4 383 290 380.2 263.8 393.3C252.5 399 238.8 396.7 229.8 387.8L225 383C215.6 373.6 200.4 373.6 191.1 383C181.8 392.4 181.7 407.6 191.1 416.9L195.9 421.7C219.5 445.3 255.5 451.1 285.3 436.2C295.3 431.2 307.2 432.3 316.1 439L344 460C354.4 467.8 367.1 472 380.1 472C399.9 472 418.5 462.2 429.7 445.8L451.8 413.5z"/></svg>
|
||||
{:else if name === 'help'}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path opacity=".4" d="M112 320C112 434.9 205.1 528 320 528C434.9 528 528 434.9 528 320C528 205.1 434.9 112 320 112C205.1 112 112 205.1 112 320zM240 272C240 227.8 275.8 192 320 192C364.2 192 400 227.8 400 272C400 319.2 364 339.2 344 346.5L344 350.3C344 363.6 333.3 374.3 320 374.3C306.7 374.3 296 363.6 296 350.3L296 342.2C296 321.7 310.8 307 326.1 302C332.5 299.9 339.3 296.5 344.3 291.7C348.6 287.5 352 281.7 352 272.1C352 254.4 337.7 240.1 320 240.1C302.3 240.1 288 254.4 288 272.1C288 285.4 277.3 296.1 264 296.1C250.7 296.1 240 285.4 240 272.1zM352 432C352 449.7 337.7 464 320 464C302.3 464 288 449.7 288 432C288 414.3 302.3 400 320 400C337.7 400 352 414.3 352 432z"/><path d="M528 320C528 205.1 434.9 112 320 112C205.1 112 112 205.1 112 320C112 434.9 205.1 528 320 528C434.9 528 528 434.9 528 320zM64 320C64 178.6 178.6 64 320 64C461.4 64 576 178.6 576 320C576 461.4 461.4 576 320 576C178.6 576 64 461.4 64 320zM320 240C302.3 240 288 254.3 288 272C288 285.3 277.3 296 264 296C250.7 296 240 285.3 240 272C240 227.8 275.8 192 320 192C364.2 192 400 227.8 400 272C400 319.2 364 339.2 344 346.5L344 350.3C344 363.6 333.3 374.3 320 374.3C306.7 374.3 296 363.6 296 350.3L296 342.2C296 321.7 310.8 307 326.1 302C332.5 299.9 339.3 296.5 344.3 291.7C348.6 287.5 352 281.7 352 272.1C352 254.4 337.7 240.1 320 240.1zM288 432C288 414.3 302.3 400 320 400C337.7 400 352 414.3 352 432C352 449.7 337.7 464 320 464C302.3 464 288 449.7 288 432z"/></svg>
|
||||
{:else if name === 'list-check'}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path opacity=".4" d=""/><path d="M203.7 133.8C211.3 122.9 208.7 108 197.8 100.4C186.9 92.8 172 95.4 164.4 106.3L124.7 162.8L105 143C95.6 133.7 80.4 133.7 71 143C61.6 152.3 61.7 167.6 71 177L111 217C116 222 123 224.6 130.1 223.9C137.2 223.2 143.6 219.6 147.7 213.8L203.7 133.8zM203.7 293.8C211.3 282.9 208.7 268 197.8 260.4C186.9 252.8 172 255.4 164.4 266.3L124.7 322.8L105 303C95.6 293.6 80.4 293.6 71.1 303C61.8 312.4 61.7 327.6 71 337L111 377C116 382 123 384.6 130.1 383.9C137.2 383.2 143.6 379.6 147.7 373.8L203.7 293.8zM256 160C256 173.3 266.7 184 280 184L552 184C565.3 184 576 173.3 576 160C576 146.7 565.3 136 552 136L280 136C266.7 136 256 146.7 256 160zM256 320C256 333.3 266.7 344 280 344L552 344C565.3 344 576 333.3 576 320C576 306.7 565.3 296 552 296L280 296C266.7 296 256 306.7 256 320zM224 480C224 493.3 234.7 504 248 504L552 504C565.3 504 576 493.3 576 480C576 466.7 565.3 456 552 456L248 456C234.7 456 224 466.7 224 480zM160 480C160 462.3 145.7 448 128 448C110.3 448 96 462.3 96 480C96 497.7 110.3 512 128 512C145.7 512 160 497.7 160 480z"/></svg>
|
||||
{:else if name === 'list'}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path opacity=".4" d="M104 320C104 333.3 114.7 344 128 344C141.3 344 152 333.3 152 320C152 306.7 141.3 296 128 296C114.7 296 104 306.7 104 320zM104 480C104 493.3 114.7 504 128 504C141.3 504 152 493.3 152 480C152 466.7 141.3 456 128 456C114.7 456 104 466.7 104 480z"/><path d="M64 160C64 124.7 92.7 96 128 96C163.3 96 192 124.7 192 160C192 195.3 163.3 224 128 224C92.7 224 64 195.3 64 160zM152 320C152 306.7 141.3 296 128 296C114.7 296 104 306.7 104 320C104 333.3 114.7 344 128 344C141.3 344 152 333.3 152 320zM64 320C64 284.7 92.7 256 128 256C163.3 256 192 284.7 192 320C192 355.3 163.3 384 128 384C92.7 384 64 355.3 64 320zM152 480C152 466.7 141.3 456 128 456C114.7 456 104 466.7 104 480C104 493.3 114.7 504 128 504C141.3 504 152 493.3 152 480zM64 480C64 444.7 92.7 416 128 416C163.3 416 192 444.7 192 480C192 515.3 163.3 544 128 544C92.7 544 64 515.3 64 480zM280 136L552 136C565.3 136 576 146.7 576 160C576 173.3 565.3 184 552 184L280 184C266.7 184 256 173.3 256 160C256 146.7 266.7 136 280 136zM280 296L552 296C565.3 296 576 306.7 576 320C576 333.3 565.3 344 552 344L280 344C266.7 344 256 333.3 256 320C256 306.7 266.7 296 280 296zM280 456L552 456C565.3 456 576 466.7 576 480C576 493.3 565.3 504 552 504L280 504C266.7 504 256 493.3 256 480C256 466.7 266.7 456 280 456z"/></svg>
|
||||
{:else if name === 'swap'}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path opacity=".4" d="M91.1 320L160 384.6L160 368C160 361.6 162.5 355.5 167 351C171.5 346.5 177.6 344 184 344L456 344C469.3 344 480 354.7 480 368L480 384.6L548.9 320L480 255.4L480 272C480 278.4 477.5 284.5 473 289C468.5 293.5 462.4 296 456 296L184 296C170.7 296 160 285.3 160 272L160 255.4L91.1 320z"/><path d="M446.5 178C455.3 174.2 465.5 176 472.5 182.5L600.5 302.5C605.3 307 608.1 313.4 608.1 320C608.1 326.6 605.4 333 600.5 337.5L472.5 457.5C465.5 464 455.3 465.8 446.5 462C437.7 458.2 432 449.6 432 440L432 392L208 392L208 440C208 449.6 202.3 458.2 193.5 462C184.7 465.8 174.5 464 167.5 457.5L39.5 337.5C34.7 333 32 326.6 32 320C32 313.4 34.7 307 39.6 302.5L167.6 182.5C174.6 176 184.8 174.2 193.6 178C202.4 181.8 208 190.4 208 200L208 248L432 248L432 200C432 190.4 437.7 181.8 446.5 178zM480 255.4L480 272C480 278.4 477.5 284.5 473 289C468.5 293.5 462.4 296 456 296L184 296C170.7 296 160 285.3 160 272L160 255.4L91.1 320L160 384.6L160 368C160 361.6 162.5 355.5 167 351C171.5 346.5 177.6 344 184 344L456 344C469.3 344 480 354.7 480 368L480 384.6L548.9 320L480 255.4z"/></svg>
|
||||
{:else if name === 'plus-circle'}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path opacity=".4" d="M112 320C112 434.9 205.1 528 320 528C434.9 528 528 434.9 528 320C528 205.1 434.9 112 320 112C205.1 112 112 205.1 112 320zM208 320C208 306.7 218.7 296 232 296L296 296L296 232C296 218.7 306.7 208 320 208C333.3 208 344 218.7 344 232L344 296L408 296C421.3 296 432 306.7 432 320C432 333.3 421.3 344 408 344L344 344L344 408C344 421.3 333.3 432 320 432C306.7 432 296 421.3 296 408L296 344L232 344C218.7 344 208 333.3 208 320z"/><path d="M320 112C434.9 112 528 205.1 528 320C528 434.9 434.9 528 320 528C205.1 528 112 434.9 112 320C112 205.1 205.1 112 320 112zM320 576C461.4 576 576 461.4 576 320C576 178.6 461.4 64 320 64C178.6 64 64 178.6 64 320C64 461.4 178.6 576 320 576zM296 408C296 421.3 306.7 432 320 432C333.3 432 344 421.3 344 408L344 344L408 344C421.3 344 432 333.3 432 320C432 306.7 421.3 296 408 296L344 296L344 232C344 218.7 333.3 208 320 208C306.7 208 296 218.7 296 232L296 296L232 296C218.7 296 208 306.7 208 320C208 333.3 218.7 344 232 344L296 344L296 408z"/></svg>
|
||||
{:else if name === 'minus-circle'}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path opacity=".4" d="M112 320C112 434.9 205.1 528 320 528C434.9 528 528 434.9 528 320C528 205.1 434.9 112 320 112C205.1 112 112 205.1 112 320zM208 320C208 306.7 218.7 296 232 296L408 296C421.3 296 432 306.7 432 320C432 333.3 421.3 344 408 344L232 344C218.7 344 208 333.3 208 320z"/><path d="M320 112C434.9 112 528 205.1 528 320C528 434.9 434.9 528 320 528C205.1 528 112 434.9 112 320C112 205.1 205.1 112 320 112zM320 576C461.4 576 576 461.4 576 320C576 178.6 461.4 64 320 64C178.6 64 64 178.6 64 320C64 461.4 178.6 576 320 576zM232 296C218.7 296 208 306.7 208 320C208 333.3 218.7 344 232 344L408 344C421.3 344 432 333.3 432 320C432 306.7 421.3 296 408 296L232 296z"/></svg>
|
||||
{:else if name === 'check-circle'}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path opacity=".4" d="M112 320C112 434.9 205.1 528 320 528C434.9 528 528 434.9 528 320C528 205.1 434.9 112 320 112C205.1 112 112 205.1 112 320zM236.8 342.4C228.8 331.8 231 316.8 241.6 308.8C252.2 300.8 267.2 303 275.2 313.6L302.2 349.6L363.6 251.3C370.6 240.1 385.4 236.6 396.7 243.7C408 250.8 411.4 265.5 404.3 276.8L324.3 404.8C320.1 411.5 312.9 415.7 305 416.1C297.1 416.5 289.5 412.9 284.8 406.5L236.8 342.5z"/><path d="M320 112C434.9 112 528 205.1 528 320C528 434.9 434.9 528 320 528C205.1 528 112 434.9 112 320C112 205.1 205.1 112 320 112zM320 576C461.4 576 576 461.4 576 320C576 178.6 461.4 64 320 64C178.6 64 64 178.6 64 320C64 461.4 178.6 576 320 576zM404.4 276.7C411.4 265.5 408 250.7 396.8 243.6C385.6 236.5 370.8 240 363.7 251.2L302.3 349.5L275.3 313.5C267.3 302.9 252.3 300.7 241.7 308.7C231.1 316.7 228.9 331.7 236.9 342.3L284.9 406.3C289.6 412.6 297.2 416.2 305.1 415.9C313 415.6 320.2 411.4 324.4 404.6L404.4 276.6z"/></svg>
|
||||
{:else if name === 'alert-triangle'}
|
||||
@@ -186,18 +225,36 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path opacity=".4" d=""/><path d="M527.7 142.7C540.3 138.4 547 124.8 542.7 112.3C538.4 99.8 524.8 93 512.3 97.3L112.3 233.3C102.6 236.6 96 245.7 96 256C96 266.3 102.5 275.4 112.3 278.7L512.3 414.7C524.8 419 538.5 412.3 542.7 399.7C546.9 387.1 540.3 373.5 527.7 369.3L194.6 256L527.7 142.7zM120 496C106.7 496 96 506.7 96 520C96 533.3 106.7 544 120 544L520 544C533.3 544 544 533.3 544 520C544 506.7 533.3 496 520 496L120 496z"/></svg>
|
||||
{:else if name === 'next-available-subnet'}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path opacity=".4" d="M144 288L144 352L344 352C357.3 352 368 362.7 368 376L368 441.4L489.4 320L368 198.6L368 264C368 277.3 357.3 288 344 288L144 288z"/><path d="M489.4 320L368 198.6L368 264C368 277.3 357.3 288 344 288L144 288L144 352L344 352C357.3 352 368 362.7 368 376L368 441.4L489.4 320zM534.7 297.4C547.2 309.9 547.2 330.2 534.7 342.7L374.7 502.7C365.5 511.9 351.8 514.6 339.8 509.6L339.8 509.6C327.8 504.6 320 493 320 480L320 400L144 400C117.5 400 96 378.5 96 352L96 288C96 261.5 117.5 240 144 240L320 240L320 160C320 147.1 327.8 135.4 339.8 130.4L339.8 130.4C351.8 125.4 365.5 128.2 374.7 137.3L534.7 297.3z"/></svg>
|
||||
{:else if name === 'network'}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path opacity=".4" d="M40 368C40 381.3 50.7 392 64 392C77.3 392 88 381.3 88 368C88 354.7 77.3 344 64 344C50.7 344 40 354.7 40 368zM200 128C200 141.3 210.7 152 224 152C237.3 152 248 141.3 248 128C248 114.7 237.3 104 224 104C210.7 104 200 114.7 200 128zM240 368C240 421 283 464 336 464C389 464 432 421 432 368C432 315 389 272 336 272C283 272 240 315 240 368zM552 192C552 205.3 562.7 216 576 216C589.3 216 600 205.3 600 192C600 178.7 589.3 168 576 168C562.7 168 552 178.7 552 192zM552 512C552 525.3 562.7 536 576 536C589.3 536 600 525.3 600 512C600 498.7 589.3 488 576 488C562.7 488 552 498.7 552 512z"/><path d="M224 104C237.3 104 248 114.7 248 128C248 141.3 237.3 152 224 152C210.7 152 200 141.3 200 128C200 114.7 210.7 104 224 104zM224 192C225.1 192 226.2 192 227.3 191.9L254.2 249.5C222.9 271.2 200.5 304.9 194 344L123.4 344C113.9 320.5 90.9 304 64.1 304C28.8 304 .1 332.7 .1 368C.1 403.3 28.8 432 64.1 432C91 432 114 415.5 123.4 392L194 392C205.4 460.1 264.7 512 336 512C379.8 512 419 492.5 445.4 461.6L512.8 502C512.3 505.2 512 508.6 512 511.9C512 547.2 540.7 575.9 576 575.9C611.3 575.9 640 547.2 640 511.9C640 476.6 611.3 447.9 576 447.9C561.5 447.9 548.2 452.7 537.5 460.8L470.2 420.4C476.6 404.1 480.1 386.4 480.1 367.9C480.1 344.7 474.6 322.7 464.8 303.3L542.4 246.4C552.2 252.5 563.7 256 576.1 256C611.4 256 640.1 227.3 640.1 192C640.1 156.7 611.4 128 576.1 128C540.8 128 512.1 156.7 512.1 192C512.1 197.4 512.8 202.7 514 207.7L436.4 264.6C410.5 239.4 375.1 223.9 336.1 223.9C322.8 223.9 310 225.7 297.8 229.1L270.9 171.6C281.5 160.2 288 144.9 288 128C288 92.7 259.3 64 224 64C188.7 64 160 92.7 160 128C160 163.3 188.7 192 224 192zM576 168C589.3 168 600 178.7 600 192C600 205.3 589.3 216 576 216C562.7 216 552 205.3 552 192C552 178.7 562.7 168 576 168zM552 512C552 498.7 562.7 488 576 488C589.3 488 600 498.7 600 512C600 525.3 589.3 536 576 536C562.7 536 552 525.3 552 512zM64 344C77.3 344 88 354.7 88 368C88 381.3 77.3 392 64 392C50.7 392 40 381.3 40 368C40 354.7 50.7 344 64 344zM336 272C389 272 432 315 432 368C432 421 389 464 336 464C283 464 240 421 240 368C240 315 283 272 336 272z"/></svg>
|
||||
{:else if name === 'free-blocks' || name === 'database'}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path opacity=".4" d="M144 150L144 238.7C157.3 245.9 175.6 252.9 198.8 258.6C232.8 267 274.5 272 320 272C365.5 272 407.3 267 441.2 258.6C464.3 252.9 482.7 245.9 496 238.7L496 150L495.4 149.5C490.1 145 479.5 138.8 462.2 132.6C428.1 120.5 377.8 112 320 112C262.2 112 211.9 120.5 177.8 132.6C160.5 138.8 149.9 145 144.6 149.5L144 150zM144 291.5L144 366.7C157.3 373.9 175.6 380.9 198.8 386.6C232.8 395 274.5 400 320 400C365.5 400 407.3 395 441.2 386.6C464.3 380.9 482.7 373.9 496 366.7L496 291.5C482.7 296.8 468.1 301.4 452.7 305.2C414.5 314.6 368.8 320 320 320C271.2 320 225.5 314.6 187.3 305.2C171.9 301.4 157.3 296.9 144 291.5zM144 419.5L144 489.9L144.6 490.4C149.9 494.9 160.5 501.1 177.8 507.3C211.9 519.5 262.2 527.9 320 527.9C377.8 527.9 428.1 519.4 462.2 507.3C479.5 501.1 490 494.9 495.4 490.4L496 489.9L496 419.5C482.7 424.8 468.1 429.4 452.7 433.2C414.5 442.6 368.8 448 320 448C271.2 448 225.5 442.6 187.3 433.2C171.9 429.4 157.3 424.9 144 419.5z"/><path d="M496 150L496 238.7C482.7 245.9 464.4 252.9 441.2 258.6C407.2 267 365.5 272 320 272C274.5 272 232.7 267 198.8 258.6C175.6 252.9 157.3 246 144 238.7L144 150L144.6 149.5C149.9 145 160.5 138.8 177.8 132.6C211.9 120.5 262.2 112 320 112C377.8 112 428.1 120.5 462.2 132.6C479.5 138.8 490 145 495.4 149.5L496 150zM496 490L495.4 490.5C490.1 495 479.5 501.2 462.2 507.4C428.1 519.6 377.8 528 320 528C262.2 528 211.9 519.5 177.8 507.4C160.5 501.2 150 495 144.6 490.5L144 490L144 419.6C157.3 424.9 171.9 429.5 187.3 433.3C225.5 442.7 271.2 448.1 320 448.1C368.8 448.1 414.5 442.7 452.7 433.3C468.1 429.5 482.7 425 496 419.6L496 490zM496 366.7C482.7 373.9 464.4 380.9 441.2 386.6C407.2 395 365.5 400 320 400C274.5 400 232.7 395 198.8 386.6C175.6 380.9 157.3 374 144 366.7L144 291.5C157.3 296.8 171.9 301.4 187.3 305.2C225.5 314.6 271.2 320 320 320C368.8 320 414.5 314.6 452.7 305.2C468.1 301.4 482.7 296.9 496 291.5L496 366.7zM544 496L544 144C544 99.8 443.7 64 320 64C196.3 64 96 99.8 96 144L96 496C96 540.2 196.3 576 320 576C443.7 576 544 540.2 544 496z"/></svg>
|
||||
{:else if name === 'draggable'}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path opacity=".4" d="M119.8 320L160 353.5L160 286.5L119.8 320zM286.5 160L353.5 160L320 119.8L286.5 160zM286.5 480L320 520.2L353.5 480L286.5 480zM480 286.5L480 353.5L520.2 320L480 286.5z"/><path d="M320 119.8L353.5 160L286.5 160L320 119.8zM293.8 76.3L232.2 150.2C226.9 156.5 224 164.5 224 172.8C224 192.3 239.8 208 259.2 208L296 208L296 296L208 296L208 259.2C208 239.7 192.2 224 172.8 224C164.6 224 156.6 226.9 150.2 232.2L76.3 293.8C68.5 300.2 64 309.9 64 320C64 330.1 68.5 339.8 76.3 346.2L150.2 407.8C156.5 413.1 164.5 416 172.8 416C192.3 416 208 400.2 208 380.8L208 344L296 344L296 432L259.2 432C239.7 432 224 447.8 224 467.2C224 475.4 226.9 483.4 232.2 489.8L293.8 563.7C300.3 571.5 309.9 576 320 576C330.1 576 339.8 571.5 346.2 563.7L407.8 489.8C413.1 483.5 416 475.5 416 467.2C416 447.7 400.2 432 380.8 432L344 432L344 344L432 344L432 380.8C432 400.3 447.8 416 467.2 416C475.4 416 483.4 413.1 489.8 407.8L563.7 346.2C571.5 339.7 576 330.1 576 320C576 309.9 571.5 300.2 563.7 293.8L489.8 232.2C483.5 226.9 475.5 224 467.2 224C447.7 224 432 239.8 432 259.2L432 296L344 296L344 208L380.8 208C400.3 208 416 192.2 416 172.8C416 164.6 413.1 156.6 407.8 150.2L346.2 76.3C339.8 68.5 330.1 64 320 64C309.9 64 300.2 68.5 293.8 76.3zM320 520.2L286.5 480L353.5 480L320 520.2zM520.2 320L480 353.5L480 286.5L520.2 320zM160 353.5L119.8 320L160 286.5L160 353.5z"/></svg>
|
||||
|
||||
<!-- UI Icons-->
|
||||
{:else if name === 'zap'}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.0.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M164.9 336L372.7 150.1L331.9 272.4C329.5 279.7 330.7 287.8 335.2 294C339.7 300.2 347 304 354.7 304L475.1 304L267.4 489.9L308.2 367.6C310.6 360.3 309.4 352.2 304.9 346C300.4 339.8 293.1 336 285.4 336L164.9 336z"/><path d="M437.2 51.9C446.3 57.9 450.2 69.2 446.8 79.5L388 256L508.9 256C528.3 256 544 271.7 544 291.1C544 301.1 539.8 310.6 532.3 317.2L232 585.9C223.9 593.2 211.9 594.1 202.8 588.1C193.7 582.1 189.8 570.8 193.2 560.5L252 384L131.1 384C111.7 384 96 368.3 96 348.9C96 339 100.2 329.5 107.7 322.8L408 54.1C416.1 46.8 428.1 46 437.2 51.9zM164.9 336L285.3 336C293 336 300.3 339.7 304.8 346C309.3 352.3 310.5 360.3 308.1 367.6L267.3 489.9L475.1 304L354.7 304C347 304 339.7 300.3 335.2 294C330.7 287.7 329.5 279.7 331.9 272.4L372.7 150.1L164.9 336z"/></svg>
|
||||
{:else if name === 'target'}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.0.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M112 320C112 434.9 205.1 528 320 528C434.9 528 528 434.9 528 320C528 205.1 434.9 112 320 112C205.1 112 112 205.1 112 320zM464 320C464 399.5 399.5 464 320 464C240.5 464 176 399.5 176 320C176 240.5 240.5 176 320 176C399.5 176 464 240.5 464 320zM224 320C224 373 267 416 320 416C373 416 416 373 416 320C416 267 373 224 320 224C267 224 224 267 224 320zM352 320C352 337.7 337.7 352 320 352C302.3 352 288 337.7 288 320C288 302.3 302.3 288 320 288C337.7 288 352 302.3 352 320z"/><path d="M528 320C528 205.1 434.9 112 320 112C205.1 112 112 205.1 112 320C112 434.9 205.1 528 320 528C434.9 528 528 434.9 528 320zM64 320C64 178.6 178.6 64 320 64C461.4 64 576 178.6 576 320C576 461.4 461.4 576 320 576C178.6 576 64 461.4 64 320zM320 416C373 416 416 373 416 320C416 267 373 224 320 224C267 224 224 267 224 320C224 373 267 416 320 416zM320 176C399.5 176 464 240.5 464 320C464 399.5 399.5 464 320 464C240.5 464 176 399.5 176 320C176 240.5 240.5 176 320 176zM288 320C288 302.3 302.3 288 320 288C337.7 288 352 302.3 352 320C352 337.7 337.7 352 320 352C302.3 352 288 337.7 288 320z"/></svg>
|
||||
{:else if name === 'chevron-right'}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.0.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d=""/><path d="M473.5 303C482.9 312.4 482.9 327.6 473.5 336.9L273.5 536.9C264.1 546.3 248.9 546.3 239.6 536.9C230.3 527.5 230.2 512.3 239.6 503L422.6 320L239.6 137C230.2 127.6 230.2 112.4 239.6 103.1C249 93.8 264.2 93.7 273.5 103.1L473.5 303.1z"/></svg>
|
||||
{:else if name === 'rotate'}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.0.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M474.1 200L528.2 200L528.2 145.9L474.1 200z"/><path d="M561.4 65.8C552.4 62.1 542.1 64.1 535.2 71L483.4 122.8C382.8 39.3 233.3 44.7 139.1 139C39.1 239 39.1 401 139.1 501C239.1 601 401.2 601 501.1 501C516 486.1 528.7 469.8 539.2 452.5C546.1 441.2 542.4 426.4 531.1 419.5C519.8 412.6 505 416.3 498.1 427.6C489.6 441.6 479.3 454.9 467.1 467C385.9 548.2 254.2 548.2 172.9 467C91.6 385.8 91.7 254.1 172.9 172.8C248.4 97.3 367.5 92 449.1 156.8L399.1 207C392.2 213.9 390.2 224.2 393.9 233.2C397.6 242.2 406.4 248 416.1 248L552.2 248C565.5 248 576.2 237.3 576.2 224L576.2 88C576.2 78.3 570.4 69.5 561.4 65.8zM528.2 145.9L528.2 200L474.1 200L528.2 145.9z"/></svg>
|
||||
{:else if name === 'server'}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.0.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M144 160L144 224C144 232.8 151.2 240 160 240L480 240C488.8 240 496 232.8 496 224L496 160C496 151.2 488.8 144 480 144L160 144C151.2 144 144 151.2 144 160zM144 416L144 480C144 488.8 151.2 496 160 496L480 496C488.8 496 496 488.8 496 480L496 416C496 407.2 488.8 400 480 400L160 400C151.2 400 144 407.2 144 416zM384 192C384 205.3 373.3 216 360 216C346.7 216 336 205.3 336 192C336 178.7 346.7 168 360 168C373.3 168 384 178.7 384 192zM384 448C384 461.3 373.3 472 360 472C346.7 472 336 461.3 336 448C336 434.7 346.7 424 360 424C373.3 424 384 434.7 384 448zM464 192C464 205.3 453.3 216 440 216C426.7 216 416 205.3 416 192C416 178.7 426.7 168 440 168C453.3 168 464 178.7 464 192zM464 448C464 461.3 453.3 472 440 472C426.7 472 416 461.3 416 448C416 434.7 426.7 424 440 424C453.3 424 464 434.7 464 448z"/><path d="M160 144C151.2 144 144 151.2 144 160L144 224C144 232.8 151.2 240 160 240L480 240C488.8 240 496 232.8 496 224L496 160C496 151.2 488.8 144 480 144L160 144zM96 160C96 124.7 124.7 96 160 96L480 96C515.3 96 544 124.7 544 160L544 224C544 259.3 515.3 288 480 288L160 288C124.7 288 96 259.3 96 224L96 160zM360 168C373.3 168 384 178.7 384 192C384 205.3 373.3 216 360 216C346.7 216 336 205.3 336 192C336 178.7 346.7 168 360 168zM416 192C416 178.7 426.7 168 440 168C453.3 168 464 178.7 464 192C464 205.3 453.3 216 440 216C426.7 216 416 205.3 416 192zM160 400C151.2 400 144 407.2 144 416L144 480C144 488.8 151.2 496 160 496L480 496C488.8 496 496 488.8 496 480L496 416C496 407.2 488.8 400 480 400L160 400zM96 416C96 380.7 124.7 352 160 352L480 352C515.3 352 544 380.7 544 416L544 480C544 515.3 515.3 544 480 544L160 544C124.7 544 96 515.3 96 480L96 416zM336 448C336 434.7 346.7 424 360 424C373.3 424 384 434.7 384 448C384 461.3 373.3 472 360 472C346.7 472 336 461.3 336 448zM440 424C453.3 424 464 434.7 464 448C464 461.3 453.3 472 440 472C426.7 472 416 461.3 416 448C416 434.7 426.7 424 440 424z"/></svg>
|
||||
{:else if name === 'file'}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.0.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M176 128L176 512C176 520.8 183.2 528 192 528L448 528C456.8 528 464 520.8 464 512L464 272L376 272C336.2 272 304 239.8 304 200L304 112L192 112C183.2 112 176 119.2 176 128zM224 344C224 330.7 234.7 320 248 320L392 320C405.3 320 416 330.7 416 344C416 357.3 405.3 368 392 368L248 368C234.7 368 224 357.3 224 344zM224 440C224 426.7 234.7 416 248 416L392 416C405.3 416 416 426.7 416 440C416 453.3 405.3 464 392 464L248 464C234.7 464 224 453.3 224 440z"/><path d="M192 112L304 112L304 200C304 239.8 336.2 272 376 272L464 272L464 512C464 520.8 456.8 528 448 528L192 528C183.2 528 176 520.8 176 512L176 128C176 119.2 183.2 112 192 112zM352 131.9L444.1 224L376 224C362.7 224 352 213.3 352 200L352 131.9zM192 64C156.7 64 128 92.7 128 128L128 512C128 547.3 156.7 576 192 576L448 576C483.3 576 512 547.3 512 512L512 250.5C512 233.5 505.3 217.2 493.3 205.2L370.7 82.7C358.7 70.7 342.5 64 325.5 64L192 64zM248 320C234.7 320 224 330.7 224 344C224 357.3 234.7 368 248 368L392 368C405.3 368 416 357.3 416 344C416 330.7 405.3 320 392 320L248 320zM248 416C234.7 416 224 426.7 224 440C224 453.3 234.7 464 248 464L392 464C405.3 464 416 453.3 416 440C416 426.7 405.3 416 392 416L248 416z"/></svg>
|
||||
{:else if name === 'x'}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path opacity=".4" d="M183.1 137.4C170.6 124.9 150.3 124.9 137.8 137.4C125.3 149.9 125.3 170.2 137.8 182.7L275.2 320L137.9 457.4C125.4 469.9 125.4 490.2 137.9 502.7C150.4 515.2 170.7 515.2 183.2 502.7L320.5 365.3L457.9 502.6C470.4 515.1 490.7 515.1 503.2 502.6C515.7 490.1 515.7 469.8 503.2 457.3L365.8 320L503.1 182.6C515.6 170.1 515.6 149.8 503.1 137.3C490.6 124.8 470.3 124.8 457.8 137.3L320.5 274.7L183.1 137.4z"/><path d=""/></svg>
|
||||
{:else if name === 'refresh'}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M64 416.3L65 543.3C65.1 561 79.6 575.2 97.3 575C115 574.8 129.2 560.4 129 542.7L128.6 491.2L139.3 501.3C185.6 547.4 249.5 576 320 576C449 576 555.7 480.6 573.4 356.5C575.9 339 563.7 322.8 546.3 320.3C528.9 317.8 512.6 330 510.1 347.4C496.8 440.4 416.7 511.9 320 511.9C267 511.9 219 490.4 184.2 455.7C184 455.5 183.8 455.3 183.6 455.1L176 447.9L223.9 447.9C241.6 447.9 255.9 433.6 255.9 415.9C255.9 398.2 241.6 383.9 223.9 383.9L96 384C87.5 384 79.3 387.4 73.3 393.5C67.3 399.6 63.9 407.7 64 416.3z"/><path d="M320 128C223.3 128 143.3 199.5 129.9 292.5C127.4 310 111.2 322.1 93.7 319.6C76.2 317.1 64.1 301 66.6 283.5C84.3 159.4 191 64 320 64C390.5 64 454.5 92.6 500.7 138.7L512 149.4L512 96C512 78.3 526.3 64 544 64C561.7 64 576 78.3 576 96L576 224C576 241.7 561.7 256 544 256L416 256C398.3 256 384 241.7 384 224C384 206.3 398.3 192 416 192L463.9 192L456.3 184.8C456.1 184.6 455.9 184.4 455.7 184.2C420.9 149.4 373 128 319.9 128z"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path opacity=".4" d="M64 416.3L65 543.3C65.1 561 79.6 575.2 97.3 575C115 574.8 129.2 560.4 129 542.7L128.6 491.2L139.3 501.3C185.6 547.4 249.5 576 320 576C449 576 555.7 480.6 573.4 356.5C575.9 339 563.7 322.8 546.3 320.3C528.9 317.8 512.6 330 510.1 347.4C496.8 440.4 416.7 511.9 320 511.9C267 511.9 219 490.4 184.2 455.7C184 455.5 183.8 455.3 183.6 455.1L176 447.9L223.9 447.9C241.6 447.9 255.9 433.6 255.9 415.9C255.9 398.2 241.6 383.9 223.9 383.9L96 384C87.5 384 79.3 387.4 73.3 393.5C67.3 399.6 63.9 407.7 64 416.3z"/><path d="M320 128C223.3 128 143.3 199.5 129.9 292.5C127.4 310 111.2 322.1 93.7 319.6C76.2 317.1 64.1 301 66.6 283.5C84.3 159.4 191 64 320 64C390.5 64 454.5 92.6 500.7 138.7L512 149.4L512 96C512 78.3 526.3 64 544 64C561.7 64 576 78.3 576 96L576 224C576 241.7 561.7 256 544 256L416 256C398.3 256 384 241.7 384 224C384 206.3 398.3 192 416 192L463.9 192L456.3 184.8C456.1 184.6 455.9 184.4 455.7 184.2C420.9 149.4 373 128 319.9 128z"/></svg>
|
||||
{:else if name === 'next'}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M64 320C64 337.7 78.3 352 96 352L466.7 352L498.7 320L466.7 288L96 288C78.3 288 64 302.3 64 320z"/><path d="M566.6 297.4C579.1 309.9 579.1 330.2 566.6 342.7L406.6 502.7C394.1 515.2 373.8 515.2 361.3 502.7C348.8 490.2 348.8 469.9 361.3 457.4L498.7 320L361.4 182.6C348.9 170.1 348.9 149.8 361.4 137.3C373.9 124.8 394.2 124.8 406.7 137.3L566.7 297.3z"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path opacity=".4" d="M64 320C64 337.7 78.3 352 96 352L466.7 352L498.7 320L466.7 288L96 288C78.3 288 64 302.3 64 320z"/><path d="M566.6 297.4C579.1 309.9 579.1 330.2 566.6 342.7L406.6 502.7C394.1 515.2 373.8 515.2 361.3 502.7C348.8 490.2 348.8 469.9 361.3 457.4L498.7 320L361.4 182.6C348.9 170.1 348.9 149.8 361.4 137.3C373.9 124.8 394.2 124.8 406.7 137.3L566.7 297.3z"/></svg>
|
||||
{:else if name === 'previous'}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M141.3 320L173.3 352L544 352C561.7 352 576 337.7 576 320C576 302.3 561.7 288 544 288L173.3 288L141.3 320z"/><path d="M73.4 342.6C60.9 330.1 60.9 309.8 73.4 297.3L233.4 137.3C245.9 124.8 266.2 124.8 278.7 137.3C291.2 149.8 291.2 170.1 278.7 182.6L141.3 320L278.6 457.4C291.1 469.9 291.1 490.2 278.6 502.7C266.1 515.2 245.8 515.2 233.3 502.7L73.3 342.7z"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path opacity=".4" d="M141.3 320L173.3 352L544 352C561.7 352 576 337.7 576 320C576 302.3 561.7 288 544 288L173.3 288L141.3 320z"/><path d="M73.4 342.6C60.9 330.1 60.9 309.8 73.4 297.3L233.4 137.3C245.9 124.8 266.2 124.8 278.7 137.3C291.2 149.8 291.2 170.1 278.7 182.6L141.3 320L278.6 457.4C291.1 469.9 291.1 490.2 278.6 502.7C266.1 515.2 245.8 515.2 233.3 502.7L73.3 342.7z"/></svg>
|
||||
{:else if name === 'search'}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M128 272C128 351.5 192.5 416 272 416C351.5 416 416 351.5 416 272C416 192.5 351.5 128 272 128C192.5 128 128 192.5 128 272z"/><path d="M480 272C480 317.9 465.1 360.3 440 394.7L566.6 521.4C579.1 533.9 579.1 554.2 566.6 566.7C554.1 579.2 533.8 579.2 521.3 566.7L394.7 440C360.3 465.1 317.9 480 272 480C157.1 480 64 386.9 64 272C64 157.1 157.1 64 272 64C386.9 64 480 157.1 480 272zM272 416C351.5 416 416 351.5 416 272C416 192.5 351.5 128 272 128C192.5 128 128 192.5 128 272C128 351.5 192.5 416 272 416z"/></svg>
|
||||
{:else if name === 'draggable'}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path opacity=".4" d="M119.8 320L160 353.5L160 286.5L119.8 320zM286.5 160L353.5 160L320 119.8L286.5 160zM286.5 480L320 520.2L353.5 480L286.5 480zM480 286.5L480 353.5L520.2 320L480 286.5z"/><path d="M320 119.8L353.5 160L286.5 160L320 119.8zM293.8 76.3L232.2 150.2C226.9 156.5 224 164.5 224 172.8C224 192.3 239.8 208 259.2 208L296 208L296 296L208 296L208 259.2C208 239.7 192.2 224 172.8 224C164.6 224 156.6 226.9 150.2 232.2L76.3 293.8C68.5 300.2 64 309.9 64 320C64 330.1 68.5 339.8 76.3 346.2L150.2 407.8C156.5 413.1 164.5 416 172.8 416C192.3 416 208 400.2 208 380.8L208 344L296 344L296 432L259.2 432C239.7 432 224 447.8 224 467.2C224 475.4 226.9 483.4 232.2 489.8L293.8 563.7C300.3 571.5 309.9 576 320 576C330.1 576 339.8 571.5 346.2 563.7L407.8 489.8C413.1 483.5 416 475.5 416 467.2C416 447.7 400.2 432 380.8 432L344 432L344 344L432 344L432 380.8C432 400.3 447.8 416 467.2 416C475.4 416 483.4 413.1 489.8 407.8L563.7 346.2C571.5 339.7 576 330.1 576 320C576 309.9 571.5 300.2 563.7 293.8L489.8 232.2C483.5 226.9 475.5 224 467.2 224C447.7 224 432 239.8 432 259.2L432 296L344 296L344 208L380.8 208C400.3 208 416 192.2 416 172.8C416 164.6 413.1 156.6 407.8 150.2L346.2 76.3C339.8 68.5 330.1 64 320 64C309.9 64 300.2 68.5 293.8 76.3zM320 520.2L286.5 480L353.5 480L320 520.2zM520.2 320L480 353.5L480 286.5L520.2 320zM160 353.5L119.8 320L160 286.5L160 353.5z"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path opacity=".4" d="M128 272C128 351.5 192.5 416 272 416C351.5 416 416 351.5 416 272C416 192.5 351.5 128 272 128C192.5 128 128 192.5 128 272z"/><path d="M480 272C480 317.9 465.1 360.3 440 394.7L566.6 521.4C579.1 533.9 579.1 554.2 566.6 566.7C554.1 579.2 533.8 579.2 521.3 566.7L394.7 440C360.3 465.1 317.9 480 272 480C157.1 480 64 386.9 64 272C64 157.1 157.1 64 272 64C386.9 64 480 157.1 480 272zM272 416C351.5 416 416 351.5 416 272C416 192.5 351.5 128 272 128C192.5 128 128 192.5 128 272C128 351.5 192.5 416 272 416z"/></svg>
|
||||
{:else}
|
||||
<!-- Default fallback icon -->
|
||||
<svg fill="currentColor" viewBox="0 0 24 24">
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -20,6 +20,7 @@ export const TOP_NAV: NavItem[] = [
|
||||
{ href: '/subnetting', label: 'Subnetting' },
|
||||
{ href: '/cidr', label: 'CIDR Convert' },
|
||||
{ href: '/ip-address-convertor', label: 'IP Tools' },
|
||||
{ href: '/dns', label: 'DNS Tools' },
|
||||
{ href: '/reference', label: 'Reference' }
|
||||
];
|
||||
|
||||
@@ -64,7 +65,7 @@ export const SUB_NAV: Record<string, (NavItem | NavGroup)[]> = {
|
||||
],
|
||||
'/cidr': [
|
||||
{
|
||||
title: 'CIDR',
|
||||
title: 'CIDR Masks',
|
||||
items: [
|
||||
{
|
||||
href: '/cidr/mask-converter/cidr-to-subnet-mask',
|
||||
@@ -100,7 +101,36 @@ export const SUB_NAV: Record<string, (NavItem | NavGroup)[]> = {
|
||||
href: '/cidr/next-available',
|
||||
label: 'Next Available Subnet',
|
||||
description: 'Find available subnets from pools minus allocations with first-fit or best-fit policies',
|
||||
icon: 'next-available-subnet'
|
||||
icon: 'next-available-subnet',
|
||||
keywords: ['next', 'available', 'subnet', 'pools', 'allocations', 'first-fit', 'best-fit']
|
||||
},
|
||||
{
|
||||
href: '/cidr/gaps',
|
||||
label: 'Free Space Finder',
|
||||
description: 'List all free blocks in pool CIDRs minus allocations, filterable by target prefix length',
|
||||
icon: 'cidr-gaps',
|
||||
keywords: ['free', 'space', 'gaps', 'finder', 'blocks', 'pools', 'allocations', 'prefix']
|
||||
},
|
||||
{
|
||||
href: '/cidr/deaggregate',
|
||||
label: 'CIDR Deaggregate',
|
||||
description: 'Decompose CIDR blocks and ranges into uniform target prefix subnets (e.g., break into /24s)',
|
||||
icon: 'cidr-deaggregate',
|
||||
keywords: ['cidr', 'deaggregate', 'decompose', 'break', 'uniform', 'prefix', 'subnets', 'split']
|
||||
},
|
||||
{
|
||||
href: '/cidr/compare',
|
||||
label: 'CIDR Compare',
|
||||
description: 'Compare two lists of CIDR blocks to identify added, removed, and unchanged entries after normalization',
|
||||
icon: 'cidr-compare',
|
||||
keywords: ['cidr', 'compare', 'diff', 'audit', 'added', 'removed', 'unchanged', 'normalization']
|
||||
},
|
||||
{
|
||||
href: '/cidr/allocator',
|
||||
label: 'CIDR Allocator',
|
||||
description: 'Pack requested subnet sizes into network pools using bin-packing algorithms (first-fit, best-fit)',
|
||||
icon: 'cidr-allocator',
|
||||
keywords: ['cidr', 'allocator', 'bin-packing', 'first-fit', 'best-fit', 'subnet', 'allocation', 'packing']
|
||||
},
|
||||
{
|
||||
href: '/cidr/alignment',
|
||||
@@ -173,6 +203,27 @@ export const SUB_NAV: Record<string, (NavItem | NavGroup)[]> = {
|
||||
description: 'Generate random IP addresses from networks with uniqueness control and seeded randomness',
|
||||
icon: 'random-ip',
|
||||
keywords: ['random', 'ip', 'generator', 'generate', 'addresses', 'networks', 'seeded']
|
||||
},
|
||||
{
|
||||
href: '/ip-address-convertor/regex',
|
||||
label: 'IP Regex Generator',
|
||||
description: 'Generate safe regular expressions for matching IPv4 and IPv6 addresses with customizable validation options',
|
||||
icon: 'ip-regex-generator',
|
||||
keywords: ['regex', 'regular', 'expression', 'ipv4', 'ipv6', 'pattern', 'matching', 'validation']
|
||||
},
|
||||
{
|
||||
href: '/ip-address-convertor/validator',
|
||||
label: 'IP Address Validator',
|
||||
description: 'Validate IPv4 and IPv6 addresses with detailed error analysis and format checking',
|
||||
icon: 'ip-validator',
|
||||
keywords: ['ip', 'validator', 'validation', 'check', 'verify', 'ipv4', 'ipv6', 'format', 'address']
|
||||
},
|
||||
{
|
||||
href: '/ip-address-convertor/enumerate',
|
||||
label: 'IP Enumerate',
|
||||
description: 'Safely enumerate all IP addresses in CIDR blocks and ranges with CSV/JSON export',
|
||||
icon: 'ip-enumerate',
|
||||
keywords: ['enumerate', 'list', 'generate', 'cidr', 'range', 'all', 'ips', 'export', 'csv', 'json']
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -202,6 +253,27 @@ export const SUB_NAV: Record<string, (NavItem | NavGroup)[]> = {
|
||||
label: 'IPv6 Zone ID Handler',
|
||||
description: 'Process IPv6 addresses with zone identifiers for link-local and multicast addresses',
|
||||
icon: 'zone-id-handler'
|
||||
},
|
||||
{
|
||||
href: '/ip-address-convertor/ipv6/solicited-node',
|
||||
label: 'IPv6 Solicited-Node',
|
||||
description: 'Compute solicited-node multicast addresses from IPv6 unicast for Neighbor Discovery Protocol',
|
||||
icon: 'ipv6-solicited-node',
|
||||
keywords: ['ipv6', 'solicited-node', 'multicast', 'ndp', 'neighbor', 'discovery', 'ff02::1:ff']
|
||||
},
|
||||
{
|
||||
href: '/ip-address-convertor/ipv6/teredo',
|
||||
label: 'IPv6 Teredo Parser',
|
||||
description: 'Parse Teredo IPv6 addresses to extract server IPv4, flags, mapped port, and client IPv4 components',
|
||||
icon: 'ipv6-teredo',
|
||||
keywords: ['ipv6', 'teredo', 'tunnel', '2001:0000', 'parse', 'server', 'client', 'port', 'flags']
|
||||
},
|
||||
{
|
||||
href: '/ip-address-convertor/ipv6/nat64',
|
||||
label: 'IPv6 NAT64 Translator',
|
||||
description: 'Translate between IPv4 and IPv6 addresses using NAT64 prefix (64:ff9b::/96 or custom)',
|
||||
icon: 'ipv6-nat64',
|
||||
keywords: ['ipv6', 'nat64', 'translate', 'ipv4', 'prefix', '64:ff9b', 'converter', 'translation']
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -240,6 +312,20 @@ export const SUB_NAV: Record<string, (NavItem | NavGroup)[]> = {
|
||||
]
|
||||
}
|
||||
],
|
||||
'/dns': [
|
||||
{
|
||||
title: 'Reverse DNS',
|
||||
items: [
|
||||
{
|
||||
href: '/dns/ptr-generator',
|
||||
label: 'PTR Record Generator',
|
||||
description: 'Generate PTR record names for IPv4 and IPv6 addresses and CIDR blocks with zone file stubs',
|
||||
icon: 'ptr-generator',
|
||||
keywords: ['ptr', 'records', 'reverse', 'dns', 'in-addr.arpa', 'ip6.arpa', 'zone', 'file', 'generator']
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
'/reference': [
|
||||
{
|
||||
title: 'Fundamentals',
|
||||
|
||||
@@ -428,4 +428,4 @@ export function computeCIDRDifference(
|
||||
visualization: createVisualization(vizA, vizB, vizResult, vizVersion),
|
||||
errors
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
<script lang="ts">
|
||||
import { site } from '$lib/constants/site';
|
||||
import CIDRAllocator from '$lib/components/CIDRAllocator.svelte';
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>CIDR Allocator - Subnet Bin Packing | {site.title}</title>
|
||||
<meta name="description" content="Pack requested subnet sizes into network pools using advanced bin-packing algorithms. Optimize subnet allocation with first-fit and best-fit strategies." />
|
||||
<meta name="keywords" content="cidr allocator, subnet allocation, bin packing, first-fit, best-fit, network planning, subnet optimization, address space management" />
|
||||
<meta property="og:title" content="CIDR Allocator - Intelligent Subnet Packing" />
|
||||
<meta property="og:description" content="Efficiently allocate subnets into network pools using proven bin-packing algorithms for optimal address space utilization." />
|
||||
<meta property="og:url" content="{site.url}/cidr/allocator" />
|
||||
</svelte:head>
|
||||
|
||||
<CIDRAllocator />
|
||||
@@ -0,0 +1,15 @@
|
||||
<script lang="ts">
|
||||
import { site } from '$lib/constants/site';
|
||||
import CIDRCompare from '$lib/components/CIDRCompare.svelte';
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>CIDR Compare - Network Audit Tool | {site.title}</title>
|
||||
<meta name="description" content="Compare two lists of CIDR blocks to identify added, removed, and unchanged networks. Perfect for network audits and change management." />
|
||||
<meta name="keywords" content="cidr compare, network audit, diff, compare networks, added removed unchanged, cidr normalization, network change management" />
|
||||
<meta property="og:title" content="CIDR Compare - Network List Audit Tool" />
|
||||
<meta property="og:description" content="Audit network changes by comparing CIDR lists to see what was added, removed, or unchanged." />
|
||||
<meta property="og:url" content="{site.url}/cidr/compare" />
|
||||
</svelte:head>
|
||||
|
||||
<CIDRCompare />
|
||||
@@ -0,0 +1,15 @@
|
||||
<script lang="ts">
|
||||
import { site } from '$lib/constants/site';
|
||||
import CIDRDeaggregate from '$lib/components/CIDRDeaggregate.svelte';
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>CIDR Deaggregate - Decompose to Uniform Prefixes | {site.title}</title>
|
||||
<meta name="description" content="Decompose arbitrary CIDR blocks and IP ranges into uniform target prefix subnets. Break large networks into /24s, /28s, or any target prefix length." />
|
||||
<meta name="keywords" content="cidr deaggregate, decompose, uniform prefix, break subnets, target prefix, network decomposition, subnet breakdown" />
|
||||
<meta property="og:title" content="CIDR Deaggregate - Uniform Prefix Decomposition" />
|
||||
<meta property="og:description" content="Break down CIDR blocks and ranges into consistent subnet sizes for efficient network management." />
|
||||
<meta property="og:url" content="{site.url}/cidr/deaggregate" />
|
||||
</svelte:head>
|
||||
|
||||
<CIDRDeaggregate />
|
||||
@@ -0,0 +1,15 @@
|
||||
<script lang="ts">
|
||||
import { site } from '$lib/constants/site';
|
||||
import FreeSpaceFinder from '$lib/components/FreeSpaceFinder.svelte';
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>Free Space Finder - Find Available CIDR Blocks | {site.title}</title>
|
||||
<meta name="description" content="Find all free space within network pools minus allocations. Filter available blocks by target prefix length for efficient IP address planning." />
|
||||
<meta name="keywords" content="free space, gaps finder, CIDR blocks, network pools, IP allocations, prefix filtering, network planning" />
|
||||
<meta property="og:title" content="Free Space Finder - Available CIDR Blocks" />
|
||||
<meta property="og:description" content="Identify unused address space within network pools to optimize IP allocation and planning." />
|
||||
<meta property="og:url" content="{site.url}/cidr/gaps" />
|
||||
</svelte:head>
|
||||
|
||||
<FreeSpaceFinder />
|
||||
@@ -0,0 +1,15 @@
|
||||
<script lang="ts">
|
||||
import { site } from '$lib/constants/site';
|
||||
import PTRGenerator from '$lib/components/PTRGenerator.svelte';
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>PTR Record Generator - DNS Reverse Lookup (in-addr.arpa & ip6.arpa) | {site.title}</title>
|
||||
<meta name="description" content="Generate PTR record names for IPv4 and IPv6 addresses and CIDR blocks. Creates proper in-addr.arpa and ip6.arpa reverse DNS entries with zone file stubs." />
|
||||
<meta name="keywords" content="ptr records, reverse dns, in-addr.arpa, ip6.arpa, zone file, dns generator, reverse lookup, dns records" />
|
||||
<meta property="og:title" content="PTR Record Generator - DNS Reverse Lookup Generator" />
|
||||
<meta property="og:description" content="Generate PTR record names and zone file stubs for IPv4 and IPv6 reverse DNS lookups." />
|
||||
<meta property="og:url" content="{site.url}/dns/ptr-generator" />
|
||||
</svelte:head>
|
||||
|
||||
<PTRGenerator />
|
||||
@@ -0,0 +1,15 @@
|
||||
<script lang="ts">
|
||||
import { site } from '$lib/constants/site';
|
||||
import IPEnumerate from '$lib/components/IPEnumerate.svelte';
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>IP Enumerate - List All IPs in CIDR/Range | {site.title}</title>
|
||||
<meta name="description" content="Safely enumerate and list all IP addresses in CIDR blocks and ranges. Export to CSV or JSON with memory-safe processing for network administration." />
|
||||
<meta name="keywords" content="ip enumerate, list all ips, cidr enumerate, ip range list, generate ip list, csv export, json export, network enumeration, ip address list" />
|
||||
<meta property="og:title" content="IP Enumerate - Generate Complete IP Address Lists" />
|
||||
<meta property="og:description" content="Generate comprehensive lists of IP addresses from CIDR blocks and ranges with safe export options." />
|
||||
<meta property="og:url" content="{site.url}/ip-address-convertor/enumerate" />
|
||||
</svelte:head>
|
||||
|
||||
<IPEnumerate />
|
||||
@@ -0,0 +1,15 @@
|
||||
<script lang="ts">
|
||||
import { site } from '$lib/constants/site';
|
||||
import IPv6NAT64 from '$lib/components/IPv6NAT64.svelte';
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>IPv6 NAT64 Translator - IPv4 ↔ IPv6 Address Translation | {site.title}</title>
|
||||
<meta name="description" content="Translate between IPv4 and IPv6 addresses using NAT64 prefix mechanism. Supports default 64:ff9b::/96 prefix and custom NAT64 prefixes with bidirectional conversion." />
|
||||
<meta name="keywords" content="ipv6 nat64, nat64 translator, ipv4 to ipv6, ipv6 to ipv4, address translation, 64:ff9b, nat64 prefix, dual stack, ip conversion" />
|
||||
<meta property="og:title" content="IPv6 NAT64 Translator - Bidirectional Address Translation" />
|
||||
<meta property="og:description" content="Convert IPv4 addresses to IPv6 using NAT64 prefix mechanism and vice versa with support for custom prefixes." />
|
||||
<meta property="og:url" content="{site.url}/ip-address-convertor/ipv6/nat64" />
|
||||
</svelte:head>
|
||||
|
||||
<IPv6NAT64 />
|
||||
@@ -0,0 +1,15 @@
|
||||
<script lang="ts">
|
||||
import { site } from '$lib/constants/site';
|
||||
import IPv6SolicitedNode from '$lib/components/IPv6SolicitedNode.svelte';
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>IPv6 Solicited-Node Multicast Calculator | {site.title}</title>
|
||||
<meta name="description" content="Calculate IPv6 solicited-node multicast addresses from unicast addresses for Neighbor Discovery Protocol (NDP). Understanding ff02::1:ff format and network operations." />
|
||||
<meta name="keywords" content="ipv6 solicited-node, multicast, ndp, neighbor discovery, ff02::1:ff, ipv6 multicast, network discovery, ipv6 protocol, solicited node" />
|
||||
<meta property="og:title" content="IPv6 Solicited-Node Multicast Calculator" />
|
||||
<meta property="og:description" content="Generate solicited-node multicast addresses for IPv6 Neighbor Discovery Protocol operations." />
|
||||
<meta property="og:url" content="{site.url}/ip-address-convertor/ipv6/solicited-node" />
|
||||
</svelte:head>
|
||||
|
||||
<IPv6SolicitedNode />
|
||||
@@ -0,0 +1,15 @@
|
||||
<script lang="ts">
|
||||
import { site } from '$lib/constants/site';
|
||||
import IPv6Teredo from '$lib/components/IPv6Teredo.svelte';
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>IPv6 Teredo Parser - Extract Components | {site.title}</title>
|
||||
<meta name="description" content="Parse IPv6 Teredo addresses to extract server IPv4, client IPv4, mapped port, and flags. Understand Teredo tunneling components and structure." />
|
||||
<meta name="keywords" content="ipv6 teredo, teredo parser, teredo tunnel, 2001:0000, teredo server, teredo client, ipv6 transition, tunnel parsing, teredo flags" />
|
||||
<meta property="og:title" content="IPv6 Teredo Parser - Extract Tunnel Components" />
|
||||
<meta property="og:description" content="Decode Teredo IPv6 addresses to understand their embedded IPv4 server, client, and port information." />
|
||||
<meta property="og:url" content="{site.url}/ip-address-convertor/ipv6/teredo" />
|
||||
</svelte:head>
|
||||
|
||||
<IPv6Teredo />
|
||||
@@ -0,0 +1,15 @@
|
||||
<script lang="ts">
|
||||
import { site } from '$lib/constants/site';
|
||||
import IPRegexGenerator from '$lib/components/IPRegexGenerator.svelte';
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>IP Regex Generator - IPv4 & IPv6 Pattern Builder | {site.title}</title>
|
||||
<meta name="description" content="Generate safe and accurate regular expressions for matching IPv4 and IPv6 addresses. Includes customizable validation options and RegexR.com integration." />
|
||||
<meta name="keywords" content="ip regex generator, ipv4 regex, ipv6 regex, regular expression, pattern matching, ip validation, regex builder, network validation" />
|
||||
<meta property="og:title" content="IP Regex Generator - Safe IPv4/IPv6 Patterns" />
|
||||
<meta property="og:description" content="Build reliable regex patterns for IP address validation with customizable options and live testing capabilities." />
|
||||
<meta property="og:url" content="{site.url}/ip-address-convertor/regex" />
|
||||
</svelte:head>
|
||||
|
||||
<IPRegexGenerator />
|
||||
@@ -0,0 +1,44 @@
|
||||
<script lang="ts">
|
||||
import { site } from '$lib/constants/site';
|
||||
import IPValidator from '$lib/components/IPValidator.svelte';
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>IP Address Validator - Check IPv4 & IPv6 Format | {site.title}</title>
|
||||
<meta name="description" content="Validate IPv4 and IPv6 addresses instantly. Get detailed error explanations for invalid formats, octet ranges, leading zeros, and compression issues." />
|
||||
<meta name="keywords" content="ip address validator, ipv4 validator, ipv6 validator, ip format checker, validate ip address, check ip address, ip address verification, network address validation" />
|
||||
<meta property="og:title" content="IP Address Validator - Instant IPv4 & IPv6 Validation" />
|
||||
<meta property="og:description" content="Validate any IP address format with detailed error analysis and format checking for network administration." />
|
||||
<meta property="og:url" content="{site.url}/ip-address-convertor/validator" />
|
||||
|
||||
<!-- Additional SEO for common searches -->
|
||||
<meta name="robots" content="index, follow" />
|
||||
<link rel="canonical" href="{site.url}/ip-address-convertor/validator" />
|
||||
|
||||
<!-- Schema.org structured data for better search results -->
|
||||
<script type="application/ld+json">
|
||||
{JSON.stringify({
|
||||
"@context": "https://schema.org",
|
||||
"@type": "WebApplication",
|
||||
"name": "IP Address Validator",
|
||||
"description": "Online tool to validate IPv4 and IPv6 addresses with detailed error analysis",
|
||||
"url": `${site.url}/ip-address-convertor/validator`,
|
||||
"applicationCategory": "NetworkingApplication",
|
||||
"operatingSystem": "Any",
|
||||
"offers": {
|
||||
"@type": "Offer",
|
||||
"price": "0",
|
||||
"priceCurrency": "USD"
|
||||
},
|
||||
"featureList": [
|
||||
"IPv4 address validation",
|
||||
"IPv6 address validation",
|
||||
"Detailed error messages",
|
||||
"Format checking",
|
||||
"Real-time validation"
|
||||
]
|
||||
})}
|
||||
</script>
|
||||
</svelte:head>
|
||||
|
||||
<IPValidator />
|
||||
Reference in new issue
Block a user