unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: "André Batista" <nandre@riseup.net>
To: 42380@debbugs.gnu.org
Cc: "André Batista" <nandre@riseup.net>
Subject: [bug#42380] [PATCH v4 8/9] gnu: Add obfs4.
Date: Thu,  3 Jun 2021 00:17:45 -0300	[thread overview]
Message-ID: <66abc6eeaeab68a209c54740678b64f1d96ecd87.1622687706.git.nandre@riseup.net> (raw)
In-Reply-To: <cover.1622687706.git.nandre@riseup.net>

* gnu/packages/tor.scm (obfs4): New variable.
* Alphabetically order module imports.

diff --git a/gnu/packages/tor.scm b/gnu/packages/tor.scm
index bd11dd3a75..52d78cba79 100644
--- a/gnu/packages/tor.scm
+++ b/gnu/packages/tor.scm
@@ -9,7 +9,7 @@
 ;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
 ;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
-;;; Copyright © 2020 André Batista <nandre@riseup.net>
+;;; Copyright © 2020, 2021 André Batista <nandre@riseup.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -33,13 +33,16 @@
   #:use-module (guix download)
   #:use-module (guix git-download)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system go)
   #:use-module (guix build-system python)
   #:use-module (gnu packages)
+  #:use-module (gnu packages autotools)
   #:use-module (gnu packages base)
-  #:use-module (gnu packages libevent)
-  #:use-module (gnu packages linux)
   #:use-module (gnu packages check)
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages golang)
+  #:use-module (gnu packages libevent)
+  #:use-module (gnu packages linux)
   #:use-module (gnu packages pcre)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
@@ -423,3 +426,75 @@ statistics and status reports on:
 
 Potential client and exit connections are scrubbed of sensitive information.")
     (license license:gpl3+)))
+
+(define-public obfs4
+  (package
+    (name "obfs4")
+    (version "0.0.11")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://git.torproject.org/pluggable-transports/obfs4.git")
+             (commit (string-append "obfs4proxy-" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "1y2kjwrk64l1h8b87m4iqsanib5rn68gzkdri1vd132qrlypycjn"))))
+    (build-system go-build-system)
+    (arguments
+     '(#:import-path "git.torproject.org/pluggable-transports/obfs4.git"
+       #:tests? #f ;; No test files
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'build
+           (lambda* (#:key outputs configure-flags #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (copy-recursively
+                "src/git.torproject.org/pluggable-transports/obfs4.git"
+                "src/gitlab.com/yawning/obfs4.git"
+                #:log (%make-void-port "w"))
+               (with-directory-excursion
+                   "src/git.torproject.org/pluggable-transports/obfs4.git/obfs4proxy"
+                 (invoke "go" "build" "-ldflags" "-s"))
+               #t)))
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (src "src/git.torproject.org/pluggable-transports/obfs4.git")
+                    (bin (string-append out "/bin"))
+                    (share (string-append out "/share"))
+                    (doc (string-append share "/doc"))
+                    (man (string-append share "/man/man1")))
+               (mkdir-p man)
+               (mkdir bin)
+               (mkdir doc)
+               (with-directory-excursion
+                   (string-append src "/obfs4proxy")
+                 (copy-file "obfs4proxy"
+                            (string-append bin "/obfs4proxy")))
+               (with-directory-excursion
+                   (string-append src "/doc")
+                 (copy-file "obfs4proxy.1"
+                            (string-append man "/obfs4proxy.1"))
+                 (copy-file "obfs4-spec.txt"
+                            (string-append doc "/obfs4-spec.txt")))
+               #t))))))
+    (propagated-inputs
+     `(("go-torproject-org-ptlib" ,go-torproject-org-ptlib)
+       ("go-github-com-agl-ed25519" ,go-github-com-agl-ed25519)
+       ("go-github-com-dchest-siphash" ,go-github-com-dchest-siphash)
+       ("go-github-com-dchest-uniuri" ,go-github-com-dchest-uniuri)
+       ("go-github-com-dsnet-compress" ,go-github-com-dsnet-compress)
+       ("go-schwanenlied-me-yawning-bsaes" ,go-schwanenlied-me-yawning-bsaes)
+       ("go-gitlab-com-yawning-utls" ,go-gitlab-com-yawning-utls)
+       ("go-golang-org-x-net" ,go-golang-org-x-net)
+       ("go-golang-org-x-crypto" ,go-golang-org-x-crypto)
+       ("go-golang-org-x-text" ,go-golang-org-x-text)))
+    (home-page "https://git.torproject.org/pluggable-transports/obfs4.git")
+    (synopsis "Obfs4 implements an obfuscation protocol")
+    (description "This is a look-like nothing obfuscation protocol that
+incorporates ideas and concepts from Philipp Winter's ScrambleSuit protocol.
+The obfs naming was chosen primarily because it was shorter, in terms of
+protocol ancestery obfs4 is much closer to ScrambleSuit than obfs2/obfs3.")
+    (license license:gpl3+)))
-- 
2.31.1





  parent reply	other threads:[~2021-06-03  3:20 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-15 21:15 [bug#42380] [WIP] gnu: Add torbrowser-unbundle André Batista
2020-07-25 14:49 ` [bug#42380] [PATCH] " André Batista
2020-08-03 12:55   ` André Batista
2020-09-07 14:13     ` Ludovic Courtès
2020-09-09  2:24       ` André Batista
2020-09-09  7:20         ` Ludovic Courtès
2020-09-09 10:59           ` Efraim Flashner
2020-09-15 14:21           ` [bug#42380] [PATCH 0/9] " André Batista
2020-09-15 15:01             ` [bug#42380] [PATCH 1/9] gnu: Add go-torproject-org-ptlib André Batista
2020-09-15 15:04             ` [bug#42380] [PATCH 2/9] gnu: Add go-github-com-agl-ed25519 André Batista
2020-09-15 22:50               ` [bug#42380] [PATCH 2v2/9] " André Batista
2020-09-15 15:06             ` [bug#42380] [PATCH 0/9] gnu: Add go-github-com-dchest-siphash André Batista
2020-09-15 22:53               ` [bug#42380] [PATCH 3/9] " André Batista
2020-09-15 15:08             ` [bug#42380] [PATCH 4/9] gnu: Add go-github-com-dchest-uniuri André Batista
2020-09-15 15:10             ` [bug#42380] [PATCH 5/9] gnu: Add go-github-com-dsnet-compress André Batista
2020-09-15 15:12             ` [bug#42380] [PATCH 6/9] gnu: Add go-schwanenlied-me-yawning-bsaes André Batista
2020-09-15 15:14             ` [bug#42380] [PATCH 7/9] gnu: Add go-gitlab-com-yawning-utls André Batista
2020-09-15 15:15             ` [bug#42380] [PATCH 8/9] gnu: obfs4 André Batista
2020-09-15 15:16             ` [bug#42380] [PATCH 9/9] gnu: Add torbrowser-unbundle André Batista
2020-09-24 23:18               ` [bug#42380] [PATCHv2 " André Batista
2020-10-07 15:51                 ` [bug#42380] [PATCHv3 " André Batista
2021-06-03  3:17                   ` [bug#42380] [PATCH v4 0/9] " André Batista
2021-06-03  3:17                     ` [bug#42380] [PATCH v4 1/9] gnu: Add go-torproject-org-ptlib André Batista
2021-06-03  3:17                     ` [bug#42380] [PATCH v4 2/9] gnu: Add go-github-com-agl-ed25519 André Batista
2021-06-03  3:17                     ` [bug#42380] [PATCH v4 3/9] gnu: Add go-github-com-dchest-siphash André Batista
2021-06-03  3:17                     ` [bug#42380] [PATCH v4 4/9] gnu: Add go-github-com-dchest-uniuri André Batista
2021-06-03  3:17                     ` [bug#42380] [PATCH v4 5/9] gnu: Add go-github-com-dsnet-compress André Batista
2021-06-03  3:17                     ` [bug#42380] [PATCH v4 6/9] gnu: Add go-schwanenlied-me-yawning-bsaes André Batista
2021-06-03  3:17                     ` [bug#42380] [PATCH v4 7/9] gnu: Add go-gitlab-com-yawning-utls André Batista
2021-06-03  3:17                     ` André Batista [this message]
2021-06-03  3:17                     ` [bug#42380] [PATCH v4 9/9] gnu: Add torbrowser-unbundle André Batista
2021-06-03  4:10                       ` [bug#42380] [PATCH v5 " André Batista
2021-06-03 21:07                         ` Maxime Devos
2021-07-10  3:10                           ` André Batista
2021-06-03 21:07                         ` Maxime Devos
2020-09-12 13:35 ` [bug#42380] Wow! Raghav Gururajan
2020-09-15 15:23   ` André Batista
2021-05-25 15:05     ` Xinglu Chen
2021-05-25 19:12       ` Leo Famulari
2021-05-25 21:24         ` Ludovic Courtès
2021-05-28  1:45           ` André Batista
2021-06-03 20:43             ` Ludovic Courtès
2023-12-12 11:21 ` [bug#42380] [PATCH] gnu: Add torbrowser Clément Lassieur
2023-12-14 21:54   ` André Batista
2023-12-15 17:04     ` André Batista
2023-12-16  3:49     ` André Batista
2023-12-19 18:19     ` Clément Lassieur
2023-12-21 15:05       ` [bug#42380] [WIP] gnu: Add torbrowser-unbundle Clément Lassieur
2023-12-22 14:54         ` André Batista
2023-12-25 15:28           ` Clément Lassieur
2023-12-27 10:03             ` André Batista
2023-12-27 11:18               ` bug#42380: " Clément Lassieur
2023-12-21 13:56   ` [bug#42380] [PATCH v2] gnu: Add torbrowser Clément Lassieur
2023-12-27 21:22 ` [bug#42380] [WIP] gnu: Add torbrowser-unbundle Anonymousemail via Guix-patches via
2023-12-28 16:03   ` Clément Lassieur
2023-12-30  0:34   ` Clément Lassieur

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=66abc6eeaeab68a209c54740678b64f1d96ecd87.1622687706.git.nandre@riseup.net \
    --to=nandre@riseup.net \
    --cc=42380@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).