eq2go/cmd/login_server/README.md

110 lines
3.2 KiB
Markdown

# EQ2Go Login Server
A modern Go implementation of the EverQuest II login server, providing client authentication, character management, and world server coordination.
## Features
- **Client Authentication**: MD5-hashed password authentication with account management
- **Character Management**: Character list, creation, deletion, and play requests
- **World Server Coordination**: Registration and status tracking of world servers
- **Web Administration**: HTTP interface for monitoring and management
- **Database Integration**: SQLite database with automatic table initialization
- **UDP Protocol**: EverQuest II compatible UDP protocol implementation
## Quick Start
### Building
```bash
go build ./cmd/login_server
```
### Running
```bash
# Run with defaults (creates login_config.json if missing)
./login_server
# Run with custom configuration
./login_server -config custom_login.json
# Run with overrides
./login_server -listen-port 6000 -web-port 8082 -db custom.db
```
### Configuration
On first run, a default `login_config.json` will be created:
```json
{
"listen_addr": "0.0.0.0",
"listen_port": 5999,
"max_clients": 1000,
"web_addr": "0.0.0.0",
"web_port": 8081,
"database_path": "login.db",
"server_name": "EQ2Go Login Server",
"log_level": "info",
"world_servers": []
}
```
## Web Interface
Access the web administration interface at `http://localhost:8081` (or configured web_port).
Features:
- Real-time server statistics
- Connected client monitoring
- World server status
- Client management (kick clients)
## Database
The login server uses SQLite by default with the following tables:
- `login_accounts` - User account information
- `characters` - Character data for character selection
- `server_stats` - Server statistics and monitoring data
## Command Line Options
- `-config` - Path to configuration file (default: login_config.json)
- `-listen-addr` - Override listen address
- `-listen-port` - Override listen port
- `-web-port` - Override web interface port
- `-db` - Override database path
- `-log-level` - Override log level (debug, info, warn, error)
- `-name` - Override server name
- `-version` - Show version information
## Architecture
The login server follows the EQ2Go architecture patterns:
- **Server**: Main server instance managing UDP connections and web interface
- **ClientList**: Thread-safe management of connected clients
- **WorldList**: Management of registered world servers
- **Database Integration**: Uses zombiezen SQLite with proper connection pooling
- **UDP Protocol**: Compatible with EverQuest II client expectations
## Development
The login server integrates with the broader EQ2Go ecosystem:
- Uses `internal/udp` for EverQuest II protocol handling
- Uses `internal/database` for data persistence
- Follows Go concurrency patterns with proper synchronization
- Implements comprehensive error handling and logging
## Next Steps
To complete the login server implementation:
1. Add character creation functionality
2. Add character deletion functionality
3. Implement world server communication protocol
4. Add user registration/account creation
5. Add password reset functionality
6. Add account management features