gnu: Add pagekite.
[jackhill/guix/guix.git] / gnu / packages / networking.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2015, 2016, 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
4 ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
5 ;;; Copyright © 2015, 2016, 2017 Stefan Reichör <stefan@xsteve.at>
6 ;;; Copyright © 2016 Raimon Grau <raimonster@gmail.com>
7 ;;; Copyright © 2016, 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
8 ;;; Copyright © 2016 John Darrington <jmd@gnu.org>
9 ;;; Copyright © 2016, 2017, 2018, 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
10 ;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org>
11 ;;; Copyright © 2016, 2017 ng0 <ng0@n0.is>
12 ;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
13 ;;; Copyright © 2016 Benz Schenk <benz.schenk@uzh.ch>
14 ;;; Copyright © 2016, 2017 Pjotr Prins <pjotr.guix@thebird.nl>
15 ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
16 ;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
17 ;;; Copyright © 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
18 ;;; Copyright © 2017, 2018, 2019 Rutger Helling <rhelling@mykolab.com>
19 ;;; Copyright © 2017, 2019 Gábor Boskovits <boskovits@gmail.com>
20 ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
21 ;;; Copyright © 2018 Adam Van Ymeren <adam@vany.ca>
22 ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
23 ;;; Copyright © 2018 Tonton <tonton@riseup.net>
24 ;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
25 ;;; Copyright © 2018 Theodoros Foradis <theodoros@foradis.org>
26 ;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com>
27 ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
28 ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
29 ;;; Copyright © 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
30 ;;; Copyright © 2019 Vasile Dumitrascu <va511e@yahoo.com>
31 ;;; Copyright © 2019 Julien Lepiller <julien@lepiller.eu>
32 ;;; Copyright © 2019 Timotej Lazar <timotej.lazar@araneo.si>
33 ;;; Copyright © 2019 Brice Waegeneire <brice@waegenei.re>
34 ;;; Copyright © 2019 Tonton <tonton@riseup.net>
35 ;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
36 ;;;
37 ;;; This file is part of GNU Guix.
38 ;;;
39 ;;; GNU Guix is free software; you can redistribute it and/or modify it
40 ;;; under the terms of the GNU General Public License as published by
41 ;;; the Free Software Foundation; either version 3 of the License, or (at
42 ;;; your option) any later version.
43 ;;;
44 ;;; GNU Guix is distributed in the hope that it will be useful, but
45 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
46 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
47 ;;; GNU General Public License for more details.
48 ;;;
49 ;;; You should have received a copy of the GNU General Public License
50 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
51
52 (define-module (gnu packages networking)
53 #:use-module ((guix licenses) #:prefix license:)
54 #:use-module (guix packages)
55 #:use-module (guix download)
56 #:use-module (guix git-download)
57 #:use-module (guix build-system cmake)
58 #:use-module (guix build-system glib-or-gtk)
59 #:use-module (guix build-system gnu)
60 #:use-module (guix build-system go)
61 #:use-module (guix build-system perl)
62 #:use-module (guix build-system python)
63 #:use-module (gnu packages)
64 #:use-module (gnu packages admin)
65 #:use-module (gnu packages adns)
66 #:use-module (gnu packages algebra)
67 #:use-module (gnu packages audio)
68 #:use-module (gnu packages autotools)
69 #:use-module (gnu packages base)
70 #:use-module (gnu packages bison)
71 #:use-module (gnu packages boost)
72 #:use-module (gnu packages check)
73 #:use-module (gnu packages code)
74 #:use-module (gnu packages compression)
75 #:use-module (gnu packages crypto)
76 #:use-module (gnu packages curl)
77 #:use-module (gnu packages dejagnu)
78 #:use-module (gnu packages documentation)
79 #:use-module (gnu packages flex)
80 #:use-module (gnu packages gettext)
81 #:use-module (gnu packages glib)
82 #:use-module (gnu packages gnome)
83 #:use-module (gnu packages gnupg)
84 #:use-module (gnu packages gtk)
85 #:use-module (gnu packages image)
86 #:use-module (gnu packages libidn)
87 #:use-module (gnu packages linux)
88 #:use-module (gnu packages lua)
89 #:use-module (gnu packages multiprecision)
90 #:use-module (gnu packages kerberos)
91 #:use-module (gnu packages ncurses)
92 #:use-module (gnu packages nettle)
93 #:use-module (gnu packages password-utils)
94 #:use-module (gnu packages pcre)
95 #:use-module (gnu packages perl)
96 #:use-module (gnu packages perl-check)
97 #:use-module (gnu packages pkg-config)
98 #:use-module (gnu packages python)
99 #:use-module (gnu packages python-web)
100 #:use-module (gnu packages python-xyz)
101 #:use-module (gnu packages qt)
102 #:use-module (gnu packages readline)
103 #:use-module (gnu packages serialization)
104 #:use-module (gnu packages sqlite)
105 #:use-module (gnu packages ssh)
106 #:use-module (gnu packages textutils)
107 #:use-module (gnu packages tls)
108 #:use-module (gnu packages valgrind)
109 #:use-module (gnu packages web)
110 #:use-module (gnu packages wxwidgets)
111 #:use-module (gnu packages xml)
112 #:use-module (ice-9 match))
113
114 ;; The gnu.org ‘home’ for this GNU project is a directory listing with 1.6.0 as
115 ;; the latest version. The author's git repository, mentioned in the 1.6.0
116 ;; README and otherwise legit-looking, contains a proper 1.7.0 release tarball
117 ;; with many OUI updates. Use it, even though it's also several years old now.
118 (define-public macchanger
119 (package
120 (name "macchanger")
121 (version "1.7.0")
122 (source
123 (origin
124 (method url-fetch)
125 (uri (string-append "https://github.com/alobbs/macchanger/"
126 "releases/download/" version "/"
127 name "-" version ".tar.gz"))
128 (sha256
129 (base32 "1gs5m0jxyprdp00w2qkbnaqm3ilkjz0q1gqdg4nzdm8g4xy73qns"))))
130 (build-system gnu-build-system)
131 (home-page "https://www.gnu.org/software/macchanger/")
132 (synopsis "Viewing and manipulating MAC addresses of network interfaces")
133 (description "GNU MAC Changer is a utility for viewing and changing MAC
134 addresses of networking devices. New addresses may be set explicitly or
135 randomly. They can include MAC addresses of the same or other hardware vendors
136 or, more generally, MAC addresses of the same category of hardware.")
137 (license license:gpl2+)))
138
139 (define-public miredo
140 (package
141 (name "miredo")
142 (version "1.2.6")
143 (source (origin
144 (method url-fetch)
145 (uri (string-append "http://www.remlab.net/files/miredo/miredo-"
146 version ".tar.xz"))
147 (sha256
148 (base32
149 "0j9ilig570snbmj48230hf7ms8kvcwi2wblycqrmhh85lksd49ps"))))
150 (build-system gnu-build-system)
151 (arguments
152 '(#:phases
153 (modify-phases %standard-phases
154 ;; The checkconf test in src/ requires network access.
155 (add-before
156 'check 'disable-checkconf-test
157 (lambda _
158 (substitute* "src/Makefile"
159 (("^TESTS = .*") "TESTS = \n"))
160 #t)))))
161 (home-page "http://www.remlab.net/miredo/")
162 (synopsis "Teredo IPv6 tunneling software")
163 (description
164 "Miredo is an implementation (client, relay, server) of the Teredo
165 specification, which provides IPv6 Internet connectivity to IPv6 enabled hosts
166 residing in IPv4-only networks, even when they are behind a NAT device.")
167 (license license:gpl2+)))
168
169 (define-public socat
170 (package
171 (name "socat")
172 (version "1.7.3.3")
173 (source (origin
174 (method url-fetch)
175 (uri (string-append
176 "http://www.dest-unreach.org/socat/download/socat-"
177 version ".tar.bz2"))
178 (sha256
179 (base32
180 "0jnhjijyq74g3wa4ph0am83z6vq7qna7ac0xqjma8s4197z3zmhd"))))
181 (build-system gnu-build-system)
182 (arguments '(#:tests? #f)) ;no 'check' phase
183 (inputs `(("openssl" ,openssl)))
184 (home-page "http://www.dest-unreach.org/socat/")
185 (synopsis
186 "Open bidirectional communication channels from the command line")
187 (description
188 "socat is a relay for bidirectional data transfer between two independent
189 data channels---files, pipes, devices, sockets, etc. It can create
190 \"listening\" sockets, named pipes, and pseudo terminals.
191
192 socat can be used, for instance, as TCP port forwarder, as a shell interface
193 to UNIX sockets, IPv6 relay, for redirecting TCP oriented programs to a serial
194 line, to logically connect serial lines on different computers, or to
195 establish a relatively secure environment (su and chroot) for running client
196 or server shell scripts with network connections.")
197 (license license:gpl2)))
198
199 (define-public tcp-wrappers
200 (package
201 (name "tcp-wrappers")
202 (version "7.6")
203 (source (origin
204 (method url-fetch)
205 (uri (string-append
206 "ftp://ftp.porcupine.org/pub/security/tcp_wrappers_"
207 version ".tar.gz"))
208 (sha256
209 (base32
210 "0p9ilj4v96q32klavx0phw9va21fjp8vpk11nbh6v2ppxnnxfhwm"))))
211 (build-system gnu-build-system)
212 (arguments
213 `(#:phases
214 (modify-phases %standard-phases
215 (delete 'configure) ; there is no configure script
216 (delete 'check) ; there are no tests
217 (replace 'build
218 (lambda _
219 (chmod "." #o755)
220 ;; Upstream doesn't generate a shared library. So we have to do it.
221 (setenv "CC" "gcc -fno-builtin -fPIC")
222 (substitute* "Makefile"
223 (("^(all[^\n]*)" line) (string-append line " libwrap.so\n
224 libwrap.so: $(LIB_OBJ)\n
225 \tgcc -shared $^ -o $@\n")))
226 ;; Deal with some gcc breakage.
227 (substitute* "percent_m.c"
228 (("extern char .sys_errlist.*;") ""))
229 (substitute* "scaffold.c"
230 (("extern char .malloc.*;") ""))
231 ;; This, believe it or not, is the recommended way to build!
232 (invoke "make" "REAL_DAEMON_DIR=/etc" "linux")))
233 ;; There is no make install stage, so we have to do it ourselves.
234 (replace 'install
235 (lambda _
236 (let ((out (assoc-ref %outputs "out"))
237 (man-pages `("hosts_access.3"
238 "hosts_access.5"
239 "hosts_options.5"
240 "tcpd.8"
241 "tcpdchk.8"
242 "tcpdmatch.8"))
243 (libs `("libwrap.a"
244 "libwrap.so"))
245 (headers `("tcpd.h"))
246 (bins `("safe_finger"
247 "tcpd"
248 "tcpdchk"
249 "tcpdmatch"
250 "try-from")))
251 (for-each
252 (lambda (x)
253 (install-file x (string-append out "/include")))
254 headers)
255 (for-each
256 (lambda (x)
257 (install-file x (string-append out "/share/man/man"
258 (string-take-right x 1))))
259 man-pages)
260 (for-each
261 (lambda (x)
262 (install-file x (string-append out "/lib/")))
263 libs)
264 (for-each
265 (lambda (x)
266 (install-file x (string-append out "/bin/")))
267 bins))
268 #t)))))
269 (home-page "http://www.porcupine.org")
270 (synopsis "Monitor and filter incoming requests for network services")
271 (description "With this package you can monitor and filter incoming requests for
272 network services. It includes a library which may be used by daemons to
273 transparently check connection attempts against an access control list.")
274 (license (license:non-copyleft "file://DISCLAIMER"
275 "See the file DISCLAIMER in the distribution."))))
276
277
278 (define-public zeromq
279 (package
280 (name "zeromq")
281 (version "4.3.2")
282 (source (origin
283 (method url-fetch)
284 (uri (string-append "https://github.com/zeromq/libzmq/releases"
285 "/download/v" version "/zeromq-" version ".tar.gz"))
286 (sha256
287 (base32
288 "0qzp80ky4y2k7k1ya09v9gkivvfbz2km813snrb8jhnn634bbmzb"))))
289 (build-system gnu-build-system)
290 (home-page "https://zeromq.org")
291 (synopsis "Library for message-based applications")
292 (description
293 "The 0MQ lightweight messaging kernel is a library which extends the
294 standard socket interfaces with features traditionally provided by specialized
295 messaging middle-ware products. 0MQ sockets provide an abstraction of
296 asynchronous message queues, multiple messaging patterns, message
297 filtering (subscriptions), seamless access to multiple transport protocols and
298 more.")
299 (license license:lgpl3+)))
300
301 (define-public czmq
302 (package
303 (name "czmq")
304 (version "4.2.0")
305 (source (origin
306 (method url-fetch)
307 (uri (string-append
308 "https://github.com/zeromq/" name
309 "/releases/download/v" version
310 "/" name "-" version ".tar.gz"))
311 (sha256
312 (base32
313 "1szciz62sk3fm4ga9qjpxz0n0lazvphm32km95bq92ncng12kayg"))))
314 (build-system gnu-build-system)
315 (arguments
316 '(#:configure-flags '("--enable-drafts")
317 #:phases (modify-phases %standard-phases
318 (add-before 'check 'patch-tests
319 (lambda _
320 ;; XXX FIXME: Disable the zproc test, which fails on some
321 ;; hardware: <https://github.com/zeromq/czmq/issues/2007>.
322 (substitute* "src/czmq_selftest.c"
323 (("\\{ \"zproc\", zproc_test.*")
324 ""))
325 #t)))))
326 (inputs
327 `(("zeromq" ,zeromq)))
328 (home-page "http://zeromq.org")
329 (synopsis "High-level C bindings for ØMQ")
330 (description
331 "czmq provides bindings for the ØMQ core API that hides the differences
332 between different versions of ØMQ.")
333 (license license:mpl2.0)))
334
335 (define-public cppzmq
336 (let ((revision "0")
337 (commit "d9f0f016c07046742738c65e1eb84722ae32d7d4"))
338 (package
339 (name "cppzmq")
340 (version (string-append "4.2.2-" revision "."
341 (string-take commit 7)))
342 (source (origin
343 (method git-fetch)
344 (uri (git-reference
345 (url "https://github.com/zeromq/cppzmq")
346 (commit commit)))
347 (sha256
348 (base32
349 "1gmqlm00y6xpa5m6d4ajq3ww63n2w7h4sy997wj81vcqmqx45b1f"))
350 (file-name (string-append name "-" version "-checkout"))))
351 (build-system cmake-build-system)
352 (arguments '(#:tests? #f)) ; No tests.
353 (native-inputs
354 `(("pkg-config" ,pkg-config)))
355 (inputs
356 `(("zeromq" ,zeromq)))
357 (home-page "http://zeromq.org")
358 (synopsis "C++ bindings for the ØMQ messaging library")
359 (description
360 "This package provides header-only C++ bindings for ØMQ. The header
361 files contain direct mappings of the abstractions provided by the ØMQ C API.")
362 (license license:expat))))
363
364 (define-public librdkafka
365 (package
366 (name "librdkafka")
367 (version "0.9.1")
368 (source (origin
369 (method url-fetch)
370 (uri (string-append
371 "https://github.com/edenhill/librdkafka/archive/"
372 version ".tar.gz"))
373 (file-name (string-append name "-" version ".tar.gz"))
374 (sha256
375 (base32
376 "10ldx7g7ymmg17snzx78vy4n8ma1rjx0agzi34g15j2fk867xmas"))))
377 (build-system gnu-build-system)
378 (arguments
379 '(#:phases
380 (modify-phases %standard-phases
381 (replace 'configure
382 ;; its custom configure script doesn't understand 'CONFIG_SHELL'.
383 (lambda* (#:key outputs #:allow-other-keys)
384 (let ((out (assoc-ref outputs "out")))
385 ;; librdkafka++.so lacks RUNPATH for librdkafka.so
386 (setenv "LDFLAGS"
387 (string-append "-Wl,-rpath=" out "/lib"))
388 (invoke "./configure"
389 (string-append "--prefix=" out))))))))
390 (native-inputs
391 `(("python" ,python-wrapper)))
392 (propagated-inputs
393 `(("zlib" ,zlib))) ; in the Libs.private field of rdkafka.pc
394 (home-page "https://github.com/edenhill/librdkafka")
395 (synopsis "Apache Kafka C/C++ client library")
396 (description
397 "librdkafka is a C library implementation of the Apache Kafka protocol,
398 containing both Producer and Consumer support.")
399 (license license:bsd-2)))
400
401 (define-public libndp
402 (package
403 (name "libndp")
404 (version "1.7")
405 (source (origin
406 (method url-fetch)
407 (uri (string-append "http://libndp.org/files/"
408 name "-" version ".tar.gz"))
409 (sha256
410 (base32
411 "1dlinhl39va00v55qygjc9ap77yqf7xvn4rwmvdr49xhzzxhlj1c"))))
412 (build-system gnu-build-system)
413 (home-page "http://libndp.org/")
414 (synopsis "Library for Neighbor Discovery Protocol")
415 (description
416 "libndp contains a library which provides a wrapper for IPv6 Neighbor
417 Discovery Protocol. It also provides a tool named ndptool for sending and
418 receiving NDP messages.")
419 (license license:lgpl2.1+)))
420
421 (define-public ethtool
422 (package
423 (name "ethtool")
424 (version "5.3")
425 (source (origin
426 (method url-fetch)
427 (uri (string-append "mirror://kernel.org/software/network/"
428 "ethtool/ethtool-" version ".tar.xz"))
429 (sha256
430 (base32
431 "1i14zrg4a84zjpwvqi8an0zx0hm06g614a79zc2syrkhrvdw1npk"))))
432 (build-system gnu-build-system)
433 (home-page "https://www.kernel.org/pub/software/network/ethtool/")
434 (synopsis "Display or change Ethernet device settings")
435 (description
436 "ethtool can be used to query and change settings such as speed,
437 auto-negotiation and checksum offload on many network devices, especially
438 Ethernet devices.")
439 (license license:gpl2)))
440
441 (define-public ifstatus
442 (package
443 (name "ifstatus")
444 (version "1.1.0")
445 (source (origin
446 (method url-fetch)
447 (uri (string-append "mirror://sourceforge/ifstatus/ifstatus/"
448 "ifstatus%20v" version "/ifstatus-v"
449 version ".tar.gz"))
450 (sha256
451 (base32
452 "045cbsq9ps32j24v8y5hpyqxnqn9mpaf3mgvirlhgpqyb9jsia0c"))
453 (modules '((guix build utils)))
454 (snippet
455 '(begin
456 (substitute* "Main.h"
457 (("#include <stdio.h>")
458 "#include <stdio.h>\n#include <stdlib.h>"))
459 #t))))
460 (build-system gnu-build-system)
461 (arguments
462 '(#:tests? #f ; no "check" target
463 #:phases
464 (modify-phases %standard-phases
465 (delete 'configure) ; no configure script
466 (replace 'install
467 (lambda* (#:key outputs #:allow-other-keys)
468 (let* ((out (assoc-ref outputs "out"))
469 (bin (string-append out "/bin")))
470 (mkdir-p bin)
471 (copy-file "ifstatus"
472 (string-append bin "/ifstatus")))
473 #t)))))
474 (inputs `(("ncurses" ,ncurses)))
475 (home-page "http://ifstatus.sourceforge.net/graphic/index.html")
476 (synopsis "Text based network interface status monitor")
477 (description
478 "IFStatus is a simple, easy-to-use program for displaying commonly
479 needed/wanted real-time traffic statistics of multiple network
480 interfaces, with a simple and efficient view on the command line. It is
481 intended as a substitute for the PPPStatus and EthStatus projects.")
482 (license license:gpl2+)))
483
484 (define-public nload
485 (package
486 (name "nload")
487 (version "0.7.4")
488 (source (origin
489 (method url-fetch)
490 (uri (string-append "mirror://sourceforge/nload/nload/" version
491 "/nload-" version ".tar.gz"))
492 (sha256
493 (base32
494 "1rb9skch2kgqzigf19x8bzk211jdfjfdkrcvaqyj89jy2pkm3h61"))))
495 (build-system gnu-build-system)
496 (inputs `(("ncurses" ,ncurses)))
497 (home-page "http://www.roland-riegel.de/nload/")
498 (synopsis "Realtime console network usage monitor")
499 (description
500 "Nload is a console application which monitors network traffic and
501 bandwidth usage in real time. It visualizes the in- and outgoing traffic using
502 two graphs, and provides additional info like total amount of transferred data
503 and min/max network usage.")
504 (license license:gpl2+)))
505
506 (define-public iodine
507 (package
508 (name "iodine")
509 (version "0.7.0")
510 (source (origin
511 (method url-fetch)
512 (uri (string-append "http://code.kryo.se/" name "/"
513 name "-" version ".tar.gz"))
514 (sha256
515 (base32
516 "0gh17kcxxi37k65zm4gqsvbk3aw7yphcs3c02pn1c4s2y6n40axd"))))
517 (build-system gnu-build-system)
518 (arguments
519 '(#:phases
520 (modify-phases %standard-phases
521 (delete 'configure)
522 (add-before 'build 'fix-ifconfig-path
523 ;; This package works only with the net-tools version of ifconfig.
524 (lambda* (#:key inputs #:allow-other-keys)
525 (substitute* "src/tun.c"
526 (("PATH=[^ ]* ")
527 (string-append (assoc-ref inputs "net-tools") "/bin/")))
528 #t))
529 (add-before 'check 'delete-failing-tests
530 ;; Avoid https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=802105.
531 (lambda _
532 (substitute* "tests/common.c"
533 (("tcase_add_test\\(tc, \
534 test_parse_format_ipv(4(|_listen_all|_mapped_ipv6)|6)\\);")
535 ""))
536 #t)))
537 #:make-flags (list "CC=gcc"
538 (string-append "prefix=" (assoc-ref %outputs "out")))
539 #:test-target "test"))
540 (inputs `(("net-tools" ,net-tools)
541 ("zlib" ,zlib)))
542 (native-inputs `(("check" ,check)
543 ("pkg-config" ,pkg-config)))
544 (home-page "http://code.kryo.se/iodine/")
545 (synopsis "Tunnel IPv4 data through a DNS server")
546 (description "Iodine tunnels IPv4 data through a DNS server. This
547 can be useful in different situations where internet access is firewalled, but
548 DNS queries are allowed. The bandwidth is asymmetrical, with limited upstream
549 and up to 1 Mbit/s downstream.")
550 ;; src/md5.[ch] is released under the zlib license
551 (license (list license:isc license:zlib))))
552
553 (define-public whois
554 (package
555 (name "whois")
556 (version "5.5.2")
557 (source
558 (origin
559 (method url-fetch)
560 (uri (string-append "mirror://debian/pool/main/w/whois/"
561 "whois_" version ".tar.xz"))
562 (sha256
563 (base32
564 "1h55zs3cj4w9b0hq0x3z7s2mn46v0jyc39gz320ra4hwr0xlsnf0"))))
565 (build-system gnu-build-system)
566 (arguments
567 `(#:tests? #f ; no test suite
568 #:make-flags (list "CC=gcc"
569 (string-append "prefix=" (assoc-ref %outputs "out")))
570 #:phases
571 (modify-phases %standard-phases
572 (delete 'configure) ; no configure script
573 (add-before 'build 'setenv
574 (lambda _
575 (setenv "HAVE_ICONV" "1")
576 #t)))))
577 (inputs
578 `(("libidn2" ,libidn2)))
579 (native-inputs
580 `(("gettext" ,gettext-minimal)
581 ("perl" ,perl)
582 ("pkg-config" ,pkg-config)))
583 (synopsis "Intelligent client for the WHOIS directory service")
584 (description
585 "whois searches for an object in a @dfn{WHOIS} (RFC 3912) database.
586 It is commonly used to look up the registered users or assignees of an Internet
587 resource, such as a domain name, an IP address block, or an autonomous system.
588 It can automatically select the appropriate server for most queries.
589
590 For historical reasons, this package also includes @command{mkpasswd}, which
591 encrypts passwords using @code{crypt(3)} and is unrelated to the Expect command
592 of the same name.")
593 (home-page "https://github.com/rfc1036/whois")
594 (license license:gpl2+)))
595
596 (define-public wireshark
597 (package
598 (name "wireshark")
599 (version "3.0.6")
600 (source
601 (origin
602 (method url-fetch)
603 (uri (string-append "https://www.wireshark.org/download/src/wireshark-"
604 version ".tar.xz"))
605 (sha256
606 (base32 "0gp3qg0280ysrsaa97yfazka8xcyrspsrw8bfgqxnpf1l0i40zx8"))))
607 (build-system cmake-build-system)
608 (arguments
609 `(#:phases
610 (modify-phases %standard-phases
611 (add-after 'unpack 'remove-failing-test
612 ;; Test 31/32 fails with errors like "Program reassemble_test is
613 ;; not available". Skipping it for now.
614 (lambda _
615 (substitute* "CMakeLists.txt"
616 (("suite_unittests" all) (string-append "# " all)))
617 #t)))
618 ;; Build process chokes during `validate-runpath' phase.
619 ;;
620 ;; Errors are like the following:
621 ;; "/gnu/store/...wireshark-3.0.0/lib/wireshark/plugins/3.0/epan/ethercat.so:
622 ;; error: depends on 'libwireshark.so.12', which cannot be found in
623 ;; RUNPATH". That is, "/gnu/store/...wireshark-3.0.0./lib" doesn't
624 ;; belong to RUNPATH.
625 ;;
626 ;; That’s not a problem in practice because "ethercat.so" is a plugin,
627 ;; so it’s dlopen’d by a process that already provides "libwireshark".
628 ;; For now, we disable this phase.
629 #:validate-runpath? #f))
630 (inputs
631 `(("c-ares" ,c-ares)
632 ("glib" ,glib)
633 ("gnutls" ,gnutls)
634 ("libcap" ,libcap)
635 ("libgcrypt" ,libgcrypt)
636 ("libnl" ,libnl)
637 ("libpcap" ,libpcap)
638 ("libssh" ,libssh)
639 ("libxml2" ,libxml2)
640 ("lz4" ,lz4)
641 ("lua" ,lua-5.2) ;Lua 5.3 unsupported
642 ("krb5" ,mit-krb5)
643 ("qtbase" ,qtbase)
644 ("qtmultimedia" ,qtmultimedia)
645 ("qtsvg" ,qtsvg)
646 ("sbc" ,sbc)
647 ("snappy" ,snappy)
648 ("zlib" ,zlib)))
649 (native-inputs
650 `(("bison" ,bison)
651 ("doxygen" ,doxygen)
652 ("flex" ,flex)
653 ("gettext" ,gettext-minimal)
654 ("perl" ,perl)
655 ("pkg-config" ,pkg-config)
656 ("python" ,python-wrapper)
657 ("qttools" ,qttools)))
658 (synopsis "Network traffic analyzer")
659 (description "Wireshark is a network protocol analyzer, or @dfn{packet
660 sniffer}, that lets you capture and interactively browse the contents of
661 network frames.")
662 (home-page "https://www.wireshark.org/")
663 (license license:gpl2+)))
664
665 (define-public fping
666 (package
667 (name "fping")
668 (version "4.2")
669 (source
670 (origin
671 (method url-fetch)
672 (uri (string-append "https://fping.org/dist/fping-"
673 version ".tar.gz"))
674 (sha256
675 (base32 "0jmnf4vmr43aiwk3h2b5qdsb95gxar8gz1yli8fswnm9nrs9ccvx"))))
676 (build-system gnu-build-system)
677 (home-page "https://fping.org/")
678 (synopsis "Send ICMP ECHO_REQUEST packets to network hosts")
679 (description
680 "fping is a ping like program which uses the Internet Control Message
681 Protocol (ICMP) echo request to determine if a target host is responding.
682 fping differs from ping in that you can specify any number of targets on the
683 command line, or specify a file containing the lists of targets to ping.
684 Instead of sending to one target until it times out or replies, fping will
685 send out a ping packet and move on to the next target in a round-robin
686 fashion.")
687 (license license:expat)))
688
689 (define-public gandi.cli
690 (package
691 (name "gandi.cli")
692 (version "1.5")
693 (source
694 (origin
695 (method url-fetch)
696 (uri (pypi-uri name version))
697 (sha256
698 (base32 "110wc9zgxsrvw4yzp21p0ian5lcf7vhcpxhnmsc4fg9pzl2bwxd5"))))
699 (build-system python-build-system)
700 (arguments
701 `(#:phases
702 (modify-phases %standard-phases
703 (add-after 'unpack 'embed-store-file-names
704 (lambda _
705 (substitute* (list "gandi/cli/modules/cert.py"
706 "gandi/cli/tests/commands/test_certificate.py")
707 (("openssl") (which "openssl")))
708 #t))
709 (add-after 'install 'install-documentation
710 ;; The included man page may be outdated but we install it anyway,
711 ;; since it's mentioned in 'gandi --help' and better than nothing.
712 (lambda* (#:key outputs #:allow-other-keys)
713 (let* ((out (assoc-ref outputs "out"))
714 (man1 (string-append out "/share/man/man1")))
715 (mkdir-p man1)
716 (with-output-to-file (string-append man1 "/gandi.1")
717 (lambda _
718 (invoke "rst2man.py" "gandicli.man.rst")))
719 #t))))))
720 (native-inputs
721 `(("python-docutils" ,python-docutils) ; for rst2man.py
722 ("python-pytest-cov" ,python-pytest-cov)
723 ("python-tox" ,python-tox)))
724 (inputs
725 `(("openssl" ,openssl)
726 ("python-click" ,python-click)
727 ("python-ipy" ,python-ipy)
728 ("python-pyyaml" ,python-pyyaml)
729 ("python-requests" ,python-requests)))
730 (home-page "https://cli.gandi.net")
731 (synopsis "Command-line interface to the Gandi.net Web API")
732 (description
733 "This package provides a command-line client (@command{gandi}) to buy,
734 manage, and delete Internet resources from Gandi.net such as domain names,
735 virtual machines, and certificates.")
736 (license license:gpl3+)))
737
738 (define-public go-netns
739 (let ((commit "13995c7128ccc8e51e9a6bd2b551020a27180abd")
740 (revision "1"))
741 (package
742 (name "go-netns")
743 (version (git-version "0.0.0" revision commit))
744 (source (origin
745 (method git-fetch)
746 (uri (git-reference
747 (url "https://github.com/vishvananda/netns.git")
748 (commit commit)))
749 (file-name (git-file-name name version))
750 (sha256
751 (base32
752 "1zk6w8158qi4niva5rijchbv9ixgmijsgqshh54wdaav4xrhjshn"))))
753 (build-system go-build-system)
754 (arguments
755 `(#:import-path "github.com/vishvananda/netns"
756 #:tests? #f)) ;tests require root privileges
757 (home-page "https://github.com/vishvananda/netns")
758 (synopsis "Simple network namespace handling for Go")
759 (description "The netns package provides a simple interface for
760 handling network namespaces in Go.")
761 (license license:asl2.0))))
762
763 (define-public go-sctp
764 ;; docker-libnetwork-cmd-proxy requires this exact commit.
765 (let ((commit "07191f837fedd2f13d1ec7b5f885f0f3ec54b1cb")
766 (revision "1"))
767 (package
768 (name "go-sctp")
769 (version (git-version "0.0.0" revision commit))
770 (source (origin
771 (method git-fetch)
772 (uri (git-reference
773 (url "https://github.com/ishidawataru/sctp.git")
774 (commit commit)))
775 (file-name (git-file-name name version))
776 (sha256
777 (base32
778 "1mk9ncm10gwi5pn5wcw4skbyf4qg7n5qdf1mim4gf3mrckvi6g6h"))))
779 (build-system go-build-system)
780 (arguments
781 `(#:import-path "github.com/ishidawataru/sctp"))
782 (home-page "https://github.com/ishidawataru/sctp")
783 (synopsis "SCTP library for the Go programming language")
784 (description "This library provides methods for using the stream control
785 transmission protocol (SCTP) in a Go application.")
786 (license license:asl2.0))))
787
788 (define-public httping
789 (package
790 (name "httping")
791 (version "2.5")
792 (source
793 (origin
794 (method url-fetch)
795 (uri (string-append "https://www.vanheusden.com/httping/httping-"
796 version ".tgz"))
797 (sha256
798 (base32
799 "1y7sbgkhgadmd93x1zafqc4yp26ssiv16ni5bbi9vmvvdl55m29y"))))
800 (build-system gnu-build-system)
801 (native-inputs
802 `(("gettext" ,gettext-minimal)))
803 (inputs
804 `(("fftw" ,fftw)
805 ("ncurses" ,ncurses)
806 ("openssl" ,openssl)))
807 (arguments
808 `(#:make-flags (list "CC=gcc"
809 (string-append "DESTDIR=" (assoc-ref %outputs "out"))
810 "PREFIX=")
811 #:tests? #f)) ; no tests
812 (home-page "https://www.vanheusden.com/httping/")
813 (synopsis "Web server latency and throughput monitor")
814 (description
815 "httping measures how long it takes to connect to a web server, send an
816 HTTP(S) request, and receive the reply headers. It is somewhat similar to
817 @command{ping}, but can be used even in cases where ICMP traffic is blocked
818 by firewalls or when you want to monitor the response time of the actual web
819 application stack itself.")
820 (license license:gpl2))) ; with permission to link with OpenSSL
821
822 (define-public httpstat
823 (package
824 (name "httpstat")
825 (version "1.2.1")
826 (source
827 (origin
828 (method url-fetch)
829 (uri (pypi-uri "httpstat" version))
830 (sha256
831 (base32
832 "1chw2nk56vaq87aba012a270k9na06hfx1pfbsrc3jfvlc2kb9hb"))))
833 (build-system python-build-system)
834 (inputs `(("curl" ,curl)))
835 (arguments
836 '(#:phases
837 (modify-phases %standard-phases
838 (add-before 'build 'fix-curl-path
839 (lambda* (#:key inputs #:allow-other-keys)
840 (substitute* "httpstat.py"
841 (("ENV_CURL_BIN.get\\('curl'\\)")
842 (string-append "ENV_CURL_BIN.get('"
843 (assoc-ref inputs "curl")
844 "/bin/curl')")))
845 #t)))))
846 (home-page "https://github.com/reorx/httpstat")
847 (synopsis "Visualize curl statistics")
848 (description
849 "@command{httpstat} is a tool to visualize statistics from the
850 @command{curl} HTTP client. It acts as a wrapper for @command{curl} and
851 prints timing information for each step of the HTTP request (DNS lookup,
852 TCP connection, TLS handshake and so on) in the terminal.")
853 (license license:expat)))
854
855 (define-public bwm-ng
856 (package
857 (name "bwm-ng")
858 (version "0.6.2")
859 (source
860 (origin
861 (method git-fetch)
862 (uri (git-reference
863 (url "https://github.com/vgropp/bwm-ng.git")
864 (commit (string-append "v" version))))
865 (file-name (git-file-name name version))
866 (sha256
867 (base32 "0k906wb4pw3dcqpcwnni78lahzi3bva483f8c17sjykic7as4y5n"))))
868 (build-system gnu-build-system)
869 (arguments
870 `(#:phases
871 (modify-phases %standard-phases
872 (add-after 'unpack 'disable-premature-./configure
873 (lambda _
874 (substitute* "autogen.sh"
875 (("\\$srcdir/configure")
876 "true"))
877 #t)))))
878 (native-inputs
879 `(("autoconf" ,autoconf)
880 ("automake" ,automake)))
881 (inputs
882 `(("ncurses" ,ncurses)))
883 (synopsis "Console based live network and disk I/O bandwidth monitor")
884 (description "Bandwidth Monitor NG is a small and simple console based
885 live network and disk I/O bandwidth monitor.")
886 (home-page "https://www.gropp.org/?id=projects&sub=bwm-ng")
887 (license license:gpl2)))
888
889 (define-public aircrack-ng
890 (package
891 (name "aircrack-ng")
892 (version "1.5.2")
893 (source
894 (origin
895 (method url-fetch)
896 (uri (string-append "https://download.aircrack-ng.org/aircrack-ng-"
897 version ".tar.gz"))
898 (sha256
899 (base32
900 "0hc2x17bxk2n00z8jj5jfwq3z41681fd19n018724il0cpkjyncy"))))
901 (build-system gnu-build-system)
902 (native-inputs
903 `(("autoconf" ,autoconf)
904 ("automake" ,automake)
905 ("libtool" ,libtool)
906 ("pkg-config" ,pkg-config)
907 ("which" ,which)))
908 (inputs
909 `(("libgcrypt" ,libgcrypt)
910 ("libnl" ,libnl)
911 ("libpcap" ,libpcap)
912 ("ethtool" ,ethtool)
913 ("pcre" ,pcre)
914 ("sqlite" ,sqlite)
915 ("zlib" ,zlib)))
916 (arguments
917 `(#:configure-flags
918 (list "--with-experimental=yes" ; build wesside-ng, etc.
919 "--with-gcrypt") ; openssl's the default
920 #:phases (modify-phases %standard-phases
921 (add-before 'bootstrap 'patch-evalrev
922 (lambda _
923 ;; Called by ./autogen.sh below, before the default
924 ;; ‘patch-shebangs’ phase has had a chance to run.
925 (substitute* "evalrev"
926 (("/bin/sh")
927 (which "sh")))
928 #t))
929 (replace 'bootstrap
930 (lambda _
931 ;; Patch shebangs in generated files before running
932 ;; ./configure.
933 (setenv "NOCONFIGURE" "please")
934 (invoke "bash" "./autogen.sh")))
935 (add-after 'build 'absolutize-tools
936 (lambda* (#:key inputs #:allow-other-keys)
937 (let ((ethtool (string-append (assoc-ref inputs "ethtool")
938 "/sbin/ethtool")))
939 (substitute* "scripts/airmon-ng"
940 (("ethtool ")
941 (string-append ethtool " ")))
942 #t))))))
943 (home-page "https://www.aircrack-ng.org")
944 (synopsis "Assess WiFi network security")
945 (description
946 "Aircrack-ng is a complete suite of tools to assess WiFi network
947 security. It focuses on different areas of WiFi security: monitoring,
948 attacking, testing, and cracking. All tools are command-line driven, which
949 allows for heavy scripting.")
950 (license (list license:gpl2+ license:bsd-3))))
951
952 (define-public pixiewps
953 (package
954 (name "pixiewps")
955 (version "1.4.2")
956 (source (origin
957 (method url-fetch)
958 (uri (string-append
959 "https://github.com/wiire-a/pixiewps/releases/"
960 "download/v" version "/" name "-" version ".tar.xz"))
961 (sha256
962 (base32
963 "07nym6bqml0k9v29vnj003nrgnwrywgjvnljb7cdpsvnwilhbp64"))))
964 (build-system gnu-build-system)
965 (arguments
966 '(#:make-flags
967 (list "CC=gcc"
968 (string-append "PREFIX=" (assoc-ref %outputs "out")))
969 #:phases
970 (modify-phases %standard-phases
971 (delete 'configure)) ; no configure script
972 #:tests? #f)) ; there are no tests
973 (home-page "https://github.com/wiire-a/pixiewps/")
974 (synopsis "Offline brute-force tool for Wi-Fi Protected Setup")
975 (description "Pixiewps implements the pixie-dust attack to brute
976 force the Wi-Fi Protected Setup (WPS) PIN by exploiting the low or
977 non-existing entropy of some access points.")
978 (license license:gpl3+)))
979
980 (define-public reaver
981 (package
982 (name "reaver")
983 (version "1.6.5")
984 (source (origin
985 (method url-fetch)
986 (uri (string-append
987 "https://github.com/t6x/reaver-wps-fork-t6x/releases/"
988 "download/v" version "/" name "-" version ".tar.xz"))
989 (sha256
990 (base32
991 "0sva3g0kwgv143n9l3lg4qp5iiqz7nk76nr0hwivsnglbhk9sbil"))))
992 (build-system gnu-build-system)
993 (arguments
994 `(#:configure-flags
995 ;; Save session files to current directory instead of /var.
996 (list "--enable-savetocurrent"
997 "--localstatedir=/tmp/dummy") ; prevent creating /var during install
998 #:phases
999 (modify-phases %standard-phases
1000 (add-before 'configure 'change-directory
1001 (lambda _
1002 (chdir "src")
1003 #t))
1004 (add-after 'install 'install-doc
1005 (lambda* (#:key outputs #:allow-other-keys)
1006 (chdir "../docs")
1007 (let* ((out (assoc-ref outputs "out"))
1008 (doc (string-append out "/share/doc/" ,name "-" ,version))
1009 (man1 (string-append out "/share/man/man1")))
1010 (for-each (lambda (file) (install-file file doc))
1011 (find-files "." "README.*"))
1012 (install-file "reaver.1" man1)
1013 #t))))
1014 #:tests? #f)) ; there are no tests
1015 (inputs
1016 `(("libpcap" ,libpcap)))
1017 (propagated-inputs
1018 `(("aircrack-ng" ,aircrack-ng)
1019 ("pixiewps" ,pixiewps)))
1020 (home-page "https://github.com/t6x/reaver-wps-fork-t6x/")
1021 (synopsis "Attack tool for Wi-Fi Protected Setup")
1022 (description "Reaver performs a brute force attack against an access
1023 point's Wi-Fi Protected Setup (WPS) PIN. Once the PIN is found, the WPA
1024 passphrase can be recovered and the AP's wireless settings can be
1025 reconfigured.")
1026 (license license:gpl2+)))
1027
1028 (define-public perl-danga-socket
1029 (package
1030 (name "perl-danga-socket")
1031 (version "1.62")
1032 (source
1033 (origin
1034 (method url-fetch)
1035 (uri (string-append "mirror://cpan/authors/id/N/NM/NML/"
1036 "Danga-Socket-" version ".tar.gz"))
1037 (sha256
1038 (base32 "0x4bvirmf0kphks19jwgva00zz73zx344218dfaiv8gigrw3yg4m"))))
1039 (build-system perl-build-system)
1040 (native-inputs
1041 `(("perl-test-tcp" ,perl-test-tcp)))
1042 (propagated-inputs
1043 `(("perl-sys-syscall" ,perl-sys-syscall)))
1044 (home-page "https://metacpan.org/release/Danga-Socket")
1045 (synopsis "Event loop and event-driven async socket base class")
1046 (description
1047 "Danga::Socket is an abstract base class for objects backed by a socket
1048 which provides the basic framework for event-driven asynchronous IO, designed
1049 to be fast. Danga::Socket is both a base class for objects, and an event
1050 loop.")
1051 (license license:perl-license)))
1052
1053 (define-public perl-data-validate-ip
1054 (package
1055 (name "perl-data-validate-ip")
1056 (version "0.27")
1057 (source
1058 (origin
1059 (method url-fetch)
1060 (uri (string-append
1061 "mirror://cpan/authors/id/D/DR/DROLSKY/Data-Validate-IP-"
1062 version ".tar.gz"))
1063 (sha256
1064 (base32 "1mmppyzsh1w2z2h86kvzqxy56wxgs62a3kf8nvcnz76bblir5ap1"))))
1065 (build-system perl-build-system)
1066 (native-inputs
1067 `(("perl-test-requires" ,perl-test-requires)))
1068 (propagated-inputs
1069 `(("perl-netaddr-ip" ,perl-netaddr-ip)))
1070 (home-page "https://metacpan.org/release/Data-Validate-IP")
1071 (synopsis "IPv4 and IPv6 validation methods")
1072 (description
1073 "This module provides several IP address validation subroutines that both
1074 validate and untaint their input. This includes both basic validation
1075 (@code{is_ipv4()} and @code{is_ipv6()}) and special cases like checking whether
1076 an address belongs to a specific network or whether an address is public or
1077 private (reserved).")
1078 (license license:perl-license)))
1079
1080 (define-public perl-net-dns
1081 (package
1082 (name "perl-net-dns")
1083 (version "1.21")
1084 (source
1085 (origin
1086 (method url-fetch)
1087 (uri
1088 (list
1089 (string-append "https://www.net-dns.org/download/Net-DNS-"
1090 version ".tar.gz")
1091 (string-append "mirror://cpan/authors/id/N/NL/NLNETLABS/Net-DNS-"
1092 version ".tar.gz")))
1093 (sha256
1094 (base32 "0yknrsh0wqr9s43c0wf3dyzrsi2r7k0v75hay74gqkq850xy3vyx"))))
1095 (build-system perl-build-system)
1096 (inputs
1097 `(("perl-digest-hmac" ,perl-digest-hmac)))
1098 (home-page "https://www.net-dns.org/")
1099 (synopsis
1100 "Perl Interface to the Domain Name System")
1101 (description "Net::DNS is the Perl Interface to the Domain Name System.")
1102 (license license:x11)))
1103
1104 (define-public perl-socket6
1105 (package
1106 (name "perl-socket6")
1107 (version "0.29")
1108 (source
1109 (origin
1110 (method url-fetch)
1111 (uri (string-append
1112 "mirror://cpan/authors/id/U/UM/UMEMOTO/Socket6-"
1113 version
1114 ".tar.gz"))
1115 (sha256
1116 (base32
1117 "054izici8klfxs8hr5rljib28plijpsfymy99xbzdp047bx1b2a6"))))
1118 (build-system perl-build-system)
1119 (arguments
1120 `(#:phases
1121 (modify-phases %standard-phases
1122 (replace 'configure
1123 (lambda* (#:key outputs #:allow-other-keys)
1124 (let* ((out (assoc-ref outputs "out"))
1125 (args `("Makefile.PL"
1126 ,(string-append "PREFIX=" out)
1127 "INSTALLDIRS=site")))
1128 (setenv "CONFIG_SHELL" (which "sh"))
1129 (apply invoke "perl" args)))))))
1130 (home-page "https://metacpan.org/release/Socket6")
1131 (synopsis
1132 "IPv6 related part of the C socket.h defines and structure manipulators for Perl")
1133 (description "Socket6 binds the IPv6 related part of the C socket header
1134 definitions and structure manipulators for Perl.")
1135 (license license:bsd-3)))
1136
1137 (define-public perl-net-dns-resolver-programmable
1138 (package
1139 (name "perl-net-dns-resolver-programmable")
1140 (version "v0.003")
1141 (source
1142 (origin
1143 (method url-fetch)
1144 (uri (string-append
1145 "mirror://cpan/authors/id/J/JM/JMEHNLE/net-dns-resolver-programmable/"
1146 "Net-DNS-Resolver-Programmable-" version ".tar.gz"))
1147 (sha256
1148 (base32
1149 "1v3nl2kaj4fs55n1617n53q8sa3mir06898vpy1rq98zjih24h4d"))
1150 (patches
1151 (search-patches "perl-net-dns-resolver-programmable-fix.patch"))))
1152 (build-system perl-build-system)
1153 (native-inputs
1154 `(("perl-module-build" ,perl-module-build)))
1155 (inputs `(("perl-net-dns" ,perl-net-dns)))
1156 (home-page
1157 "https://metacpan.org/release/Net-DNS-Resolver-Programmable")
1158 (synopsis
1159 "Programmable DNS resolver class for offline emulation of DNS")
1160 (description "Net::DNS::Resolver::Programmable is a programmable DNS resolver for
1161 offline emulation of DNS.")
1162 (license license:perl-license)))
1163
1164 (define-public perl-net-dns-resolver-mock
1165 (package
1166 (name "perl-net-dns-resolver-mock")
1167 (version "1.20171219")
1168 (source (origin
1169 (method url-fetch)
1170 (uri (string-append
1171 "mirror://cpan/authors/id/M/MB/MBRADSHAW/"
1172 "Net-DNS-Resolver-Mock-" version ".tar.gz"))
1173 (sha256
1174 (base32
1175 "0m3rxpkv1b9121srvbqkrgzg4m8mnydiydqv34in1i1ixwrl6jn9"))))
1176 (build-system perl-build-system)
1177 (inputs
1178 `(("perl-net-dns" ,perl-net-dns)))
1179 (home-page "https://metacpan.org/release/Net-DNS-Resolver-Mock")
1180 (synopsis "Mock DNS Resolver object for testing")
1181 (description
1182 "Net::DNS::Resolver::Mock is a subclass of Net::DNS::Resolver, but returns
1183 static data from any provided DNS zone file instead of querying the network.
1184 It is intended primarily for use in testing.")
1185 (license license:perl-license)))
1186
1187 (define-public perl-netaddr-ip
1188 (package
1189 (name "perl-netaddr-ip")
1190 (version "4.079")
1191 (source
1192 (origin
1193 (method url-fetch)
1194 (uri (string-append
1195 "mirror://cpan/authors/id/M/MI/MIKER/NetAddr-IP-"
1196 version
1197 ".tar.gz"))
1198 (sha256
1199 (base32
1200 "1rx0dinrz9fk9qcg4rwqq5n1dm3xv2arymixpclcv2q2nzgq4npc"))))
1201 (build-system perl-build-system)
1202 (arguments
1203 `(#:phases
1204 (modify-phases %standard-phases
1205 (replace 'configure
1206 (lambda* (#:key outputs #:allow-other-keys)
1207 (let* ((out (assoc-ref outputs "out"))
1208 (args `("Makefile.PL"
1209 ,(string-append "PREFIX=" out)
1210 "INSTALLDIRS=site")))
1211 (setenv "CONFIG_SHELL" (which "sh"))
1212 (apply invoke "perl" args)))))))
1213 (home-page
1214 "https://metacpan.org/release/NetAddr-IP")
1215 (synopsis
1216 "Manages IPv4 and IPv6 addresses and subnets")
1217 (description "NetAddr::IP manages IPv4 and IPv6 addresses and subsets.")
1218 (license license:perl-license)))
1219
1220 (define-public perl-net-patricia
1221 (package
1222 (name "perl-net-patricia")
1223 (version "1.22")
1224 (source
1225 (origin
1226 (method url-fetch)
1227 (uri (string-append
1228 "mirror://cpan/authors/id/G/GR/GRUBER/Net-Patricia-"
1229 version
1230 ".tar.gz"))
1231 (sha256
1232 (base32
1233 "0ln5f57vc8388kyh9vhx2infrdzfhbpgyby74h1qsnhwds95m0vh"))))
1234 (build-system perl-build-system)
1235 (inputs
1236 `(("perl-net-cidr-lite" ,perl-net-cidr-lite)
1237 ("perl-socket6" ,perl-socket6)))
1238 (home-page
1239 "https://metacpan.org/release/Net-Patricia")
1240 (synopsis
1241 "Patricia Trie Perl module for fast IP address lookups")
1242 (description
1243 "Net::Patricia does IP address lookups quickly in Perl.")
1244 ;; The bindings are licensed under GPL2 or later.
1245 ;; libpatricia is licensed under 2-clause BSD.
1246 (license (list license:gpl2+ license:bsd-2))))
1247
1248 (define-public perl-net-cidr-lite
1249 (package
1250 (name "perl-net-cidr-lite")
1251 (version "0.21")
1252 (source
1253 (origin
1254 (method url-fetch)
1255 (uri (string-append
1256 "mirror://cpan/authors/id/D/DO/DOUGW/Net-CIDR-Lite-"
1257 version
1258 ".tar.gz"))
1259 (sha256
1260 (base32
1261 "14shj73zbqmfjbp0qz1fs9j4p2dpvz5hfkm4qfdjbydflbl2b8fg"))))
1262 (build-system perl-build-system)
1263 (home-page
1264 "https://metacpan.org/release/Net-CIDR-Lite")
1265 (synopsis
1266 "Perl extension for merging IPv4 or IPv6 CIDR addresses")
1267 (description "Net::CIDR::Lite merges IPv4 or IPv6 CIDR addresses.")
1268 (license license:gpl1+)))
1269
1270 ;; TODO: Use the geolite-mirror-simple.pl script from the example
1271 ;; directory to stay current with the databases. How?
1272 (define-public perl-geo-ip
1273 (package
1274 (name "perl-geo-ip")
1275 (version "1.51")
1276 (source
1277 (origin
1278 (method url-fetch)
1279 (uri (string-append
1280 "mirror://cpan/authors/id/M/MA/MAXMIND/Geo-IP-"
1281 version
1282 ".tar.gz"))
1283 (sha256
1284 (base32
1285 "1fka8fr7fw6sh3xa9glhs1zjg3s2gfkhi7n7da1l2m2wblqj0c0n"))))
1286 (build-system perl-build-system)
1287 (home-page "https://metacpan.org/release/Geo-IP")
1288 (synopsis
1289 "Look up location and network information by IP Address in Perl")
1290 (description "The Perl module @code{Geo::IP}. It looks up location and
1291 network information by IP Address.")
1292 (license license:perl-license)))
1293
1294 (define-public perl-io-socket-inet6
1295 (package
1296 (name "perl-io-socket-inet6")
1297 (version "2.72")
1298 (source
1299 (origin
1300 (method url-fetch)
1301 (uri (string-append
1302 "mirror://cpan/authors/id/S/SH/SHLOMIF/IO-Socket-INET6-"
1303 version
1304 ".tar.gz"))
1305 (sha256
1306 (base32
1307 "1fqypz6qa5rw2d5y2zq7f49frwra0aln13nhq5gi514j2zx21q45"))))
1308 (build-system perl-build-system)
1309 (native-inputs
1310 `(("perl-module-build" ,perl-module-build)
1311 ("perl-test-pod" ,perl-test-pod)
1312 ("perl-test-pod-coverage" ,perl-test-pod-coverage)))
1313 (inputs `(("perl-socket6" ,perl-socket6)))
1314 (arguments `(;; Need network socket API
1315 #:tests? #f))
1316 (home-page
1317 "https://metacpan.org/release/IO-Socket-INET6")
1318 (synopsis
1319 "Perl object interface for AF_INET/AF_INET6 domain sockets")
1320 (description "IO::Socket::INET6 is an interface for AF_INET/AF_INET6 domain
1321 sockets in Perl.")
1322 (license license:perl-license)))
1323
1324 (define-public libproxy
1325 (package
1326 (name "libproxy")
1327 (version "0.4.15")
1328 (source (origin
1329 (method url-fetch)
1330 (uri (string-append "https://github.com/libproxy/libproxy/"
1331 "releases/download/" version "/libproxy-"
1332 version ".tar.xz"))
1333 (sha256
1334 (base32
1335 "0kvdrazlzwia876w988cmlypp253gwy6idlh8mjk958c29jb8kb5"))))
1336 (build-system cmake-build-system)
1337 (native-inputs
1338 `(("pkg-config" ,pkg-config)))
1339 (inputs
1340 `(("dbus" ,dbus)
1341 ("zlib" ,zlib)))
1342 (arguments
1343 `(#:phases
1344 (modify-phases %standard-phases
1345 (replace 'check
1346 (lambda _
1347 (invoke "ctest" "-E" "url-test"))))))
1348 (synopsis "Library providing automatic proxy configuration management")
1349 (description "Libproxy handles the details of HTTP/HTTPS proxy
1350 configuration for applications across all scenarios. Applications using
1351 libproxy only have to specify which proxy to use.")
1352 (home-page "https://libproxy.github.io/libproxy")
1353 (license license:lgpl2.1+)))
1354
1355 (define-public proxychains-ng
1356 (package
1357 (name "proxychains-ng")
1358 (version "4.14")
1359 (source
1360 (origin
1361 (method url-fetch)
1362 (uri (string-append "http://ftp.barfooze.de/pub/sabotage/tarballs/"
1363 "proxychains-ng-" version ".tar.xz"))
1364 (sha256
1365 (base32 "1bmhfbl1bzc87vl0xwr1wh5xvslfyc41nl2hqzhbj258p0sy004x"))))
1366 (build-system gnu-build-system)
1367 (arguments
1368 `(#:tests? #f ; there are no tests
1369 #:phases
1370 (modify-phases %standard-phases
1371 (add-after 'unpack 'fix-configure-script
1372 (lambda _
1373 ;; The configure script is very intolerant to unknown arguments,
1374 ;; such as "CONFIG_SHELL".
1375 (substitute* "configure"
1376 (("\\*\\) break ;;" line)
1377 (string-append "[A-Z]*) shift ;;\n"
1378 line)))
1379 #t))
1380 (add-before 'configure 'set-up-environment
1381 (lambda _
1382 (setenv "CC" "gcc")
1383 #t)))))
1384 (synopsis "Redirect any TCP connection through a proxy or proxy chain")
1385 (description "Proxychains-ng is a preloader which hooks calls to sockets
1386 in dynamically linked programs and redirects them through one or more SOCKS or
1387 HTTP proxies.")
1388 (home-page "https://github.com/rofl0r/proxychains-ng")
1389 (license license:gpl2+)))
1390
1391 (define-public enet
1392 (package
1393 (name "enet")
1394 (version "1.3.14")
1395 (source (origin
1396 (method url-fetch)
1397 (uri (string-append "http://enet.bespin.org/download/"
1398 "enet-" version ".tar.gz"))
1399 (sha256
1400 (base32
1401 "0w780zc6cy8yq4cskpphx0f91lzh51vh9lwyc5ll8hhamdxgbxlq"))))
1402 (build-system gnu-build-system)
1403 (native-inputs
1404 `(("pkg-config" ,pkg-config)))
1405 (synopsis "Network communication layer on top of UDP")
1406 (description
1407 "ENet's purpose is to provide a relatively thin, simple and robust network
1408 communication layer on top of UDP. The primary feature it provides is optional
1409 reliable, in-order delivery of packets. ENet omits certain higher level
1410 networking features such as authentication, server discovery, encryption, or
1411 other similar tasks that are particularly application specific so that the
1412 library remains flexible, portable, and easily embeddable.")
1413 (home-page "http://enet.bespin.org")
1414 (license license:expat)))
1415
1416 (define-public sslh
1417 (package
1418 (name "sslh")
1419 (version "1.20")
1420 (source
1421 (origin
1422 (method git-fetch)
1423 (uri (git-reference
1424 (url "https://github.com/yrutschle/sslh.git")
1425 (commit (string-append "v" version))))
1426 (file-name (git-file-name name version))
1427 (sha256
1428 (base32 "18zhkqlwfh6f5dg1a41a4p7p9g94dgb9nwls1ksy9r5yz174i2fx"))))
1429 (build-system gnu-build-system)
1430 (native-inputs
1431 `(;; Test dependencies.
1432 ("lcov" ,lcov)
1433 ("perl" ,perl)
1434 ("perl-conf-libconfig" ,perl-conf-libconfig)
1435 ("perl-io-socket-inet6" ,perl-io-socket-inet6)
1436 ("perl-socket6" ,perl-socket6)
1437 ("psmisc" ,psmisc))) ; for ‘killall’
1438 (inputs
1439 `(("libcap" ,libcap)
1440 ("libconfig" ,libconfig)
1441 ("pcre" ,pcre)
1442 ("tcp-wrappers" ,tcp-wrappers)))
1443 (arguments
1444 '(#:phases
1445 (modify-phases %standard-phases
1446 (delete 'configure) ; no configure script
1447 (add-before 'check 'fix-tests
1448 (lambda _
1449 (substitute* "./t"
1450 (("\"/tmp") "$ENV{\"TMPDIR\"} . \"")
1451 ;; The Guix build environment lacks ‘ip6-localhost’.
1452 (("ip6-localhost") "localhost"))
1453 #t))
1454 ;; Many of these files are mentioned in the man page. Install them.
1455 (add-after 'install 'install-documentation
1456 (lambda* (#:key outputs #:allow-other-keys)
1457 (let* ((out (assoc-ref outputs "out"))
1458 (doc (string-append out "/share/doc/sslh")))
1459 (install-file "README.md" doc)
1460 (for-each
1461 (lambda (file)
1462 (install-file file (string-append doc "/examples")))
1463 (append (find-files "." "\\.cfg")
1464 (find-files "scripts"))))
1465 #t)))
1466 #:make-flags (list "CC=gcc"
1467 "USELIBCAP=1"
1468 "USELIBWRAP=1"
1469 (string-append "PREFIX=" (assoc-ref %outputs "out")))
1470 #:test-target "test"))
1471 (home-page "https://www.rutschle.net/tech/sslh/README.html")
1472 (synopsis "Applicative network protocol demultiplexer")
1473 (description
1474 "sslh is a network protocol demultiplexer. It acts like a switchboard,
1475 accepting connections from clients on one port and forwarding them to different
1476 servers based on the contents of the first received data packet. Detection of
1477 common protocols like HTTP(S), SSL, SSH, OpenVPN, tinc, and XMPP is already
1478 implemented, but any other protocol that matches a regular expression can be
1479 added. sslh's name comes from its original application of serving both SSH and
1480 HTTPS on port 443, allowing SSH connections from inside corporate firewalls
1481 that block port 22.")
1482 (license (list license:bsd-2 ; tls.[ch]
1483 license:gpl2+)))) ; everything else
1484
1485 (define-public iperf
1486 (package
1487 (name "iperf")
1488 (version "3.1.7")
1489 (source (origin
1490 (method url-fetch)
1491 (uri (string-append "http://downloads.es.net/pub/iperf"
1492 "/iperf-" version ".tar.gz"))
1493 (sha256
1494 (base32
1495 "0kvk8d0a3dcxc8fisyprbn01y8akxj4sx8ld5dh508p9dx077vx4"))))
1496 (build-system gnu-build-system)
1497 (synopsis "TCP, UDP and SCTP bandwidth measurement tool")
1498 (description
1499 "iPerf is a tool to measure achievable bandwidth on IP networks. It
1500 supports tuning of various parameters related to timing, buffers and
1501 protocols (TCP, UDP, SCTP with IPv4 and IPv6). For each test it reports
1502 the bandwidth, loss, and other parameters.")
1503 (home-page "http://software.es.net/iperf/")
1504 (license (list license:bsd-3 ; Main distribution.
1505 license:ncsa ; src/{units,iperf_locale,tcp_window_size}.c
1506 license:expat ; src/{cjson,net}.[ch]
1507 license:public-domain)))) ; src/portable_endian.h
1508
1509 (define-public nethogs
1510 (package
1511 (name "nethogs")
1512 (version "0.8.5")
1513 (source (origin
1514 (method url-fetch)
1515 (uri (string-append "https://github.com/raboof/nethogs/archive/v"
1516 version ".tar.gz"))
1517 (sha256
1518 (base32
1519 "1k4x8r7s4dgcb6n2rjn28h2yyij92mwm69phncl3597cdxr954va"))
1520 (file-name (string-append name "-" version ".tar.gz"))))
1521 (build-system gnu-build-system)
1522 (inputs
1523 `(("libpcap" ,libpcap)
1524 ("ncurses" ,ncurses)))
1525 (arguments
1526 `(#:make-flags `("CC=gcc"
1527 ,(string-append "PREFIX=" %output))
1528 #:phases
1529 (modify-phases %standard-phases
1530 (delete 'configure)))) ; No ./configure script.
1531 (home-page "https://github.com/raboof/nethogs")
1532 (synopsis "Per-process bandwidth monitor")
1533 (description "NetHogs is a small 'net top' tool for Linux. Instead of
1534 breaking the traffic down per protocol or per subnet, like most tools do, it
1535 groups bandwidth by process.
1536
1537 NetHogs does not rely on a special kernel module to be loaded. If there's
1538 suddenly a lot of network traffic, you can fire up NetHogs and immediately see
1539 which PID is causing this. This makes it easy to identify programs that have
1540 gone wild and are suddenly taking up your bandwidth.")
1541 (license license:gpl2+)))
1542
1543 (define-public nzbget
1544 (package
1545 (name "nzbget")
1546 (version "21.0")
1547 (source
1548 (origin
1549 (method url-fetch)
1550 (uri (string-append "https://github.com/nzbget/nzbget/archive/v"
1551 version ".tar.gz"))
1552 (file-name (string-append name "-" version ".tar.gz"))
1553 (sha256
1554 (base32
1555 "0l3dzxz7d7jf6cyach41zirvsx1x0vs4nh053c0miycv7zjyrly7"))
1556 (modules '((guix build utils)))
1557 (snippet
1558 ;; Reported upstream as <https://github.com/nzbget/nzbget/pull/414>.
1559 '(begin
1560 (substitute* "daemon/connect/TlsSocket.cpp"
1561 (("gnutls_certificate-verification_status_print")
1562 "gnutls_certificate_verification_status_print"))
1563 #t))))
1564 (arguments
1565 `(#:configure-flags
1566 (list
1567 (string-append "--with-libcurses-includes="
1568 (assoc-ref %build-inputs "ncurses") "/include")
1569 (string-append "--with-libcurses-libraries="
1570 (assoc-ref %build-inputs "ncurses") "/lib")
1571 (string-append "--with-tlslib=GnuTLS"))))
1572 (build-system gnu-build-system)
1573 (inputs `(("gnutls" ,gnutls)
1574 ("libxml2" ,libxml2)
1575 ("ncurses" ,ncurses)
1576 ("zlib" ,zlib)))
1577 (native-inputs `(("pkg-config" ,pkg-config)))
1578 (home-page "https://github.com/nzbget/nzbget")
1579 (synopsis "Usenet binary file downloader")
1580 (description
1581 "NZBGet is a binary newsgrabber, which downloads files from Usenet based
1582 on information given in @code{nzb} files. NZBGet can be used in standalone
1583 and in server/client modes. In standalone mode, you pass NZBGet @command{nzb}
1584 files as command-line parameters and it downloads them and exits. NZBGet also
1585 contains a Web interface. Its server can be controlled through remote
1586 procedure calls (RPCs).")
1587 (license license:gpl2+)))
1588
1589 (define-public openvswitch
1590 (package
1591 (name "openvswitch")
1592 (version "2.12.0")
1593 (source (origin
1594 (method url-fetch)
1595 (uri (string-append
1596 "https://www.openvswitch.org/releases/openvswitch-"
1597 version ".tar.gz"))
1598 (sha256
1599 (base32
1600 "1y78ix5inhhcvicbvyy2ij38am1215nr55vydhab3d4065q45z8k"))))
1601 (build-system gnu-build-system)
1602 (arguments
1603 '(;; FIXME: many tests fail with:
1604 ;; […]
1605 ;; test -e $OVS_RUNDIR/ovs-vswitchd.pid
1606 ;; ovs-appctl -t ovs-vswitchd exit
1607 ;; hard failure
1608 #:tests? #f
1609 #:configure-flags
1610 '("--enable-shared"
1611 "--localstatedir=/var"
1612 "--with-dbdir=/var/lib/openvswitch")
1613 #:phases
1614 (modify-phases %standard-phases
1615 (replace 'install
1616 (lambda _
1617 (invoke "make"
1618 ;; Don't try to create directories under /var.
1619 "RUNDIR=/tmp"
1620 "PKIDIR=/tmp"
1621 "LOGDIR=/tmp"
1622 "DBDIR=/tmp"
1623 "install"))))))
1624 (native-inputs
1625 `(("perl" ,perl)
1626 ("pkg-config" ,pkg-config)
1627 ("python" ,python-2)
1628 ;; for testing
1629 ("util-linux" ,util-linux)))
1630 (propagated-inputs
1631 `(("python-six" ,python2-six)))
1632 (inputs
1633 `(("libcap-ng" ,libcap-ng)
1634 ("openssl" ,openssl)))
1635 (synopsis "Virtual network switch")
1636 (home-page "https://www.openvswitch.org/")
1637 (description
1638 "Open vSwitch is a multilayer virtual switch. It is designed to enable
1639 massive network automation through programmatic extension, while still
1640 supporting standard management interfaces and protocols (e.g. NetFlow, sFlow,
1641 IPFIX, RSPAN, CLI, LACP, 802.1ag).")
1642 (license ; see debian/copyright for detail
1643 (list license:lgpl2.1 ; xenserver and utilities/bugtool
1644 license:gpl2 ; datapath
1645 license:bsd-2 license:bsd-3
1646 license:asl2.0)))) ; all other
1647
1648 (define-public python-ipy
1649 (package
1650 (name "python-ipy")
1651 (version "1.00")
1652 (source (origin
1653 (method url-fetch)
1654 (uri (pypi-uri "IPy" version))
1655 (sha256
1656 (base32
1657 "08d6kcacj67mvh0b6y765ipccy6gi4w2ndd4v1l3im2qm1cgcarg"))))
1658 (build-system python-build-system)
1659 (home-page "https://github.com/autocracy/python-ipy/")
1660 (synopsis "Python class and tools for handling IP addresses and networks")
1661 (description "The @code{IP} class allows a comfortable parsing and
1662 handling for most notations in use for IPv4 and IPv6 addresses and
1663 networks.")
1664 (license license:bsd-3)))
1665
1666 (define-public python2-ipy
1667 (package-with-python2 python-ipy))
1668
1669 (define-public speedtest-cli
1670 (package
1671 (name "speedtest-cli")
1672 (version "2.1.1")
1673 (source
1674 (origin
1675 (method git-fetch)
1676 (uri (git-reference
1677 (url "https://github.com/sivel/speedtest-cli")
1678 (commit (string-append "v" version))))
1679 (file-name (git-file-name name version))
1680 (sha256
1681 (base32 "0swm7nbk99w2xf1cb0l3c8y1vm4rqw6785p5j04alyb0g98vqa4b"))))
1682 (build-system python-build-system)
1683 (home-page "https://github.com/sivel/speedtest-cli")
1684 (synopsis "Internet bandwidth tester")
1685 (description
1686 "Command line interface for testing internet bandwidth using
1687 speedtest.net.")
1688 (license license:asl2.0)))
1689
1690 (define-public tftp-hpa
1691 (package
1692 (name "tftp-hpa")
1693 (version "5.2")
1694 (source (origin
1695 (method url-fetch)
1696 (uri (string-append "mirror://kernel.org/software/"
1697 "network/tftp/tftp-hpa/tftp-hpa-" version
1698 ".tar.xz"))
1699 (sha256
1700 (base32
1701 "12vidchglhyc20znq5wdsbhi9mqg90jnl7qr9qs8hbvaz4fkdvmg"))))
1702 (build-system gnu-build-system)
1703 (arguments `(#:tests? #f)) ; no test target
1704 (synopsis "HPA's tftp client")
1705 (description
1706 "This is a tftp client derived from OpenBSD tftp with some extra options
1707 added and bugs fixed. The source includes readline support but it is not
1708 enabled due to license conflicts between the BSD advertising clause and the GPL.")
1709 (home-page "http://git.kernel.org/cgit/network/tftp/tftp-hpa.git/about/")
1710 ;; Some source files are distributed under a 3-clause BSD license, and
1711 ;; others under a 4-clause BSD license. Refer to the files in the source
1712 ;; distribution for clarification.
1713 (license (list license:bsd-3 license:bsd-4))))
1714
1715 (define-public pidentd
1716 (package
1717 (name "pidentd")
1718 (version "3.0.19")
1719 (source
1720 (origin
1721 (method url-fetch)
1722 (uri (string-append "https://github.com/ptrrkssn/pidentd/archive/"
1723 "v" version ".tar.gz"))
1724 (file-name (string-append name "-" version ".tar.gz"))
1725 (sha256
1726 (base32
1727 "0y3kd1bkydqkpc1qdff24yswysamsqivvadjy0468qri5730izgc"))))
1728 (build-system gnu-build-system)
1729 (arguments
1730 `(#:tests? #f)) ; No tests are included
1731 (inputs
1732 `(("openssl" ,openssl-1.0))) ;for the DES library
1733 (home-page "https://www.lysator.liu.se/~pen/pidentd/")
1734 (synopsis "Small Ident Daemon")
1735 (description
1736 "@dfn{Pidentd} (Peter's Ident Daemon) is a identd, which implements a
1737 identification server. Pidentd looks up specific TCP/IP connections and
1738 returns the user name and other information about the connection.")
1739 (license license:public-domain)))
1740
1741 (define-public spiped
1742 (package
1743 (name "spiped")
1744 (version "1.6.0")
1745 (source (origin
1746 (method url-fetch)
1747 (uri (string-append "https://www.tarsnap.com/spiped/spiped-"
1748 version ".tgz"))
1749 (sha256
1750 (base32
1751 "1r51rdcl7nib1yv3yvgd5alwlkkwmr387brqavaklb0p2bwzixz6"))))
1752 (build-system gnu-build-system)
1753 (arguments
1754 '(#:test-target "test"
1755 #:make-flags (let* ((out (assoc-ref %outputs "out"))
1756 (bindir (string-append out "/bin"))
1757 (man1dir (string-append out "/share/man/man1")))
1758 (list "CC=gcc" ; It tries to invoke `c99`.
1759 (string-append "BINDIR=" bindir)
1760 (string-append "MAN1DIR=" man1dir)))
1761 #:phases
1762 (modify-phases %standard-phases
1763 (add-after 'unpack 'patch-command-invocations
1764 (lambda _
1765 (substitute* '("Makefile"
1766 "libcperciva/cpusupport/Build/cpusupport.sh"
1767 "libcperciva/POSIX/posix-cflags.sh"
1768 "libcperciva/POSIX/posix-l.sh")
1769 (("command -p") ""))
1770 #t))
1771 (delete 'configure) ; No ./configure script.
1772 (add-after 'install 'install-more-docs
1773 (lambda* (#:key outputs #:allow-other-keys)
1774 (let* ((out (assoc-ref %outputs "out"))
1775 (misc (string-append out "/share/doc/spiped")))
1776 (install-file "DESIGN.md" misc)
1777 #t))))))
1778 (native-inputs
1779 `(("procps" ,procps))) ; `ps` is used by the test suite.
1780 (inputs
1781 `(("openssl" ,openssl)))
1782 (home-page "https://www.tarsnap.com/spiped.html")
1783 (synopsis "Create secure pipes between sockets")
1784 (description "Spiped (pronounced \"ess-pipe-dee\") is a utility for creating
1785 symmetrically encrypted and authenticated pipes between socket addresses, so
1786 that one may connect to one address (e.g., a UNIX socket on localhost) and
1787 transparently have a connection established to another address (e.g., a UNIX
1788 socket on a different system). This is similar to 'ssh -L' functionality, but
1789 does not use SSH and requires a pre-shared symmetric key.")
1790 (license license:bsd-2)))
1791
1792 (define-public quagga
1793 (package
1794 (name "quagga")
1795 (version "1.2.4")
1796 (source (origin
1797 (method url-fetch)
1798 (uri (string-append "mirror://savannah/quagga/quagga-"
1799 version ".tar.gz"))
1800 (sha256
1801 (base32
1802 "1lsksqxij5f1llqn86pkygrf5672kvrqn1kvxghi169hqf1c0r73"))
1803 (patches
1804 (search-patches "quagga-reproducible-build.patch"))))
1805 (build-system gnu-build-system)
1806 (native-inputs `(("pkg-config" ,pkg-config)
1807 ("perl" ,perl)
1808 ("dejagnu" ,dejagnu)))
1809 (inputs `(("readline" ,readline)
1810 ("c-ares" ,c-ares)))
1811 (synopsis "Routing Software Suite")
1812 (description "Quagga is a routing software suite, providing implementations
1813 of OSPFv2, OSPFv3, RIP v1 and v2, RIPng and BGP-4 for Unix platforms.
1814
1815 The Quagga architecture consists of a core daemon, @command{zebra}, which
1816 acts as an abstraction layer to the underlying Unix kernel and presents the
1817 Zserv API over a Unix or TCP stream to Quagga clients. It is these Zserv
1818 clients which typically implement a routing protocol and communicate routing
1819 updates to the zebra daemon.")
1820 (home-page "https://www.nongnu.org/quagga/")
1821 (license license:gpl2+)))
1822
1823 (define-public thc-ipv6
1824 (let ((revision "0")
1825 (commit "4bb72573e0950ce6f8ca2800a10748477020029e"))
1826 (package
1827 (name "thc-ipv6")
1828 (version (git-version "3.4" revision commit))
1829 (source (origin
1830 (method git-fetch)
1831 (uri (git-reference
1832 (url "https://github.com/vanhauser-thc/thc-ipv6.git")
1833 (commit commit)))
1834 (file-name (git-file-name name version))
1835 (sha256
1836 (base32
1837 "1x5i6vbsddqc2yks7r1a2fw2fk16qxvd6hpzh1lykjfpkal8fdir"))))
1838 (build-system gnu-build-system)
1839 (arguments
1840 `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
1841 #:tests? #f ; No test suite.
1842 #:phases
1843 (modify-phases %standard-phases
1844 (delete 'configure) ; No ./configure script.
1845 (add-before 'build 'patch-paths
1846 (lambda _
1847 (substitute* "Makefile"
1848 (("/bin/echo") "echo"))
1849 #t))
1850 (add-after 'install 'install-more-docs
1851 (lambda* (#:key outputs #:allow-other-keys)
1852 (let* ((out (assoc-ref outputs "out"))
1853 (doc (string-append out "/share/thc-ipv6/doc")))
1854 (install-file "README" doc)
1855 (install-file "HOWTO-INJECT" doc)
1856 #t))))))
1857 ;; TODO Add libnetfilter-queue once packaged.
1858 (inputs
1859 `(("libpcap" ,libpcap)
1860 ("openssl" ,openssl)
1861 ("perl" ,perl)))
1862 (home-page "https://github.com/vanhauser-thc/thc-ipv6")
1863 (synopsis "IPv6 security research toolkit")
1864 (description "The THC IPv6 Toolkit provides command-line tools and a library
1865 for researching IPv6 implementations and deployments. It requires Linux 2.6 or
1866 newer and only works on Ethernet network interfaces.")
1867 ;; AGPL 3 with exception for linking with OpenSSL. See the 'LICENSE' file in
1868 ;; the source distribution for more information.
1869 (license license:agpl3))))
1870
1871 (define-public bmon
1872 (package
1873 (name "bmon")
1874 (version "4.0")
1875 (source
1876 (origin
1877 (method url-fetch)
1878 (uri (string-append "https://github.com/tgraf/bmon/releases/download/v"
1879 version "/bmon-" version ".tar.gz"))
1880 (sha256
1881 (base32
1882 "0ylzriv4pwh76344abzl1w219x188gshbycbna35gsyfp09c7z82"))))
1883 (build-system gnu-build-system)
1884 (inputs
1885 `(("libconfuse" ,libconfuse)
1886 ("libnl" ,libnl)
1887 ("ncurses" ,ncurses)))
1888 (native-inputs
1889 `(("pkg-config" ,pkg-config)))
1890 (synopsis "Bandwidth monitor")
1891 (description "bmon is a monitoring and debugging tool to capture
1892 networking-related statistics and prepare them visually in a human-friendly
1893 way. It features various output methods including an interactive curses user
1894 interface and a programmable text output for scripting.")
1895 (home-page "https://github.com/tgraf/bmon")
1896 ;; README.md mentions both the 2-clause BSD and expat licenses, but all
1897 ;; the source files only have expat license headers. Upstream has been
1898 ;; contacted for clarification: https://github.com/tgraf/bmon/issues/59
1899 ;; Update the license field when upstream responds.
1900 (license (list license:bsd-2
1901 license:expat))))
1902
1903 (define-public libnet
1904 (package
1905 (name "libnet")
1906 (version "1.2-rc3")
1907 (source
1908 (origin
1909 (method git-fetch)
1910 (uri (git-reference
1911 (url "https://github.com/sam-github/libnet")
1912 (commit (string-append "libnet-" version))))
1913 (file-name (git-file-name name version))
1914 (sha256
1915 (base32
1916 "0cy8w4g5rv963v4p6iq3333kxgdddx2lywp70xf62553a25xhhs4"))))
1917 (build-system gnu-build-system)
1918 (arguments
1919 `(#:phases
1920 (modify-phases %standard-phases
1921 (add-after 'unpack 'chdir
1922 (lambda _ (chdir "libnet") #t))
1923 (add-before 'build 'build-doc
1924 (lambda* (#:key make-flags #:allow-other-keys)
1925 (apply invoke "make" "-C" "doc" "doc"
1926 make-flags))))))
1927 (native-inputs
1928 `(("autoconf" ,autoconf)
1929 ("automake" ,automake)
1930 ("libtool" ,libtool)
1931 ("doxygen" ,doxygen)))
1932 (home-page "https://sourceforge.net/projects/libnet-dev/")
1933 (synopsis "Framework for low-level network packet construction")
1934 (description
1935 "Libnet provides a fairly portable framework for network packet
1936 construction and injection. It features portable packet creation interfaces
1937 at the IP layer and link layer, as well as a host of supplementary
1938 functionality. Using libnet, quick and simple packet assembly applications
1939 can be whipped up with little effort.")
1940 (license license:bsd-2)))
1941
1942 (define-public mtr
1943 (package
1944 (name "mtr")
1945 (version "0.92")
1946 (source
1947 (origin
1948 (method url-fetch)
1949 (uri (string-append "ftp://ftp.bitwizard.nl/" name "/"
1950 name "-" version ".tar.gz"))
1951 (sha256
1952 (base32 "10j3ds3p27jygys4x08kj8fi3zlsgiv72xsfazkah6plwawrv5zj"))))
1953 (build-system gnu-build-system)
1954 (inputs
1955 `(("libcap" ,libcap)
1956 ("ncurses" ,ncurses)))
1957 (native-inputs
1958 ;; The 0.92 release tarball still requires the ‘autoheader’ tool.
1959 `(("autoconf" ,autoconf)))
1960 (arguments
1961 `(#:tests? #f)) ; tests require network access
1962 (home-page "https://www.bitwizard.nl/mtr/")
1963 (synopsis "Network diagnostic tool")
1964 (description
1965 "@dfn{mtr} (My TraceRoute) combines the functionality of the
1966 @command{traceroute} and @command{ping} programs in a single network diagnostic
1967 tool. @command{mtr} can use several network protocols to detect intermediate
1968 routers (or @dfn{hops}) between the local host and a user-specified destination.
1969 It then continually measures the response time and packet loss at each hop, and
1970 displays the results in real time.")
1971 (license license:gpl2+)))
1972
1973 (define-public strongswan
1974 (package
1975 (name "strongswan")
1976 (version "5.8.1")
1977 (source
1978 (origin
1979 (method url-fetch)
1980 (uri (string-append "https://download.strongswan.org/strongswan-"
1981 version ".tar.bz2"))
1982 (sha256
1983 (base32 "034rd6kr1bmnvj8rg2kcxdjb0cgj3dn9310mmm94j1awxan71byr"))))
1984 (build-system gnu-build-system)
1985 (arguments
1986 `(#:phases
1987 (modify-phases %standard-phases
1988 (add-before 'build 'patch-command-file-names
1989 (lambda* (#:key inputs #:allow-other-keys)
1990 (substitute* "src/libstrongswan/utils/process.c"
1991 (("/bin/sh")
1992 (string-append (assoc-ref inputs "bash") "/bin/sh")))
1993
1994 (substitute* "src/libstrongswan/tests/suites/test_process.c"
1995 (("/bin/sh") (which "sh"))
1996 (("/bin/echo") (which "echo"))
1997 (("cat") (which "cat")))
1998 #t))
1999 (add-before 'check 'set-up-test-environment
2000 (lambda* (#:key inputs #:allow-other-keys)
2001 (setenv "TZDIR" (string-append (assoc-ref inputs "tzdata")
2002 "/share/zoneinfo"))
2003 #t)))
2004 #:configure-flags
2005 (list
2006 ;; Disable bsd-4 licensed plugins.
2007 "--disable-des"
2008 "--disable-blowfish")))
2009 (inputs
2010 `(("curl" ,curl)
2011 ("gmp" ,gmp)
2012 ("libgcrypt" ,libgcrypt)
2013 ("openssl" ,openssl)))
2014 (native-inputs
2015 `(("coreutils" ,coreutils)
2016 ("tzdata" ,tzdata-for-tests)))
2017 (synopsis "IKEv1/v2 keying daemon")
2018 (description "StrongSwan is an IPsec implementation originally based upon
2019 the FreeS/WAN project. It contains support for IKEv1, IKEv2, MOBIKE, IPv6,
2020 NAT-T and more.")
2021 (home-page "https://strongswan.org/")
2022 (license
2023 (list license:gpl2+
2024 ;; src/aikgen/*
2025 ;; src/libcharon/plugins/dnscert/*
2026 ;; src/libcharon/plugins/ext_auth/*
2027 ;; src/libcharon/plugins/vici/ruby/*
2028 ;; src/libcharon/plugins/xauth_pam/xauth_pam_listener.[ch]
2029 license:expat
2030 ;; src/inclue/sys/*
2031 license:bsd-3
2032 ;; src/libstrongswan/plugins/sha3/sha3_keccak.c
2033 license:public-domain
2034 ;; src/libstrongswan/plugins/pkcs11/pkcs11.h
2035 (license:non-copyleft
2036 "file://src/libstrongswan/plugins/pkcs11/pkcs11.h"
2037 "pkcs11 contains a unknown permissive license. View the specific
2038 file for more details.")
2039 ;; These files are not included in the
2040 ;; build, they are disabled through
2041 ;; options to ./configure
2042 ;;
2043 ;; src/libstrongswan/plugins/blowfish/bf_enc.c
2044 ;; src/libstrongswan/plugins/blowfish/bf_locl.h
2045 ;; src/libstrongswan/plugins/blowfish/bf_pi.h
2046 ;; src/libstrongswan/plugins/blowfish/bf_skey.c
2047 ;; src/libstrongswan/plugins/blowfish/blowfish_crypter.c
2048 ;; src/libstrongswan/plugins/des/des_crypter.c
2049 license:bsd-4))))
2050
2051 (define-public amule
2052 (package
2053 (name "amule")
2054 (version "2.3.2")
2055 (source (origin
2056 (method git-fetch)
2057 (uri (git-reference
2058 (url "https://github.com/amule-project/amule")
2059 (commit version)))
2060 (file-name (git-file-name name version))
2061 (sha256
2062 (base32
2063 "010wxm6g9f92x6fympj501zbnjka32rzbx0sk3a2y4zpih5d2nsn"))
2064 ;; Patch for adopting crypto++ >= 6.0.
2065 (patches (search-patches "amule-crypto-6.patch"))))
2066 (build-system gnu-build-system)
2067 (arguments
2068 `(#:phases
2069 (modify-phases %standard-phases
2070 (delete 'bootstrap) ; bootstrap phase runs too early.
2071 (add-after 'patch-source-shebangs 'autogen
2072 (lambda _
2073 (invoke "sh" "autogen.sh")
2074 #t)))
2075 #:configure-flags
2076 '("--disable-rpath"
2077 "--enable-wxcas"
2078 "--enable-cas"
2079 "--enable-alc"
2080 "--enable-alcc"
2081 "--enable-xas"
2082 "--enable-amulecmd"
2083 "--enable-geoip"
2084 "--enable-ccache"
2085 "--enable-nls"
2086 "--enable-optimize"
2087 "--enable-amule-gui"
2088 "--enable-amule-daemon"
2089 "--enable-webserver"
2090 "--with-denoise-level=0")))
2091 (native-inputs
2092 `(("autoconf" ,autoconf)
2093 ("automake" ,automake)
2094 ("gettext-minimal" ,gettext-minimal)
2095 ("perl" ,perl)))
2096 (inputs
2097 `(("zlib" ,zlib)
2098 ("crypto++" ,crypto++)
2099 ("libpng" ,libpng)
2100 ("wxwidgets-gtk2" ,wxwidgets-gtk2)))
2101 (home-page "http://amule.org/")
2102 (synopsis "Peer-to-peer client for the eD2K and Kademlia networks")
2103 (description
2104 "aMule is an eMule-like client for the eD2k and Kademlia peer-to-peer
2105 file sharing networks. It includes a graphical user interface (GUI), a daemon
2106 allowing you to run a client with no graphical interface, and a Web GUI for
2107 remote access. The @command{amulecmd} command allows you to control aMule
2108 remotely.")
2109 (license license:gpl2+)))
2110
2111 (define-public zyre
2112 (package
2113 (name "zyre")
2114 (version "2.0.0")
2115 (source (origin
2116 (method url-fetch)
2117 (uri
2118 (string-append "https://github.com/zeromq/zyre/releases/download/v"
2119 version "/" name "-" version ".tar.gz"))
2120 (sha256
2121 (base32
2122 "0qz2730bng1gs9xbqxhkw88qbsmszgmmrl2g9k6xrg6r3bqvsdc7"))))
2123 (build-system gnu-build-system)
2124 (arguments
2125 `(;; Ensure the kernel headers are treated as system headers to suppress
2126 ;; harmless -Werror=pedantic warnings.
2127 #:make-flags (list (string-append "C_INCLUDE_PATH="
2128 (assoc-ref %build-inputs "kernel-headers")
2129 "/include"))))
2130 (inputs `(("zeromq" ,zeromq)
2131 ("czmq" ,czmq)
2132 ("libsodium" ,libsodium)))
2133 (synopsis "Framework for proximity-based peer-to-peer applications")
2134 (description "Zyre provides reliable group messaging over local area
2135 networks using zeromq. It has these key characteristics:
2136
2137 @itemize
2138 @item Zyre needs no administration or configuration.
2139 @item Peers may join and leave the network at any time.
2140 @item Peers talk to each other without any central brokers or servers.
2141 @item Peers can talk directly to each other.
2142 @item Peers can join groups, and then talk to groups.
2143 @item Zyre is reliable, and loses no messages even when the network is heavily loaded.
2144 @item Zyre is fast and has low latency, requiring no consensus protocols.
2145 @item Zyre is designed for WiFi networks, yet also works well on Ethernet networks.
2146 @end itemize")
2147 (home-page "https://github.com/zeromq/zyre")
2148 (license license:mpl2.0)))
2149
2150 (define-public can-utils
2151 (package
2152 (name "can-utils")
2153 (version "2018.02.0")
2154 (source (origin
2155 (method git-fetch)
2156 (uri (git-reference
2157 (url "https://github.com/linux-can/can-utils.git")
2158 (commit (string-append "v" version))))
2159 (file-name (git-file-name name version))
2160 (sha256
2161 (base32
2162 "0r0zkm67bdcmbfypjr7z041d4zp0xzb379dyl8cvhmflh12fd2jb"))))
2163 (build-system gnu-build-system)
2164 (arguments
2165 `(#:tests? #f ; No tests exist.
2166 #:make-flags (list "CC=gcc"
2167 (string-append "PREFIX="
2168 (assoc-ref %outputs "out")))
2169 #:phases
2170 (modify-phases %standard-phases
2171 (delete 'bootstrap)
2172 (delete 'configure))))
2173 (home-page "https://github.com/linux-can/can-utils")
2174 (synopsis "CAN utilities")
2175 (description "This package provides CAN utilities in the following areas:
2176
2177 @itemize
2178 @item Basic tools to display, record, generate and replay CAN traffic
2179 @item CAN access via IP sockets
2180 @item CAN in-kernel gateway configuration
2181 @item CAN bus measurement and testing
2182 @item ISO-TP (ISO15765-2:2016 - this means messages with a body larger than
2183 eight bytes) tools
2184 @item Log file converters
2185 @item Serial Line Discipline configuration for slcan driver
2186 @end itemize")
2187 ;; Either BSD-3 or GPL-2 can be used.
2188 (license (list license:bsd-3 license:gpl2))))
2189
2190 (define-public asio
2191 (package
2192 (name "asio")
2193 (version "1.12.2")
2194 (source
2195 (origin
2196 (method url-fetch)
2197 (uri (string-append "mirror://sourceforge/asio/asio/"
2198 version " (Stable)/asio-" version ".tar.bz2"))
2199 (sha256
2200 (base32 "1akray4l3hgahmb92sbvsqg128c7g7s92jrkf1sp1fjnfjrxq9sf"))))
2201 (build-system gnu-build-system)
2202 (inputs
2203 `(("boost" ,boost)
2204 ("openssl" ,openssl)))
2205 (arguments
2206 `(#:configure-flags
2207 (list
2208 (string-append "--with-boost=" (assoc-ref %build-inputs "boost"))
2209 (string-append "--with-openssl=" (assoc-ref %build-inputs "openssl")))))
2210 (home-page "https://think-async.com/Asio")
2211 (synopsis "C++ library for ASynchronous network I/O")
2212 (description "Asio is a cross-platform C++ library for network and
2213 low-level I/O programming that provides developers with a consistent
2214 asynchronous model using a modern C++ approach.")
2215 (license license:boost1.0)))
2216
2217 (define-public shadowsocks
2218 ;; There are some security fixes after the last release.
2219 (let* ((commit "e332ec93e9c90f1cbee676b022bf2c5d5b7b1239")
2220 (revision "0")
2221 (version (git-version "2.8.2" revision commit)))
2222 (package
2223 (name "shadowsocks")
2224 (version version)
2225 (home-page "https://github.com/shadowsocks/shadowsocks")
2226 (source (origin
2227 (method git-fetch)
2228 (uri (git-reference
2229 (url home-page)
2230 (commit commit)))
2231 (sha256
2232 (base32
2233 "1idd9b4f2pnhcpk1bh030hqg5zq25gkwxd53xi3c0cj242w7sp2j"))
2234 (file-name (git-file-name name version))))
2235 (build-system python-build-system)
2236 (synopsis "Fast tunnel proxy that helps you bypass firewalls")
2237 (description
2238 "This package is a fast tunnel proxy that helps you bypass firewalls.
2239
2240 Features:
2241 @itemize
2242 @item TCP & UDP support
2243 @item User management API
2244 @item TCP Fast Open
2245 @item Workers and graceful restart
2246 @item Destination IP blacklist
2247 @end itemize")
2248 (license license:asl2.0))))
2249
2250 (define-public net-snmp
2251 (package
2252 (name "net-snmp")
2253 (version "5.8")
2254 (source (origin
2255 (method url-fetch)
2256 (uri (string-append "mirror://sourceforge/net-snmp/net-snmp/"
2257 version "/net-snmp-" version ".tar.gz"))
2258 (sha256
2259 (base32
2260 "1pvajzj9gmj56dmwix0ywmkmy2pglh6nny646hkm7ghfhh03bz5j"))
2261 (modules '((guix build utils)))
2262 (snippet
2263 '(begin
2264 ;; Drop bundled libraries.
2265 (delete-file-recursively "snmplib/openssl")
2266 #t))))
2267 (build-system gnu-build-system)
2268 (arguments
2269 `(#:test-target "test"
2270 ;; XXX: With parallel build enabled, Perl modules may not get linked with
2271 ;; libnetsnmp. See e.g. <https://bugzilla.novell.com/show_bug.cgi?id=819497>.
2272 #:parallel-build? #f
2273 #:configure-flags
2274 (list (string-append "LDFLAGS=-Wl,-rpath="
2275 (assoc-ref %outputs "out")
2276 "/lib")
2277 "--with-logfile=/var/log/snmpd.log"
2278 (string-append "--with-openssl="
2279 (assoc-ref %build-inputs "openssl")))
2280 #:phases
2281 (modify-phases %standard-phases
2282 (add-after 'unpack 'patch-tests
2283 (lambda* (#:key inputs #:allow-other-keys)
2284 (substitute* "testing/fulltests/support/simple_TESTCONF.sh"
2285 (("NETSTAT=\"\"")
2286 (string-append "NETSTAT=\"" (which "netstat") "\"")))
2287 (substitute* '("testing/fulltests/default/T065agentextend_simple"
2288 "testing/fulltests/default/T115agentxperl_simple")
2289 (("/usr/bin/env") (which "env")))
2290 (substitute* "testing/fulltests/default/T065agentextend_sh_simple"
2291 (("/bin/sh") (which "sh")))
2292 ;; These tests require network access.
2293 (for-each delete-file
2294 '("testing/fulltests/default/T070com2sec_simple"
2295 "testing/fulltests/default/T071com2sec6_simple"))
2296 #t))
2297 (add-after 'unpack 'patch-Makefile.PL
2298 (lambda* (#:key outputs #:allow-other-keys)
2299 (substitute* "Makefile.in"
2300 (("Makefile.PL -NET")
2301 (string-append "Makefile.PL PREFIX="
2302 (assoc-ref outputs "out")
2303 " INSTALLDIRS=site" " NO_PERLLOCAL=1"
2304 " -NET")))
2305 #t)))))
2306 (inputs
2307 `(("perl" ,perl)
2308 ("openssl" ,openssl)
2309 ("libnl" ,libnl)))
2310 ;; These inputs are only needed for tests.
2311 (native-inputs
2312 `(("net-tools" ,net-tools)
2313 ("coreutils" ,coreutils)
2314 ("grep" ,grep)))
2315 (home-page "http://www.net-snmp.org/")
2316 (synopsis "Simple Network Management Protocol library and tools")
2317 (description "The @dfn{Simple Network Management Protocol} (SNMP) is a
2318 widely used protocol for monitoring the health and welfare of network
2319 equipment (e.g. routers), computer equipment and even devices like UPSs.
2320 Net-SNMP is a suite of applications used to implement SNMP v1, SNMP v2c and
2321 SNMP v3 using both IPv4 and IPv6.")
2322 ;; This only affects OpenBSD
2323 ;; https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-8100
2324 (properties `((lint-hidden-cve . ("CVE-2015-8100"))))
2325 (license (list license:bsd-3
2326 (license:non-copyleft
2327 "http://www.net-snmp.org/about/license.html"
2328 "CMU/UCD copyright notice")))))
2329
2330 (define-public ubridge
2331 (package
2332 (name "ubridge")
2333 (version "0.9.16")
2334 (source
2335 (origin
2336 (method git-fetch)
2337 (uri (git-reference
2338 (url "https://github.com/GNS3/ubridge.git")
2339 (commit (string-append "v" version))))
2340 (file-name (git-file-name name version))
2341 (sha256
2342 (base32 "1bind7ylgxs743vfdmpdrpp4iamy461bc3i7nxza91kj7hyyjz6h"))))
2343 (build-system gnu-build-system)
2344 (arguments
2345 `(#:tests? #f ; no tests
2346 #:make-flags '("CC=gcc")
2347 #:phases
2348 (modify-phases %standard-phases
2349 (delete 'configure) ; no configure script
2350 (add-before 'install 'set-bindir
2351 (lambda* (#:key inputs outputs #:allow-other-keys)
2352 (let ((bin (string-append (assoc-ref outputs "out")
2353 "/bin")))
2354 (mkdir-p bin)
2355 (substitute* "Makefile"
2356 (("\\$\\(BINDIR\\)") bin)
2357 (("\tsetcap cap_net.*$") "")))
2358 #t)))))
2359 (inputs
2360 `(("libpcap" ,libpcap)))
2361 (home-page "https://github.com/GNS3/ubridge/")
2362 (synopsis "Bridge for UDP tunnels, Ethernet, TAP and VMnet interfaces")
2363 (description "uBridge is a simple program to create user-land bridges
2364 between various technologies. Currently, bridging between UDP tunnels,
2365 Ethernet and TAP interfaces is supported. Packet capture is also supported.")
2366 (license license:gpl3+)))
2367
2368 (define-public hcxtools
2369 (package
2370 (name "hcxtools")
2371 (version "5.2.0")
2372 (source
2373 (origin
2374 (method git-fetch)
2375 (uri (git-reference
2376 (url "https://github.com/ZerBea/hcxtools.git")
2377 (commit version)))
2378 (sha256
2379 (base32 "0k2qlq9hz5zc21nyc6yrnfqzga7hydn5mm0x3rpl2fhkwl81lxcn"))
2380 (file-name (git-file-name name version))))
2381 (build-system gnu-build-system)
2382 (inputs
2383 `(("curl" ,curl)
2384 ("libpcap" ,libpcap)
2385 ("openssl" ,openssl)
2386 ("zlib" ,zlib)))
2387 (arguments
2388 `(#:make-flags
2389 (list "CC=gcc"
2390 (string-append "INSTALLDIR=" (assoc-ref %outputs "out") "/bin"))
2391 #:tests? #f ; no test suite
2392 #:phases
2393 (modify-phases %standard-phases
2394 (delete 'configure)
2395 (add-after 'unpack 'set-environment
2396 (lambda* (#:key inputs #:allow-other-keys)
2397 (setenv "C_INCLUDE_PATH"
2398 (string-append (assoc-ref inputs "curl") "/include:"
2399 (assoc-ref inputs "libpcap") "/include:"
2400 (assoc-ref inputs "openssl") "/include:"
2401 (assoc-ref inputs "zlib") "/include"))
2402 #t)))))
2403 (home-page "https://github.com/ZerBea/hcxtools")
2404 (synopsis "Capture wlan traffic to hashcat and John the Ripper")
2405 (description
2406 "This package contains a small set of tools to capture and convert
2407 packets from wireless devices for use with hashcat or John the Ripper.")
2408 (license license:expat)))
2409
2410 (define-public hcxdumptool
2411 (package
2412 (name "hcxdumptool")
2413 (version "5.2.0")
2414 (source
2415 (origin
2416 (method git-fetch)
2417 (uri (git-reference
2418 (url "https://github.com/ZerBea/hcxdumptool.git")
2419 (commit version)))
2420 (sha256
2421 (base32 "0pg1pvg029gm4rj0fj5kcsjb32hixgn4cxsgiir7spkmacf1qm4q"))
2422 (file-name (git-file-name name version))))
2423 (build-system gnu-build-system)
2424 (arguments
2425 `(#:make-flags
2426 (list "CC=gcc"
2427 (string-append "INSTALLDIR=" (assoc-ref %outputs "out") "/bin"))
2428 #:tests? #f ; no test suite
2429 #:phases
2430 (modify-phases %standard-phases
2431 (delete 'configure))))
2432 (home-page "https://github.com/ZerBea/hcxdumptool")
2433 (synopsis "Small tool to capture packets from wlan devices")
2434 (description
2435 "Small tool to capture packets from WLAN devices. After capturing,
2436 upload the \"uncleaned\" cap to @url{https://wpa-sec.stanev.org/?submit} to
2437 see if the access point or the client is vulnerable to a dictionary attack.
2438 Convert the cap file to hccapx format and/or to WPA-PMKID-PBKDF2
2439 hashline (16800) with @command{hcxpcaptool} from the @code{hcxtools} package
2440 and check if the WLAN key or the master key was transmitted unencrypted.")
2441 (license license:expat)))
2442
2443 (define-public dante
2444 (package
2445 (name "dante")
2446 (version "1.4.2")
2447 (source
2448 (origin
2449 (method url-fetch)
2450 (uri (string-append "https://www.inet.no/dante/files/dante-"
2451 version ".tar.gz"))
2452 (sha256
2453 (base32
2454 "19rqzj167q73ag20zxpvswhkk0bj56r5maf83v5016sw7vrcz5sc"))))
2455 (build-system gnu-build-system)
2456 (arguments
2457 ;; XXX: The dynamic socks library doesn't work with 'libc.so' (GNU ld
2458 ;; script). When preloading is enabled, 'sockd' failed with:
2459 ;; … Failed to open library "libc.so": …: invalid ELF header
2460 '(#:configure-flags '("--disable-preload")))
2461 (home-page "https://www.inet.no/dante/")
2462 (synopsis "SOCKS server and client")
2463 (description "Dante is a SOCKS client and server implementation. It can
2464 be installed on a machine with access to an external TCP/IP network and will
2465 allow all other machines, without direct access to that network, to be relayed
2466 through the machine the Dante server is running on. The external network will
2467 never see any machines other than the one Dante is running on.")
2468 (license (license:non-copyleft "file://LICENSE"))))
2469
2470 (define-public restbed
2471 (let ((commit "6eb385fa9051203f28bf96cc1844bbb5a9a6481f"))
2472 (package
2473 (name "restbed")
2474 (version (git-version "4.6" "1" commit))
2475 (source
2476 (origin
2477 (method git-fetch)
2478 (uri (git-reference
2479 (url "https://github.com/Corvusoft/restbed/")
2480 (commit commit)))
2481 (file-name (string-append name "-" version ".tar.gz"))
2482 (sha256
2483 (base32 "0k60i5drklqqrb4khb25fzkgz9y0sncxf1sp6lh2bm1m0gh0661n"))))
2484 (build-system cmake-build-system)
2485 (inputs
2486 `(("asio" ,asio)
2487 ("catch" ,catch-framework)
2488 ("openssl" ,openssl)))
2489 (arguments
2490 `(#:tests? #f
2491 #:configure-flags
2492 '("-DBUILD_TESTS=NO"
2493 "-DBUILD_EXAMPLES=NO"
2494 "-DBUILD_SSL=NO"
2495 "-DBUILD_SHARED=NO")
2496 #:phases
2497 (modify-phases %standard-phases
2498 (add-after 'unpack 'apply-patches-and-fix-paths
2499 (lambda* (#:key inputs #:allow-other-keys)
2500 (let ((asio (assoc-ref inputs "asio"))
2501 (catch (assoc-ref inputs "catch"))
2502 (openssl (assoc-ref inputs "openssl")))
2503 (substitute* "cmake/Findasio.cmake"
2504 (("(find_path\\( asio_INCLUDE asio\\.hpp HINTS ).*$" all begin)
2505 (string-append begin " \"" asio "/include\" )")))
2506 (substitute* "cmake/Findcatch.cmake"
2507 (("(find_path\\( catch_INCLUDE catch\\.hpp HINTS ).*$" all begin)
2508 (string-append begin " \"" catch "/include\" )")))
2509 (substitute* "cmake/Findopenssl.cmake"
2510 (("(find_library\\( ssl_LIBRARY ssl ssleay32 HINTS ).*$" all begin)
2511 (string-append begin " \"" openssl "/lib\" )"))
2512 (("(find_library\\( crypto_LIBRARY crypto libeay32 HINTS ).*$" all begin)
2513 (string-append begin " \"" openssl "/lib\" )"))
2514 (("(find_path\\( ssl_INCLUDE openssl/ssl\\.h HINTS ).*$" all begin)
2515 (string-append begin " \"" openssl "/include\" )")))))))))
2516 (synopsis "Asynchronous RESTful functionality to C++11 applications")
2517 (description "Restbed is a comprehensive and consistent programming
2518 model for building applications that require seamless and secure
2519 communication over HTTP.")
2520 (home-page "https://github.com/Corvusoft/restbed")
2521 (license license:agpl3+))))
2522
2523 (define-public opendht
2524 (package
2525 (name "opendht")
2526 (version "1.8.1")
2527 (source (origin
2528 (method git-fetch)
2529 (uri (git-reference
2530 (url "https://github.com/savoirfairelinux/opendht.git")
2531 (commit version)))
2532 (file-name (git-file-name name version))
2533 (sha256
2534 (base32
2535 "0vninb5mak27wigajslyvr05vq7wbrwqhbr4wzl2nmqcb20wmlq2"))))
2536 (build-system gnu-build-system)
2537 (inputs
2538 `(("gnutls" ,gnutls)
2539 ("nettle" ,nettle)
2540 ("readline" ,readline)
2541 ("jsoncpp" ,jsoncpp)
2542 ("restbed" ,restbed)))
2543 (propagated-inputs
2544 `(("argon2" ,argon2) ; TODO: Needed for the pkg-config .pc file to work?
2545 ("msgpack" ,msgpack))) ;included in several installed headers
2546 (native-inputs
2547 `(("autoconf" ,autoconf)
2548 ("pkg-config" ,pkg-config)
2549 ("automake" ,automake)
2550 ("libtool" ,libtool)))
2551 (arguments
2552 `(#:configure-flags '("--disable-tools"
2553 "--disable-python"
2554 "--with-argon2")))
2555 (home-page "https://github.com/savoirfairelinux/opendht/")
2556 (synopsis "Distributed Hash Table (DHT) library")
2557 (description "OpenDHT is a Distributed Hash Table (DHT) library. It may
2558 be used to manage peer-to-peer network connections as needed for real time
2559 communication.")
2560 (license license:gpl3+)))
2561
2562 (define-public frrouting
2563 (package
2564 (name "frrouting")
2565 (version "6.0.2")
2566 (source (origin
2567 (method url-fetch)
2568 (uri (string-append "https://github.com/FRRouting/frr/releases/"
2569 "download/frr-" version "/frr-" version
2570 ".tar.xz"))
2571 (sha256
2572 (base32
2573 "0xfrvi62w8qlh46f504ka0skb7pm0g0p8vmdng4w90gsbirlzpdd"))))
2574 (build-system gnu-build-system)
2575 (inputs
2576 `(("c-ares" ,c-ares)
2577 ("json-c" ,json-c)
2578 ("readline" ,readline)))
2579 (native-inputs
2580 `(("perl" ,perl)
2581 ("pkg-config" ,pkg-config)
2582 ("python" ,python-wrapper)
2583 ("python-pytest" ,python-pytest)))
2584 (home-page "https://frrouting.org/")
2585 (synopsis "IP routing protocol suite")
2586 (description "FRRouting (FRR) is an IP routing protocol suite which includes
2587 protocol daemons for BGP, IS-IS, LDP, OSPF, PIM, and RIP. ")
2588 (license license:gpl2+)))
2589
2590 (define-public iwd
2591 (package
2592 (name "iwd")
2593 (version "0.21")
2594 (source (origin
2595 (method git-fetch)
2596 (uri (git-reference
2597 (url "https://git.kernel.org/pub/scm/network/wireless/iwd.git")
2598 (commit version)))
2599 (file-name (git-file-name name version))
2600 (sha256
2601 (base32
2602 "001dikinsa6kshwscjbvwipavzwpqnpvx9fpshcn63gbvbhyd393"))))
2603 (build-system gnu-build-system)
2604 (inputs
2605 `(("dbus" ,dbus)
2606 ("libtool" ,libtool)
2607 ("ell" ,ell)
2608 ("readline" ,readline)))
2609 (native-inputs
2610 `(("asciidoc" ,asciidoc)
2611 ("autoconf" ,autoconf)
2612 ("automake" ,automake)
2613 ("pkgconfig" ,pkg-config)
2614 ("python" ,python)
2615 ("openssl" ,openssl)))
2616 (arguments
2617 `(#:configure-flags
2618 (let ((dbus (assoc-ref %outputs "out")))
2619 (list "--disable-systemd-service"
2620 "--enable-external-ell"
2621 "--enable-hwsim"
2622 "--enable-tools"
2623 "--enable-wired"
2624 "--enable-docs"
2625 "--localstatedir=/var"
2626 (string-append "--with-dbus-datadir=" dbus "/share/")
2627 (string-append "--with-dbus-busdir="
2628 dbus "/share/dbus-1/system-services")))
2629 #:phases
2630 (modify-phases %standard-phases
2631 (add-before 'bootstrap 'pre-bootstrap
2632 (lambda _
2633 (substitute* "Makefile.am"
2634 ;; Test disabled because it needs the kernel module
2635 ;; 'pkcs8_key_parser' loaded.
2636 (("unit\\/test-eapol.*? ") "")
2637 ;; Don't try to 'mkdir /var'.
2638 (("\\$\\(MKDIR_P\\) -m 700") "true"))
2639 #t)))))
2640 (home-page "https://git.kernel.org/pub/scm/network/wireless/iwd.git/")
2641 (synopsis "Internet Wireless Daemon")
2642 (description "iwd is a wireless daemon for Linux that aims to replace WPA
2643 Supplicant. It optimizes resource utilization by not depending on any external
2644 libraries and instead utilizing features provided by the Linux kernel to the
2645 maximum extent possible.")
2646 (license license:lgpl2.1+)))
2647
2648 (define-public batctl
2649 (package
2650 (name "batctl")
2651 (version "2019.3")
2652 (source
2653 (origin
2654 (method url-fetch)
2655 (uri (string-append "https://downloads.open-mesh.org/batman/releases/batman-adv-"
2656 version "/batctl-" version ".tar.gz"))
2657 (sha256
2658 (base32
2659 "0307a01n72kg7vcm60mi8jna6bydiin2cr3ylrixra1596hkzn9b"))))
2660 (inputs
2661 `(("libnl" ,libnl)))
2662 (native-inputs
2663 `(("pkg-config" ,pkg-config)))
2664 (build-system gnu-build-system)
2665 (arguments
2666 `(#:tests? #f
2667 ;; Batctl only has a makefile. Thus we disable tests and
2668 ;; configuration, passing in a few make-flags.
2669 #:phases (modify-phases %standard-phases (delete 'configure))
2670 #:make-flags
2671 (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
2672 (string-append "PKG_CONFIG=" (assoc-ref %build-inputs "pkg-config")
2673 "/bin/pkg-config")
2674 "CC=gcc")))
2675 (home-page "https://www.open-mesh.org/projects/batman-adv/wiki/Wiki")
2676 (synopsis "Management tool for the mesh networking BATMAN protocol")
2677 (description "This package provides a control tool for the
2678 B.A.T.M.A.N. mesh networking routing protocol provided by the Linux kernel
2679 module @code{batman-adv}, for Layer 2.")
2680 (license license:gpl2+)))
2681
2682 (define-public pagekite
2683 (package
2684 (name "pagekite")
2685 (version "1.0.0.190721")
2686 (source
2687 (origin
2688 (method url-fetch)
2689 (uri (string-append "https://pagekite.net/pk/src/pagekite-"
2690 version ".tar.gz"))
2691 (sha256
2692 (base32 "0y4vaqd3pjr6if8jcnhjwignkxgrajmnx1rd1p37anj8xjg7l8zh"))))
2693 (build-system python-build-system)
2694 (arguments
2695 ;; Python 3 support is a work-in-progress and should come soon:
2696 ;; https://github.com/pagekite/PyPagekite/issues/40
2697 ;; https://github.com/pagekite/PyPagekite/pull/71
2698 `(#:python ,python-2
2699 #:phases
2700 (modify-phases %standard-phases
2701 (add-after 'install 'install-man-page
2702 (lambda* (#:key inputs outputs #:allow-other-keys)
2703 (let* ((out (assoc-ref outputs "out"))
2704 (man (string-append out "/share/man")))
2705 (invoke "make"
2706 (string-append "PYTHONPATH=" (getenv "PYTHONPATH"))
2707 "doc/pagekite.1")
2708 (install-file "doc/pagekite.1" (string-append man "/man1"))
2709 #t))))))
2710 (inputs
2711 `(("python2-socksipychain" ,python2-socksipychain)))
2712 (home-page "https://pagekite.net/")
2713 (synopsis "Make localhost servers publicly visible")
2714 (description
2715 "PageKite implements a tunneled reverse proxy which makes it easy to make
2716 a service (such as an HTTP or SSH server) on localhost visible to the wider
2717 Internet, even behind NAT or restrictive firewalls. A managed front-end relay
2718 service is available at @url{https://pagekite.net/}, or you can run your own.")
2719 (license license:agpl3+)))