Skip to main content

Introduction

The Miku Miku Beam server exposes both REST endpoints and real-time Socket.IO connections for managing network stress tests. The server is built with Echo framework and supports CORS for web client integration.

Base Configuration

The server listens on the port configured in your settings (default: 8080).
Base URL: http://localhost:8080
Socket.IO: ws://localhost:8080/socket.io/

Authentication

Currently, the server does not require authentication. CORS is configured to allow requests from the origin specified in your configuration file.

Available Endpoints

REST Endpoints

GET /attacks

List all available attack methods

GET /configuration

Retrieve current proxy and user agent configuration

POST /configuration

Update proxy and user agent configuration

Socket.IO Events

The server uses Socket.IO for real-time attack management and statistics.

Client Events (Emit)

EventDescription
startAttackInitiate a new stress test with specified parameters
stopAttackStop the currently running attack
disconnectDisconnect from server (automatically stops attack)

Server Events (Listen)

EventDescription
statsReal-time statistics updates (packets/sec, total packets, logs)
attackAcceptedConfirmation that attack has started
attackErrorError message if attack cannot start
attackEndNotification that attack has ended

Attack Methods

The following attack methods are registered by default:
  • http_flood - Standard HTTP flood attack
  • http_bypass - HTTP flood with bypass techniques
  • http_slowloris - Slowloris connection exhaustion attack
  • tcp_flood - Raw TCP packet flood
  • minecraft_ping - Minecraft server ping flood

Proxy Support

The server supports proxy rotation for attacks. By default, proxies are required unless you:
  • Set ALLOW_NO_PROXY=true environment variable
  • Start server with --no-proxy flag
Running attacks without proxies exposes your IP address to the target server.

Example: Basic Connection

import { io } from 'socket.io-client';

const socket = io('http://localhost:8080');

socket.on('connect', () => {
  console.log('Connected to Miku Miku Beam server');
});

socket.on('stats', (data) => {
  console.log('Stats:', data);
});

Error Handling

HTTP Errors

REST endpoints return standard HTTP status codes:
  • 200 OK - Request successful
  • 400 Bad Request - Invalid request parameters
  • 500 Internal Server Error - Server error

Socket.IO Errors

Errors during attack execution are sent via the attackError event:
socket.on('attackError', (error) => {
  console.error('Attack error:', error.message);
});
Common error scenarios:
  • No proxies available (when ALLOW_NO_PROXY is false)
  • Invalid attack method
  • Invalid target format
  • Attack duration or size limits exceeded

Build docs developers (and LLMs) love