Skip to main content

Overview

Miku Miku Beam supports multiple proxy protocols for routing attack traffic. Proxies are loaded from a text file and randomly distributed across worker threads.

Supported Protocols

HTTP/HTTPS

Layer 7 proxies using HTTP CONNECT tunneling

SOCKS4

Layer 4 proxies for TCP connections

SOCKS5

Layer 4 proxies with authentication support

Proxy File Format

Proxies are loaded from a text file (default: data/proxies.txt). Each line represents one proxy.

Format Syntax

Examples

Comments and Empty Lines

Lines starting with # are treated as comments and ignored during parsing.

Proxy Parsing

Location: internal/proxy/loader.go

Loading Process

Steps:
  1. Open file and scan line-by-line
  2. Skip empty lines and comments
  3. Parse protocol (defaults to http if not specified)
  4. Extract authentication credentials if present
  5. Split host and port
  6. Create Proxy struct

Proxy Structure

Default Values


Protocol-Specific Behavior

HTTP/HTTPS Proxies

Implementation: Uses Go’s net/http proxy support with CONNECT tunneling.
Authentication: Basic auth with Base64 encoding
CONNECT Request Example:

SOCKS4/SOCKS5 Proxies

Implementation: Uses h12.io/socks library for SOCKS protocol handling.
Key Differences:
SOCKS proxies provide lower-level control and are required for Layer 4 attacks (TCP Flood, Slowloris, Minecraft Ping).

Method-Based Filtering

Proxies are automatically filtered based on attack method compatibility.

Filter Rules

Location: internal/proxy/loader.go:72

Why Layer 4 Attacks Require SOCKS

HTTP/HTTPS proxies work at Layer 7 and only support HTTP protocol. Methods that need raw TCP control (Slowloris, TCP Flood, Minecraft Ping) require SOCKS proxies for direct TCP socket access.
If you load only HTTP/HTTPS proxies and use a Layer 4 attack method, filtering will result in zero usable proxies.

Proxy Distribution

Location: internal/engine/engine.go:179

Random Selection

For each packet dispatch, a random proxy is selected:

Load Distribution

With multiple threads and high packet rates, proxies receive roughly equal distribution:
Random selection prevents predictable patterns but doesn’t guarantee perfect balance. With enough packets, distribution approaches uniform.

HTTP Client Configuration

Location: internal/netutil/httpdial.go

Client Settings

Default Values:
  • Timeout: 5-6 seconds (method-dependent)
  • Max Redirects: 3
  • TLS Verification: Disabled (InsecureSkipVerify: true)
  • Keep-Alive: Enabled via Connection: keep-alive header

TLS Configuration

TLS certificate verification is disabled for all connections. This is intentional for stress testing but should never be used in production client code.

TCP Connection Handling

Location: internal/netutil/tcpdial.go

Connection Flow

HTTP CONNECT Tunneling

For HTTP/HTTPS proxies with TCP targets: 1. Connect to proxy:
2. Send CONNECT request:
3. Parse response:
4. Drain headers and use established tunnel

TLS Wrapping

TLS is applied AFTER proxy tunneling, encrypting traffic between client and target (not proxy).

User Agent Rotation

While not strictly proxy-related, user agents are distributed similarly.

Loading User Agents

Location: internal/proxy/loader.go:54
File format (default: data/uas.txt):

Random Selection

Each packet gets a random user agent, independent of proxy selection.

Configuration Reference

config.toml

Path Resolution

  • Absolute paths: Used as-is
  • Relative paths: Resolved from baseDir (or current working directory)
Example:
  • Config: proxies_file = "data/proxies.txt"
  • Base dir: /home/user/mikumikubeam
  • Resolved: /home/user/mikumikubeam/data/proxies.txt

Best Practices

Proxy Selection

Match Proxy Type to Attack Method

  • Use SOCKS proxies for Layer 4 attacks
  • HTTP/HTTPS proxies work for HTTP Flood and Bypass
  • Mix both types for maximum flexibility

Performance

Optimize Proxy Count

  • More proxies = better distribution
  • Dead proxies waste threads (timeouts reduce throughput)
  • Test proxies before using in attacks

Security

Protect Credentials

  • Store proxy files outside version control
  • Use restrictive file permissions (chmod 600)
  • Avoid plain-text credentials when possible

Testing

Validate Proxy List

  • Test connectivity before attacks
  • Check protocol compatibility with attack method
  • Monitor for proxy failures during attacks

Troubleshooting

No Proxies Loaded

Symptom: Attack runs but uses direct connection Causes:
  • File path incorrect
  • All lines commented or empty
  • File doesn’t exist (silently ignored)
Solution: Check file path and format

Zero Usable Proxies

Symptom: Attack starts but no traffic generated Causes:
  • Proxy protocol incompatible with attack method
  • All proxies filtered out
Solution: Use SOCKS proxies for Layer 4 attacks

Slow Attack Rate

Symptom: Packets/second lower than expected Causes:
  • Proxy timeouts (dead proxies)
  • High latency proxies
  • Authentication failures
Solution: Remove slow/dead proxies, test connectivity

Authentication Failures

Symptom: Connections fail with 407 Proxy Authentication Required Causes:
  • Incorrect username/password
  • Special characters not URL-encoded
Solution: Verify credentials, escape special characters

Example Configurations

Mixed Protocol Setup

High-Performance Setup

Authenticated Enterprise Proxies

Testing Setup (No Proxies)