Upload files to "/"
This commit is contained in:
66
.env
Normal file
66
.env
Normal 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
67
.env.example
Normal 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
64
.gitignore
vendored
Normal 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
|
||||
Reference in New Issue
Block a user