-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.py
61 lines (58 loc) · 2.89 KB
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# config.py
import os
# Constants
CHROMIUM_PROFILE_BASE_DIR = os.getenv("CHROMIUM_PROFILE_BASE_DIR", "/config/chromium_profiles") # Base directory for profiles
BASE_PORT = int(os.getenv("BASE_PORT", 9000))
DEBUGGING_PORT_START = int(os.getenv("DEBUGGING_PORT_START", 9222))
NUM_WARM = int(os.getenv("NUM_WARM", 1))
MAX_INSTANCES = int(os.getenv("MAX_INSTANCES", 15))
IDLE_TIMEOUT = int(os.getenv("IDLE_TIMEOUT", 300))
SCALE_DOWN_INTERVAL = int(os.getenv("SCALE_DOWN_INTERVAL", 60))
MAX_STARTUP_ATTEMPTS = int(os.getenv("MAX_STARTUP_ATTEMPTS", 3))
HEALTH_CHECK_INTERVAL = int(os.getenv("HEALTH_CHECK_INTERVAL", 2))
PROXY_CONNECTION_TIMEOUT = int(os.getenv("PROXY_CONNECTION_TIMEOUT", 5))
# Chromium command-line arguments to ensure clean, private browsing
CHROMIUM_ARGS = [
"--start-maximized",#"--headless=new",
"--disable-backgrounding-occluded-windows",
"--disable-hang-monitor",
"--metrics-recording-only",
"--disable-sync", # Disable syncing to Google accounts
"--disable-background-timer-throttling",
"--disable-prompt-on-repost",
"--disable-background-networking",
"--disable-infobars",
"--remote-allow-origins=*",
"--homepage=about:blank", # Set a blank homepage
"--no-service-autorun",
"--disable-ipc-flooding-protection",
"--disable-session-crashed-bubble",
"--force-fieldtrials=*BackgroundTracing/default/",
"--disable-breakpad",
"--password-store=basic", # Don't use the OS's password storage
"--disable-features=IsolateOrigins,site-per-process",
"--disable-client-side-phishing-detection",
"--use-mock-keychain",
"--no-pings",
"--disable-renderer-backgrounding",
"--disable-component-update",
"--disable-dev-shm-usage",
"--disable-default-apps",
"--disable-domain-reliability",
"--no-default-browser-check", # Don't check if Chromium is the default browser
"--disable-history-quick-provider",
"--disable-history-url-provider",
"--disable-save-password-bubble", # Disable "Save Password" prompts
"--disable-single-click-autofill",
"--disable-autofill-download-manager",
"--disable-offer-store-unmasked-wallet-cards",
"--disable-offer-upload-credit-cards",
"--disable-extensions", # Disable extensions entirely
"--disable-notifications", # Disable web notifications
"--disable-geolocation", # Disable geolocation
"--disable-media-source", # Helps to prevent sites from tracking via media
"--disable-device-discovery-notifications", # Disables notifications related to device discovery
"--disable-component-extensions-with-background-pages", # Disables component extensions that have background pages
"--disable-backing-store", # Disables the backing store for each renderer, which helps manage memory by not caching content when navigating back/forward
"--disable-features=OptimizationHints", # Disables optimization hints that can be used for tracking or profiling
]