CS2RemoteConsole is a C++ utility for remotely interacting with Counter-Strike 2's console, featuring a TUI and support for a centralized remote server.
- Connect, read, and write messages to CS2 through the VConsole socket
- Connect and receive commands from a remote control server
- Display console output with channel-based coloring
- Configurable settings via INI file
- Cross-platform remote server (Windows and Linux)
- Text-based User Interface for easy interaction
Use responsibly and in accordance with the Counter-Strike Fair Play Guidelines. This tool is
for educational and development purposes only and should only be used in -tools
mode.
- Windows OS
- Counter-Strike 2 running in
-tools
mode - C++ compiler with C++17 support
- Winsock2 library
- PDCursesMod library
- spdlog library
- Windows or Linux OS
- C++ compiler with C++11 support
- Winsock2 library (Windows only)
- Open the project in Visual Studio
- Ensure all required libraries are properly linked
- Build the solution
- Open the server project in Visual Studio
- Build the solution
- Navigate to the server directory
- Run the following command:
g++ -std=c++11 -pthread main.cpp -o server
- Ensure Docker and Docker Compose are installed
- Navigate to the
docker
directory - Build and run:
docker-compose up --build
Edit config.ini
to customize:
cs2_console_ip
: IP address of the CS2 console (default: 127.0.0.1)cs2_console_port
: Port number of the CS2 console (default: 29000)cs2_console_reconnect_delay
: Reconnection delay in milliseconds (default: 5000)remote_server_ip
: IP address of the remote control server (default: 127.0.0.1)remote_server_port
: Port number of the remote control server (default: 42069)remote_server_reconnect_delay
: Remote server reconnection delay in milliseconds (default: 5000)debug_sanity_enabled
: Enable or disable debug sanity checks (default: 0)debug_sanity_interval
: Interval for debug sanity checks in milliseconds (default: 5000)
- Ensure
config.ini
is in the same directory as the executable or in the current working directory - Run the program
- Use the TUI to interact with the CS2 console:
- Type commands and press Enter to send them to CS2
- Use Page Up/Down or mouse wheel to scroll through console output
- Run the server program
- Enter commands to be broadcasted to all connected clients
- Type 'quit' to exit the server
CS2RemoteConsole consists of three main components:
- Client: Connects to both CS2 console and the remote server. It features a TUI for user interaction and displays console output.
- Server: Acts as a central hub for multiple clients, allowing command broadcasting.
- libvconsole: A static library implementing the VConsole2 Protocol used by Source 2 games.
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
This project is licensed under the MIT License. See the LICENSE file for details.
We express our gratitude to the original authors of these libraries, which served as a foundation for our VConsole protocol implementation.