-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
base.cfg
1885 lines (1453 loc) · 100 KB
/
base.cfg
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
// Base Phoenix Mozilla.cfg :p
/// DEFENSE IN DEPTH to harden security & protect users
// Below prefs are likely unnecessary and/or redundant, as Firefox reads them early in runtime, but better be safe than sorry. https://codeberg.org/celenity/Phoenix/issues/18#issuecomment-2490737
// I could see this being beneficial in certain cases, such as for users who manually/locally install Phoenix.
lockPref("general.config.sandbox_enabled", true);
lockPref("security.turn_off_all_security_so_that_viruses_can_take_over_this_computer", false); // This is a real pref... https://searchfox.org/mozilla-central/source/testing/profiles/common/user.js
lockPref("mail.identity.useremail", "");
lockPref("autoadmin.append_emailaddr", false);
lockPref("general.config.filename", "phoenix.cfg");
lockPref("general.config.vendor", "phoenix");
lockPref("autoadmin.global_config_url", "https://phoenix.celenity.dev/base.cfg");
// The Phoenix shall rise from the ashes of what fell before it.
defaultPref("browser.aboutConfig.showWarning", false);
defaultPref("general.warnOnAboutConfig", false);
// 001 DATA COLLECTION
// A lot of defense in depth...
/// Shield Studies/Normandy/Nimbus
// We also set "DisableFirefoxStudies" in policies
// https://mozilla.github.io/policy-templates/#disablefirefoxstudies
// https://mozilla.github.io/normandy/
// https://wiki.mozilla.org/Firefox/Shield/Shield_Studies
// https://support.mozilla.org/kb/shield
// https://support.mozilla.org/kb/how-stop-firefox-making-automatic-connections#w_experiments-or-studies
// https://wiki.mozilla.org/Advocacy/heartbeat
// https://experimenter.info/
// resource://nimbus/ExperimentAPI.sys.mjs
lockPref("app.normandy.api_url", "");
lockPref("app.normandy.enabled", false);
lockPref("app.normandy.first_run", false);
lockPref("app.normandy.last_seen_buildid", "");
lockPref("app.normandy.logging.level", 70); // Limits logging to fatal only
lockPref("app.normandy.user_id", "");
lockPref("app.shield.optoutstudies.enabled", false);
lockPref("messaging-system.log", "off"); // Disables logging
lockPref("messaging-system.rsexperimentloader.enabled", false);
lockPref("messaging-system.rsexperimentloader.collection_id", "");
lockPref("nimbus.appId", ""); // https://searchfox.org/mozilla-central/source/toolkit/components/backgroundtasks/defaults/backgroundtasks_browser.js
lockPref("toolkit.telemetry.pioneer-new-studies-available", false);
/// WebVTT Testing Events
// https://searchfox.org/mozilla-central/source/modules/libpref/init/StaticPrefList.yaml
lockPref("media.webvtt.testing.events", false);
/// Origin Trials
// https://wiki.mozilla.org/Origin_Trials
lockPref("dom.origin-trials.enabled", false);
/// Crash Reporting
// https://github.com/mozilla-services/socorro
// https://wiki.mozilla.org/Socorro
// https://firefox-source-docs.mozilla.org/tools/sanitizer/asan_nightly.html
lockPref("asanreporter.apiurl", "");
lockPref("asanreporter.clientid", "");
lockPref("breakpad.reportURL", "");
lockPref("browser.crashReports.chancesUntilSuppress", 0);
lockPref("browser.crashReports.unsubmittedCheck.autoSubmit2", false); // [DEFAULT]
lockPref("browser.crashReports.unsubmittedCheck.enabled", false); // [DEFAULT]
lockPref("browser.tabs.crashReporting.includeURL", false); // Defense in depth
lockPref("browser.tabs.crashReporting.sendReport", false);
lockPref("toolkit.crashreporter.include_context_heap", false); // Defense in depth
/// X-Frame Options Error Reporting
// https://firefox-source-docs.mozilla.org/toolkit/components/telemetry/data/xfocsp-error-report-ping.html
lockPref("security.xfocsp.errorReporting.automatic", false); // [DEFAULT]
lockPref("security.xfocsp.errorReporting.enabled", false);
/// Coverage
// https://blog.mozilla.org/data/2018/08/20/effectively-measuring-search-in-firefox/
lockPref("toolkit.coverage.enabled", false);
lockPref("toolkit.coverage.endpoint.base", "");
lockPref("toolkit.coverage.opt-out", true); // [HIDDEN]
lockPref("toolkit.telemetry.coverage.opt-out", true); // [HIDDEN]
/// Default Browser Agent
/// We also configure "DisableDefaultBrowserAgent" in policies
// https://mozilla.github.io/policy-templates/#disabledefaultbrowseragent
// https://firefox-source-docs.mozilla.org/toolkit/mozapps/defaultagent/default-browser-agent/index.html
lockPref("default-browser-agent.enabled", false);
/// Misc. Telemetry
/// We also configure "DisableTelemetry" & "ImproveSuggest" in policies
// https://mozilla.github.io/policy-templates/#disabletelemetry
// https://mozilla.github.io/policy-templates/#firefoxsuggest
// https://searchfox.org/mozilla-central/source/testing/geckodriver/src/prefs.rs
// https://wiki.mozilla.org/QA/Telemetry
// https://firefox-source-docs.mozilla.org/toolkit/components/telemetry/internals/preferences.html
// https://searchfox.org/mozilla-central/source/modules/libpref/init/StaticPrefList.yaml
// https://searchfox.org/mozilla-central/source/remote/shared/RecommendedPreferences.sys.mjs
// https://searchfox.org/mozilla-central/source/testing/profiles/perf/user.js
lockPref("browser.aboutwelcome.log", "off"); // Disable logging
lockPref("browser.newtabpage.activity-stream.feeds.telemetry", false);
lockPref("browser.newtabpage.activity-stream.impressionId", "");
lockPref("browser.newtabpage.activity-stream.telemetry", false);
lockPref("browser.newtabpage.activity-stream.telemetry.structuredIngestion.endpoint", "");
lockPref("browser.newtabpage.activity-stream.telemetry.ut.events", false);
lockPref("browser.places.interactions.enabled", false); // https://searchfox.org/mozilla-central/source/browser/app/profile/firefox.js
lockPref("browser.privacySegmentation.preferences.show", false);
lockPref("browser.rights.3.shown", true);
lockPref("browser.search.serpEventTelemetryCategorization.enabled", false);
lockPref("browser.search.serpEventTelemetryCategorization.regionEnabled", false);
lockPref("browser.search.serpMetricsRecordedCounter", 0);
lockPref("browser.urlbar.quicksuggest.dataCollection.enabled", false);
lockPref("browser.urlbar.quicksuggest.onboardingDialogChoice", "reject_2"); // [HIDDEN] https://searchfox.org/mozilla-central/source/browser/components/urlbar/docs/firefox-suggest-telemetry.rst https://searchfox.org/mozilla-central/source/toolkit/components/telemetry/docs/data/environment.rst https://searchfox.org/mozilla-central/source/browser/components/urlbar/tests/quicksuggest/browser/browser_quicksuggest_onboardingDialog.js
lockPref("datareporting.dau.cachedUsageProfileID", "beefbeef-beef-beef-beef-beeefbeefbee"); // [HIDDEN] https://searchfox.org/mozilla-central/source/toolkit/components/telemetry/app/ClientID.sys.mjs#44
lockPref("datareporting.healthreport.documentServerURI", ""); // [HIDDEN]
lockPref("datareporting.healthreport.logging.consoleEnabled", false); // [HIDDEN]
lockPref("datareporting.healthreport.service.enabled", false); // [HIDDEN]
lockPref("datareporting.healthreport.service.firstRun", false); // [HIDDEN]
lockPref("datareporting.healthreport.uploadEnabled", false);
lockPref("datareporting.policy.dataSubmissionEnabled", false);
lockPref("datareporting.policy.dataSubmissionPolicyAccepted", false);
lockPref("datareporting.policy.dataSubmissionPolicyBypassNotification", true);
lockPref("datareporting.policy.firstRunURL", "");
lockPref("dom.security.unexpected_system_load_telemetry_enabled", false);
lockPref("network.jar.record_failure_reason", false); // https://searchfox.org/mozilla-release/source/modules/libpref/init/StaticPrefList.yaml#14271
lockPref("network.traffic_analyzer.enabled", false); // https://searchfox.org/mozilla-release/source/modules/libpref/init/StaticPrefList.yaml#13191
lockPref("network.trr.confirmation_telemetry_enabled", false);
lockPref("identity.fxaccounts.telemetry.clientAssociationPing.enabled", false);
lockPref("identity.fxaccounts.account.telemetry.sanitized_uid", "");
lockPref("privacy.trackingprotection.emailtracking.data_collection.enabled", false);
lockPref("toolkit.content-background-hang-monitor.disabled", true);
lockPref("toolkit.telemetry.archive.enabled", false);
lockPref("toolkit.telemetry.bhrPing.enabled", false);
lockPref("toolkit.telemetry.cachedClientID", "c0ffeec0-ffee-c0ff-eec0-ffeec0ffeec0");
lockPref("toolkit.telemetry.cachedProfileGroupID", "decafdec-afde-cafd-ecaf-decafdecafde");
lockPref("toolkit.telemetry.dap.helper.hpke", "");
lockPref("toolkit.telemetry.dap.helper.url", "");
lockPref("toolkit.telemetry.dap.leader.hpke", "");
lockPref("toolkit.telemetry.dap.leader.url", "");
lockPref("toolkit.telemetry.dap_enabled", false);
lockPref("toolkit.telemetry.dap_helper", "");
lockPref("toolkit.telemetry.dap_helper_owner", "");
lockPref("toolkit.telemetry.dap_leader", "");
lockPref("toolkit.telemetry.dap_leader_owner", "");
lockPref("toolkit.telemetry.dap.logLevel", "Off");
lockPref("toolkit.telemetry.dap_task1_enabled", false);
lockPref("toolkit.telemetry.dap_task1_taskid", "");
lockPref("toolkit.telemetry.dap_visit_counting_enabled", false);
lockPref("toolkit.telemetry.dap_visit_counting_experiment_list", "[]");
lockPref("toolkit.telemetry.debugSlowSql", false);
lockPref("toolkit.telemetry.enabled", false);
lockPref("toolkit.telemetry.firstShutdownPing.enabled", false);
lockPref("toolkit.telemetry.geckoview.streaming", false); // [Android specific?]
lockPref("toolkit.telemetry.healthping.enabled", false); // [HIDDEN]
lockPref("toolkit.telemetry.newProfilePing.enabled", false);
lockPref("toolkit.telemetry.pioneerId", ""); // [HIDDEN]
lockPref("toolkit.telemetry.previousBuildID", "");
lockPref("toolkit.telemetry.reportingpolicy.firstRun", false);
lockPref("toolkit.telemetry.server", "data;");
lockPref("toolkit.telemetry.server_owner", "");
lockPref("toolkit.telemetry.shutdownPingSender.backgroundtask.enabled", false);
lockPref("toolkit.telemetry.shutdownPingSender.enabled", false);
lockPref("toolkit.telemetry.shutdownPingSender.enabledFirstSession", false);
lockPref("toolkit.telemetry.testing.suppressPingsender", true); // [HIDDEN]
lockPref("toolkit.telemetry.translations.logLevel", "Off");
lockPref("toolkit.telemetry.unified", false);
lockPref("toolkit.telemetry.updatePing.enabled", false);
lockPref("toolkit.telemetry.user_characteristics_ping.current_version", 0);
lockPref("toolkit.telemetry.user_characteristics_ping.last_version_sent", 0);
lockPref("toolkit.telemetry.user_characteristics_ping.logLevel", "Off");
lockPref("toolkit.telemetry.user_characteristics_ping.opt-out", true);
lockPref("toolkit.telemetry.user_characteristics_ping.send-once", false); // [DEFAULT]
lockPref("toolkit.telemetry.user_characteristics_ping.uuid", "");
/// Misc. UX - Harmless but does not apply to us
lockPref("app.normandy.shieldLearnMoreUrl", "");
lockPref("datareporting.healthreport.infoURL", "");
lockPref("extensions.recommendations.privacyPolicyUrl", "");
lockPref("toolkit.crashreporter.infoURL", "");
lockPref("toolkit.datacollection.infoURL", "");
// 002 MOZILLA CRAP™
/// Firefox Recommendations & "Discovery"
// We also set "ExtensionRecommendations" & "FeatureRecommendations" in policies
// https://mozilla.github.io/policy-templates/#usermessaging
// https://support.mozilla.org/kb/recommendations-firefox
// https://support.mozilla.org/kb/personalized-extension-recommendations
lockPref("browser.dataFeatureRecommendations.enabled", false);
lockPref("browser.discovery.enabled", false);
lockPref("browser.discovery.sites", "");
lockPref("browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons", false);
lockPref("browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features", false);
lockPref("extensions.getAddons.browseAddons", ""); // Android
lockPref("extensions.getAddons.discovery.api_url", "data:;"); // https://searchfox.org/mozilla-central/source/testing/profiles/common/user.js
lockPref("extensions.getAddons.showPane", false);
lockPref("extensions.htmlaboutaddons.recommendations.enabled", false);
lockPref("extensions.recommendations.themeRecommendationUrl", "");
lockPref("extensions.webservice.discoverURL", "");
/// Fakespot
lockPref("browser.newtabpage.activity-stream.contextualContent.fakespot.ctaCopy", "");
lockPref("browser.newtabpage.activity-stream.contextualContent.fakespot.ctaUrl", "");
lockPref("browser.newtabpage.activity-stream.contextualContent.fakespot.defaultCategoryTitle", "");
lockPref("browser.newtabpage.activity-stream.contextualContent.fakespot.enabled", false);
lockPref("browser.newtabpage.activity-stream.contextualContent.fakespot.footerCopy", "");
lockPref("browser.shopping.experience2023.ads.enabled", false);
lockPref("browser.shopping.experience2023.ads.exposure", false);
lockPref("browser.shopping.experience2023.ads.userEnabled", false);
lockPref("browser.shopping.experience2023.active", false);
lockPref("browser.shopping.experience2023.autoOpen.enabled", false);
lockPref("browser.shopping.experience2023.autoOpen.userEnabled", false);
lockPref("browser.shopping.experience2023.enabled", false);
lockPref("browser.shopping.experience2023.integratedSidebar", false);
lockPref("browser.shopping.experience2023.optedIn", 2);
lockPref("browser.shopping.experience2023.survey.enabled", false);
lockPref("browser.shopping.experience2023.survey.hasSeen", true);
lockPref("browser.urlbar.fakespot.featureGate", false);
lockPref("browser.urlbar.fakespot.suggestedIndex", 0);
lockPref("browser.urlbar.suggest.fakespot", false);
lockPref("toolkit.shopping.ohttpConfigURL", "");
lockPref("toolkit.shopping.ohttpRelayURL", "");
/// Pocket
// We also set "DisablePocket", "Pocket", & "SponsoredPocket" in policies
// https://mozilla.github.io/policy-templates/#disablepocket
// https://mozilla.github.io/policy-templates/#firefoxhome
// https://searchfox.org/mozilla-central/source/toolkit/components/nimbus/FeatureManifest.yaml
lockPref("browser.newtabpage.activity-stream.discoverystream.descLines", 0);
lockPref("browser.newtabpage.activity-stream.discoverystream.fourCardLayout.enabled", false);
lockPref("browser.newtabpage.activity-stream.discoverystream.hideCardBackground.enabled", true);
lockPref("browser.newtabpage.activity-stream.discoverystream.hideDescriptions.enabled", true);
lockPref("browser.newtabpage.activity-stream.discoverystream.newFooterSection.enabled", false);
lockPref("browser.newtabpage.activity-stream.discoverystream.pocket-feed-parameters", "");
defaultPref("browser.newtabpage.activity-stream.discoverystream.recentSaves.enabled", false);
lockPref("browser.newtabpage.activity-stream.discoverystream.region-stories-config", "");
lockPref("browser.newtabpage.activity-stream.discoverystream.saveToPocketCard.enabled", false);
lockPref("browser.newtabpage.activity-stream.discoverystream.saveToPocketCardRegions", "");
lockPref("browser.newtabpage.activity-stream.discoverystream.sendToPocket.enabled", false);
lockPref("browser.newtabpage.activity-stream.feeds.section.topstories", false);
lockPref("browser.newtabpage.activity-stream.pocketCta", "");
lockPref("browser.urlbar.pocket.featureGate", false);
lockPref("browser.urlbar.suggest.pocket", false);
lockPref("browser.newtabpage.activity-stream.section.highlights.includePocket", false);
lockPref("extensions.pocket.api", "");
lockPref("extensions.pocket.bffApi", "");
lockPref("extensions.pocket.bffRecentSaves", false);
lockPref("extensions.pocket.enabled", false);
lockPref("extensions.pocket.oAuthConsumerKey", "");
lockPref("extensions.pocket.oAuthConsumerKeyBff", "");
lockPref("extensions.pocket.refresh.emailButton.enabled", false);
lockPref("extensions.pocket.refresh.hideRecentSaves.enabled", true);
lockPref("extensions.pocket.showHome", false);
lockPref("extensions.pocket.site", "");
/// Firefox Relay
lockPref("signon.firefoxRelay.base_url", "");
lockPref("signon.firefoxRelay.feature", "disabled");
lockPref("signon.firefoxRelay.learn_more_url", "");
lockPref("signon.firefoxRelay.manage_url", "");
lockPref("signon.firefoxRelay.privacy_policy_url", "");
lockPref("signon.firefoxRelay.terms_of_service_url", "");
/// "Interest-based Content Relevance Ranking"
// https://bugzilla.mozilla.org/show_bug.cgi?id=1886207
lockPref("toolkit.contentRelevancy.enabled", false);
lockPref("toolkit.contentRelevancy.ingestEnabled", false);
lockPref("toolkit.contentRelevancy.log", false);
/// "Top Sites"
// We also set "SponsoredTopSites" in policies
// https://mozilla.github.io/policy-templates/#firefoxhome
// https://searchfox.org/mozilla-central/source/toolkit/components/nimbus/FeatureManifest.yaml
defaultPref("browser.newtabpage.activity-stream.default.sites", "");
lockPref("browser.newtabpage.activity-stream.discoverystream.contile-topsites-positions", "");
lockPref("browser.newtabpage.activity-stream.discoverystream.spoc-topsites-positions", "");
lockPref("browser.newtabpage.activity-stream.discoverystream.spocTopsitesAdTypes", "");
lockPref("browser.newtabpage.activity-stream.discoverystream.spocTopsitesZoneIds", "");
lockPref("browser.newtabpage.activity-stream.discoverystream.spocTopsitesPlacement.enabled", false);
lockPref("browser.newtabpage.activity-stream.showSponsoredTopSites", false);
lockPref("browser.newtabpage.activity-stream.improvesearch.noDefaultSearchTile", true); // [DEFAULT]
lockPref("browser.newtabpage.activity-stream.improvesearch.topSiteSearchShortcuts", false);
lockPref("browser.newtabpage.activity-stream.improvesearch.topSiteSearchShortcuts.havePinned", "");
lockPref("browser.newtabpage.activity-stream.improvesearch.topSiteSearchShortcuts.searchEngines", "");
defaultPref("browser.newtabpage.pinned", "");
lockPref("browser.partnerlink.attributionURL", "");
lockPref("browser.partnerlink.campaign.topsites", "");
lockPref("browser.topsites.component.enabled", false);
lockPref("browser.topsites.contile.cachedTiles", "");
lockPref("browser.topsites.contile.enabled", false); // Make sure still active
lockPref("browser.topsites.contile.endpoint", "");
lockPref("browser.topsites.useRemoteSetting", false);
lockPref("browser.urlbar.sponsoredTopSites", false);
/// Misc. Activity Stream (about:home)
// We also configure "FirefoxHome" in policies
// https://mozilla.github.io/policy-templates/#firefoxhome
// https://searchfox.org/mozilla-central/source/testing/geckodriver/src/prefs.rs
// https://searchfox.org/mozilla-central/source/toolkit/components/nimbus/FeatureManifest.yaml
lockPref("browser.newtabpage.activity-stream.asrouter.providers.cfr", "null");
lockPref("browser.newtabpage.activity-stream.asrouter.providers.cfr-fxa", "null");
lockPref("browser.newtabpage.activity-stream.asrouter.providers.message-groups", "null");
lockPref("browser.newtabpage.activity-stream.asrouter.providers.messaging-experiments", "null");
lockPref("browser.newtabpage.activity-stream.asrouter.providers.onboarding", "null");
lockPref("browser.newtabpage.activity-stream.asrouter.providers.snippets", "null");
lockPref("browser.newtabpage.activity-stream.asrouter.useRemoteL10n", false);
lockPref("browser.newtabpage.activity-stream.discoverystream.ctaButtonSponsors", "");
lockPref("browser.newtabpage.activity-stream.discoverystream.config", "[]");
lockPref("browser.newtabpage.activity-stream.discoverystream.contextualContent.enabled", false);
lockPref("browser.newtabpage.activity-stream.discoverystream.contextualContent.feeds", "");
lockPref("browser.newtabpage.activity-stream.discoverystream.contextualContent.listFeedTitle", "");
lockPref("browser.newtabpage.activity-stream.discoverystream.contextualContent.locale-content-config", "");
lockPref("browser.newtabpage.activity-stream.discoverystream.contextualContent.region-content-config", "");
lockPref("browser.newtabpage.activity-stream.discoverystream.contextualContent.selectedFeed", "");
lockPref("browser.newtabpage.activity-stream.discoverystream.enabled", false);
lockPref("browser.newtabpage.activity-stream.discoverystream.editorsPicksHeader.enabled", false);
lockPref("browser.newtabpage.activity-stream.discoverystream.endpoints", "");
lockPref("browser.newtabpage.activity-stream.discoverystream.endpointSpocsClear", "");
lockPref("browser.newtabpage.activity-stream.discoverystream.essentialReadsHeader.enabled", false);
lockPref("browser.newtabpage.activity-stream.discoverystream.isCollectionDismissible", true);
lockPref("browser.newtabpage.activity-stream.discoverystream.locale-list-config", "");
lockPref("browser.newtabpage.activity-stream.discoverystream.newSponsoredLabel.enabled", false);
lockPref("browser.newtabpage.activity-stream.discoverystream.onboardingExperience.dismissed", true);
lockPref("browser.newtabpage.activity-stream.discoverystream.onboardingExperience.enabled", false);
lockPref("browser.newtabpage.activity-stream.discoverystream.personalization.enabled", false);
lockPref("browser.newtabpage.activity-stream.discoverystream.personalization.modelKeys", "");
lockPref("browser.newtabpage.activity-stream.discoverystream.placements.spocs", "");
lockPref("browser.newtabpage.activity-stream.discoverystream.placements.spocs.counts", "0");
lockPref("browser.newtabpage.activity-stream.discoverystream.recs.personalized", false);
lockPref("browser.newtabpage.activity-stream.discoverystream.region-bff-config", "");
lockPref("browser.newtabpage.activity-stream.discoverystream.region-spocs-config", "");
lockPref("browser.newtabpage.activity-stream.discoverystream.spocs.personalized", false);
lockPref("browser.newtabpage.activity-stream.discoverystream.spocs.startupCache.enabled", false);
lockPref("browser.newtabpage.activity-stream.discoverystream.spocs-endpoint", "");
lockPref("browser.newtabpage.activity-stream.discoverystream.spocs-endpoint-query", "");
lockPref("browser.newtabpage.activity-stream.discoverystream.spocAdTypes", "");
lockPref("browser.newtabpage.activity-stream.discoverystream.spocSiteId", "");
lockPref("browser.newtabpage.activity-stream.discoverystream.spocZoneIds", "");
lockPref("browser.newtabpage.activity-stream.discoverystream.sponsored-collections.enabled", false);
lockPref("browser.newtabpage.activity-stream.discoverystream.topicLabels.locale-topic-label-config", "");
lockPref("browser.newtabpage.activity-stream.discoverystream.topicLabels.region-topic-label-config", "");
lockPref("browser.newtabpage.activity-stream.discoverystream.topicSelection.enabled", false);
lockPref("browser.newtabpage.activity-stream.discoverystream.topicSelection.locale-topics-config", "");
lockPref("browser.newtabpage.activity-stream.discoverystream.topicSelection.onboarding.enabled", false);
lockPref("browser.newtabpage.activity-stream.discoverystream.topicSelection.region-topics-config", "");
lockPref("browser.newtabpage.activity-stream.feeds.discoverystreamfeed", false);
lockPref("browser.newtabpage.activity-stream.feeds.recommendationprovider", false);
lockPref("browser.newtabpage.activity-stream.feeds.section.topstories.options", "{\"hidden\":true}");
lockPref("browser.newtabpage.activity-stream.feeds.snippets", false);
lockPref("browser.newtabpage.activity-stream.showSponsored", false);
lockPref("browser.newtabpage.activity-stream.system.showSponsored", false);
lockPref("browser.newtabpage.activity-stream.tippyTop.service.endpoint", "");
lockPref("browser.newtabpage.activity-stream.unifiedAds.enabled", false);
lockPref("browser.newtabpage.activity-stream.unifiedAds.endpoint", "");
lockPref("browser.newtabpage.activity-stream.unifiedAds.spocs.enabled", false);
lockPref("browser.newtabpage.activity-stream.unifiedAds.tiles.enabled", false);
lockPref("messaging-system.askForFeedback", false);
/// Firefox Suggest
// We also configure "FirefoxSuggest" & "UrlbarInterventions" in policies
// https://mozilla.github.io/policy-templates/#firefoxsuggest
// https://mozilla.github.io/policy-templates/#usermessaging
// https://mozilla-services.github.io/merino/firefox.html
// https://github.com/mozilla-services/merino-py
lockPref("browser.newtabpage.activity-stream.discoverystream.merino-feed-experiment", false);
lockPref("browser.newtabpage.activity-stream.discoverystream.merino-provider.enabled", false);
lockPref("browser.newtabpage.activity-stream.discoverystream.merino-provider.endpoint", "");
lockPref("browser.urlbar.addons.featureGate", false);
lockPref("browser.urlbar.groupLabels.enabled", false);
lockPref("browser.urlbar.mdn.featureGate", false);
lockPref("browser.urlbar.merino.endpointURL", "");
lockPref("browser.urlbar.merino.providers", "");
lockPref("browser.urlbar.quicksuggest.contextualOptIn", false);
lockPref("browser.urlbar.quicksuggest.enabled", false);
lockPref("browser.urlbar.quicksuggest.hideSettingsUI", true);
lockPref("browser.urlbar.quicksuggest.nonSponsoredIndex", 0);
lockPref("browser.urlbar.quicksuggest.scenario", "offline");
lockPref("browser.urlbar.quicksuggest.shouldShowOnboardingDialog", false);
lockPref("browser.urlbar.quicksuggest.showedOnboardingDialog", true);
lockPref("browser.urlbar.quicksuggest.sponsoredIndex", 0);
lockPref("browser.urlbar.quicksuggest.sponsoredPriority", false);
lockPref("browser.urlbar.suggest.addons", false);
lockPref("browser.urlbar.suggest.mdn", false);
lockPref("browser.urlbar.suggest.quicksuggest.nonsponsored", false);
lockPref("browser.urlbar.suggest.quicksuggest.sponsored", false);
lockPref("browser.urlbar.suggest.trending", false);
lockPref("browser.urlbar.suggest.weather", false);
lockPref("browser.urlbar.suggest.yelp", false);
lockPref("browser.urlbar.trending.featureGate", false);
lockPref("browser.urlbar.weather.featureGate", false);
lockPref("browser.urlbar.yelp.featureGate", false);
/// Web Notifications
/// I have yet to see a legitimate use-case for websites using push notifications... but I have very commonly seen it abused for malicious purposes & spam
/// We also set "Notifications" in policies
// https://mozilla.github.io/policy-templates/#permissions
// https://mozilla-push-service.readthedocs.io/en/latest/
// https://mozilla-services.github.io/autopush-rs/
lockPref("dom.push.enabled", true); // [DEFAULT] - Fingerprintable & unnecessary with other prefs
defaultPref("permissions.default.desktop-notification", 2);
/// Misc. Promotions
// We also set "MoreFromMozilla" in policies
// https://mozilla.github.io/policy-templates/#usermessaging
lockPref("browser.contentblocking.report.hide_vpn_banner", true);
lockPref("browser.contentblocking.report.proxy.enabled", false);
lockPref("browser.contentblocking.report.proxy_extension.url", "");
lockPref("browser.contentblocking.report.show_mobile_app", false);
lockPref("browser.contentblocking.report.vpn_sub_id", "");
lockPref("browser.contentblocking.report.vpn.url", "");
lockPref("browser.contentblocking.report.vpn-android.url", "");
lockPref("browser.contentblocking.report.vpn-ios.url", "");
lockPref("browser.contentblocking.report.vpn-promo.url", "");
lockPref("browser.newtabpage.activity-stream.newtabWallpapers.highlightDismissed", true);
lockPref("browser.newtabpage.activity-stream.newtabWallpapers.highlightEnabled", false);
lockPref("browser.preferences.moreFromMozilla", false);
lockPref("browser.preferences.moreFromMozilla.template", "simple");
lockPref("browser.privatebrowsing.vpnpromourl", "");
lockPref("browser.promo.cookiebanners.enabled", false);
lockPref("browser.promo.focus.enabled", false);
lockPref("browser.promo.pin.enabled", false);
lockPref("browser.protections_panel.infoMessage.seen", true); // Disables ETP Banner
lockPref("browser.vpn_promo.enabled", false);
lockPref("cookiebanners.ui.desktop.showCallout", false);
lockPref("identity.fxaccounts.toolbar.pxiToolbarEnabled", false);
lockPref("identity.fxaccounts.toolbar.pxiToolbarEnabled.monitorEnabled", false);
lockPref("identity.fxaccounts.toolbar.pxiToolbarEnabled.relayEnabled", false);
lockPref("identity.fxaccounts.toolbar.pxiToolbarEnabled.vpnEnabled", false);
lockPref("identity.mobilepromo.android", "");
lockPref("identity.mobilepromo.ios", "");
lockPref("identity.sendtabpromo.url", "");
/// Kill about:welcome & Onboarding
/// We also set "OverrideFirstRunPage", "OverridePostUpdatePage", & "SkipOnboarding" in policies
// https://mozilla.github.io/policy-templates/#overridefirstrunpage
// https://mozilla.github.io/policy-templates/#overridepostupdatepage
// https://mozilla.github.io/policy-templates/#usermessaging
lockPref("browser.aboutwelcome.enabled", false);
lockPref("browser.aboutwelcome.screens", "");
lockPref("browser.aboutwelcome.showModal", false);
lockPref("browser.aboutwelcome.toolbarButtonEnabled", false);
lockPref("browser.EULA.override", true); // https://searchfox.org/mozilla-central/source/testing/profiles/perf/user.js
lockPref("browser.migrate.content-modal.about-welcome-behavior", "autoclose");
lockPref("browser.startup.homepage_override.mstone", "ignore");
lockPref("browser.suppress_first_window_animation", true);
lockPref("browser.usedOnWindows10.introURL", ""); // https://searchfox.org/mozilla-central/source/remote/shared/RecommendedPreferences.sys.mjs
lockPref("startup.homepage_override_url", "");
lockPref("startup.homepage_override_url_nimbus", "");
lockPref("startup.homepage_welcome_url", "");
lockPref("startup.homepage_welcome_url.additional", "");
/// Kill UI Tour & Misc. "Feature Tours"
lockPref("browser.firefox-view.feature-tour", "{\"screen\":\"\",\"complete\":true}");
lockPref("browser.firefox-view.view-count", 0); // Prevent logging # of times you use View
lockPref("browser.pdfjs.feature-tour", "{\"screen\":\"\",\"complete\":true}");
lockPref("browser.uitour.enabled", false);
lockPref("browser.uitour.loglevel", "Off");
lockPref("browser.uitour.requireSecure", true); // [DEFAULT]
lockPref("browser.uitour.surveyDuration", 0);
lockPref("browser.uitour.url", "");
/// Prevent Mozilla domains from having special privileges
// https://firefox-source-docs.mozilla.org/dom/ipc/process_model.html#privileged-mozilla-content
lockPref("browser.tabs.remote.separatePrivilegedMozillaWebContentProcess", false);
lockPref("browser.tabs.remote.separatedMozillaDomains", "");
lockPref("dom.ipc.processCount.privilegedmozilla", 0);
defaultPref("extensions.webextensions.restrictedDomains", "");
lockPref("permissions.manager.defaultsUrl", "");
lockPref("privacy.resistFingerprinting.block_mozAddonManager", true);
lockPref("services.sync.addons.trustedSourceHostnames", "");
lockPref("svg.context-properties.content.allowed-domains", "");
lockPref("webchannel.allowObject.urlWhitelist", "");
/// Remove Mozilla URL tracking params
defaultPref("app.releaseNotesURL", "https://www.mozilla.org/%LOCALE%/firefox/%VERSION%/releasenotes");
defaultPref("app.releaseNotesURL.aboutDialog", "https://www.mozilla.org/%LOCALE%/firefox/%VERSION%/releasenotes");
defaultPref("app.releaseNotesURL.prompt", "https://www.mozilla.org/%LOCALE%/firefox/%VERSION%/releasenotes");
defaultPref("extensions.getAddons.search.browseURL", "https://addons.mozilla.org/%LOCALE%/firefox/search?q=%TERMS%");
/// Disable Mozilla Web Compatibility Reporter
// Harmless from a privacy perspective - We just don't want to waste Mozilla's time due to our custom set-up...
// Also acts as attack surface reduction & a potential performance improvement
lockPref("extensions.webcompat-reporter.enabled", false); // [DEFAULT]
lockPref("extensions.webcompat-reporter.newIssueEndpoint", "");
lockPref("ui.new-webcompat-reporter.enabled", false); // https://searchfox.org/mozilla-central/source/toolkit/components/nimbus/FeatureManifest.yaml#3604
lockPref("ui.new-webcompat-reporter.send-more-info-link", false); // [DEFAULT]
/// Set homepage to about:home, this is typically default, but overriden by some distro-packaged versions of Firefox like Fedora
defaultPref("browser.startup.homepage", "about:home"); // [DEFAULT]
// 003 Search & URL Bar
/// Allow adding custom search engines in about:preferences#search
defaultPref("browser.urlbar.update2.engineAliasRefresh", true);
/// Never trim URLs
lockPref("browser.urlbar.trimHttps", false);
lockPref("browser.urlbar.trimURLs", false);
/// Allow using a different search engine in Private Windows vs. Normal Windows
defaultPref("browser.search.separatePrivateDefault.ui.enabled", true);
// Ensure by default we use same search engine in both Private & Normal Windows
// Otherwise, Firefox's private search appears to default to Google... :/
defaultPref("browser.search.separatePrivateDefault", false);
// Prompt to use Private Browsing
defaultPref("browser.search.separatePrivateDefault.urlbarResult.enabled", true);
// Remove Search Engine Placeholders
lockPref("browser.urlbar.placeholderName", "");
lockPref("browser.urlbar.placeholderName.private", "");
/// Always show Punycode - Helps prevent phishing & IDN Homograph Attacks
// https://wikipedia.org/wiki/IDN_homograph_attack
defaultPref("network.IDN_show_punycode", true);
/// Do not autofill/autocomplete URLs by default
defaultPref("browser.urlbar.autoFill", false);
// Always show URL instead of search terms
lockPref("browser.urlbar.showSearchTerms.enabled", false);
lockPref("browser.urlbar.showSearchTerms.featureGate", false);
/// Enforce that JavaScript URLS are excluded from results
lockPref("browser.urlbar.filter.javascript", true); // [DEFAULT]
/// Disable "Recent Searches" being suggested since we disable Search & Form History anyways
lockPref("browser.urlbar.recentsearches.featureGate", false);
lockPref("browser.urlbar.suggest.recentsearches", false);
// Nice to have
defaultPref("browser.urlbar.clipboard.featureGate", false);
defaultPref("browser.urlbar.suggest.bookmark", true);
defaultPref("browser.urlbar.suggest.calculator", true);
defaultPref("browser.urlbar.suggest.clipboard", false);
defaultPref("browser.urlbar.suggest.engines", false);
defaultPref("browser.urlbar.suggest.history", false);
defaultPref("browser.urlbar.suggest.openpage", true);
defaultPref("browser.urlbar.unitConversion.enabled", true);
// 004 Implicit Connections
/// Disable Network Prefetching
// We also set "NetworkPrediction" in policies
// https://mozilla.github.io/policy-templates/#networkprediction
// https://developer.mozilla.org/docs/Glossary/Prefetch
lockPref("browser.places.speculativeConnect.enabled", false);
lockPref("browser.urlbar.speculativeConnect.enabled", false);
lockPref("network.dns.disablePrefetch", true);
lockPref("network.dns.disablePrefetchFromHTTPS", true); // [DEFAULT]
lockPref("network.http.speculative-parallel-limit", 0);
lockPref("network.predictor.enable-hover-on-ssl", false); // [DEFAULT]
lockPref("network.predictor.enable-prefetch", false); // [DEFAULT]
lockPref("network.predictor.enabled", false);
lockPref("network.prefetch-next", false);
/// Disable Search Suggestions
/// We also set "SearchSuggestEnabled" in policies
// https://mozilla.github.io/policy-templates/#searchsuggestenabled
lockPref("browser.search.suggest.enabled", false);
lockPref("browser.search.suggest.enabled.private", false);
lockPref("browser.urlbar.showSearchSuggestionsFirst", false);
lockPref("browser.urlbar.suggest.searches", false);
/// Prevent leaking single word searches to DNS provider
/// We also set "GoToIntranetSiteForSingleWordEntryInAddressBar" in policies
// https://mozilla.github.io/policy-templates/#gotointranetsiteforsinglewordentryinaddressbar
lockPref("browser.fixup.dns_first_for_single_words", false); // [DEFAULT]
lockPref("browser.urlbar.dnsResolveSingleWordsAfterSearch", 0);
/// Prevent middle click on new tab button opening URLs or searches from clipboard
lockPref("browser.tabs.searchclipboardfor.middleclick", false);
// 005 HTTP(S) - Mixed Content & General Network Hardening
/// Enforce using HTTPS as much as possible
lockPref("dom.security.https_first", true);
lockPref("dom.security.https_first_for_custom_ports", true); // [DEFAULT, DEFENSE IN DEPTH]
lockPref("dom.security.https_first_pbm", true); // [DEFAULT]
lockPref("dom.security.https_first_schemeless", true);
lockPref("dom.security.https_only_mode", true);
lockPref("dom.security.https_only_mode.upgrade_local", true);
lockPref("dom.security.https_only_mode_pbm", true);
lockPref("security.mixed_content.block_active_content", true);
lockPref("security.mixed_content.block_display_content", true);
lockPref("security.mixed_content.upgrade_display_content", true);
lockPref("security.mixed_content.upgrade_display_content.audio", true); // [DEFAULT]
lockPref("security.mixed_content.upgrade_display_content.image", true); // [DEFAULT]
lockPref("security.mixed_content.upgrade_display_content.video", true); // [DEFAULT]
/// Prevent sending HTTP requests to websites that do not respond quickly to check if they support HTTPS
defaultPref("dom.security.https_only_mode_send_http_background_request", false);
/// Show suggestions when an HTTPS page can not be found
defaultPref("dom.security.https_only_mode_error_page_user_suggestions", true);
/// Always warn on insecure webpages
lockPref("security.insecure_connection_text.enabled", true);
lockPref("security.insecure_connection_text.pbmode.enabled", true);
lockPref("security.ssl.treat_unsafe_negotiation_as_broken", true);
lockPref("security.warn_submit_secure_to_insecure", true); // Warn when submitting a form from HTTP to HTTPS
/// Show detailed information on insecure warning pages
defaultPref("browser.xul.error_pages.expert_bad_cert", true);
/// Disable TLS1.3 0-RTT (Not forward secret)
// https://github.com/tlswg/tls13-spec/issues/1001
lockPref("security.tls.enable_0rtt_data", false);
/// Enforce preloading intermediates
// https://wiki.mozilla.org/Security/CryptoEngineering/Intermediate_Preloading
lockPref("security.remote_settings.intermediates.enabled", true); // [DEFAULT]
/// Never downgrade to insecure TLS 1.0/1.1
lockPref("security.tls.insecure_fallback_hosts", ""); // [DEFAULT]
lockPref("security.tls.version.enable-deprecated", false); // [DEFAULT]
/// Enforce TLS 1.3 downgrade protection
// https://bugzilla.mozilla.org/show_bug.cgi?id=1576790
lockPref("security.tls.hello_downgrade_check", true); // [DEFAULT]
/// Only load secure websockets from HTTPS pages
lockPref("network.websocket.allowInsecureFromHTTPS", false); // [DEFAULT]
/// Enforce blocking additional ports
lockPref("network.security.ports.banned.override", ""); // [DEFAULT]
/// Enable Post Quantum Key Agreement (Kyber)
/// We also set "PostQuantumKeyAgreementEnabled" in policies
// https://mozilla.github.io/policy-templates/#postquantumkeyagreementenabled
lockPref("media.webrtc.enable_pq_dtls", true);
lockPref("network.http.http3.enable_kyber", true);
lockPref("security.tls.enable_kyber", true);
/// Enforce MITM Detection
// https://bugzilla.mozilla.org/show_bug.cgi?id=1529643
lockPref("security.certerrors.mitm.priming.enabled", true); // [DEFAULT]
/// Disable Captive Portal & Connectivity Checks
// We also set "CaptivePortal" in policies
// https://support.mozilla.org/kb/how-stop-firefox-making-automatic-connections#w_network-detection
// https://www.eff.org/deeplinks/2017/08/how-captive-portals-interfere-wireless-security-and-privacy
lockPref("captivedetect.canonicalContent", "");
lockPref("captivedetect.canonicalURL", "");
lockPref("network.captive-portal-service.enabled", false);
lockPref("network.connectivity-service.DNSv4.domain", "");
lockPref("network.connectivity-service.DNSv6.domain", "");
lockPref("network.connectivity-service.enabled", false);
lockPref("network.connectivity-service.IPv4.url", "");
lockPref("network.connectivity-service.IPv6.url", "");
/// Proxy
// We also set "UseProxyForDNS" in policies
// https://mozilla.github.io/policy-templates/#proxy
defaultPref("network.file.disable_unc_paths", true);
defaultPref("network.gio.supported-protocols", "");
defaultPref("network.proxy.allow_bypass", false);
defaultPref("network.proxy.failover_direct", false);
defaultPref("network.proxy.socks_remote_dns", true);
defaultPref("network.proxy.socks5_remote_dns", true);
// 006 DNS
/// We also set "DNSOverHTTPS" in policies
// https://mozilla.github.io/policy-templates/#dnsoverhttps
/// Disable Mozilla DoH Rollout
lockPref("doh-rollout.disable-heuristics", true);
lockPref("doh-rollout.enabled", false);
lockPref("doh-rollout.skipHeuristicsCheck", true);
lockPref("doh-rollout.uri", "");
lockPref("network.trr.default_provider_uri", "");
/// Enable DoH & Set to Quad9 by default
/// We also set "DNSOverHTTPS" in policies
// https://mozilla.github.io/policy-templates/#dnsoverhttps
defaultPref("network.trr.custom_uri", "https://dns.quad9.net/dns-query");
defaultPref("network.trr.mode", 3);
defaultPref("network.trr.uri", "https://dns.quad9.net/dns-query");
/// Improve list of built-in DoH Providers
defaultPref("doh-rollout.provider-list", '[{"UIName":"Quad9 - Real-time Malware Protection","uri":"https://dns.quad9.net/dns-query"}, {"UIName":"DNS0 (ZERO) - Hardened Real-time Malware Protection","uri":"https://zero.dns0.eu"}, {"UIName":"DNS0 - Real-time Malware Protection","uri":"https://dns0.eu"}, {"UIName":"Mullvad - Ad/Tracking/Limited Malware Protection","uri":"https://base.dns.mullvad.net/dns-query"}, {"UIName":"AdGuard (Public) - Ad/Tracking Protection","uri":"https://dns.adguard-dns.com/dns-query"}, {"UIName":"Mullvad - No Filtering","uri":"https://dns.mullvad.net/dns-query"}, {"UIName":"Wikimedia - No Filtering","uri":"https://wikimedia-dns.org/dns-query"}, {"UIName":"AdGuard (Public) - No Filtering","uri":"https://unfiltered.adguard-dns.com/dns-query"}, {"UIName":"DNS0 - Kids","uri":"https://kids.dns0.eu"}, {"UIName":"Mullvad - Family","uri":"https://family.dns.mullvad.net/dns-query"}, {"UIName":"AdGuard (Public) - Family Protection","uri":"https://family.adguard-dns.com/dns-query"}, {"UIName":"Mullvad - Ad/Tracking/Limited Malware/Social Media Protection","uri":"https://extended.dns.mullvad.net/dns-query"}, {"UIName":"Mullvad - Ad/Tracking/Limited Malware/Social Media/Adult/Gambling Protection","uri":"https://all.dns.mullvad.net/dns-query"}]');
/// Skip DoH Connectivity Checks
lockPref("network.connectivity-service.DNS_HTTPS.domain", "");
lockPref("network.trr.confirmationNS", "skip");
/// Never disable DoH from registry checks
// https://searchfox.org/mozilla-central/source/modules/libpref/init/StaticPrefList.yaml
lockPref("network.notify.checkForNRPT", false);
lockPref("network.notify.checkForProxies", false);
/// Enforce EncryptedClientHello
// We also set "DisableEncryptedClientHello" in policies
// https://mozilla.github.io/policy-templates/#disableencryptedclienthello
// https://blog.cloudflare.com/announcing-encrypted-client-hello
lockPref("network.dns.echconfig.enabled", true); // [DEFAULT]
lockPref("network.dns.http3_echconfig.enabled", true); // [DEFAULT]
/// Enable Native DNS HTTPS Lookups
defaultPref("network.dns.native_https_query", true);
// 007 CERTIFICATES
/// Enforce OCSP & Stapling
lockPref("security.OCSP.enabled", 1); // [DEFAULT]
lockPref("security.ssl.enable_ocsp_must_staple", true); // [DEFAULT]
lockPref("security.ssl.enable_ocsp_stapling", true); // [DEFAULT]
/// Hard-fail OCSP by default
// Personally have not ran into any issues from this in YEARS... & it provides a fairly significant security improvement
// Can reconsider if people start having issues
defaultPref("security.OCSP.require", true);
/// Enable CRLite & use where possible
lockPref("security.pki.crlite_mode", 2);
lockPref("security.remote_settings.crlite_filters.enabled", true);
/// Make exceptions for certificate errors session only
lockPref("security.certerrors.permanentOverride", false);
/// Enforce Strict Certificate Pinning
lockPref("security.cert_pinning.enforcement_level", 2);
/// Enable & Enforce Certificate Transparency
// https://searchfox.org/mozilla-central/source/modules/libpref/init/StaticPrefList.yaml#15868
lockPref("security.pki.certificate_transparency.mode", 2); // [DEFAULT: 0]
lockPref("security.pki.certificate_transparency.disable_for_hosts", ""); // [DEFAULT]
lockPref("security.pki.certificate_transparency.disable_for_spki_hashes", ""); // [DEFAULT]
// 008 DOWNLOADS
/// Always prompt before downloading files
/// We also set "PromptForDownloadLocation" in policies
// https://mozilla.github.io/policy-templates/#promptfordownloadlocation
lockPref("browser.download.always_ask_before_handling_new_types", true);
lockPref("browser.download.useDownloadDir", false);
// Always notify when downloading files
lockPref("browser.download.alwaysOpenPanel", true); // [DEFAULT]
// Enforce blocking insecure downloads
lockPref("dom.block_download_insecure", true); // [DEFAULT]
// 009 SAFE BROWSING
/// Enable Safe Browsing by default
// Harmless from a privacy perspective due to the below changes, also effective at preventing real-time malicious domains and downloads.
// We will of course **ALWAYS** give users the ability to disable.
defaultPref("browser.safebrowsing.blockedURIs.enabled", true); // [DEFAULT]
defaultPref("browser.safebrowsing.downloads.enabled", true); // [DEFAULT]
defaultPref("browser.safebrowsing.malware.enabled", true); // [DEFAULT]
defaultPref("browser.safebrowsing.phishing.enabled", true); // [DEFAULT]
// I would rather not touch the below prefs, but they are important for ex. LibreWolf...
defaultPref("browser.safebrowsing.provider.google.gethashURL", "https://safebrowsing.google.com/safebrowsing/gethash?client=SAFEBROWSING_ID&appver=%MAJOR_VERSION%&pver=2.2"); // [DEFAULT]
defaultPref("browser.safebrowsing.provider.google.updateURL", "https://safebrowsing.google.com/safebrowsing/downloads?client=SAFEBROWSING_ID&appver=%MAJOR_VERSION%&pver=2.2&key=%GOOGLE_SAFEBROWSING_API_KEY%"); // [DEFAULT]
defaultPref("browser.safebrowsing.provider.google4.gethashURL", "https://safebrowsing.googleapis.com/v4/fullHashes:find?$ct=application/x-protobuf&key=%GOOGLE_SAFEBROWSING_API_KEY%&$httpMethod=POST"); // [DEFAULT]
defaultPref("browser.safebrowsing.provider.google4.updateURL", "https://safebrowsing.googleapis.com/v4/threatListUpdates:fetch?$ct=application/x-protobuf&key=%GOOGLE_SAFEBROWSING_API_KEY%&$httpMethod=POST"); // [DEFAULT]
/// Prevent sending metadata of downloaded files to Google
// https://support.mozilla.org/kb/how-does-phishing-and-malware-protection-work#w_how-does-phishing-and-malware-protection-work-in-firefox
// https://feeding.cloud.geek.nz/posts/how-safe-browsing-works-in-firefox/
lockPref("browser.safebrowsing.downloads.remote.enabled", false);
lockPref("browser.safebrowsing.downloads.remote.url", "");
/// Enforce that no data is shared with Google
// https://bugzilla.mozilla.org/show_bug.cgi?id=1351147
lockPref("browser.safebrowsing.provider.google.dataSharing.enabled", false); // [DEFAULT] Android
lockPref("browser.safebrowsing.provider.google4.dataSharing.enabled", false); // [DEFAULT]
lockPref("browser.safebrowsing.provider.google4.dataSharingURL", "");
/// Show advanced details on pages blocked by Safe Browsing by default
defaultPref("browser.xul.error_pages.show_safe_browsing_details_on_load", true);
/// By default, when you report a Safe Browsing false positive, it sends the URL to both Mozilla & Google (NOT PROXIED), as well as your locale to Mozilla
// Ex. https://en-us.phish-error.mozilla.com/?url=example.org - Which redirects you directly to https://safebrowsing.google.com/safebrowsing/report_error/?tpl=mozilla&url=example.org
// We can improve privacy & speed by sending the domain *only* to Google & without sending your locale to anyone
// We could also potentially strip tpl=mozilla which tells Google the request is from Firefox - though it looks like there is a different page for Firefox users with a better privacy policy, so we will leave it for now
// Unclear whether 'MalwareMistake' is used, but we can set it anyways
defaultPref("browser.safebrowsing.provider.google.reportMalwareMistakeURL", "https://safebrowsing.google.com/safebrowsing/report_error/?tpl=mozilla&url=");
defaultPref("browser.safebrowsing.provider.google.reportPhishMistakeURL", "https://safebrowsing.google.com/safebrowsing/report_error/?tpl=mozilla&url=");
defaultPref("browser.safebrowsing.provider.google4.reportMalwareMistakeURL", "https://safebrowsing.google.com/safebrowsing/report_error/?tpl=mozilla&url=");
defaultPref("browser.safebrowsing.provider.google4.reportPhishMistakeURL", "https://safebrowsing.google.com/safebrowsing/report_error/?tpl=mozilla&url=");
/// Similar behavior also appears to happen when you report a URL to Safe Browsing
defaultPref("browser.safebrowsing.reportPhishURL", "https://safebrowsing.google.com/safebrowsing/report_phish/?tpl=mozilla&url=");
/// Unclear whether these are actually used or not, but looks like Firefox has some kind of functionality to view a "report" from Safe Browsing about the safety, history, & general status of a site
// By default, it unnecessarily redirects from ex. https://safebrowsing.google.com/safebrowsing/diagnostic?site=example.org to https://transparencyreport.google.com/safe-browsing/search?url=example.org
// We can skip the redirect to improve speed
defaultPref("browser.safebrowsing.provider.google.reportURL", "https://transparencyreport.google.com/safe-browsing/search?url=");
defaultPref("browser.safebrowsing.provider.google4.reportURL", "https://transparencyreport.google.com/safe-browsing/search?url=");
// 010 GEOLOCATION
/// Prevent Wi-Fi Scanning
lockPref("browser.region.network.scan", false); // [DEFAULT]
lockPref("geo.wifi.scan", false);
/// Disable "Region Updates"
// https://firefox-source-docs.mozilla.org/toolkit/modules/toolkit_modules/Region.html
lockPref("browser.region.network.url", "");
lockPref("browser.region.update.enabled", false);
/// Deny websites geo permission by default
/// We also set "Location" in policies
// https://mozilla.github.io/policy-templates/#permissions
defaultPref("permissions.default.geo", 2);
/// Geo Provider
defaultPref("geo.provider.network.url", "https://beacondb.net/v1/geolocate"); // Enable experimental geolocation support for BeaconDB, better than nothing for Windows/Linux users
defaultPref("geo.provider.use_corelocation", true); // Enable Apple Location Services for macOS
defaultPref("geo.provider.use_geoclue", false); // Disable Geoclue for Linux distros (at least for now)
defaultPref("geo.provider.ms-windows-location", false); // Disable Microsoft Location Services for Windows users
/// Update info URL to ours so that users receive accurate information
defaultPref("browser.geolocation.warning.infoURL", "https://phoenix.celenity.dev/geo");
// 011 AI
// https://support.mozilla.org/kb/ai-chatbot
/// Ensure that AI functionality is disabled by default
defaultPref("browser.ml.chat.enabled", false); // [DEFAULT] - AI Chatbot
defaultPref("browser.ml.chat.shortcuts", false); // Pop-up when highlighting text
defaultPref("browser.ml.enable", false); // [DEFAULT] - "Experimental Machine Learning Inference Engine"
/// If AI Chatbot is enabled, set it to DuckDuckGo AI Chat by default
/// Unfortunately this is not compatible with the pop-up when selecting text. There is also not a way at the moment to add it as a persistent option.
defaultPref("browser.ml.chat.provider", "https://duckduckgo.com/?q=DuckDuckGo+AI+Chat&ia=chat");
/// If AI Chatbot is enabled, remove built-in Anthropic Claude, ChatGPT, Google Gemini, & Le Chat Mistral options due to the terrible privacy policies...
/// HuggingChat is generally solid, though it does leave room for some questions, best option out of the built-in
defaultPref("browser.ml.chat.providers", "huggingchat");
/// Allow toggling AI via about:preferences#experimental by default
defaultPref("browser.ml.chat.hideFromLabs", false);
/// If pop-up when highlighting text is enabled, allow typing a custom prompt based on your selection
defaultPref("browser.ml.chat.shortcuts.custom", true); // [DEFAULT]
// 012 WEBRTC
defaultPref("media.peerconnection.ice.obfuscate_host_addresses", true);
defaultPref("media.peerconnection.ice.proxy_only_if_behind_proxy", true);
lockPref("privacy.webrtc.allowSilencingNotifications", true);
defaultPref("privacy.webrtc.globalMuteToggles", true);
lockPref("privacy.webrtc.hideGlobalIndicator", false);
lockPref("privacy.webrtc.sharedTabWarning", true);
/// Always sandbox Media Transport
// https://searchfox.org/mozilla-central/source/security/sandbox/common/SandboxSettings.cpp
lockPref("media.peerconnection.mtransport_process", true); // [DEFAULT]
// 013 DISK AVOIDANCE
/// Disable Search & Form History - Can be leaked to sites
// We also set "DisableFormHistory" in policies
// https://mozilla.github.io/policy-templates/#disableformhistory
// https://blog.mindedsecurity.com/2011/10/autocompleteagain.html
lockPref("browser.formfill.enable", false);
/// Disable caching, might reconsider since we clear cache on exit anyways
defaultPref("browser.cache.disk.enable", false);
defaultPref("browser.cache.disk_cache_ssl", false);
defaultPref("browser.cache.memory.enable", false);
defaultPref("browser.cache.memory.capacity", 0);
defaultPref("browser.privatebrowsing.forceMediaMemoryCache", true);
/// Prevent storing unnecessary extra session data
defaultPref("browser.sessionstore.privacy_level", 2);
/// Sanitize on exit
// We also configure "SanitizeOnShutdown" in policies
// https://mozilla.github.io/policy-templates/#sanitizeonshutdown-selective
defaultPref("privacy.clearHistory.cache", true);
defaultPref("privacy.clearHistory.historyFormDataAndDownloads", true);
defaultPref("privacy.clearSiteData.cache", true);
defaultPref("privacy.clearSiteData.historyFormDataAndDownloads", true);
defaultPref("privacy.clearOnShutdown.cache", true);
defaultPref("privacy.clearOnShutdown.cookies", true);
defaultPref("privacy.clearOnShutdown.downloads", true);
defaultPref("privacy.clearOnShutdown.formdata", true);
defaultPref("privacy.clearOnShutdown.history", true);
defaultPref("privacy.clearOnShutdown.offlineApps", true);
defaultPref("privacy.clearOnShutdown.sessions", true);
defaultPref("privacy.clearOnShutdown_v2.cache", true);
defaultPref("privacy.clearOnShutdown_v2.cookiesAndStorage", true);
defaultPref("privacy.clearOnShutdown_v2.historyFormDataAndDownloads", true);
defaultPref("privacy.cpd.cache", true);
defaultPref("privacy.cpd.formdata", true);
defaultPref("privacy.sanitize.sanitizeOnShutdown", true); // Allows selectively clearing data on shutdown
/// Set time range when manually clearing data to "everything" by default
defaultPref("privacy.sanitize.timeSpan", 0);
// Prevent automatically sharing Firefox Sync accounts...
lockPref("identity.fxaccounts.migrateToDevEdition", false);
/// Prevent logging blocked domains in about:protections
defaultPref("browser.contentblocking.cfr-milestone.enabled", false);
defaultPref("browser.contentblocking.database.enabled", false);
/// Disable favicons in shortcuts, prevents .ico files from persisting even after deletion