A Python utility that generates ChatroomIPs.dat files for Ares Galaxy from JSON chatroom server lists.
This script converts chatroom server data from JSON format into the binary ChatroomIPs.dat format required by Ares Galaxy. It automatically writes to the correct user data directory, making it work for any Windows user without requiring administrator privileges.
- User-agnostic: Works for any Windows user via environment variables
- No admin required: Writes to user's AppData directory instead of Program Files
- JSON input: Load server lists from external JSON files
- Score calculation: Automatically calculates server scores based on user count
- Error handling: Graceful error messages for missing or malformed JSON files
- Python 3.6 or higher
- Windows OS (uses
%LOCALAPPDATA%environment variable) - Ares Galaxy installed
- Clone this repository or download
generate_chatroomips.py - Ensure Python 3.6+ is installed on your system
- No additional dependencies required (uses standard library only)
-
Prepare your JSON file
Create or download a
rooms.jsonfile with this structure:{ "Count": 2, "Items": [ { "port": 54321, "users": 25, "name": "Example Room", "externalIp": "192.168.1.100" }, { "port": 5000, "users": 10, "name": "Another Room", "externalIp": "10.0.0.50" } ] }You can download the latest server list from: http://chatrooms.mywire.org/rooms.json
-
Run the script
python generate_chatroomips.py
-
Expected output
Created ChatroomIPs.dat at: C:\Users\YourUsername\AppData\Local\Ares\Data\ChatroomIPs.dat Total servers: 53
Server scores are calculated based on active user count:
score = min(users * 5, 200)Higher scores indicate more popular/reliable servers.
The script uses %LOCALAPPDATA% to determine the output path, matching how Ares Galaxy itself locates user data:
%LOCALAPPDATA%\Ares\Data\ChatroomIPs.dat
Ares Galaxy checks this location first before falling back to the Program Files installation directory.
The script generates binary files following the Ares Galaxy ChatroomIPs.dat format:
| Component | Size | Description |
|---|---|---|
| Header | 6 bytes | IP placeholder, record size (12), padding |
| Records | 12 bytes each | IP address (4), port (2), score (2), padding (4) |
All integers are stored in little-endian format.
IP addresses are converted to 32-bit little-endian integers:
ip_int = struct.unpack('<I', socket.inet_aton(ip_str))[0]Modify the json_file_path variable in the script:
json_file_path = 'path/to/your/servers.json'The script automatically uses the correct user data directory. To override:
output_path = 'C:/custom/path/ChatroomIPs.dat'If you get a permission error, the script is likely trying to write to Program Files. Ensure you're using the environment variable approach (default behavior).
Ensure rooms.json is in the same directory as the script, or provide the full path.
- Verify the file was created at the correct location
- Check that Ares Galaxy is looking in
%LOCALAPPDATA%\Ares\Data\ - Ensure the file is at least 600 bytes (minimum requirement)
Ares Galaxy requires the file to be at least 600 bytes. With 53 servers, the generated file is 642 bytes (6-byte header + 53 × 12-byte records), meeting this requirement.
Ares Galaxy filters out firewalled IPs during loading. The script doesn't perform this validation, relying on the source JSON to provide valid IPs.
The script handles common errors gracefully:
- File not found: Clear error message if JSON file is missing
- Invalid JSON: Reports JSON parsing errors with details
- Directory creation: Automatically creates the Ares data directory if it doesn't exist
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
Based on the Ares Galaxy file format specification from the CWBudde/AresGalaxy repository.
For issues, questions, or feature requests, please open an issue on the GitHub repository.
Made for the Ares Galaxy community