import os


"""Application configuration for proxy viewer and omok.

This file centralizes tunables for performance, security, and storage.
"""

# Directories
RENDERED_DIR = os.path.join(os.getcwd(), "rendered")
CACHE_DIR = os.path.join(os.getcwd(), "cache")

# Networking / security
ALLOWED_SCHEMES = {"http", "https"}
# Optional domain whitelist. If empty/None, allow all public domains.
ALLOWED_DOMAINS = None  # e.g., {"inven.co.kr", "dcinside.com"}

# Requests timeouts (connect, read)
REQUEST_TIMEOUT = (5, 15)

# Rendered/Cached files policy
RENDERED_MAX_FILES = 200  # keep at most this many files
RENDERED_TTL_SECS = 600   # reuse rendered HTML for this duration

PROXY_CACHE_MAX_FILES = 500  # max cached resource files
PROXY_CACHE_TTL_SECS = 3600  # seconds to keep cached proxy resources
