change html/css to match standard; update docs

This commit is contained in:
Face
2025-08-20 15:06:56 +03:00
parent aa49fac5b8
commit cf99c8beff
10 changed files with 193 additions and 91 deletions

View File

@@ -1,5 +1,34 @@
# Gurty - a CLI tool to setup your GURT Protocol server
Gurty is a command-line interface tool for setting up and managing GURT protocol servers.
## Configuration
Gurty uses a TOML configuration file to manage server settings. The `gurty.template.toml` file provides a complete configuration template with all available options:
### Sections
- **Server**: Basic server settings (host, port, protocol version, connection limits)
- **TLS**: Certificate and private key configuration for secure connections
- **Logging**: Logging levels, request/response logging, and log file paths
- **Security**: File access restrictions, allowed HTTP methods, and rate limiting
- **Error Pages**: Custom error page templates and default error responses
- **Headers**: Custom HTTP headers for security and server identification
### Using Configuration Files
1. **Copy the configuration template:**
```bash
cp gurty.template.toml gurty.toml
```
2. **Edit the configuration** to match your environment. (optional)
3. **Use the configuration file:**
```bash
gurty serve --config gurty.toml
```
## Setup for Production
For production deployments, you'll need to generate your own certificates since traditional Certificate Authorities don't support custom protocols:
@@ -19,14 +48,24 @@ For production deployments, you'll need to generate your own certificates since
openssl req -x509 -newkey rsa:4096 -keyout gurt-server.key -out gurt-server.crt -days 365 -nodes
```
2. **Deploy with production certificates:**
2. **Copy the configuration template and customize:**
```bash
cargo run --release serve --cert gurt-server.crt --key gurt-server.key --host 0.0.0.0 --port 4878
cp gurty.template.toml gurty.toml
```
3. **Deploy with production certificates and configuration:**
```bash
gurty serve --config gurty.toml
```
Or specify certificates explicitly:
```bash
gurty serve --cert gurt-server.crt --key gurt-server.key --config gurty.toml
```
## Development Environment Setup
To set up a development environment for GURT, follow these steps:
1. **Install mkcert:**
```bash
# Windows (with Chocolatey)
@@ -50,7 +89,16 @@ To set up a development environment for GURT, follow these steps:
- `localhost+2.pem` (certificate)
- `localhost+2-key.pem` (private key)
4. **Start GURT server with certificates:**
4. **Copy the configuration template and customize:**
```bash
cargo run --release serve --cert localhost+2.pem --key localhost+2-key.pem
cp gurty.template.toml gurty.toml
```
5. **Start GURT server with certificates and configuration:**
```bash
gurty serve --config gurty.toml
```
Or specify certificates explicitly:
```bash
gurty serve --cert localhost+2.pem --key localhost+2-key.pem --config gurty.toml
```