From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id lDdlLZdKuGD4YgEAgWs5BA (envelope-from ) for ; Thu, 03 Jun 2021 05:20:55 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id SAJbKJdKuGAJdwAAB5/wlQ (envelope-from ) for ; Thu, 03 Jun 2021 03:20:55 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 0E4A7128AB for ; Thu, 3 Jun 2021 05:20:55 +0200 (CEST) Received: from localhost ([::1]:60610 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lodug-0008LZ-3d for larch@yhetil.org; Wed, 02 Jun 2021 23:20:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48788) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lodtu-0007Hh-14 for guix-patches@gnu.org; Wed, 02 Jun 2021 23:20:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:58458) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lodtt-0001i3-OM for guix-patches@gnu.org; Wed, 02 Jun 2021 23:20:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lodtt-0001C1-L7 for guix-patches@gnu.org; Wed, 02 Jun 2021 23:20:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#42380] [PATCH v4 8/9] gnu: Add obfs4. Resent-From: =?UTF-8?Q?Andr=C3=A9?= Batista Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 03 Jun 2021 03:20:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42380 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 42380@debbugs.gnu.org Cc: =?UTF-8?Q?Andr=C3=A9?= Batista Received: via spool by 42380-submit@debbugs.gnu.org id=B42380.16226903914499 (code B ref 42380); Thu, 03 Jun 2021 03:20:05 +0000 Received: (at 42380) by debbugs.gnu.org; 3 Jun 2021 03:19:51 +0000 Received: from localhost ([127.0.0.1]:41760 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lodtf-0001AU-0L for submit@debbugs.gnu.org; Wed, 02 Jun 2021 23:19:51 -0400 Received: from mx1.riseup.net ([198.252.153.129]:53386) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lodtd-00019t-Rt for 42380@debbugs.gnu.org; Wed, 02 Jun 2021 23:19:50 -0400 Received: from fews1.riseup.net (fews1-pn.riseup.net [10.0.1.83]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "Sectigo RSA Domain Validation Secure Server CA" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id 4FwWNJ3zKmzDq8t for <42380@debbugs.gnu.org>; Wed, 2 Jun 2021 20:19:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1622690384; bh=oTEtKk3vm1WhLN21XOcLTvg09YSk5SypoKyq1od5iAw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=q/J5K5DbQMUzLBW+pVbiWgX9YSw2V41hxFzxtJYKKMHqoBqnPJZrUJViwyfILZz8f WFN7DgoRqhNyT2AluAHEC3f5Vc6ebHHPzRKv60GydeAk0ZtLV5xLe2aKuIL1keV/g1 XTTuyJTm3bosZzI6O5t/TJE/7zfabCkZgu0APhxg= X-Riseup-User-ID: 54FAF121C34F5EFB976165D446D468B486D1DC1329717DC03B8876B970DA135C Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews1.riseup.net (Postfix) with ESMTPSA id 4FwWNH4Qggz5vks; Wed, 2 Jun 2021 20:19:43 -0700 (PDT) From: =?UTF-8?Q?Andr=C3=A9?= Batista Date: Thu, 3 Jun 2021 00:17:45 -0300 Message-Id: <66abc6eeaeab68a209c54740678b64f1d96ecd87.1622687706.git.nandre@riseup.net> In-Reply-To: References: <20201007155154.GA5226@andel> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1622690455; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=CaEmkHPnj9JdM6rcQpnuYZFsQJDc3x5g8UTAMc/iDUY=; b=WkXZXBJb+GDJg20s8bZez7WAjVwNoWbyWdMVDdB0rgusIzf6vC4t7LjiXfKKEuNM9OECok WFgcXAA8CsZJPjIaoM7Mg+gwdCG1Xdzsx74NxcIRA9tlfqdzV+1f8J59pdOFlbGWztTTVu RTFSvKpZBDNUl7OdCSo4+DQrQcDbHZagaZSXQWiJ2Qxdh2Pymr1qK8SxoxkWsrdzr5GWMo PaGfuOkaIsEicXGQAhHYqmzy7OHizc6WENiMfNOTE0hY5FZ3BYCWHkiRQN2u+6LTIIxJ2E Hk+MUYOTROo2atICEGsX8zwI+zBtZRhFwmBkaDH8gZLuA7O+jYbdzxgv3rktDw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1622690455; a=rsa-sha256; cv=none; b=MFTBkuS7syLeAD7Xe68oefnvQVhAwktH2SigtJI/sUd4t0b+k1jc5WCPd+sDBcdYmWpRMU 8En/U8rjzNxm3uViCiwKa+SdzXf1se2xwspqZL/wrhB3MMN+YRLS39w9N2j2wh6Iy0K/uT ZS3khbEIKgYoIQG70GM5js86cJ1TGU2QKwvyf/zlQeVU5mxU9xS/JDAx4oA2foyRqgOCQf EABVFEhdo3GSNVV3HcckI5NYNPf6kYp03WFImX7X4lzAvMLzlXVVQnP0mA0a775hNvEPq0 rHTUg07j7KNqekVD1OIIi6crsvWxAhonyv/2LGH5Ep9/2mYz2+qli29yqexmdQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=riseup.net header.s=squak header.b="q/J5K5Db"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=riseup.net (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -0.33 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=riseup.net header.s=squak header.b="q/J5K5Db"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=riseup.net (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 0E4A7128AB X-Spam-Score: -0.33 X-Migadu-Scanner: scn1.migadu.com X-TUID: 648BeEiyMd/r * 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 ;;; Copyright © 2020 Vincent Legoll ;;; Copyright © 2020 Brice Waegeneire -;;; Copyright © 2020 André Batista +;;; Copyright © 2020, 2021 André Batista ;;; ;;; 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