gnu: python-language-server: Update to 0.29.1.
[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>
ae608622 4;;; Copyright © 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
47956fa0 5;;; Copyright © 2016, 2017 ng0 <ng0@n0.is>
eac5d425 6;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
4afdb792 7;;; Copyright © 2017, 2018, 2019 Eric Bavier <bavier@member.fsf.org>
7e9e1a36 8;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
90664247 9;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
7f08437b
LC
10;;;
11;;; This file is part of GNU Guix.
12;;;
13;;; GNU Guix is free software; you can redistribute it and/or modify it
14;;; under the terms of the GNU General Public License as published by
15;;; the Free Software Foundation; either version 3 of the License, or (at
16;;; your option) any later version.
17;;;
18;;; GNU Guix is distributed in the hope that it will be useful, but
19;;; WITHOUT ANY WARRANTY; without even the implied warranty of
20;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21;;; GNU General Public License for more details.
22;;;
23;;; You should have received a copy of the GNU General Public License
24;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
25
26(define-module (gnu packages tor)
71794d7b 27 #:use-module ((guix licenses) #:prefix license:)
7f08437b
LC
28 #:use-module (guix packages)
29 #:use-module (guix download)
ba583bd2 30 #:use-module (guix git-download)
7f08437b 31 #:use-module (guix build-system gnu)
c4605e4c 32 #:use-module (guix build-system python)
ba583bd2 33 #:use-module (gnu packages)
f3cf25c3 34 #:use-module (gnu packages base)
7f08437b 35 #:use-module (gnu packages libevent)
f3cf25c3 36 #:use-module (gnu packages linux)
ac257f12 37 #:use-module (gnu packages check)
7f08437b 38 #:use-module (gnu packages compression)
b2e3dd94 39 #:use-module (gnu packages pcre)
6c97f17f 40 #:use-module (gnu packages pkg-config)
8850303e 41 #:use-module (gnu packages python)
4afdb792 42 #:use-module (gnu packages python-crypto)
1b2f753d 43 #:use-module (gnu packages python-web)
44d10b1f 44 #:use-module (gnu packages python-xyz)
b8ea5204 45 #:use-module (gnu packages qt)
b2e3dd94 46 #:use-module (gnu packages autotools)
cc2b77df 47 #:use-module (gnu packages tls)
b2e3dd94 48 #:use-module (gnu packages w3m))
7f08437b
LC
49
50(define-public tor
51 (package
52 (name "tor")
664aa184 53 (version "0.4.1.6")
7f08437b
LC
54 (source (origin
55 (method url-fetch)
0ab57b0d 56 (uri (string-append "https://dist.torproject.org/tor-"
7f08437b
LC
57 version ".tar.gz"))
58 (sha256
59 (base32
664aa184 60 "0wgdid8w7srd218hh4rwslzdx2ickxw1pg18p2wry1r6wi65521a"))))
7f08437b 61 (build-system gnu-build-system)
8850303e 62 (native-inputs
6c97f17f 63 `(("pkg-config" ,pkg-config)
4105f13b 64 ("python" ,python-2))) ; for tests
7f08437b
LC
65 (inputs
66 `(("zlib" ,zlib)
67 ("openssl" ,openssl)
7e9e1a36 68 ("libevent" ,libevent)
6c97f17f
TGR
69 ("libseccomp" ,libseccomp)
70 ("xz" ,xz)
ec0de9d8 71 ("zstd" ,zstd "lib")))
0ab57b0d 72 (home-page "https://www.torproject.org/")
9e771e3b 73 (synopsis "Anonymous network router to improve privacy on the Internet")
7f08437b
LC
74 (description
75 "Tor protects you by bouncing your communications around a distributed
76network of relays run by volunteers all around the world: it prevents
77somebody watching your Internet connection from learning what sites you
78visit, and it prevents the sites you visit from learning your physical
35b9e423 79location. Tor works with many of your existing applications, including
7f08437b 80web browsers, instant messaging clients, remote login, and other
fc9286d0 81applications based on the TCP protocol.
55b27569 82
fc9286d0 83To @code{torify} applications (to take measures to ensure that an application,
84which has not been designed for use with Tor such as ssh, will use only Tor for
85internet connectivity, and also ensures that there are no leaks from DNS, UDP or
86the application layer) you need to install @code{torsocks}.")
71794d7b 87 (license license:bsd-3)))
4f7e152b
LC
88
89(define-public torsocks
90 (package
91 (name "torsocks")
15c661ec 92 (version "2.3.0")
4f7e152b 93 (source (origin
91988aee 94 (method url-fetch)
95 (uri (string-append "https://people.torproject.org/~dgoulet/"
d77ade87 96 "torsocks/torsocks-" version ".tar.xz"))
ba583bd2
LC
97 (sha256
98 (base32
15c661ec 99 "08inrkap29gikb6sdmb58z43hw4abwrfw7ny40c4xzdkss0vkwdr"))))
4f7e152b 100 (build-system gnu-build-system)
f3cf25c3 101 (inputs
15c661ec 102 `(("libcap" ,libcap)))
f3cf25c3
EB
103 (arguments
104 `(#:phases (modify-phases %standard-phases
105 (add-after 'build 'absolutize
106 (lambda* (#:key inputs #:allow-other-keys)
107 (substitute* "src/bin/torsocks"
15c661ec
TGR
108 (("getcap=.*")
109 (string-append "getcap=" (which "getcap") "\n")))
f3cf25c3 110 #t)))))
91988aee 111 (home-page "https://www.torproject.org/")
4f7e152b
LC
112 (synopsis "Use socks-friendly applications with Tor")
113 (description
114 "Torsocks allows you to use most socks-friendly applications in a safe
115way with Tor. It ensures that DNS requests are handled safely and explicitly
116rejects UDP traffic from the application you're using.")
ba583bd2
LC
117
118 ;; All the files explicitly say "version 2 only".
71794d7b 119 (license license:gpl2)))
b2e3dd94
LC
120
121(define-public privoxy
122 (package
123 (name "privoxy")
be4f8391 124 (version "3.0.28")
b2e3dd94
LC
125 (source (origin
126 (method url-fetch)
127 (uri (string-append "mirror://sourceforge/ijbswa/Sources/"
128 version "%20%28stable%29/privoxy-"
129 version "-stable-src.tar.gz"))
130 (sha256
131 (base32
be4f8391 132 "0jl2yav1qzqnaqnnx8i6i53ayckkimcrs3l6ryvv7bda6v08rmxm"))))
b2e3dd94
LC
133 (build-system gnu-build-system)
134 (arguments
ae5c6fca
LC
135 '(;; The default 'sysconfdir' is $out/etc; change that to
136 ;; $out/etc/privoxy.
137 #:configure-flags (list (string-append "--sysconfdir="
138 (assoc-ref %outputs "out")
139 "/etc/privoxy"))
b2e3dd94
LC
140 #:tests? #f))
141 (inputs
142 `(("w3m" ,w3m)
143 ("pcre" ,pcre)
144 ("zlib" ,zlib)
145 ("autoconf" ,autoconf)
146 ("automake" ,automake)))
a8f3d492 147 (home-page "https://www.privoxy.org")
b2e3dd94
LC
148 (synopsis "Web proxy with advanced filtering capabilities for enhancing privacy")
149 (description
150 "Privoxy is a non-caching web proxy with advanced filtering capabilities
151for enhancing privacy, modifying web page data and HTTP headers, controlling
152access, and removing ads and other obnoxious Internet junk. Privoxy has a
153flexible configuration and can be customized to suit individual needs and
154tastes. It has application for both stand-alone systems and multi-user
155networks.")
71794d7b 156 (license license:gpl2+)))
b8ea5204
EF
157
158(define-public onionshare
159 (package
160 (name "onionshare")
4afdb792 161 (version "2.1")
b8ea5204
EF
162 (source
163 (origin
d123b094
RW
164 (method git-fetch)
165 (uri (git-reference
166 (url "https://github.com/micahflee/onionshare.git")
167 (commit (string-append "v" version))))
168 (file-name (git-file-name name version))
b8ea5204 169 (sha256
4afdb792 170 (base32 "1lx21p12888qnbhsyin4lrnn4xizb39ldk77r71y53hn8mfxi54z"))))
b8ea5204
EF
171 (build-system python-build-system)
172 (arguments
173 `(#:phases
174 (modify-phases %standard-phases
175 (add-after 'unpack 'fix-install-path
176 (lambda* (#:key outputs #:allow-other-keys)
177 (let* ((out (assoc-ref outputs "out"))
178 (onionshare (string-append out "/share/onionshare")))
b2fb40de 179 (substitute* '("setup.py" "onionshare/common.py")
e5a12fba
EF
180 (("sys.prefix,") (string-append "'" out "',")))
181 (substitute* "setup.py"
b6dc6aca 182 ;; For the nautilus plugin.
e5a12fba 183 (("/usr/share/nautilus") "share/nautilus"))
b2fb40de
EB
184 (substitute* "install/onionshare.desktop"
185 (("/usr") out))
186 #t)))
b8ea5204 187 (delete 'check)
4afdb792 188 (add-before 'strip 'check
b8ea5204 189 ;; After all the patching we run the tests after installing.
68e7632d 190 (lambda _
4afdb792
EB
191 (setenv "HOME" "/tmp") ; Some tests need a writable homedir
192 (invoke "pytest" "tests/")
68e7632d 193 #t)))))
b8ea5204 194 (native-inputs
b2fb40de 195 `(("python-pytest" ,python-pytest)))
b8ea5204 196 (inputs
4afdb792
EB
197 `(("python-pycrypto" ,python-pycrypto)
198 ("python-flask" ,python-flask)
b8ea5204
EF
199 ("python-nautilus" ,python-nautilus)
200 ("python-sip" ,python-sip)
201 ("python-stem" ,python-stem)
4afdb792 202 ("python-pysocks" ,python-pysocks)
b8ea5204
EF
203 ("python-pyqt" ,python-pyqt)))
204 (home-page "https://onionshare.org/")
205 (synopsis "Securely and anonymously share files")
206 (description "OnionShare lets you securely and anonymously share files of
207any size. It works by starting a web server, making it accessible as a Tor
208hidden service, and generating an unguessable URL to access and download the
209files. It doesn't require setting up a server on the internet somewhere or
210using a third party filesharing service. You host the file on your own computer
211and use a Tor hidden service to make it temporarily accessible over the
212internet. The other user just needs to use Tor Browser to download the file
213from you.")
4afdb792 214 (license license:gpl3+)))
61ac7544
TGR
215
216(define-public nyx
18ab54d4
TGR
217 (package
218 (name "nyx")
ab1019f1 219 (version "2.1.0")
18ab54d4
TGR
220 (source
221 (origin
222 (method url-fetch)
223 (uri (pypi-uri name version))
224 (sha256
225 (base32
ab1019f1 226 "02rrlllz2ci6i6cs3iddyfns7ang9a54jrlygd2jw1f9s6418ll8"))))
18ab54d4
TGR
227 (build-system python-build-system)
228 (inputs
229 `(("python-stem" ,python-stem)))
230 (arguments
231 `(#:phases
232 (modify-phases %standard-phases
233 (add-after 'install 'install-man-page
234 (lambda* (#:key outputs #:allow-other-keys)
235 (let* ((out (assoc-ref outputs "out"))
236 (man (string-append out "/share/man")))
237 (install-file "nyx.1" (string-append man "/man1"))
238 #t)))
239 (add-after 'install 'install-sample-configuration
240 (lambda* (#:key outputs #:allow-other-keys)
241 (let* ((out (assoc-ref outputs "out"))
242 (doc (string-append out "/share/doc/" ,name "-" ,version)))
243 (install-file "web/nyxrc.sample" doc)
244 #t))))
245 ;; XXX The tests seem to require more of a real terminal than the build
246 ;; environment provides:
247 ;; _curses.error: setupterm: could not find terminal
248 ;; With TERM=linux, the tests try to move the cursor and still fail:
249 ;; _curses.error: cbreak() returned ERR
250 #:tests? #f))
251 (home-page "https://nyx.torproject.org/")
252 (synopsis "Tor relay status monitor")
253 (description
254 "Nyx monitors the performance of relays participating in the
61ac7544
TGR
255@uref{https://www.torproject.org/, Tor anonymity network}. It displays this
256information visually and in real time, using a curses-based terminal interface.
257This makes Nyx well-suited for remote shell connections and servers without a
258graphical display. It's like @command{top} for Tor, providing detailed
259statistics and status reports on:
260
261@enumerate
262@item connections (with IP address, hostname, fingerprint, and consensus data),
263@item bandwidth, processor, and memory usage,
264@item the relay's current configuration,
265@item logged events,
266@item and much more.
267@end enumerate
268
269Potential client and exit connections are scrubbed of sensitive information.")
18ab54d4 270 (license license:gpl3+)))