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

Configuration Options

string
default:"data/proxies.txt"
Path to the file containing proxy server addresses. Can be absolute or relative to the working directory.
string
default:"data/uas.txt"
Path to the file containing user agent strings for HTTP attacks. One user agent per line.
int
default:"3000"
Port number for the web server to listen on. Only used by mmb-server.
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:

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

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

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

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:
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:
Then access the web interface at http://localhost:8080.

Allowed Origin

Configure CORS for frontend development:
For production, set this to your deployed frontend URL:
Never use allowed_origin = "*" in production. This allows any website to make requests to your attack server.

Complete Configuration Example

config.toml
With corresponding data files:

Environment Variables

Some settings can be controlled via environment variables:
string
default:"console"
Server log format. Set to json for structured logs.
boolean
default:"false"
Allow server to run attacks without proxies.

Default Values

If no configuration file is provided, Miku Miku Beam uses these defaults:

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

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:

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:
2

Version Control

Add data files to .gitignore to avoid committing sensitive proxy credentials:
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: