From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tobias Geerinckx-Rice Subject: [PATCH] gnu: Add sslh. Date: Mon, 12 Sep 2016 02:32:08 +0200 Message-ID: <1473640328-28092-1-git-send-email-me@tobias.gr> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37760) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjFAd-0005fh-Nc for guix-devel@gnu.org; Sun, 11 Sep 2016 20:32:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bjFAZ-0003vt-GD for guix-devel@gnu.org; Sun, 11 Sep 2016 20:32:22 -0400 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:53117) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjFAZ-0003uf-9r for guix-devel@gnu.org; Sun, 11 Sep 2016 20:32:19 -0400 Received: from mfilter19-d.gandi.net (mfilter19-d.gandi.net [217.70.178.147]) by relay2-d.mail.gandi.net (Postfix) with ESMTP id 468F8C5A49 for ; Mon, 12 Sep 2016 02:32:18 +0200 (CEST) Received: from relay2-d.mail.gandi.net ([IPv6:::ffff:217.70.183.194]) by mfilter19-d.gandi.net (mfilter19-d.gandi.net [::ffff:10.0.15.180]) (amavisd-new, port 10024) with ESMTP id dYo2LvPsoYwW for ; Mon, 12 Sep 2016 02:32:16 +0200 (CEST) Received: from localhost.localdomain (unknown [91.177.29.84]) (Authenticated sender: me@tobias.gr) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 7DF0DC5A53 for ; Mon, 12 Sep 2016 02:32:16 +0200 (CEST) List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org * gnu/packages/networking.scm (sslh): New variable. --- gnu/packages/networking.scm | 71 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 70 insertions(+), 1 deletion(-) diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm index c4edbc3..1818b62 100644 --- a/gnu/packages/networking.scm +++ b/gnu/packages/networking.scm @@ -40,6 +40,7 @@ #:use-module (gnu packages audio) #:use-module (gnu packages bison) #:use-module (gnu packages check) + #:use-module (gnu packages code) #:use-module (gnu packages compression) #:use-module (gnu packages databases) #:use-module (gnu packages flex) @@ -54,7 +55,9 @@ #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) - #:use-module (gnu packages tls)) + #:use-module (gnu packages textutils) + #:use-module (gnu packages tls) + #:use-module (gnu packages valgrind)) (define-public macchanger (package @@ -824,3 +827,69 @@ in dynamically linked programs and redirects them through one or more SOCKS or HTTP proxies.") (home-page "https://github.com/rofl0r/proxychains-ng") (license license:gpl2+))) + +(define-public sslh + (package + (name "sslh") + (version "1.18") + (source + (origin + (method url-fetch) + (uri (string-append "https://github.com/yrutschle/sslh/archive/v" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "1vzw7a7s9lhspbn5zn3hw8hir4pkjgbd68yys4hfsnjp1h7bzjpn")))) + (build-system gnu-build-system) + (arguments + '(#:phases + (modify-phases %standard-phases + (delete 'configure) ; no configure script + (add-before 'check 'fix-tests + (lambda* _ + (substitute* "./t" + (("\"/tmp") "$ENV{\"TMPDIR\"} . \"") + (("ip6-localhost") "localhost")))) + ;; Many of these files are mentioned in the man page. Install them. + (add-after 'install 'install-documentation + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (doc (string-append out "/share/doc"))) + (install-file "README.md" doc) + (for-each + (lambda (file) + (install-file file (string-append doc "/examples"))) + (append (find-files "." "\\.cfg") + (find-files "scripts" ".*")))) + #t))) + #:make-flags (list "CC=gcc" + "USELIBCAP=1" + "USELIBWRAP=1" + (string-append "PREFIX=" (assoc-ref %outputs "out"))) + #:test-target "test")) + (native-inputs + ;; Tests dependencies. + `(("lcov" ,lcov) + ("perl" ,perl) + ("perl-io-socket-inet6" ,perl-io-socket-inet6) + ("perl-socket6" ,perl-socket6) + ("psmisc" ,psmisc) + ("valgrind" ,valgrind))) + (inputs + `(("libcap" ,libcap) + ("libconfig" ,libconfig) + ("tcp-wrappers" ,tcp-wrappers))) + (home-page "http://www.rutschle.net/tech/sslh.shtml") + (synopsis "Applicative network protocol demultiplexer") + (description + "sslh is a network protocol demultiplexer. It acts like a switchboard, +accepting connections from clients on one port and forwarding them to different +servers based on the contents of the first received data packet. Detection of +common protocols like HTTP(S), SSL, SSH, OpenVPN, tinc, and XMPP is already +implemented, but any other protocol that matches a regular expression can be +added. sslh's name comes from its original application of serving both SSH and +HTTPS on port 443, allowing SSH connections from inside corporate firewalls +that block port 22.") + (license (list license:bsd-2 ; tls.[ch] + license:gpl2+)))) ; everything else -- 2.7.4