[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/13: services: block-facebook-hosts: Use proper unroutable addresses.
From: |
guix-commits |
Subject: |
01/13: services: block-facebook-hosts: Use proper unroutable addresses. |
Date: |
Sun, 18 Feb 2024 10:19:16 -0500 (EST) |
civodul pushed a commit to branch master
in repository guix.
commit c1d37d0653766c8de52e22bae01701baf503338f
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Sun Jan 28 23:05:43 2024 +0100
services: block-facebook-hosts: Use proper unroutable addresses.
This is safer and more appropriate than redirecting to localhost.
* gnu/services/networking.scm (%unroutable-ipv4, %unroutable-ipv6): New
variables.
(facebook-host-aliases): Use them.
Change-Id: Idd4b1fec903c52d542d177a52fec1814eded4119
---
gnu/services/networking.scm | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm
index 495d049728..8e64e529ab 100644
--- a/gnu/services/networking.scm
+++ b/gnu/services/networking.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013-2023 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013-2024 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2016, 2018, 2020 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016 John Darrington <jmd@gnu.org>
@@ -270,6 +270,14 @@
;;;
;;; Code:
+(define %unroutable-ipv4
+ ;; Unroutable address, as per <https://www.rfc-editor.org/rfc/rfc5737>.
+ "203.0.113.1")
+
+(define %unroutable-ipv6
+ ;; Unroutable address, as per <https://www.rfc-editor.org/rfc/rfc6666>.
+ "0100::")
+
(define facebook-host-aliases
;; This is the list of known Facebook hosts to be added to /etc/hosts if you
;; are to block it.
@@ -282,7 +290,8 @@
(append-map (lambda (name)
(map (lambda (addr)
(host addr name))
- (list "127.0.0.1" "::1"))) domains)))
+ (list %unroutable-ipv4 %unroutable-ipv6)))
+ domains)))
(define-deprecated %facebook-host-aliases
block-facebook-hosts-service-type
- branch master updated (f8f0a5954a -> fdbf4192f5), guix-commits, 2024/02/18
- 02/13: services: virtual-build-machine: Do not offload when service is stopped., guix-commits, 2024/02/18
- 01/13: services: block-facebook-hosts: Use proper unroutable addresses.,
guix-commits <=
- 04/13: services: virtual-build-machine: Add periodic GC job., guix-commits, 2024/02/18
- 03/13: services: virtual-build-machine: Use a non-volatile root file system., guix-commits, 2024/02/18
- 05/13: services: virtual-build-machine: Add ‘configuration’ action., guix-commits, 2024/02/18
- 08/13: gnu: Add emacs-fdroid., guix-commits, 2024/02/18
- 13/13: gnu: bemenu: Install man pages, guix-commits, 2024/02/18
- 10/13: gnu: Add go-github-com-cli-safeexec., guix-commits, 2024/02/18
- 12/13: gnu: Add git-sizer., guix-commits, 2024/02/18
- 06/13: gnu: Add snapper., guix-commits, 2024/02/18
- 07/13: gnu: Add restartd., guix-commits, 2024/02/18
- 09/13: gnu: Add libdisplay-info., guix-commits, 2024/02/18