Skip to main content

Overview

Miku Miku Beam uses TOML configuration files to manage settings, proxy lists, and user agent strings. Configuration can be specified via the --config flag or by using default values.

Configuration File

Create a TOML file with your preferred settings:
config.toml
proxies_file = "data/proxies.txt"
user_agents_file = "data/uas.txt"
server_port = 3000
allowed_origin = "http://localhost:5173"

Configuration Options

proxies_file
string
default:"data/proxies.txt"
Path to the file containing proxy server addresses. Can be absolute or relative to the working directory.
user_agents_file
string
default:"data/uas.txt"
Path to the file containing user agent strings for HTTP attacks. One user agent per line.
server_port
int
default:"3000"
Port number for the web server to listen on. Only used by mmb-server.
allowed_origin
string
default:"http://localhost:5173"
CORS allowed origin for the web API. Set to your frontend URL for development or production deployment.

Using Configuration Files

CLI Usage

Specify a configuration file when running attacks:
mmb --config config.toml attack http_flood http://example.com

Server Usage

The server automatically looks for a configuration file. You can specify a custom path programmatically, but the binary currently uses default config loading.
If no configuration file is specified or the file is not found, Miku Miku Beam uses default values.

Proxy Configuration

Proxies are essential for distributed attacks and IP protection. Configure them in a text file specified by proxies_file.

Proxy File Format

The proxy file (data/proxies.txt by default) contains one proxy per line:
data/proxies.txt
# HTTP/HTTPS proxies
http://1.2.3.4:8080
https://5.6.7.8:8443

# SOCKS proxies
socks4://10.20.30.40:1080
socks5://50.60.70.80:1080

# Authenticated proxies
http://username:[email protected]:8080
socks5://user:[email protected]:1080

# Without protocol (defaults to http)
192.168.1.100:8080

Proxy Format Rules

1

Protocol

Supported protocols: http, https, socks4, socks5If no protocol is specified, http is assumed.
2

Authentication

Format: protocol://username:password@host:portUsername and password are optional.
3

Host and Port

Format: host:portIf port is omitted, defaults to 8080.
4

Comments

Lines starting with # are ignored.Empty lines are also ignored.

Proxy Filtering by Attack Method

Different attack methods support different proxy protocols:
Supported protocols: HTTP, HTTPS, SOCKS4, SOCKS5All proxy types work with standard HTTP flood attacks.
Supported protocols: HTTP, HTTPS, SOCKS4, SOCKS5All proxy types work with HTTP bypass attacks.
Supported protocols: SOCKS4, SOCKS5 onlySlowloris requires SOCKS proxies for persistent connections.
Supported protocols: SOCKS4, SOCKS5 onlyTCP-level attacks require SOCKS proxies.
Supported protocols: SOCKS4, SOCKS5 onlyMinecraft attacks require SOCKS proxies.
Miku Miku Beam automatically filters proxies based on the selected attack method. Incompatible proxies are silently ignored.

Example Proxy Configurations

# Warning: Public proxies are often slow and unreliable
http://51.158.68.68:8811
http://103.81.85.129:3128
socks4://103.127.1.130:80
socks5://192.111.130.5:17002

User Agent Configuration

User agent strings randomize HTTP requests to avoid detection. Configure them in the file specified by user_agents_file.

User Agent File Format

The user agent file (data/uas.txt by default) contains one user agent per line:
data/uas.txt
# Modern browsers
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:121.0) Gecko/20100101 Firefox/121.0

# Mobile browsers
Mozilla/5.0 (iPhone; CPU iPhone OS 17_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Mobile/15E148 Safari/604.1
Mozilla/5.0 (Linux; Android 14) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.6099.144 Mobile Safari/537.36

# Other clients
curl/8.1.2
Python-urllib/3.11

User Agent Best Practices

Use Recent Versions

Keep user agents up-to-date with current browser versions

Mix Desktop & Mobile

Include both desktop and mobile user agents for variety

Avoid Rare Strings

Stick to common browsers to blend in with normal traffic

Add Custom Agents

Include API clients or tools relevant to your testing

Path Resolution

Paths in the configuration file can be absolute or relative:
Relative to the current working directory:
proxies_file = "data/proxies.txt"
user_agents_file = "data/uas.txt"
If you run mmb from /home/user/mmb, it will look for /home/user/mmb/data/proxies.txt.

Server Configuration

Port Configuration

Change the web server port:
server_port = 8080
Then access the web interface at http://localhost:8080.

Allowed Origin

Configure CORS for frontend development:
allowed_origin = "http://localhost:5173"
For production, set this to your deployed frontend URL:
allowed_origin = "https://mmb.example.com"
Never use allowed_origin = "*" in production. This allows any website to make requests to your attack server.

Complete Configuration Example

config.toml
# Miku Miku Beam Configuration

# Proxy configuration
proxies_file = "data/proxies.txt"

# User agent configuration
user_agents_file = "data/uas.txt"

# Web server settings
server_port = 3000
allowed_origin = "http://localhost:5173"
With corresponding data files:
# HTTP proxies
http://1.2.3.4:8080
http://5.6.7.8:3128

# SOCKS proxies
socks4://10.20.30.40:1080
socks5://user:[email protected]:1080

Environment Variables

Some settings can be controlled via environment variables:
LOG_FORMAT
string
default:"console"
Server log format. Set to json for structured logs.
LOG_FORMAT=json ./bin/mmb-server
ALLOW_NO_PROXY
boolean
default:"false"
Allow server to run attacks without proxies.
ALLOW_NO_PROXY=true ./bin/mmb-server

Default Values

If no configuration file is provided, Miku Miku Beam uses these defaults:
proxies_file = "data/proxies.txt"
user_agents_file = "data/uas.txt"
server_port = 3000
allowed_origin = "http://localhost:5173"

Troubleshooting

Configuration File Not Found

If you specify --config but the file doesn’t exist, Miku Miku Beam falls back to default values. No error is raised.

Proxy File Missing

No proxies available (file: data/proxies.txt). Use --no-proxy to proceed.
Solution: Create the proxy file or use --no-proxy flag.

Invalid Proxy Format

Badly formatted proxies are silently skipped. Check your proxy file if you see fewer proxies than expected:
# Check loaded proxy count
mmb attack http_flood http://example.com
# Output: Starting http_flood against http://example.com with 150 proxies

User Agent File Missing

If the user agent file doesn’t exist, attacks may proceed with empty or default user agents. This is not fatal but reduces effectiveness.

Best Practices

1

Organize Data Files

Keep proxy and user agent files in a dedicated data/ directory:
mmb/
├── bin/
│   ├── mmb
│   └── mmb-server
├── data/
│   ├── proxies.txt
│   └── uas.txt
└── config.toml
2

Version Control

Add data files to .gitignore to avoid committing sensitive proxy credentials:
data/proxies.txt
data/uas.txt
3

Regular Updates

Regularly update your proxy and user agent lists:
  • Remove dead proxies
  • Add new working proxies
  • Update user agents to match current browser versions
4

Test Configuration

Always test with a short attack first:
mmb --config config.toml attack http_flood http://example.com --duration 10

Build docs developers (and LLMs) love