Files
wt ec50db01af
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Make (push) Successful in 2m11s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-CMake (push) Successful in 29s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Meson (push) Successful in 31s
added README.md and LICENSE
2025-07-16 17:01:26 +07:00

158 lines
3.7 KiB
Markdown

# OpenRouter
A modern C++ router management application providing a web-based interface for configuring and managing network router settings.
## Features
- **Web-based Interface**: Modern web UI for easy router configuration
- **Network Configuration**:
- WiFi settings management (SSID, password, channel, QR code generation)
- DNS server configuration
- SSH server management with key handling
- Telnet server configuration
- FTP server settings
- **System Management**:
- System reboot functionality
- Uptime monitoring
- System log access
- Firmware updates
- **Security**:
- Authentication system
- CORS security headers
- SSH key management
- **Backup & Restore**: Configuration backup and restore capabilities
- **QR Code Generation**: Generate QR codes for WiFi credentials
## Requirements
- C++20 compatible compiler (GCC 10+ or Clang 10+)
- CMake 3.6 or higher
- Make build system
- Linux-based system (for installation paths)
## Building from Source
### Using CMake
```bash
mkdir build
cd build
cmake ..
make
```
### Using Make
```bash
make
```
### Using Meson
```bash
meson setup builddir
cd builddir
meson compile
```
## Installation
After building, install the application:
```bash
sudo make install
```
This will install:
- `openrouter` binary to `/usr/bin/`
- Web interface files to `/usr/share/openrouter/web/`
## Configuration
The application uses JSON configuration files:
- `config.json`: Main configuration file
- `config_default.json`: Default configuration template
### Basic Configuration
```json
{
"server": {
"ip": "0.0.0.0",
"port": 8080
}
}
```
## Usage
### Starting the Server
```bash
openrouter
```
The web interface will be available at `http://localhost:8080` (or the configured IP and port).
### API Endpoints
The application provides RESTful API endpoints for:
- **WiFi Management**: Configure wireless settings
- **DNS Settings**: Manage DNS servers and local domains
- **SSH Configuration**: Enable/disable SSH, manage keys and ports
- **Telnet Settings**: Configure telnet access
- **FTP Server**: Manage FTP server settings
- **System Operations**: Reboot, view logs, check uptime
- **Authentication**: User authentication and session management
## Development
### Project Structure
```
src/
├── openrouter.cpp # Main application entry point
├── OpenRouter/ # Core router functionality
├── settings/ # Configuration modules
│ ├── wifi/ # WiFi management
│ ├── dns/ # DNS configuration
│ ├── ssh/ # SSH server settings
│ ├── telnet/ # Telnet configuration
│ └── ftp/ # FTP server settings
├── system/ # System management
├── auth/ # Authentication system
├── security/ # Security features (CORS, etc.)
├── libs/ # Third-party libraries
└── web/ # Web interface files
```
### Building for Development
```bash
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Debug ..
make
```
## Contributing
1. Fork the repository
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## Security
If you discover any security vulnerabilities, please report them responsibly by contacting the maintainers directly rather than opening a public issue.
## Support
For support, please open an issue in the project repository or contact the maintainers.