42 lines
1.1 KiB
Python
42 lines
1.1 KiB
Python
from pydantic_settings import BaseSettings, SettingsConfigDict
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
model_config = SettingsConfigDict(env_file=".env", env_file_encoding="utf-8", extra="ignore")
|
|
|
|
app_name: str = "VpnPanel"
|
|
app_version: str = "1.0.0"
|
|
secret_key: str = "change-me"
|
|
debug: bool = False
|
|
|
|
admin_username: str = "admin"
|
|
admin_password: str = "change-me"
|
|
admin_email: str = "admin@example.com"
|
|
|
|
database_url: str = "postgresql+asyncpg://vpn:vpn@postgres:5432/vpn_panel"
|
|
|
|
public_host: str = "127.0.0.1"
|
|
public_port: int = 51820
|
|
awg_public_port: int = 51821
|
|
|
|
wg_interface: str = "wg0"
|
|
awg_interface: str = "awg0"
|
|
wg_subnet: str = "10.8.0.0/24"
|
|
awg_subnet: str = "10.9.0.0/24"
|
|
wg_dns: str = "1.1.1.1"
|
|
|
|
server_private_key: str = ""
|
|
server_public_key: str = ""
|
|
awg_server_private_key: str = ""
|
|
awg_server_public_key: str = ""
|
|
|
|
wg_config_dir: str = "/data/wireguard"
|
|
awg_config_dir: str = "/data/amneziawg"
|
|
|
|
session_cookie: str = "vpn_panel_session"
|
|
session_max_age: int = 60 * 60 * 24 * 7
|
|
session_https_only: bool = False
|
|
|
|
|
|
settings = Settings()
|