tests: hackage: Fix mock urls.
[jackhill/guix/guix.git] / gnu / packages / tor.scm
CommitLineData
7f08437b 1;;; GNU Guix --- Functional package management for GNU
9355498d 2;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
722ec722 3;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
be866fb1 4;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
4cc4d363 5;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
7f08437b
LC
6;;;
7;;; This file is part of GNU Guix.
8;;;
9;;; GNU Guix is free software; you can redistribute it and/or modify it
10;;; under the terms of the GNU General Public License as published by
11;;; the Free Software Foundation; either version 3 of the License, or (at
12;;; your option) any later version.
13;;;
14;;; GNU Guix is distributed in the hope that it will be useful, but
15;;; WITHOUT ANY WARRANTY; without even the implied warranty of
16;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17;;; GNU General Public License for more details.
18;;;
19;;; You should have received a copy of the GNU General Public License
20;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21
22(define-module (gnu packages tor)
ba583bd2 23 #:use-module ((guix licenses) #:select (bsd-3 gpl2+ gpl2))
7f08437b
LC
24 #:use-module (guix packages)
25 #:use-module (guix download)
ba583bd2 26 #:use-module (guix git-download)
7f08437b 27 #:use-module (guix build-system gnu)
ba583bd2 28 #:use-module (gnu packages)
7f08437b
LC
29 #:use-module (gnu packages libevent)
30 #:use-module (gnu packages compression)
b2e3dd94 31 #:use-module (gnu packages pcre)
ba583bd2 32 #:use-module (gnu packages perl)
8850303e 33 #:use-module (gnu packages python)
b2e3dd94 34 #:use-module (gnu packages autotools)
cc2b77df 35 #:use-module (gnu packages tls)
b2e3dd94 36 #:use-module (gnu packages w3m))
7f08437b
LC
37
38(define-public tor
39 (package
40 (name "tor")
ec9be00f 41 (version "0.2.8.7")
7f08437b
LC
42 (source (origin
43 (method url-fetch)
44 (uri (string-append "https://www.torproject.org/dist/tor-"
45 version ".tar.gz"))
46 (sha256
47 (base32
ec9be00f 48 "1iigfi8ljl88s8b5y1g4ak8im57simazscl467zvfbg8k6vf4i5f"))))
7f08437b 49 (build-system gnu-build-system)
8850303e
MW
50 (native-inputs
51 `(("python" ,python-2))) ; for tests
7f08437b
LC
52 (inputs
53 `(("zlib" ,zlib)
54 ("openssl" ,openssl)
55 ("libevent" ,libevent)))
4f7e152b
LC
56
57 ;; TODO: Recommend `torsocks' since `torify' needs it.
58
7f08437b 59 (home-page "http://www.torproject.org/")
9e771e3b 60 (synopsis "Anonymous network router to improve privacy on the Internet")
7f08437b
LC
61 (description
62 "Tor protects you by bouncing your communications around a distributed
63network of relays run by volunteers all around the world: it prevents
64somebody watching your Internet connection from learning what sites you
65visit, and it prevents the sites you visit from learning your physical
35b9e423 66location. Tor works with many of your existing applications, including
7f08437b
LC
67web browsers, instant messaging clients, remote login, and other
68applications based on the TCP protocol.")
69 (license bsd-3)))
4f7e152b
LC
70
71(define-public torsocks
72 (package
73 (name "torsocks")
ba583bd2 74 (version "2.0.0")
4f7e152b 75 (source (origin
ba583bd2
LC
76 (method git-fetch)
77 (uri (git-reference
78 (url "https://git.torproject.org/torsocks.git")
79 (commit (string-append "v" version))))
80 (sha256
81 (base32
82 "0an2q5ail9z414riyjbkjkm29504hy778j914baz2gn5hlv2cfak"))
83 (file-name (string-append name "-" version "-checkout"))
fc1adab1 84 (patches (search-patches "torsocks-dns-test.patch"))))
4f7e152b 85 (build-system gnu-build-system)
ba583bd2
LC
86 (arguments
87 '(#:phases (modify-phases %standard-phases
88 (add-before 'configure 'bootstrap
89 (lambda _
90 (system* "autoreconf" "-vfi"))))))
91 (native-inputs `(("autoconf" ,(autoconf-wrapper))
92 ("automake" ,automake)
93 ("libtool" ,libtool)
94 ("perl-test-harness" ,perl-test-harness)))
95 (home-page "http://www.torproject.org/")
4f7e152b
LC
96 (synopsis "Use socks-friendly applications with Tor")
97 (description
98 "Torsocks allows you to use most socks-friendly applications in a safe
99way with Tor. It ensures that DNS requests are handled safely and explicitly
100rejects UDP traffic from the application you're using.")
ba583bd2
LC
101
102 ;; All the files explicitly say "version 2 only".
103 (license gpl2)))
b2e3dd94
LC
104
105(define-public privoxy
106 (package
107 (name "privoxy")
6b6a62dd 108 (version "3.0.24")
b2e3dd94
LC
109 (source (origin
110 (method url-fetch)
111 (uri (string-append "mirror://sourceforge/ijbswa/Sources/"
112 version "%20%28stable%29/privoxy-"
113 version "-stable-src.tar.gz"))
114 (sha256
115 (base32
6b6a62dd 116 "04mhkz5g713i2crvjd6s783hhrlsjjjlfb9llbaf13ghg3fgd0d3"))))
b2e3dd94
LC
117 (build-system gnu-build-system)
118 (arguments
ae5c6fca
LC
119 '(;; The default 'sysconfdir' is $out/etc; change that to
120 ;; $out/etc/privoxy.
121 #:configure-flags (list (string-append "--sysconfdir="
122 (assoc-ref %outputs "out")
123 "/etc/privoxy"))
722ec722
MW
124 #:phases (alist-cons-after
125 'unpack 'autoconf
b2e3dd94
LC
126 (lambda _
127 ;; Unfortunately, this is not a tarball produced by
128 ;; "make dist".
129 (zero? (system* "autoreconf" "-vfi")))
130 %standard-phases)
131 #:tests? #f))
132 (inputs
133 `(("w3m" ,w3m)
134 ("pcre" ,pcre)
135 ("zlib" ,zlib)
136 ("autoconf" ,autoconf)
137 ("automake" ,automake)))
138 (home-page "http://www.privoxy.org")
139 (synopsis "Web proxy with advanced filtering capabilities for enhancing privacy")
140 (description
141 "Privoxy is a non-caching web proxy with advanced filtering capabilities
142for enhancing privacy, modifying web page data and HTTP headers, controlling
143access, and removing ads and other obnoxious Internet junk. Privoxy has a
144flexible configuration and can be customized to suit individual needs and
145tastes. It has application for both stand-alone systems and multi-user
146networks.")
147 (license gpl2+)))