Upload files to "/"

This commit is contained in:
2026-03-02 09:48:34 -05:00
commit 4a7b7e6dd0
4 changed files with 1775 additions and 0 deletions

66
.env Normal file
View File

@@ -0,0 +1,66 @@
# ==============================================================================
# Chat Server Configuration
# ==============================================================================
# -----------------
# Server Settings
# -----------------
HOST=0.0.0.0
PORT=8765
# -----------------
# Security & Auth
# -----------------
# The global administrator password for top-level commands (/admin)
ADMIN_PASSWORD=CrimsonAuthority888!
# (Optional) SSL/TLS Configuration
USE_SSL=false
SSL_CERT_PATH=
SSL_KEY_PATH=
# -----------------
# Database & State
# -----------------
# Location of the server SQLite database
DB_PATH=data/chat.db
# -----------------
# Operations & Logs
# -----------------
LOG_LEVEL=INFO
LOG_FILE=logs/chat_server.log
# -----------------
# Chat Parameters
# -----------------
# Maximum messages sent back to clients upon joining a room
MAX_HISTORY=100
MAX_MESSAGE_LENGTH=4096
MAX_NICKNAME_LENGTH=32
# Anti-Spam limits
RATE_LIMIT_MESSAGES=120
RATE_LIMIT_WINDOW=60
# -----------------
# Maintenance
# -----------------
# Delete unused/empty rooms after this many hours
ROOM_EXPIRATION_HOURS=24
# Whether to automatically delete very old message history from the DB periodically
AUTO_HISTORY_CLEAR=false
# -----------------
# Backups
# -----------------
BACKUP_DIR=backups
AUTO_BACKUP_ENABLED=false
AUTO_BACKUP_INTERVAL=86400
# -----------------
# Network & Timeout
# -----------------
SESSION_TIMEOUT=3600
KEEPALIVE_INTERVAL=30
RECONNECT_TIMEOUT=300

67
.env.example Normal file
View File

@@ -0,0 +1,67 @@
# ==============================================================================
# Chat Server Example Configuration
# Copy this file to .env and adjust the values for your environment
# ==============================================================================
# -----------------
# Server Settings
# -----------------
HOST=0.0.0.0
PORT=8765
# -----------------
# Security & Auth
# -----------------
# The global administrator password for top-level commands (/admin)
ADMIN_PASSWORD=admin123
# (Optional) SSL/TLS Configuration
USE_SSL=false
SSL_CERT_PATH=
SSL_KEY_PATH=
# -----------------
# Database & State
# -----------------
# Location of the server SQLite database
DB_PATH=data/chat.db
# -----------------
# Operations & Logs
# -----------------
LOG_LEVEL=INFO
LOG_FILE=logs/chat_server.log
# -----------------
# Chat Parameters
# -----------------
# Maximum messages sent back to clients upon joining a room
MAX_HISTORY=100
MAX_MESSAGE_LENGTH=4096
MAX_NICKNAME_LENGTH=32
# Anti-Spam limits
RATE_LIMIT_MESSAGES=120
RATE_LIMIT_WINDOW=60
# -----------------
# Maintenance
# -----------------
# Delete unused/empty rooms after this many hours
ROOM_EXPIRATION_HOURS=24
# Whether to automatically delete very old message history from the DB periodically
AUTO_HISTORY_CLEAR=false
# -----------------
# Backups
# -----------------
BACKUP_DIR=backups
AUTO_BACKUP_ENABLED=false
AUTO_BACKUP_INTERVAL=86400
# -----------------
# Network & Timeout
# -----------------
SESSION_TIMEOUT=3600
KEEPALIVE_INTERVAL=30
RECONNECT_TIMEOUT=300

64
.gitignore vendored Normal file
View File

@@ -0,0 +1,64 @@
# Python
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
# Virtual Environment
venv/
ENV/
env/
# Environment variables
.env
# Database
*.db
*.db-journal
*.db-wal
*.db-shm
# Logs
*.log
logs/
# Backups
backups/
*.backup
# IDE
.vscode/
.idea/
*.swp
*.swo
*~
# OS
.DS_Store
Thumbs.db
desktop.ini
# SSL Certificates (don't commit private keys!)
*.pem
*.key
*.crt
*.cert
# Chat history
.chat_client_history

1578
client.py Normal file

File diff suppressed because it is too large Load Diff