Repository navigation
Expand file tree
/
Copy pathconfig.schema.json
More file actions
1178 lines (1178 loc) · 47.1 KB
/
Copy pathconfig.schema.json
File metadata and controls
1178 lines (1178 loc) · 47.1 KB
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://pkg.flowguard.network/config.schema.json",
"type": "object",
"title": "FlowGuard Proxy Configuration",
"description": "Configuration schema for the FlowGuard reverse proxy.",
"properties": {
"$schema": {
"type": "string",
"description": "JSON Schema reference for IDE validation and autocomplete"
},
"id": {
"type": "string",
"format": "ulid",
"description": "Unique identifier for this configuration version"
},
"host": {
"$ref": "#/definitions/host_config"
},
"rules": {
"type": "object",
"description": "Security rules that define when to take actions",
"patternProperties": {
"^[a-zA-Z0-9_-]+$": {
"$ref": "#/definitions/rule"
}
},
"additionalProperties": false
},
"server": {
"$ref": "#/definitions/server_config"
},
"actions": {
"type": "object",
"description": "Actions that can be taken when rules match",
"patternProperties": {
"^[a-zA-Z0-9_-]+$": {
"$ref": "#/definitions/action"
}
},
"additionalProperties": false
},
"logging": {
"$ref": "#/definitions/logger_config"
},
"updates": {
"$ref": "#/definitions/updates_config"
},
"firewall": {
"$ref": "#/definitions/firewall_config"
},
"fail2ban": {
"$ref": "#/definitions/fail2ban_config"
},
"ip_lists": {
"$ref": "#/definitions/ip_lists_config"
},
"realtime": {
"$ref": "#/definitions/realtime_config"
},
"heartbeat": {
"$ref": "#/definitions/heartbeat_config"
},
"challenges": {
"$ref": "#/definitions/challenges_config"
},
"ip_database": {
"$ref": "#/definitions/ip_database_config"
},
"trusted_proxies": {
"$ref": "#/definitions/trusted_proxies_config"
}
},
"definitions": {
"host_config": {
"type": "object",
"description": "Host and API configuration",
"properties": {
"id": {
"type": "string",
"format": "ulid",
"description": "The FlowGuard server identifier"
},
"key": {
"type": "string",
"description": "The FlowGuard API key for authenticating requests"
},
"team": {
"type": "string",
"description": "The FlowGuard team slug this host belongs to"
},
"name": {
"type": "string",
"description": "The human-readable name of this host"
},
"cache_path": {
"type": "string",
"description": "Path to directory for caching remote resources (IP databases, IP lists, etc.)"
},
"cert_path": {
"type": "string",
"description": "Path to directory containing combined SSL certificate+key files, to a DirectAdmin installation (/usr/local/directadmin) to load its domain and hostname certificates, or to a certbot config directory (/etc/letsencrypt) to load the certificates in its live directory. Optional - can be combined with other certificate sources."
},
"acme_path": {
"type": "string",
"description": "Path to a Traefik v2/v3 acme.json file containing bundled certificates and private keys. Optional - can be combined with other certificate sources."
},
"nginx_config_path": {
"type": "string",
"description": "Path to NGINX configuration file to parse for SSL certificates. Optional - can be combined with other certificate sources."
},
"default_hostname": {
"type": "string",
"description": "Default hostname to use when a certificate is not found"
},
"deployment": {
"type": "string",
"enum": ["host", "fleet"],
"description": "Whether this server runs on a single host or as a fleet of instances sharing one key. Set by the control panel."
}
},
"additionalProperties": false
},
"server_config": {
"type": "object",
"description": "Proxy server runtime configuration",
"properties": {
"bind_addresses": {
"type": "array",
"description": "IP addresses to listen on instead of the auto-detected public addresses. The run command's --bind flag takes precedence. Restart FlowGuard after changing them",
"items": {
"type": "string",
"oneOf": [
{
"format": "ipv4"
},
{
"format": "ipv6"
}
]
},
"uniqueItems": true
},
"protocols": {
"$ref": "#/definitions/protocols_config"
},
"advertise_http3": {
"type": "boolean",
"description": "Advertise HTTP/3 availability on HTTPS responses by adding an Alt-Svc header when HTTP/3 is enabled"
},
"upstream": {
"$ref": "#/definitions/upstream_config"
}
},
"additionalProperties": false
},
"upstream_config": {
"type": "object",
"description": "Backend connection and client IP propagation settings",
"properties": {
"client_ip_mode": {
"type": "string",
"enum": [
"headers",
"transparent"
],
"default": "headers",
"description": "Use forwarding headers or Linux transparent source sockets to expose the validated client IP to backends"
},
"headers": {
"$ref": "#/definitions/upstream_headers_config"
},
"transparent": {
"$ref": "#/definitions/transparent_upstream_config"
}
},
"additionalProperties": false
},
"upstream_headers_config": {
"type": "object",
"description": "Informational headers FlowGuard adds to requests sent to the backend",
"properties": {
"stream_id": {
"type": "boolean",
"default": true,
"description": "Add the FG-Stream header (unique request ID) to requests sent to the backend. Responses to the client always include FG-Stream"
},
"ip_country": {
"type": "boolean",
"default": true,
"description": "Add the FG-IPCountry header (client ISO 3166-1 alpha-2 country code, or XX when unknown) to requests sent to the backend"
}
},
"additionalProperties": false
},
"transparent_upstream_config": {
"type": "object",
"description": "Linux transparent upstream networking settings",
"properties": {
"fwmark": {
"type": "integer",
"minimum": 1,
"maximum": 4294967295,
"default": 17991
},
"route_table": {
"type": "integer",
"minimum": 1,
"maximum": 4294967295,
"default": 17991
},
"rule_priority": {
"type": "integer",
"minimum": 1,
"maximum": 4294967295,
"default": 17991
},
"max_client_pools": {
"type": "integer",
"minimum": 1,
"default": 4096
},
"pool_idle_seconds": {
"type": "integer",
"minimum": 1,
"default": 90
},
"max_idle_conns_per_client": {
"type": "integer",
"minimum": 1,
"default": 8,
"description": "Idle connections to each site that a client's pool keeps open to the web server"
},
"address_pairs": {
"type": "array",
"items": {
"$ref": "#/definitions/upstream_address_pair"
}
}
},
"additionalProperties": false
},
"upstream_address_pair": {
"type": "object",
"properties": {
"ipv4": {
"type": "string",
"format": "ipv4"
},
"ipv6": {
"type": "string",
"format": "ipv6",
"description": "Omit to mark the IPv4 address as IPv4-only"
}
},
"required": [
"ipv4"
],
"additionalProperties": false
},
"protocols_config": {
"type": "object",
"description": "HTTP protocols enabled by the proxy. Omitted values default to true.",
"properties": {
"http1": {
"type": "boolean",
"description": "Enable HTTP/1.0 and HTTP/1.1 over cleartext HTTP and TLS"
},
"http2": {
"type": "boolean",
"description": "Enable HTTP/2 over TLS"
},
"http3": {
"type": "boolean",
"description": "Enable HTTP/3 over QUIC/UDP"
}
},
"additionalProperties": false
},
"rule": {
"type": "object",
"description": "A security rule with conditions and an action",
"properties": {
"name": {
"type": "string",
"description": "The human-readable name of this rule"
},
"action": {
"type": "string",
"description": "The action ID to execute when this rule matches"
},
"sort_order": {
"type": "integer",
"description": "Optional explicit ordering for rule processing. Lower values are processed first, including 0. Rules without sort_order are processed after ordered rules, sorted by rule ID."
},
"conditions": {
"$ref": "#/definitions/conditions"
}
},
"required": [
"action",
"conditions"
],
"additionalProperties": false
},
"conditions": {
"type": "object",
"description": "Logical conditions for rule matching",
"properties": {
"operator": {
"type": "string",
"enum": [
"AND",
"OR",
"NAND",
"NOR"
],
"description": "Logical operator for combining conditions (default: AND)"
},
"groups": {
"type": "array",
"description": "Nested condition groups",
"items": {
"$ref": "#/definitions/conditions"
}
},
"matches": {
"type": "array",
"description": "Match conditions to evaluate",
"items": {
"$ref": "#/definitions/match"
}
},
"comment": {
"type": "string",
"description": "Optional comment explaining this condition group"
}
},
"additionalProperties": false
},
"match": {
"type": "object",
"description": "A single match condition",
"properties": {
"type": {
"type": "string",
"enum": [
"domain",
"path",
"method",
"header",
"query-param",
"cookie",
"body",
"body-truncated",
"user-agent",
"ip",
"proxy-ip",
"asn",
"proxy-asn",
"as-name",
"as-domain",
"country",
"continent",
"iplist",
"proxy-iplist",
"registerable-domain",
"fingerprint-ja4",
"behavior"
],
"description": "The type of value to match against. 'body' matches the first 256 KiB of the request body, which is read before the request is forwarded; 'body-truncated' is 'true' when the body is longer than that and 'false' otherwise."
},
"match": {
"type": "string",
"enum": [
"equals",
"not-equals",
"contains",
"not-contains",
"starts-with",
"not-starts-with",
"ends-with",
"not-ends-with",
"in",
"not-in",
"regex",
"not-regex",
"exists",
"missing",
"greater-than",
"greater-than-or-equal",
"less-than",
"less-than-or-equal"
],
"description": "The matching operation to perform. When a header, query parameter or cookie has several values, positive operations match if any value matches and negated (not-*) operations match only if no value matches."
},
"key": {
"type": "string",
"description": "The key/name to match against. Required for 'header', 'query-param', 'cookie', and 'behavior' type matches."
},
"value": {
"type": "string",
"description": "The value to match against. Required for most operations except 'in'/'not-in' (use 'values' instead) and 'exists'/'missing'."
},
"values": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of values for 'in' and 'not-in' operations. Required when match is 'in' or 'not-in'."
},
"case_insensitive": {
"type": "boolean",
"description": "Perform case-insensitive matching (default: false). Domain and registerable-domain matches are always case-insensitive."
},
"raw_match": {
"type": "boolean",
"description": "Match the path as sent, still percent-encoded and without normalization, to detect malformed or encoded URLs such as %2e%2e or %00 (default: false). Only applies to 'path' type matches."
},
"confidence": {
"type": "integer",
"minimum": 0,
"maximum": 100,
"description": "Minimum confidence level (0-100) required for a match to be considered valid (only applies to IP list matches)"
}
},
"required": [
"type",
"match"
],
"additionalProperties": false,
"allOf": [
{
"if": {
"properties": {
"type": {
"enum": [
"header",
"query-param",
"cookie",
"behavior"
]
}
}
},
"then": {
"required": [
"key"
]
}
}
]
},
"action": {
"type": "object",
"description": "An action to take when a rule matches",
"properties": {
"name": {
"type": "string",
"description": "The human-readable name of this action"
},
"action": {
"type": "string",
"enum": [
"log",
"skip_log",
"allow",
"block",
"rate_limit",
"challenge"
],
"description": "The type of action to take. skip_log continues rule evaluation and leaves the request out of the logs if it is proxied with a status below 400 and no other rule logs, blocks, challenges or rate limits it."
},
"status": {
"type": "integer",
"minimum": 100,
"maximum": 599,
"description": "HTTP status code to return"
},
"message": {
"type": "string",
"description": "Response message to send"
},
"requests_per_window": {
"type": "integer",
"minimum": 1,
"description": "Maximum number of requests allowed in the time window (for rate_limit actions)"
},
"window_seconds": {
"type": "integer",
"minimum": 1,
"description": "Time window in seconds for rate limiting (for rate_limit actions)"
},
"partition_by": {
"type": "array",
"maxItems": 5,
"uniqueItems": true,
"items": {
"type": "string",
"enum": [
"client.ip",
"connection.id",
"request.fingerprint.ja4",
"request.url.domain",
"request.url.path"
]
},
"description": "Dimensions that receive independent rate-limit buckets. An empty list creates one bucket per rule; omission partitions by client.ip. IPv6 clients are grouped by /64 for client.ip."
},
"challenge": {
"$ref": "#/definitions/action_challenge_config"
}
},
"required": [
"action"
],
"additionalProperties": false,
"allOf": [
{
"if": {
"properties": {
"action": {
"const": "rate_limit"
}
}
},
"then": {
"required": [
"requests_per_window",
"window_seconds"
]
}
},
{
"if": {
"properties": {
"action": {
"const": "challenge"
}
}
},
"then": {
"properties": {
"challenge": {
"$ref": "#/definitions/action_challenge_config"
}
}
}
}
]
},
"action_challenge_config": {
"type": "object",
"description": "Challenge behavior for challenge actions. V1 supports built-in proof-of-work only.",
"properties": {
"type": {
"type": "string",
"enum": [
"pow"
],
"description": "Challenge type. Defaults to pow."
},
"clearance_scope": {
"type": "string",
"enum": [
"rule",
"host"
],
"description": "Scope cleared by a successful challenge. Defaults to rule. Use host to clear other challenge rules on the same request host."
},
"ttl_seconds": {
"type": "integer",
"minimum": 0,
"description": "Clearance cookie lifetime for this action. Defaults to challenges.default_ttl_seconds. Set to 0 for a session clearance cookie with no signed clearance expiry."
},
"min_page_time_ms": {
"type": "integer",
"minimum": 0,
"maximum": 60000,
"description": "Minimum time in milliseconds the challenge page must exist before verification is accepted. Defaults to challenges.min_page_time_ms. Set to 0 to disable the dwell-time gate."
},
"difficulty_bits": {
"type": "integer",
"minimum": 1,
"maximum": 30,
"description": "Leading-zero difficulty for probabilistic proof-of-work. In calibrated mode, this derives work_units when work_units is omitted. Defaults to challenges.pow.difficulty_bits."
},
"algorithm": {
"type": "string",
"enum": [
"pbkdf2-sha256",
"sha256"
],
"description": "Proof-of-work algorithm for this action. Defaults to challenges.pow.algorithm."
},
"pbkdf2_iterations": {
"type": "integer",
"minimum": 1,
"maximum": 100000,
"description": "PBKDF2 iteration count for this action when algorithm is pbkdf2-sha256. Defaults to challenges.pow.pbkdf2_iterations."
},
"effort_mode": {
"type": "string",
"enum": [
"calibrated",
"probabilistic"
],
"description": "Proof-of-work effort mode. Calibrated uses a fixed work-unit count for predictable solve time; probabilistic uses leading-zero difficulty. Defaults to challenges.pow.effort_mode."
},
"work_units": {
"type": "integer",
"minimum": 1,
"maximum": 100000,
"description": "Fixed sequential work-unit count for calibrated proof-of-work. Defaults to challenges.pow.work_units, or is derived from difficulty_bits when omitted."
}
},
"additionalProperties": false
},
"logger_config": {
"type": "object",
"description": "Request logging configuration",
"properties": {
"sinks": {
"type": "object",
"description": "Named logging sinks (destinations). Multiple sinks of the same type can be configured.",
"patternProperties": {
"^[a-zA-Z0-9_-]+$": {
"$ref": "#/definitions/logger_sink"
}
},
"additionalProperties": false
},
"header_whitelist": {
"type": "array",
"description": "List of header names (or prefixes ending with '-') to log values for. If empty, no header values are logged. All header names are always logged regardless of whitelist. The User-Agent header is always logged regardless of this whitelist.",
"items": {
"type": "string",
"examples": [
"content-type",
"user-agent",
"sec-ch-",
"cf-"
]
}
}
},
"additionalProperties": false
},
"logger_sink": {
"type": "object",
"description": "A logging sink configuration",
"properties": {
"type": {
"type": "string",
"enum": [
"file",
"loki",
"openobserve",
"flowguard_ingest"
],
"description": "The type of logging sink"
},
"path": {
"type": "string",
"description": "For file sink: path to the log file"
},
"url": {
"type": "string",
"format": "uri",
"description": "For loki sink: Loki push API URL (e.g., http://loki:3100/loki/api/v1/push). For openobserve sink: OpenObserve base URL (e.g., https://observe.example.com). For flowguard_ingest sink: exact HTTPS ingest endpoint."
},
"organization": {
"type": "string",
"description": "For openobserve sink: Organization name in OpenObserve"
},
"stream": {
"type": "string",
"description": "For openobserve sink: Stream name (default: flowguard)"
},
"labels": {
"type": "object",
"description": "For loki sink: Static labels to attach to all log entries",
"additionalProperties": {
"type": "string"
}
},
"tenant_id": {
"type": "string",
"description": "For loki sink: Optional X-Scope-OrgID header for multi-tenancy"
},
"username": {
"type": "string",
"description": "For loki sink: Optional basic auth username. For openobserve sink: Basic auth username (typically email)"
},
"password": {
"type": "string",
"description": "For loki sink: Optional basic auth password. For openobserve sink: Basic auth password (API token)"
},
"protocol_version": {
"type": "integer",
"const": 1,
"description": "For flowguard_ingest sink: ingest protocol version"
},
"credential_id": {
"type": "string",
"pattern": "^[0-9a-f]{32}$",
"description": "For flowguard_ingest sink: shared team ingest-only credential ID"
},
"secret": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{43}$",
"description": "For flowguard_ingest sink: base64url-encoded 32-byte credential secret"
}
},
"required": [
"type"
],
"allOf": [
{
"if": {
"properties": {
"type": {
"const": "file"
}
}
},
"then": {
"required": [
"path"
]
}
},
{
"if": {
"properties": {
"type": {
"const": "loki"
}
}
},
"then": {
"required": [
"url"
]
}
},
{
"if": {
"properties": {
"type": {
"const": "openobserve"
}
}
},
"then": {
"required": [
"url",
"organization"
]
}
},
{
"if": {
"properties": {
"type": {
"const": "flowguard_ingest"
}
}
},
"then": {
"required": [
"url",
"protocol_version",
"credential_id",
"secret"
],
"properties": {
"url": {
"pattern": "^https://"
}
}
}
}
],
"additionalProperties": false
},
"updates_config": {
"type": "object",
"description": "Configuration for remote package upgrades via WebSocket",
"properties": {
"allow_unattended": {
"type": "boolean",
"description": "Allow the FlowGuard control panel to trigger unattended package upgrades via WebSocket. Default: false"
}
},
"additionalProperties": false
},
"firewall_config": {
"type": "object",
"description": "Firewall monitoring and repair settings for FlowGuard-managed redirect rules",
"properties": {
"monitor_enabled": {
"type": "boolean",
"description": "Whether FlowGuard should periodically verify its redirect rules while running. Default: true when redirects are managed"
},
"auto_repair": {
"type": "boolean",
"description": "Whether FlowGuard should automatically re-add missing redirect rules. Default: true"
},
"check_interval_seconds": {
"type": "integer",
"minimum": 5,
"description": "How often to verify redirect rules in seconds. Default: 30"
}
},
"additionalProperties": false
},
"fail2ban_config": {
"type": "object",
"description": "Optional synchronization with the local Fail2Ban daemon",
"properties": {
"enabled": {
"type": "boolean",
"description": "Mirror all active Fail2Ban jail bans into FlowGuard. Default: false"
}
},
"required": [
"enabled"
],
"additionalProperties": false
},
"ip_lists_config": {
"type": "object",
"description": "In-memory IP list configurations for high-performance IP matching",
"patternProperties": {
"^[a-zA-Z0-9_-]+$": {
"$ref": "#/definitions/ip_list"
}
},
"additionalProperties": false
},
"ip_list": {
"type": "object",
"description": "Configuration for a single IP list",
"properties": {
"url": {
"type": "string",
"format": "uri",
"description": "URL to fetch IP list from (one IP or CIDR per line)"
},
"name": {
"type": "string",
"description": "Human-readable name for the IP list"
},
"path": {
"type": "string",
"description": "Local file path to load IP list from (one IP or CIDR per line)"
},
"confidence": {
"type": "integer",
"minimum": 0,
"maximum": 100,
"description": "Minimum confidence level (0-100) for IP list entries contained in this list"
},
"refresh_interval_seconds": {
"type": "integer",
"minimum": 60,
"description": "How often to refresh the list from URL in seconds"
}
},
"oneOf": [
{
"required": [
"url"
]
},
{
"required": [
"path"
]
}
],
"additionalProperties": false
},
"realtime_config": {
"type": "object",
"description": "WebSocket configuration for real-time messaging",
"properties": {
"key": {
"type": "string",
"description": "WebSocket application key"
},
"host": {
"type": "string",
"description": "Host for the WebSocket server"
},
"port": {
"type": "integer",
"minimum": 1,
"maximum": 65535,
"description": "Port for the WebSocket server"
},
"channel": {
"type": "string",
"description": "Channel name to subscribe to for config update notifications (can be public or private)"
},
"auth_url": {
"type": "string",
"format": "uri",
"description": "Authentication URL for private channel access. Required for private channels"
},
"encrypted": {
"type": "boolean",
"description": "Whether to use encrypted WebSocket connections (WSS instead of WS). Default: true"
}
},
"required": [
"key",
"host",
"port",
"channel"
],
"additionalProperties": false
},
"heartbeat_config": {
"type": "object",
"description": "Heartbeat configuration for managed proxies to report operational status",
"properties": {
"enabled": {
"type": "boolean",
"description": "Whether heartbeat reporting is enabled. Default: true"
},
"interval_seconds": {
"type": "integer",
"minimum": 30,
"description": "How often to send heartbeats in seconds. Default: 300 (5 minutes)"
},
"jitter_seconds": {
"type": "integer",
"minimum": 0,
"description": "Random jitter applied as +/- seconds to each interval. Default: 30"
}
},
"additionalProperties": false
},
"challenges_config": {
"type": "object",
"description": "Global configuration for first-party FlowGuard challenge interstitials.",
"properties": {
"cookie_name": {
"type": "string",
"description": "Name of the HTTP-only clearance cookie. Defaults to fg_clearance."
},
"default_ttl_seconds": {
"type": "integer",
"minimum": 0,
"description": "Default clearance lifetime in seconds. Defaults to 1800. Set to 0 for session clearance cookies with no signed clearance expiry."
},
"min_page_time_ms": {
"type": "integer",
"minimum": 0,
"maximum": 60000,
"description": "Default minimum time in milliseconds the challenge page must exist before verification is accepted. Defaults to 1500. Set to 0 to disable the dwell-time gate."
},
"bind_ip": {
"type": "boolean",
"description": "Bind challenge and clearance tokens to the client IP. Defaults to true."
},
"bind_user_agent": {
"type": "boolean",
"description": "Bind challenge and clearance tokens to the User-Agent. Defaults to true."
},
"non_html_status": {
"type": "integer",
"minimum": 100,
"maximum": 599,
"description": "Status code for matched non-HTML requests that cannot display an interstitial. Defaults to 202."
},
"max_attempts_per_window": {
"type": "integer",
"minimum": 0,
"description": "Maximum failed or successful verification attempts per client/window. Defaults to 20. Set to 0 to disable challenge attempt limiting."
},
"attempt_window_seconds": {
"type": "integer",
"minimum": 1,
"description": "Attempt limit window in seconds. Defaults to 60."
},
"secret": {
"type": "string",
"description": "Optional HMAC secret for challenge and clearance tokens. Defaults to host.key; otherwise a process-local key is generated."
},
"pow": {
"$ref": "#/definitions/pow_challenge_config"
}
},
"additionalProperties": false
},
"pow_challenge_config": {
"type": "object",