guix/gnu/packages/tor.scm

486 lines
20 KiB
Scheme
Raw Normal View History

;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013, 2014, 2015, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2016-2018, 2020-2023 Efraim Flashner <efraim@flashner.co.il>
mailmap: Update entries for Nikita. * .mailmap: change email and name for Nikita. * Makefile.am, doc/guix.texi, etc/completion/fish/guix.fish, gnu/packages/accessibility.scm, gnu/packages/admin.scm, gnu/packages/audio.scm, gnu/packages/autotools.scm, gnu/packages/cdrom.scm, gnu/packages/check.scm, gnu/packages/cinnamon.scm, gnu/packages/compression.scm, gnu/packages/crypto.scm, gnu/packages/databases.scm, gnu/packages/django.scm, gnu/packages/dns.scm, gnu/packages/elixir.scm, gnu/packages/emacs-xyz.scm, gnu/packages/emacs.scm, gnu/packages/enlightenment.scm, gnu/packages/erlang.scm, gnu/packages/fonts.scm, gnu/packages/fontutils.scm, gnu/packages/forth.scm, gnu/packages/fvwm.scm, gnu/packages/games.scm, gnu/packages/gl.scm, gnu/packages/gnome.scm, gnu/packages/gnunet.scm, gnu/packages/gnupg.scm, gnu/packages/gtk.scm, gnu/packages/guile-wm.scm, gnu/packages/guile-xyz.scm, gnu/packages/haskell-apps.scm, gnu/packages/haskell-check.scm, gnu/packages/haskell-crypto.scm, gnu/packages/haskell-xyz.scm, gnu/packages/haskell.scm, gnu/packages/image-viewers.scm, gnu/packages/image.scm, gnu/packages/irc.scm, gnu/packages/language.scm, gnu/packages/libcanberra.scm, gnu/packages/linux.scm, gnu/packages/lisp-xyz.scm, gnu/packages/lisp.scm, gnu/packages/lolcode.scm, gnu/packages/lxde.scm, gnu/packages/lxqt.scm, gnu/packages/mail.scm, gnu/packages/markup.scm, gnu/packages/mate.scm, gnu/packages/maths.scm, gnu/packages/mc.scm, gnu/packages/messaging.scm, gnu/packages/music.scm, gnu/packages/ncurses.scm, gnu/packages/networking.scm, gnu/packages/nickle.scm, gnu/packages/openbox.scm, gnu/packages/pdf.scm, gnu/packages/perl-check.scm, gnu/packages/perl.scm, gnu/packages/python-compression.scm, gnu/packages/python-crypto.scm, gnu/packages/python-web.scm, gnu/packages/python-xyz.scm, gnu/packages/python.scm, gnu/packages/qt.scm, gnu/packages/ruby.scm, gnu/packages/rust.scm, gnu/packages/scheme.scm, gnu/packages/serialization.scm, gnu/packages/shells.scm, gnu/packages/ssh.scm, gnu/packages/suckless.scm, gnu/packages/tbb.scm, gnu/packages/telephony.scm, gnu/packages/text-editors.scm, gnu/packages/textutils.scm, gnu/packages/time.scm, gnu/packages/tls.scm, gnu/packages/tor.scm, gnu/packages/version-control.scm, gnu/packages/video.scm, gnu/packages/vim.scm, gnu/packages/web.scm, gnu/packages/wm.scm, gnu/packages/xdisorg.scm, gnu/packages/xfce.scm, gnu/packages/xml.scm, gnu/packages/xorg.scm, gnu/services/certbot.scm, gnu/services/desktop.scm, gnu/services/version-control.scm, gnu/services/web.scm, guix/import/hackage.scm, guix/licenses.scm: Likewise. Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
2020-05-11 07:05:45 -04:00
;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
;;; Copyright © 20172021 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2017, 2018, 2019, 2021, 2023 Eric Bavier <bavier@posteo.net>
;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
;;; Copyright © 2018, 2022 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 © 2021-2023 Danial Behzadi <dani.behzi@ubuntu.com>
;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2022 Jim Newsome <jnewsome@torproject.org>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu packages tor)
#:use-module (guix gexp)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix utils)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix build-system gnu)
#:use-module (guix build-system python)
#:use-module (guix build-system pyproject)
#:use-module (gnu packages)
#:use-module (gnu packages base)
#:use-module (gnu packages libevent)
#:use-module (gnu packages linux)
gnu: Move testing packages from python.scm to check.scm. * gnu/packages/python.scm (python-behave-web-api, python2-behave-web-api, python-mock, python2-mock, python-mock-2, python-nose, python2-nose, python-nose2, python2-nose2, python-unittest2, python2-unittest2, python-pytest, python2-pytest, python-pytest-3.0, python2-pytest-3.0, python-pytest-cov, python2-pytest-cov, python-pytest-runner, python2-pytest-runner, python-pytest-mock, python2-pytest-mock, python-pytest-xdist, python2-pytest-xdist, python-scripttest, python2-scripttest, python-testtools, python2-testtools, python-testscenarios, python2-testscenarios, python-testresources, python2-testresources, python-subunit, python2-subunit, python-fixtures, python2-fixtures, python-testrepository, python2-testrepository, python-coverage, python2-coverage, python-cov-core, python2-cov-core, python-testpath, python2-testpath, python-testlib, python2-testlib, python-pytest-cache, python2-pytest-cache, python-pytest-localserver, python-pytest-xprocess, python-pytest-subtesthack, python2-pytest-subtesthack, python-hypothesis, python2-hypothesis, python-lit, python2-lit, python-pytest-pep8, python2-pytest-pep8, python-pytest-flakes, python2-pytest-flakes, python2-coverage-test-runner, python-pylint, python2-pylint, python-paramunittest, python2-python-paramunittest, python-pytest-warnings, python2-pytest-warnings, python-pytest-capturelog, python2-pytest-capturelog, python-pytest-catchlog, python2-pytest-catchlog, python-nosexcover, python2-nosexcover, python-discover, python2-discover, behave, python-rednose, python2-rednose, python-nose-randomly, python2-nose-randomly, python-nose-timer, python2-nose-timer): Move from here... * gnu/packages/check.scm: ...to here. * gnu/packages/admin.scm, gnu/packages/android.scm, gnu/packages/backup.scm, gnu/packages/bioinformatics.scm, gnu/packages/calendar.scm, gnu/packages/dav.scm, gnu/packages/django.scm, gnu/packages/freedesktop.scm, gnu/packages/haskell.scm, gnu/packages/image.scm, gnu/packages/irc.scm, gnu/packages/jrnl.scm, gnu/packages/ldc.scm, gnu/packages/libffi.scm, gnu/packages/mail.scm, gnu/packages/mpd.scm, gnu/packages/openstack.scm, gnu/packages/package-management.scm, gnu/packages/password-utils.scm, gnu/packages/python-crypto.scm, gnu/packages/python-web.scm, gnu/packages/rdf.scm, gnu/packages/statistics.scm, gnu/packages/storage.scm, gnu/packages/time.scm, gnu/packages/tls.scm, gnu/packages/tor.scm, gnu/packages/tryton.scm: Adjust accordingly.
2017-11-17 15:42:23 -05:00
#:use-module (gnu packages check)
#:use-module (gnu packages compression)
#:use-module (gnu packages pcre)
#:use-module (gnu packages freedesktop)
#:use-module (gnu packages glib)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
#:use-module (gnu packages python-check)
#:use-module (gnu packages python-crypto)
gnu: Move web packages from python to python-web. This is in part to address <https://bugs.gnu.org/27284>. * gnu/packages/python.scm (python-httplib2, python2-httplib2) (python-sockjs-tornado, python2-sockjs-tornado) (python-flask-babel, python2-flask-babel) (python-html5lib, python2-html5lib) (python-html5lib-0.9, python2-html5lib-0.9) (python-html5-parser, python2-html5-parser) (python-webencodings, python2-webencodings) (python-openid, python2-openid, python-cssutils, python2-cssutils) (python-cssselect, python2-cssutils) (python-openid-cla, python2-openid-cla) (python-openid-teams, python2-openid-teams) (python-tornado, python2-tornado) (python-tornado-http-auth, python-terminado, python2-terminado) (python-webob, python2-webob, python-zope-event, python2-zope-event) (python-zope-interface, python2-zope-interface) (python-zope-exceptions, python2-zope-exceptions) (python-zope-testing, python2-zope-testing) (python-zope-testrunner, python2-zope-testrunner) (python-zope-i18nmessageid, python2-zope-i18nmessageid) (python-zope-schema, python2-zope-schema) (python-zope-configuration, python2-zope-configuration) (python-zope-proxy, python2-zope-proxy) (python-zope-location, python2-zope-location) (python-zope-security, python2-zope-security) (python-zope-component, python2-zope-component) (python-ndg-httpsclient, python2-ndg-httpsclient) (python-websocket-client, python2-websocket-client) (python-requests-toolbelt, python2-requests-toolbelt) (python-rauth, python2-rauth, python-urllib3, python2-urllib3) (awscli, python-wsgiproxy2, python2-wsgiproxy2) (python-pastedeploy, python2-pastedeploy) (python-webtest, python2-webtest, python-flask, python2-flask) (python-flast-wtf, python2-flask-wtf) (python-flask-multistatic, python2-flask-multistatic) (python-cookies, python2-cookies) (python-responses, python2-responses) (python-geventhttpclient, python2-geventhttpclient) (python-requests-oauthlib, python2-requests-oauthlib) (python-url, python2-url, python-cachecontrol, python2-cachecontrol) (python-betamax, python2-betamax) (python-betamax-matchers, python2-betamax-matchers) (python-s3transfer, python2-s3transfer) (python-flask-restful, python-flask-basicauth) (python-flask-sqlalchemy, python-flask-restplus) (python-flask-restful-swagger, python-htmlmin, python2-htmlmin) (python-flask-htmlmin, python2-flask-htmlmin) (python-flask-login, python2-flask-login) (python-oauth2client, python-flask-oidc) (python-webassets, python-cssmin, python2-cssmin) (python-elasticsearch, python2-elasticsearch) (python-flask-script, python2-flask-script) (python-flask-migrate, python2-flask-migrate) (python-genshi, python2-genshi) (python-flask-principal, python2-flask-principal) (python-flask-httpauth, python2-flask-httpauth) (python-uritemplate, python2-uritemplate): Move to... * gnu/packages/python-web.scm: ... here. New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. * gnu/packages/admin.scm, gnu/packages/backup.scm, gnu/packages/dav.scm, gnu/packages/django.scm, gnu/packages/docker.scm, gnu/packages/ebook.scm, gnu/packages/logging.scm, gnu/packages/mail.scm, gnu/packages/music.scm, gnu/packages/openstack.scm, gnu/packages/package-management.scm, gnu/packages/rdf.scm, gnu/packages/tls.scm, gnu/packages/tor.scm, gnu/packages/tryton.scm, gnu/packages/version-control.scm, gnu/packages/web-browsers.scm, gnu/packages/web.scm: Adjust accordingly.
2017-11-13 17:24:11 -05:00
#:use-module (gnu packages python-web)
gnu: Separate Python core packages from the rest. * gnu/packages/python.scm: Move hundreds of package definitions from here... * gnu/packages/python-xyz.scm: ...to this new module. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. * gnu/packages/ada.scm, gnu/packages/admin.scm, gnu/packages/android.scm, gnu/packages/audio.scm, gnu/packages/backup.scm, gnu/packages/benchmark.scm, gnu/packages/bioinformatics.scm, gnu/packages/bittorrent.scm, gnu/packages/calendar.scm, gnu/packages/check.scm, gnu/packages/chemistry.scm, gnu/packages/cluster.scm, gnu/packages/compression.scm, gnu/packages/connman.scm, gnu/packages/crypto.scm, gnu/packages/cups.scm, gnu/packages/databases.scm, gnu/packages/dav.scm, gnu/packages/direct-connect.scm, gnu/packages/disk.scm, gnu/packages/django.scm, gnu/packages/dlang.scm, gnu/packages/docker.scm, gnu/packages/ebook.scm, gnu/packages/elf.scm, gnu/packages/emacs.scm, gnu/packages/emulators.scm, gnu/packages/engineering.scm, gnu/packages/enlightenment.scm, gnu/packages/finance.scm, gnu/packages/fltk.scm, gnu/packages/fontutils.scm, gnu/packages/freedesktop.scm, gnu/packages/game-development.scm, gnu/packages/games.scm, gnu/packages/geo.scm, gnu/packages/gl.scm, gnu/packages/glib.scm, gnu/packages/gnome.scm, gnu/packages/gnupg.scm, gnu/packages/gnuzilla.scm, gnu/packages/graph.scm, gnu/packages/graphics.scm, gnu/packages/graphviz.scm, gnu/packages/gtk.scm, gnu/packages/ham-radio.scm, gnu/packages/image-processing.scm, gnu/packages/image-viewers.scm, gnu/packages/image.scm, gnu/packages/irc.scm, gnu/packages/jrnl.scm, gnu/packages/julia.scm, gnu/packages/kde-frameworks.scm, gnu/packages/key-mon.scm, gnu/packages/libffi.scm, gnu/packages/libreoffice.scm, gnu/packages/libusb.scm, gnu/packages/lirc.scm, gnu/packages/logging.scm, gnu/packages/machine-learning.scm, gnu/packages/mail.scm, gnu/packages/mate.scm, gnu/packages/maths.scm, gnu/packages/medical.scm, gnu/packages/messaging.scm, gnu/packages/monitoring.scm, gnu/packages/mp3.scm, gnu/packages/mpd.scm, gnu/packages/music.scm, gnu/packages/networking.scm, gnu/packages/nutrition.scm, gnu/packages/openldap.scm, gnu/packages/openstack.scm, gnu/packages/package-management.scm, gnu/packages/password-utils.scm, gnu/packages/patchutils.scm, gnu/packages/pdf.scm, gnu/packages/photo.scm, gnu/packages/polkit.scm, gnu/packages/protobuf.scm, gnu/packages/python-crypto.scm, gnu/packages/python-web.scm, gnu/packages/qt.scm, gnu/packages/rdf.scm, gnu/packages/ruby.scm, gnu/packages/search.scm, gnu/packages/selinux.scm, gnu/packages/serialization.scm, gnu/packages/shells.scm, gnu/packages/simulation.scm, gnu/packages/ssh.scm, gnu/packages/statistics.scm, gnu/packages/storage.scm, gnu/packages/sync.scm, gnu/packages/terminals.scm, gnu/packages/textutils.scm, gnu/packages/time.scm, gnu/packages/tls.scm, gnu/packages/tor.scm, gnu/packages/tryton.scm, gnu/packages/version-control.scm, gnu/packages/video.scm, gnu/packages/virtualization.scm, gnu/packages/vpn.scm, gnu/packages/web-browsers.scm, gnu/packages/web.scm, gnu/packages/wicd.scm, gnu/packages/xdisorg.scm, gnu/packages/xorg.scm: Update module references.
2019-01-15 08:21:30 -05:00
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages qt)
#:use-module (gnu packages autotools)
#:use-module (gnu packages tls)
#:use-module (gnu packages w3m)
#:use-module (gnu packages xorg))
(define-public tor
(package
(name "tor")
(version "0.4.8.10")
(source (origin
(method url-fetch)
(uri (string-append "https://dist.torproject.org/tor-"
version ".tar.gz"))
(sha256
(base32
"11is8rwa3654kv2z425chmv9ynip64lwy8svf4klgnqfnzxb8a76"))))
(build-system gnu-build-system)
(arguments
(list #:configure-flags
#~(list "--enable-gpl"
"--enable-lzma"
"--enable-zstd")
#:phases
#~(modify-phases %standard-phases
(add-before 'build 'adjust-torify
(lambda* (#:key inputs #:allow-other-keys)
;; Record in 'torify' the absolute file name of 'torsocks'.
(let ((torsocks (search-input-file
inputs "/bin/torsocks")))
(substitute* "contrib/client-tools/torify"
(("pathfind torsocks")
"true")
(("exec torsocks")
(string-append "exec " torsocks))))))
(add-before 'check 'skip-practracker
;; This is a style linter. It doesn't get to throw fatal errors.
(lambda _
(setenv "TOR_DISABLE_PRACTRACKER" "set")))
#$@(if (or (target-x86-64?)
(target-x86-32?))
'()
;; Work around upstream issues relating to libseccomp,
;; sandboxing and glibc-2.33. This is similar to the issue
;; the tor-sandbox-i686 patch fixes but for other architectures.
;; https://gitlab.torproject.org/tpo/core/tor/-/issues/40381
;; https://gitlab.torproject.org/tpo/core/tor/-/issues/40599
;; https://gitlab.torproject.org/tpo/core/tor/-/merge_requests/446
`((add-before 'check 'adjust-test-suite
(lambda _
(substitute* "src/test/test_include.sh"
((".*Sandbox 1.*") ""))
(substitute* "src/test/test.c"
((".*sandbox_tests.*") "")))))))))
(native-inputs
(list pkg-config python)) ; for tests
(inputs
(list libevent
libseccomp
openssl
torsocks
xz
zlib
`(,zstd "lib")))
(home-page "https://www.torproject.org/")
(synopsis "Anonymous network router to improve privacy on the Internet")
(description
"Tor protects you by bouncing your communications around a distributed
network of relays run by volunteers all around the world: it prevents
somebody watching your Internet connection from learning what sites you
visit, and it prevents the sites you visit from learning your physical
gnu: Some cleanup based on lint checkers. * gnu/packages/admin.scm, gnu/packages/aidc.scm, gnu/packages/algebra.scm, gnu/packages/apr.scm, gnu/packages/avahi.scm, gnu/packages/backup.scm, gnu/packages/base.scm, gnu/packages/calcurse.scm, gnu/packages/cdrom.scm, gnu/packages/check.scm, gnu/packages/compression.scm, gnu/packages/cook.scm, gnu/packages/crypto.scm, gnu/packages/cryptsetup.scm, gnu/packages/curl.scm, gnu/packages/cyrus-sasl.scm, gnu/packages/databases.scm, gnu/packages/doxygen.scm, gnu/packages/dwm.scm, gnu/packages/elf.scm, gnu/packages/emacs.scm, gnu/packages/feh.scm, gnu/packages/file.scm, gnu/packages/fish.scm, gnu/packages/flex.scm, gnu/packages/fltk.scm, gnu/packages/fontutils.scm, gnu/packages/games.scm, gnu/packages/gcal.scm, gnu/packages/gcc.scm, gnu/packages/geeqie.scm, gnu/packages/ghostscript.scm, gnu/packages/gimp.scm, gnu/packages/gl.scm, gnu/packages/glib.scm, gnu/packages/gnome.scm, gnu/packages/gnunet.scm, gnu/packages/gnupg.scm, gnu/packages/gperf.scm, gnu/packages/grub.scm, gnu/packages/gsasl.scm, gnu/packages/gtk.scm, gnu/packages/guile-wm.scm, gnu/packages/guile.scm, gnu/packages/hurd.scm, gnu/packages/icu4c.scm, gnu/packages/image.scm, gnu/packages/imagemagick.scm, gnu/packages/irssi.scm, gnu/packages/kde.scm, gnu/packages/libdaemon.scm, gnu/packages/libevent.scm, gnu/packages/libidn.scm, gnu/packages/libusb.scm, gnu/packages/linux.scm, gnu/packages/lout.scm, gnu/packages/lsh.scm, gnu/packages/lsof.scm, gnu/packages/lua.scm, gnu/packages/maths.scm, gnu/packages/mcrypt.scm, gnu/packages/mp3.scm, gnu/packages/netpbm.scm, gnu/packages/noweb.scm, gnu/packages/ocaml.scm, gnu/packages/openssl.scm, gnu/packages/pcre.scm, gnu/packages/pdf.scm, gnu/packages/pkg-config.scm, gnu/packages/pretty-print.scm, gnu/packages/python.scm, gnu/packages/qt.scm, gnu/packages/rsync.scm, gnu/packages/scheme.scm, gnu/packages/scrot.scm, gnu/packages/sdl.scm, gnu/packages/skribilo.scm, gnu/packages/ssh.scm, gnu/packages/stalonetray.scm, gnu/packages/tcl.scm, gnu/packages/tcsh.scm, gnu/packages/telephony.scm, gnu/packages/texlive.scm, gnu/packages/tor.scm, gnu/packages/valgrind.scm, gnu/packages/version-control.scm, gnu/packages/vim.scm, gnu/packages/vpn.scm, gnu/packages/w3m.scm, gnu/packages/web.scm, gnu/packages/wordnet.scm, gnu/packages/xiph.scm, gnu/packages/xml.scm, gnu/packages/xorg.scm, gnu/packages/zile.scm, gnu/packages/zip.scm, gnu/packages/zsh.scm [synopsis, description]: Adjust according to lint checkers. * gnu/packages/fltk.scm (fltk)[source]: Wrap long line in uri. * /gnu/packages/xiph.scm (libogg, libtheora, vorbis-tools)[source]: Same.
2014-10-24 00:46:59 -04:00
location. Tor works with many of your existing applications, including
web browsers, instant messaging clients, remote login, and other
applications based on the TCP protocol.
This package is the full featured @code{tor} which is needed for running
relays, bridges or directory authorities. If you just want to access the Tor
network or to setup an onion service you may install @code{tor-client}
instead.")
(license license:bsd-3)))
(define-public tor-client
(package
(inherit tor)
(name "tor-client")
(arguments
(substitute-keyword-arguments (package-arguments tor)
((#:configure-flags flags #~'())
#~(append #$flags
(list "--disable-module-relay")))))
(synopsis "Client to the anonymous Tor network")
(description
"Tor protects you by bouncing your communications around a distributed
network of relays run by volunteers all around the world: it prevents
somebody watching your Internet connection from learning what sites you
visit, and it prevents the sites you visit from learning your physical
location. Tor works with many of your existing applications, including
web browsers, instant messaging clients, remote login, and other
applications based on the TCP protocol.
To @code{torify} applications (to take measures to ensure that an application,
which has not been designed for use with Tor such as ssh, will use only Tor for
internet connectivity, and also ensures that there are no leaks from DNS, UDP or
the application layer) you need to install @code{torsocks}.
This package only provides a client to the Tor Network.")))
(define-public torsocks
(package
(name "torsocks")
(version "2.4.0")
(source
(origin
(method url-fetch)
(uri (string-append
"https://gitlab.torproject.org/tpo/core/torsocks/-/archive/v"
version "/torsocks-v" version ".tar.bz2"))
(sha256
(base32
"1a7k3njdhp7dz603knhisna1zvxw35j3g213p6dvczv9bcjy7cjl"))))
(build-system gnu-build-system)
(inputs
(list libcap))
(native-inputs
(list autoconf automake libtool))
(arguments
`(#:phases
(modify-phases %standard-phases
(add-after 'build 'absolutize
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "src/bin/torsocks"
(("getcap=.*")
(string-append "getcap=" (which "getcap") "\n"))))))))
(home-page "https://www.torproject.org/")
gnu: Fix various lint issues in synopsis and descriptions. * gnu/packages/android.scm (etc1tool)[synopsis]: Drop trailing period. * gnu/packages/bioinformatics.scm (mudskipper)[synopsis]: Likewise. * gnu/packages/crates-io.scm (rust-async-log-attributes-1)[synopsis]: Likewise. (rust-atomic-polyfill-1)[synopsis]: Likewise. (rust-modifier-0.1)[synopsis]: Likewise. (rust-openssl-macros-0.1)[synopsis]: Likewise. (rust-syn-mid-0.5)[synopsis]: Likewise. (rust-toml-edit-0.14)[synopsis]: Likewise. (rust-valuable-derive-0.1)[synopsis]: Likewise. (rust-inflections-1)[synopsis]: Likewise. * gnu/packages/databases.scm (python-databases)[synopsis]: Likewise. * gnu/packages/games.scm (liquidwar6)[synopsis]: Likewise. * gnu/packages/golang.scm (go-golang.org-x-sync-errgroup)[synopsis]: Likewise. * gnu/packages/guile-xyz.scm (guile-config)[synopsis]: Likewise. * gnu/packages/haskell-web.scm (ghc-hxt-xpath)[synopsis]: Likewise. * gnu/packages/haskell-xyz.scm (ghc-string-qq)[synopsis]: Likewise. * gnu/packages/machine-learning.scm (python-lap)[synopsis]: Likewise. (python-pyro-api)[synopsis]: Likewise. * gnu/packages/messaging.scm (python-librecaptcha)[synopsis]: Likewise. * gnu/packages/python-check.scm (python-pytest-cram)[synopsis]: Likewise. * gnu/packages/python-web.scm (python-jschema-to-python)[synopsis]: Likewise. (python-sarif-om)[synopsis]: Likewise. (python-socksio)[synopsis]: Likewise. (python-msrest)[synopsis]: Likewise. * gnu/packages/tor.scm (torsocks)[synopsis]: Likewise. * gnu/packages/cran.scm (r-rlist)[synopsis]: Remove leading article. * gnu/packages/crates-io.scm (rust-clippy-lints-0.0.153)[synopsis]: Likewise. (rust-simplelog-0.11)[synopsis]: Likewise. * gnu/packages/samba.scm (wsdd)[synopsis]: Likewise. * gnu/packages/crates-io.scm (rust-spki-0.4)[synopsis]: Remove trailing whitespace. * gnu/packages/golang.scm (go-github-com-mattn-go-zglob)[description]: Remove leading whitespace. * gnu/packages/haskell-check.scm (ghc-crypto-cipher-tests)[description]: Likewise. * gnu/packages/lisp-xyz.scm (sbcl-ctype)[synopsis]: Remove trailing whitespace. * gnu/packages/mpi.scm (openmpi-thread-multiple)[description]: Remove leading whitespace. * gnu/packages/node-xyz.scm (node-string-decoder)[synopsis]: Remove trailing whitespace.
2022-10-31 20:08:32 -04:00
(synopsis "Transparently route an application's traffic through Tor")
(description
"Torsocks allows you to use most applications in a safe way with Tor. It
ensures that DNS requests are handled safely and explicitly rejects UDP
traffic from the application you're using.")
(properties
'((release-monitoring-url
. "https://gitlab.torproject.org/tpo/core/torsocks/-/tags")))
;; All the files explicitly say "version 2 only".
(license license:gpl2)))
(define-public privoxy
(package
(name "privoxy")
(version "3.0.34")
(source (origin
(method url-fetch)
(uri (string-append "mirror://sourceforge/ijbswa/Sources/"
version "%20%28stable%29/privoxy-"
version "-stable-src.tar.gz"))
(sha256
(base32
"0b2x7hm34fbqaxb46afpx6bnc3x76d753y2p8rmn2kkgcnhvrk76"))))
(build-system gnu-build-system)
(arguments
'(;; The default 'sysconfdir' is $out/etc; change that to
;; $out/etc/privoxy.
#:configure-flags (list (string-append "--sysconfdir="
(assoc-ref %outputs "out")
"/etc/privoxy")
"--localstatedir=/var"
"--with-brotli"
"--with-openssl")
#:tests? #f ; no test suite
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'patch-default-logging
(lambda _
(with-fluids ((%default-port-encoding "ISO-8859-1"))
;; Do not create /var/run nor /var/log/privoxy/logfile.
(substitute* "GNUmakefile.in"
(("(logfile \\|\\| exit )1" _ match)
(string-append match "0"))
(("(\\$\\(DESTDIR\\)\\$\\(SHARE_DEST\\)) \\\\" _ match)
match)
((".*\\$\\(LOG_DEST\\) \\$\\(DESTDIR\\)\\$\\(PID_DEST\\).*")
""))
;; Disable logging in the default configuration to allow for
;; non-root users using it as is.
(substitute* "config"
(("^logdir") "#logdir")
(("^logfile") "#logfile"))))))))
(inputs
(list brotli openssl pcre w3m zlib))
(native-inputs
(list autoconf automake))
(home-page "https://www.privoxy.org")
(synopsis "Web proxy with advanced filtering capabilities for enhancing privacy")
(description
"Privoxy is a non-caching web proxy with advanced filtering capabilities
for enhancing privacy, modifying web page data and HTTP headers, controlling
access, and removing ads and other obnoxious Internet junk. Privoxy has a
flexible configuration and can be customized to suit individual needs and
tastes. It has application for both stand-alone systems and multi-user
networks.")
(license license:gpl2+)))
(define-public onionshare-cli
(package
(name "onionshare-cli")
(version "2.6")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/onionshare/onionshare")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32 "1bhrp019a0923h7dnfxhgvgvdp81blvnsbnvzy34hp827abxf3ic"))
(patches (search-patches "onionshare-cli-async-mode.patch"))))
(build-system python-build-system)
(native-inputs
(list python-pytest))
(inputs
;; TODO: obfs4proxy
(list python-click
python-colorama
python-eventlet
python-flask
python-flask-httpauth
python-flask-socketio
python-pynacl
python-psutil
python-pycryptodome
python-pysocks
python-requests
python-stem
python-unidecode
python-urllib3
tor))
(arguments
(list
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'bake-tor
(lambda* (#:key inputs #:allow-other-keys)
(substitute* (list "cli/onionshare_cli/common.py"
"desktop/onionshare/gui_common.py")
(("shutil\\.which\\(\\\"tor\\\"\\)")
(format #f "~s" (search-input-file inputs "bin/tor"))))
(substitute* "cli/tests/test_cli_common.py"
(("/usr/share/tor")
(search-input-directory inputs "share/tor")))))
(add-before 'build 'change-directory
(lambda _ (chdir "cli")))
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
(setenv "HOME" "/tmp")
;; Greendns is not needed for testing, and if eventlet tries to
;; load it, an OSError is thrown when getprotobyname is called.
;; Thankfully there is an environment variable to disable the
;; greendns import, so use it:
(setenv "EVENTLET_NO_GREENDNS" "yes")
(invoke "pytest" "-v" "./tests")))))))
(home-page "https://onionshare.org/")
(synopsis "Securely and anonymously share files")
(description "OnionShare lets you securely and anonymously share files,
host websites, and chat with friends using the Tor network.
This package contains @code{onionshare-cli}, a command-line interface to
OnionShare.")
;; Bundled, minified jquery and socket.io are expat licensed.
(license (list license:gpl3+ license:expat))))
(define-public onionshare
(package
(inherit onionshare-cli)
(name "onionshare")
(arguments
(substitute-keyword-arguments (package-arguments onionshare-cli)
((#:phases phases)
#~(modify-phases #$phases
(add-after 'unpack 'absolutize
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "desktop/onionshare/tab/mode/history.py"
(("Popen\\(\\[\"xdg-open\"")
(string-append "Popen([\"" (which "xdg-open") "\"")))))
(replace 'change-directory
(lambda _ (chdir "desktop/")))
(add-after 'install 'install-data
(lambda _
(install-file "org.onionshare.OnionShare.svg"
(string-append #$output
"/share/icons/hicolor/scalable/apps"))
(install-file "org.onionshare.OnionShare.desktop"
(string-append #$output
"/share/applications"))))
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
;; Remove multiline load-path adjustment, so that
;; onionshare-cli modules are loaded from input
(substitute* "tests/conftest.py"
(("\"cli\",")
"\"/nonexistent\""))
;; Avoid `getprotobyname` issues:
(setenv "EVENTLET_NO_GREENDNS" "yes")
;; Make Qt render "offscreen":
(setenv "QT_QPA_PLATFORM" "offscreen")
(setenv "HOME" "/tmp")
(apply invoke "xvfb-run" "pytest" "-vv"
(find-files "tests" "^test_gui.*\\.py$")))))))))
(native-inputs
(list python-pytest xvfb-run))
(inputs
;; The desktop client uses onionshare-cli like a python module. But
;; propagating onionshare-cli's inputs is not great, since a user would
;; not expect to have those installed when using onionshare-cli as a
;; standalone utility. So add onionshare-cli's inputs here.
(modify-inputs (package-inputs onionshare-cli)
(prepend onionshare-cli ;TODO: package obfs4proxy
python-shiboken-2
python-pyside-2
python-qrcode
xdg-utils)))
(description "OnionShare lets you securely and anonymously share files,
host websites, and chat with friends using the Tor network.")))
(define-public nyx
(package
(name "nyx")
(version "2.1.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri name version))
(sha256
(base32
"02rrlllz2ci6i6cs3iddyfns7ang9a54jrlygd2jw1f9s6418ll8"))))
(build-system python-build-system)
(inputs
(list python-stem))
(arguments
`(#:phases
(modify-phases %standard-phases
(add-after 'install 'install-man-page
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(man (string-append out "/share/man")))
(install-file "nyx.1" (string-append man "/man1"))
#t)))
(add-after 'install 'install-sample-configuration
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(doc (string-append out "/share/doc/" ,name "-" ,version)))
(install-file "web/nyxrc.sample" doc)
#t))))
;; XXX The tests seem to require more of a real terminal than the build
;; environment provides:
;; _curses.error: setupterm: could not find terminal
;; With TERM=linux, the tests try to move the cursor and still fail:
;; _curses.error: cbreak() returned ERR
#:tests? #f))
(home-page "https://nyx.torproject.org/")
(synopsis "Tor relay status monitor")
(description
"Nyx monitors the performance of relays participating in the
@uref{https://www.torproject.org/, Tor anonymity network}. It displays this
information visually and in real time, using a curses-based terminal interface.
This makes Nyx well-suited for remote shell connections and servers without a
graphical display. It's like @command{top} for Tor, providing detailed
statistics and status reports on:
@enumerate
@item connections (with IP address, hostname, fingerprint, and consensus data),
@item bandwidth, processor, and memory usage,
@item the relay's current configuration,
@item logged events,
@item and much more.
@end enumerate
Potential client and exit connections are scrubbed of sensitive information.")
(license license:gpl3+)))
(define-public tractor
(package
(name "tractor")
(version "4.1.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "traxtor" version))
(sha256
(base32
"1542g6alycwlmvndxcijzn4d5lgycmxxb78gqd8qwgm9kw0fnr3q"))))
(build-system pyproject-build-system)
(native-inputs
(list (list glib "bin"))) ; for glib-compile-schemas.
(inputs
(list python-fire
python-psutil
python-pygobject
python-requests
python-stem
python-termcolor))
(arguments
(list
#:tests? #f ; no test suite.
#:phases
#~(modify-phases %standard-phases
(add-after 'install 'install-man-page
(lambda _
(let ((man1 (string-append #$output "/share/man/man1")))
(install-file "tractor/man/tractor.1" man1))))
(add-after 'install 'install-bash-completion
(lambda _
(mkdir "bash-completion")
(rename-file "tractor/tractor-completion"
"bash-completion/tractor")
(let ((bash-completion
(string-append #$output "/share/bash-completion/completions")))
(install-file "bash-completion/tractor" bash-completion))))
(add-after 'install 'install-gschema
(lambda _
(let ((schemas (string-append #$output "/share/glib-2.0/schemas")))
(install-file "tractor/tractor.gschema.xml" schemas)))))))
(home-page "https://framagit.org/tractor")
(synopsis "Setup an onion routing proxy")
(description
"This package uses Python stem library to provide a connection through
the onion proxy and sets up proxy in user session, so you don't have to mess
up with TOR on your system anymore.")
(license license:gpl3+)))