Skip to content

Commit 33f8c68

Browse files
authored
Merge pull request #3 from MahdiButcher/main
Add SSL activation and certificate issuance documentation for PasarGuard
2 parents 6838ccb + 718bf8b commit 33f8c68

36 files changed

Lines changed: 3018 additions & 636 deletions

.devcontainer/Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM mcr.microsoft.com/devcontainers/base:ubuntu-24.04
2+
3+
# use this Dockerfile to install additional tools you might need, e.g.
4+
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
5+
# && apt-get -y install --no-install-recommends <your-package-list-here>

.devcontainer/devcontainer.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// The Dev Container format allows you to configure your environment. At the heart of it
2+
// is a Docker image or Dockerfile which controls the tools available in your environment.
3+
//
4+
// See https://aka.ms/devcontainer.json for more information.
5+
{
6+
"name": "Ona",
7+
// Use "image": "mcr.microsoft.com/devcontainers/base:ubuntu-24.04",
8+
// instead of the build to use a pre-built image.
9+
"build": {
10+
"context": ".",
11+
"dockerfile": "Dockerfile"
12+
}
13+
// Features add additional features to your environment. See https://containers.dev/features
14+
// Beware: features are not supported on all platforms and may have unintended side-effects.
15+
// "features": {
16+
// "ghcr.io/devcontainers/features/docker-in-docker": {
17+
// "moby": false
18+
// }
19+
// }
20+
}

content/docs/en/cli-tui/CLI.mdx

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
---
2+
title: CLI
3+
navigation: CLI
4+
icon: Terminal
5+
---
6+
7+
# PasarGuard CLI
8+
9+
Modern command-line tools for managing PasarGuard with efficiency and style.
10+
11+
---
12+
13+
## CLI - Command-Line Interface
14+
15+
A modern, type-safe command-line interface for managing PasarGuard, built with Typer.
16+
17+
### Features
18+
19+
- 🎯 **Type-safe CLI** with rich output formatting
20+
- 📊 **Beautiful tables and panels** for data visualization
21+
- 🔒 **Secure admin management** with interactive prompts
22+
- 📈 **System status monitoring** and diagnostics
23+
- ⌨️ **Interactive prompts** with confirmations for safety
24+
25+
### Installation
26+
27+
The CLI is included with PasarGuard and can be used directly:
28+
29+
```bash
30+
pasarguard cli --help
31+
32+
# Or from the project root
33+
uv run pasarguard-cli.py --help
34+
```
35+
36+
### Usage
37+
38+
#### General Commands
39+
40+
```bash
41+
# Show version
42+
pasarguard cli version
43+
44+
# Show help
45+
pasarguard cli --help
46+
```
47+
48+
#### Admin Management
49+
50+
```bash
51+
# List all admins
52+
pasarguard cli admins --list
53+
54+
# Create new admin
55+
pasarguard cli admins --create username
56+
57+
# Delete admin
58+
pasarguard cli admins --delete username
59+
60+
# Modify admin (password and sudo status)
61+
pasarguard cli admins --modify username
62+
63+
# Reset admin usage statistics
64+
pasarguard cli admins --reset-usage username
65+
```
66+
67+
#### System Information
68+
69+
```bash
70+
# Show system status
71+
pasarguard cli system
72+
```
73+
74+
### Examples
75+
76+
**Creating a new admin:**
77+
```bash
78+
pasarguard cli admins --create john_admin
79+
# You'll be prompted to enter password and sudo permissions
80+
```
81+
82+
**Listing all admins with formatted output:**
83+
```bash
84+
pasarguard cli admins --list
85+
# Displays a beautiful table with admin details
86+
```

content/docs/en/cli-tui/TUI.mdx

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
---
2+
title: TUI
3+
navigation: TUI
4+
icon: Terminal
5+
---
6+
7+
# PasarGuard TUI
8+
9+
Modern text-based user interface tools for managing PasarGuard with efficiency and style.
10+
11+
---
12+
13+
## TUI - Text User Interface
14+
15+
A modern, interactive command-line interface for managing PasarGuard, built with Textual.
16+
17+
### Features
18+
19+
- 🎯 **Interactive TUI** with mouse and keyboard support
20+
- 📱 **Responsive design** with dark mode support
21+
- ⌨️ **Keyboard shortcuts** for quick navigation
22+
- 🔄 **Real-time updates** and live data refresh
23+
- 📊 **Rich data visualization** with colors and formatting
24+
- 🔒 **Secure admin management** with visual feedback
25+
26+
### Starting the TUI
27+
28+
```bash
29+
pasarguard tui
30+
```
31+
32+
Once launched, you'll see a beautiful interactive interface with navigation panels, data tables, and action buttons.
33+
34+
### Keyboard Shortcuts
35+
36+
#### Global Commands
37+
38+
- `q` - Quit the application
39+
- `?` - Show help and keyboard shortcuts
40+
- `Tab` - Navigate between panels
41+
- `Shift+Tab` - Navigate backwards
42+
- `Escape` - Cancel current action
43+
44+
#### Admin Section
45+
46+
- `c` - Create new admin
47+
- `m` - Modify admin
48+
- `r` - Reset admin usage statistics
49+
- `d` - Delete admin
50+
- `i` - Import admins from environment variables
51+
52+
### Admin Management
53+
54+
The TUI provides a visual interface for all admin operations:
55+
56+
- **Create** - Interactive forms for new admin accounts
57+
- **Modify** - Edit admin passwords and permissions
58+
- **Delete** - Safe deletion with confirmation prompts
59+
- **Reset Usage** - Clear usage statistics for admins
60+
- **Import** - Bulk import admins from environment variables
61+
- **View Details** - Detailed admin information and status
62+
63+
### Navigation Tips
64+
65+
1. Use **arrow keys** or **mouse** to navigate
66+
2. Press **Enter** to select items or confirm actions
67+
3. Use **Tab** to move between input fields
68+
4. Press **Escape** to cancel dialogs
69+
5. Press **?** anytime to see available shortcuts

content/docs/en/cli-tui/index.mdx

Lines changed: 0 additions & 155 deletions
This file was deleted.

content/docs/en/learn/meta.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"title": "Learn",
3+
"description": "Step-by-step guides for advanced configurations",
4+
"pages": [
5+
"ssl-certificate",
6+
"ssl-activation",
7+
"warp"
8+
],
9+
"icon": "BookOpen"
10+
}

0 commit comments

Comments
 (0)