chore: bootstrap Claude setup

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
dasemuandClaude Sonnet 5 committed 2026-10-18 15:05:08 +02:00
1 parent 4f0a0423be
commit 4ed8ab0a0c
10 files changed
+428 -289

No files matched your search

+99
View File
@@ -0,0 +1,99 @@
# Deployment
## Run as a service (systemd)
Create `/etc/systemd/system/maskarr.service`:
```ini
[Unit]
Description=Maskarr Tracker Proxy
After=network.target
[Service]
Type=simple
User=youruser
WorkingDirectory=/path/to/maskarr
ExecStart=/usr/bin/python3 /path/to/maskarr/maskarr.py
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
```
Enable and start:
```bash
sudo systemctl enable maskarr
sudo systemctl start maskarr
sudo systemctl status maskarr
```
## Docker
### Using Docker Compose (recommended)
```bash
# Download docker-compose.yml
wget https://raw.githubusercontent.com/yourusername/maskarr/main/docker-compose.yml
# Create config directory
mkdir -p config
# Start the service
docker-compose up -d
# View logs
docker-compose logs -f
```
### Using Docker directly
From GitHub Container Registry:
```bash
docker run -d \
--name maskarr \
-p 8888:8888 \
-v $(pwd)/config:/app/config \
--restart unless-stopped \
ghcr.io/yourusername/maskarr:latest
```
Or build the image locally:
```bash
# Clone the repository
git clone https://github.com/yourusername/maskarr.git
cd maskarr
# Build the image
docker build -t maskarr .
# Run the container
docker run -d \
--name maskarr \
-p 8888:8888 \
-v $(pwd)/config:/app/config \
--restart unless-stopped \
maskarr:latest
```
## CI/CD - automatic Docker image publishing
The project includes workflows for **GitHub Actions** and **Gitea Actions** that automatically
publish Docker images.
### Supported registries
Each push to `main`/`master` or tag `v*.*.*` will publish to:
1. **GitHub Container Registry** (`ghcr.io`) - primary and most reliable
2. **Gitea Container Registry** (your private instance)
### Using published images
```bash
# From GitHub Container Registry (recommended)
docker pull ghcr.io/dasemu/maskarr:latest
# From Gitea
docker pull git.dariosevilla.es/dasemu/maskarr:latest
```
+166
View File
@@ -0,0 +1,166 @@
# Usage
## 1. Start the server
```bash
python3 maskarr.py
```
You'll see something like:
```
Maskarr - Tracker Proxy Server
==================================================
Server running on http://0.0.0.0:8888
Web UI: http://localhost:8888
Config file: /path/to/maskarr_config.json
==================================================
Press Ctrl+C to stop
```
## 2. Configure a tracker
1. Open your browser at `http://localhost:8888`
2. Fill in the form:
- **Tracker ID**: Unique identifier (e.g., `mytracker`)
- **Domain**: Tracker domain (e.g., `mytracker.com`)
- **User-Agent**: Browser user-agent you want to use
- **Additional headers**: JSON with extra headers (optional)
- **Timeout**: Timeout in seconds (default: 30)
- **Verify SSL**: Verify SSL certificate (recommended: enabled)
3. Click **Save Tracker**
## 3. Use the proxy in Prowlarr/Jackett
Each configured tracker will have a unique proxy URL:
```
http://localhost:8888/proxy/{tracker_id}/
```
For example, if you configured `mytracker`:
```
http://localhost:8888/proxy/mytracker/
```
You will have to create a custom definition for the indexer, copying one which has been
created already, and modifying its `base_url` to:
`http://localhost:8888/proxy/mytracker`
## Configuration examples
### Tracker without custom headers
```json
{
"id": "mytracker",
"domain": "mytracker.com",
"user_agent": "Mozilla/5.0 (X11; Linux x86_64; rv:133.0) Gecko/20100101 Firefox/133.0",
"headers": {},
"timeout": 30,
"verify_ssl": true
}
```
### Tracker with custom headers
```json
{
"id": "mytracker",
"domain": "tracker.example.com",
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36",
"headers": {
"Referer": "https://tracker.example.com",
"X-Requested-With": "XMLHttpRequest"
},
"timeout": 45,
"verify_ssl": true
}
```
## REST API
### GET /api/trackers
Get all configured trackers.
**Response:**
```json
{
"trackers": {
"mytracker": {
"domain": "mytracker.com",
"user_agent": "Mozilla/5.0...",
"headers": {},
"timeout": 30,
"verify_ssl": true
}
}
}
```
### POST /api/trackers
Add or update a tracker.
**Body:**
```json
{
"id": "mytracker",
"domain": "mytracker.com",
"user_agent": "Mozilla/5.0...",
"headers": {},
"timeout": 30,
"verify_ssl": true
}
```
### DELETE /api/trackers/{tracker_id}
Delete a tracker.
## Advanced configuration
### Change the port
Edit `maskarr_config.json`:
```json
{
"port": 9999,
"log_requests": true,
"trackers": {}
}
```
### Disable request logging
In `maskarr_config.json`:
```json
{
"log_requests": false
}
```
## Troubleshooting
### Port in use
```
Error: Port 8888 might be already in use
```
Change the port in `maskarr_config.json` or close the application using port 8888.
### Permission denied
```
Error: Permission denied to bind to port 8888
```
Use a port > 1024 or run with privileges (not recommended).
### SSL certificate verify failed
If the tracker uses a self-signed certificate, disable "Verify SSL" in the tracker configuration.
### Request timeout
Increase the "Timeout" value in the tracker configuration.
## Security
- **Don't expose the server to the internet**: it's designed for local use.
- **Use HTTPS if exposing**: consider a reverse proxy (nginx, Caddy).
- **Protect your cookies**: cookies are passed through the proxy.
- **Check the logs**: enable `log_requests` for debugging.