feat(fuzzer): implement Probe v2, stable scoring, two-stage verification, and adaptive smart fuzzer
This commit is contained in:
@@ -255,6 +255,11 @@ export function renderStrategyFuzzerModal(ruleNames: string[] = []) {
|
||||
{ value: 'presets', selected: true },
|
||||
_('⚡ Quick Benchmark (Presets ~30+)'),
|
||||
),
|
||||
E(
|
||||
'option',
|
||||
{ value: 'adaptive' },
|
||||
_('🧬 Adaptive Smart Fuzzing (Genetic / Prior Seeds)'),
|
||||
),
|
||||
E(
|
||||
'option',
|
||||
{ value: 'combinatorial' },
|
||||
@@ -1454,6 +1459,36 @@ export function renderStrategyFuzzerModal(ruleNames: string[] = []) {
|
||||
);
|
||||
}
|
||||
|
||||
if (item.verified) {
|
||||
statusChildren.push(
|
||||
E(
|
||||
'div',
|
||||
{ style: 'font-size: 10px; opacity: 0.85; margin-top: 2px;' },
|
||||
[
|
||||
E(
|
||||
'span',
|
||||
{
|
||||
class: `badge ${
|
||||
item.confidence === 'high'
|
||||
? 'badge-success'
|
||||
: item.confidence === 'medium'
|
||||
? 'badge-warning'
|
||||
: 'badge-neutral'
|
||||
}`,
|
||||
style: 'font-size: 9px; padding: 1px 4px; margin-right: 4px;',
|
||||
},
|
||||
item.confidence ? item.confidence.toUpperCase() : 'VERIFIED',
|
||||
),
|
||||
E(
|
||||
'span',
|
||||
{},
|
||||
`${item.stability_pct ?? 100}% ` + _('stability (3x)'),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
if (item.sub_probes && item.sub_probes.length > 1) {
|
||||
const passedSub = item.sub_probes.filter((p) => p.success).length;
|
||||
const totalSub = item.sub_probes.length;
|
||||
@@ -1528,7 +1563,20 @@ export function renderStrategyFuzzerModal(ruleNames: string[] = []) {
|
||||
E(
|
||||
'td',
|
||||
{ class: 'cbi-section-table-cell', style: 'padding: 8px 10px;' },
|
||||
item.success ? `${item.ttfb_ms}ms` : '—',
|
||||
item.success
|
||||
? [
|
||||
E('div', {}, `${item.ttfb_ms}ms`),
|
||||
item.jitter_ms !== undefined &&
|
||||
item.jitter_ms !== null &&
|
||||
item.jitter_ms > 0
|
||||
? E(
|
||||
'div',
|
||||
{ style: 'font-size: 10px; opacity: 0.65;' },
|
||||
`±${item.jitter_ms}ms jitter`,
|
||||
)
|
||||
: '',
|
||||
]
|
||||
: '—',
|
||||
),
|
||||
E(
|
||||
'td',
|
||||
@@ -1604,7 +1652,13 @@ export function renderStrategyFuzzerModal(ruleNames: string[] = []) {
|
||||
|
||||
if (statusText) {
|
||||
if (state.running) {
|
||||
statusText.innerText = `${_('Testing strategy')} ${state.current_index} / ${state.total_strategies}...`;
|
||||
if (state.phase === 'detecting_dpi') {
|
||||
statusText.innerText = _('🔍 Analyzing DPI blocking patterns...');
|
||||
} else if (state.stage === 2 || state.phase === 'verification') {
|
||||
statusText.innerText = `${_('🛡️ Stage 2: Stability Verification')} (${state.progress_pct}%)...`;
|
||||
} else {
|
||||
statusText.innerText = `${_('Stage 1: Exploration Scan')} (${state.current_index} / ${state.total_strategies})...`;
|
||||
}
|
||||
} else if (state.finished_at > 0 || state.results?.length) {
|
||||
if (bestStrategy || workingResults.length > 0) {
|
||||
if (state.error) {
|
||||
|
||||
@@ -1043,7 +1043,7 @@ export namespace Tachyon {
|
||||
| 'quic_http3'
|
||||
| 'custom';
|
||||
|
||||
export type FuzzerMode = 'presets' | 'combinatorial' | 'custom';
|
||||
export type FuzzerMode = 'presets' | 'combinatorial' | 'adaptive' | 'custom';
|
||||
|
||||
export interface FuzzerStrategyItem {
|
||||
id: string;
|
||||
@@ -1066,6 +1066,9 @@ export namespace Tachyon {
|
||||
data_verified?: boolean;
|
||||
data_bytes?: number;
|
||||
dpi_verdict?: string;
|
||||
required?: boolean;
|
||||
weight?: number;
|
||||
score?: number;
|
||||
success: boolean;
|
||||
error?: string;
|
||||
}
|
||||
@@ -1086,6 +1089,12 @@ export namespace Tachyon {
|
||||
data_bytes?: number;
|
||||
dpi_verdict?: string;
|
||||
score: number;
|
||||
stability_pct?: number;
|
||||
reps?: number;
|
||||
jitter_ms?: number;
|
||||
p25_speed_kbps?: number;
|
||||
confidence?: string;
|
||||
verified?: boolean;
|
||||
error?: string;
|
||||
badge?: string;
|
||||
sub_probes?: Array<{
|
||||
@@ -1098,6 +1107,8 @@ export namespace Tachyon {
|
||||
data_verified?: boolean;
|
||||
data_bytes?: number;
|
||||
dpi_verdict?: string;
|
||||
required?: boolean;
|
||||
weight?: number;
|
||||
score: number;
|
||||
success: boolean;
|
||||
error?: string;
|
||||
@@ -1121,6 +1132,14 @@ export namespace Tachyon {
|
||||
best_strategy?: FuzzerStrategyResult | null;
|
||||
error?: string | null;
|
||||
aborted?: boolean;
|
||||
phase?:
|
||||
| 'idle'
|
||||
| 'detecting_dpi'
|
||||
| 'exploration'
|
||||
| 'verification'
|
||||
| 'finished'
|
||||
| string;
|
||||
stage?: 1 | 2;
|
||||
started_at: number;
|
||||
finished_at: number;
|
||||
dpi_detection?: FuzzerDpiDetection | null;
|
||||
|
||||
Reference in New Issue
Block a user