MyNixOS website logo
Description

A Haskell Tor Node.

An implementation of the Tor anonymity system in Haskell. The core functionality is exported both as an application and as a high-level library exported by the Tor module. Please see that module for common usage scenarios, and dip only into the other files for advanced / unplanned cases.

A Tor Implementation in Haskell

This version of haskell-tor is (C) 2015 Galois, Inc., and distributed under
a standard, three-clause BSD license. Please see the file LICENSE,
distributed with this software, for specific terms and conditions.

What is Tor?

Tor is a secure onion routing network for providing anonymized access to both the public Internet as well as a series of Tor-internal hidden services. Much more information about Tor can be found at http://torproject.org.

Many thanks to all the hard work that project has put into developing and evangelizing Tor.

What is in this repository?

This repository contains a Tor implementation in Haskell. It is eventually designed to be a fully-compliant Tor implementation, but at the moment lacks some features:

  • Support for finding or implementing hidden services.
  • Proper flow-control support.
  • Statistics updating.
  • Directory server support.

Using this library as an entrance node (i.e., to create anonymized connections to hosts on the Internet) is fairly well tested and should be functional. Relay and exit node support is implemented but much less well tested. For whichever use case you have, please report any problems you find to the GitHub issue tracker.

Building haskell-tor

This library uses cabal as its build system, and should work for Mac, Unix, and HaLVM-based installations. Windows support may work ... we just haven't tested it.

Understanding Network Stacks

The haskell-tor library is built such that it can use one of two built-in network stacks and/or a third-party network stack that you provide. How you get each of these is governed by two flags that correspond to the two network stacks:

  • network ensures that haskell-tor includes defaults for the standard, sockets-based network stack as described in the Haskell network library.

  • hans ensures that haskell-tor includes defaults for the Haskell Network stack, which is a clean-slate networks stack that runs off raw Ethernet frames.

The defaults are a little complicated. To help try to sort things out, here is a table that describes all the combinations of flags, and what the default is for each platform:

DefaultPlatformnetworkhansMeaning
NormalTrueTrueSupport for both hans and network
*NormalTrueFalseSupport only network
NormalFalseTrueSupport only hans
NormalFalseFalseNo network stack support (BYONS)
HaLVMTrueTrueSupport only hans (network ignored)
HaLVMTrueFalseNo network stack support (see prev.)
*HaLVMFalseTrueSupport only hans
HaLVMFalseFalseNo network stack support (BYONS)

Standard Cabal Constraints

If you're building with the HaLVM, please add the constraints --constraint "tls +hans", --constraint "tls -network", and -f-network to your build flags, and if you're using the integer-simple library (for example, to avoid GPL entanglements with unikernels), you should add the constraints --constraint "cryptonite -integer-gmp", --constraint "scientific +integer-simple" and --constraint "scientific < 0.3.4.1".

In either case, we strongly suggest using sandboxes to keep everything nice and tidy.

Important Note

This is an early implementation of Tor that has not been peer-reviewed. Those with a true, deep need for anonymity should strongly consider using the mainline Tor client until and unless this version receives appropriate extensions, testing, and review.

Usage

As with most Haskell packages, this package can either be used as a library or as a binary package. Currently, the executable binary will simply perform an example get from whatismyip.com. Extending this to support a wider range of features is an open issue.

Metadata

Version

0.1.2

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows