-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wrangler-example.toml
46 lines (39 loc) · 2.56 KB
/
wrangler-example.toml
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
#:schema node_modules/wrangler/config-schema.json
name = "freesocks-control-plane"
main = "src/index.js"
compatibility_date = "2024-06-05"
compatibility_flags = ["nodejs_compat"]
routes = [
{ pattern = "freesocks.org/get", zone_name = "freesocks.org" },
{ pattern = "freesocks.org/delete", zone_name = "freesocks.org" },
{ pattern = "freesocks.org/update", zone_name = "freesocks.org" },
{ pattern = "freesocks.org/list", zone_name = "freesocks.org" }
]
### Cloudflare KV namespace bindings
kv_namespaces = [
{ binding = "FREESOCKS_OUTLINE_API_ENDPOINTS", id = "ID_HERE" },
{ binding = "FREESOCKS_OUTLINE_ACCESS_KEYS", id = "ID_HERE" },
{ binding = "FREESOCKS_PROM_API_ENDPOINTS", id = "ID_HERE" },
{ binding = "FREESOCKS_STATE_KV", id = "ID_HERE" }
]
[triggers]
crons = ["*/5 * * * *"]
[vars]
### Environment variables for the GET Worker
#TURNSTILE_SECRET_KEY = "" # Cloudflare Turnstile secret key, manage with `wrangler secret` https://developers.cloudflare.com/workers/wrangler/commands/#secret
#TURNSTILE_SITE_KEY = "" # Cloudflare Turnstile site key, manage with `wrangler secret` https://developers.cloudflare.com/workers/wrangler/commands/#secret
VAR_EXPIRATION_DAYS = "90" # Set the expiration period in days
VAR_PREFIX_DISGUISE = "&prefix=%16%03%01%00%C2%A8%01%01" # Custom text to append after the access URL
VAR_WEIGHT_LATENCY = "0.8" # Weight for latency in the score calculation
VAR_WEIGHT_ACCESS_KEY_COUNT = "0.2" # Weight for access key count in the score calculation
VAR_API_ENDPOINT_TIMEOUT = "5000" # Timeout duration for API endpoint requests (in milliseconds)
### Environment variables for the DELETE Worker
#SECRET_AUTH_TOKEN = "" # Set a random auth token, manage with `wrangler secret` https://developers.cloudflare.com/workers/wrangler/commands/#secret
#VAR_CF_ACCESS_CLIENT_ID = "" # Cloudflare Access Service Token details, manage with `wrangler secret` https://developers.cloudflare.com/workers/wrangler/commands/#secret
#VAR_CF_ACCESS_CLIENT_SECRET = "" # Cloudflare Access Service Token details, manage with `wrangler secret` https://developers.cloudflare.com/workers/wrangler/commands/#secret
VAR_PROM_QUERY_TIME_RANGE = "90d" # delete keys that have not been used for X number of days
### Environment variables for the UPDATE Worker
VAR_MAX_KEYS_PER_RUN = "5000" # Cursor-based pagination - how many keys will be processed
VAR_MINIMUM_BYTES_THRESHOLD = "1000" # Minimum number of bytes transferred to consider a key active
VAR_MAX_RETRIES = "2" # Maximum number of retry attempts for operations
VAR_RETRY_DELAY = "1000" # Delay in milliseconds between retry attempts