- 版权类型
- 原创
- 插件中文名称
- IP账号限制
- 插件英文名称
- MultiAccountLimit
- 原帖地址
- #
- 支持的核心(代理端)
- Velocity
- 语言支持
- 多语言
- 适配版本(Java)
- 最新版本
- 1.7
[MD]
# VelocityMultiAccountLimit
**A lightweight Velocity proxy plugin that prevents multiple accounts from connecting from the same IP address + anti-bot detection.**
---
## Features
- 🛡️ **Per-IP Connection Limit** — Set a maximum number of concurrent connections per IP address
- 🤖 **Anti-Bot Detection** — Three-layer bot detection: username pattern analysis, rapid reconnection detection, and banned-IP reconnection blocking
- **Bilingual Support** — Built-in Chinese (zh_CN) and English (en_US) language files
- **Colored Console Logs** — Real-time colored console output (green for allowed, red for blocked/bot)
- **Hot Reload** — Reload config and language without restarting the proxy (`/vmultireload`)
- **Thread-Safe** — Concurrent connection tracking with synchronized IP counting
- **Customizable Kick Message** — Supports color codes and multi-line messages
- **Editable Language Files** — YAML-based language files in the plugin's `lang/` directory
## How It Works
When a player connects to the proxy, the plugin runs two stages of checks:
**Stage 1 — Anti-Bot Detection** (v1.1.0+):
- Analyzes username patterns (vowel density, case transitions, consonant runs) to detect randomly-generated script bot names
- Tracks rapid reconnection attempts from the same IP
- Blocks banned IPs from reconnecting with new accounts
**Stage 2 — IP Connection Limit**:
- **Below limit** → Player is allowed in, connection count increases
- **At or above limit** → Player is kicked with a configurable message, connection is logged in red
- **Player disconnects** → Connection count decreases automatically
The plugin operates at the `LoginEvent` stage — after authentication but before the player joins a server.
## Commands
| Command | Permission | Description |
|---------|-----------|-------------|
| `/vmultireload` | `velocitymultilimit.reload` | Hot-reload config and language files |
Alias: `/vmlreload`
## Permissions
| Node | Default | Description |
|------|---------|-------------|
| `velocitymultilimit.reload` | OP / Console | Allows using the reload command |
## Installation
1. Place the JAR in your Velocity proxy's `plugins/` folder
2. Restart the proxy (or use `/velocity plugin load` if supported)
3. A default `config.properties` will be created in `plugins/VelocityMultiAccountLimit/`
4. Language files (`zh_cn.yml`, `en_us.yml`) will be created in `plugins/VelocityMultiAccountLimit/lang/`
## Configuration
### `config.properties`
| Option | Default | Description |
|--------|---------|-------------|
| `language` | `zh_CN` | Language setting (`zh_CN` or `en_US`) |
| `max-connections-per-ip` | `3` | Max connections per IP (`-1` = unlimited) |
| `kick-message` | *(empty)* | Custom kick message (uses language default if empty). Supports `&` color codes and `\n` for new lines. |
| `anti-bot.enabled` | `true` | Enable anti-bot detection |
| `anti-bot.name-pattern.enabled` | `true` | Enable username pattern analysis (separate toggle; disable if false-positives occur) |
| `anti-bot.score-threshold` | `0.55` | Username pattern score threshold (0.0~1.0, recommended 0.50~0.65) |
| `anti-bot.rapid-connect.enabled` | `true` | Enable rapid reconnection detection |
| `anti-bot.rapid-connect.max-attempts` | `5` | Max connection attempts within the time window |
| `anti-bot.rapid-connect.window-minutes` | `10` | Time window in minutes for rapid connect detection |
| `anti-bot.kick-message` | *(empty)* | Custom kick message for bot detection (uses language default if empty) |
### Example
```properties
language=en_US
max-connections-per-ip=2
kick-message=&cYou already have an account on this server!\n&eLimit: &6%d
anti-bot.name-pattern.enabled=true
anti-bot.score-threshold=0.55
anti-bot.rapid-connect.max-attempts=5
```
## Language Files
Language files are stored in `plugins/VelocityMultiAccountLimit/lang/` as YAML files. You can edit them directly to customize any message. The plugin will copy default files from the JAR if they don't exist.
**Available languages:**
- `zh_cn.yml` — Chinese (Simplified)
- `en_us.yml` — English (US)
## Console Output Example
```
[VelocityMultiLimit] Allowed: Steve (IP: 192.168.1.100) - Current IP online: 1
[VelocityMultiLimit] Blocked: Alex (IP: 192.168.1.100)
└─ Exceeded alt-account limit (Blocked: 1/1)
[VelocityMultiLimit] Bot blocked: DxZZfVyhAtBQ (IP: 14.150.218.209)
└─ Suspicious username pattern (score: 0.79/0.55)
[VelocityMultiLimit] Player disconnected: Steve (IP: 192.168.1.100)
```
## Requirements
- **Velocity** 3.0.0 or higher (4.0.0 supported)
- **Java** 21 or higher
## Changelog
### v1.2.0 — Anti-Bot Detection
- **New**: Three-layer anti-bot detection system
- Username pattern analysis (vowel ratio, case transitions, consonant runs)
- Rapid reconnection detection (same IP, many accounts, short time window)
- Banned-IP reconnection blocking
- **New**: Each detection layer has its own enable/disable toggle
- `anti-bot.name-pattern.enabled` — toggle username pattern analysis independently
- `anti-bot.rapid-connect.enabled` — toggle rapid reconnection detection independently
- **New**: Configurable detection threshold and time windows
- `anti-bot.score-threshold` — sensitivity (0.0~1.0)
- `anti-bot.rapid-connect.max-attempts` — max attempts per window
- `anti-bot.rapid-connect.window-minutes` — time window
- **New**: Bot detection stats tracking
- **New**: `anti-bot.*` configuration options in `config.properties`
- **New**: Bilingual anti-bot messages in language files
- **Update**: `/vmultireload` now re-initializes bot detector with new config
- **Update**: Enhanced console logging with bot detection reasons
### v1.1.0 — *(Skipped, internal version alignment)*
### v1.0.0 — Initial Release
- Per-IP connection limit
- Bilingual support (zh_CN / en_US)
- Hot reload capability
- Customizable kick messages
- Colored console output
### v1.0.0 — Initial Release
- Per-IP connection limit
- Bilingual support (zh_CN / en_US)
- Hot reload capability
- Customizable kick messages
- Colored console output
## Support
- Issues: [GitHub Issues](https://github.com/LiquidTeam/VelocityMultiAccountLimit/issues)
- Source: [GitHub](https://github.com/LiquidTeam/VelocityMultiAccountLimit)
[/MD]