|
|
= Building Command-Line Tor on macOS =
|
|
|
== Pre-Packaged Alternatives ==
|
|
|
# Building Command-Line Tor on macOS
|
|
|
## Pre-Packaged Alternatives
|
|
|
Go to https://www.torproject.org/download/download-easy.html.en#mac to install a pre-built Tor Browser on macOS, including a recent command-line tor.
|
|
|
|
|
|
Go to https://www.torproject.org/docs/tor-doc-osx.html.en to install a command-line tor binary, or build it from source. The current MacPorts version of tor is 0.3.1.8
|
|
|
|
|
|
=== Obtaining a Recent libevent ===
|
|
|
### Obtaining a Recent libevent
|
|
|
1. Go to http://libevent.org/
|
|
|
1. Download the latest stable libevent tar.gz, currently 2.1.8
|
|
|
1. Go to the “Building libevent from source” instructions below
|
... | ... | @@ -17,18 +17,19 @@ Azat Khuzhin https://launchpad.net/~azat 9E3AC83A27974B84D1B3401DB86086848EF8686 |
|
|
|
|
|
Niels Provos http://www.citi.umich.edu/u/provos/ B683 13D0 C293 9222 D26E DFD6 13C2 15C0 6A45 C816
|
|
|
|
|
|
== Obtaining a Recent OpenSSL ==
|
|
|
## Obtaining a Recent OpenSSL
|
|
|
The included OpenSSL 0.9.8 on macOS is too old to build tor. You need at least OpenSSL 1.0.
|
|
|
|
|
|
Build or install the x86_64 architecture of OpenSSL's stable or developer version:
|
|
|
|
|
|
=== Installing Pre-Built Binaries ===
|
|
|
### Installing Pre-Built Binaries
|
|
|
1. Use the instructions at https://www.torproject.org/docs/tor-doc-osx.html.en to install MacPorts, but don't install tor
|
|
|
1. Run: port install openssl
|
|
|
|
|
|
This installs the latest version of tor.[[BR]]
|
|
|
This installs the latest version of tor.
|
|
|
|
|
|
=== Building libevent from source ===
|
|
|
|
|
|
### Building libevent from source
|
|
|
1. ./configure
|
|
|
1. make
|
|
|
1. make verify # (optional)
|
... | ... | @@ -36,17 +37,17 @@ This installs the latest version of tor.[[BR]] |
|
|
|
|
|
This installs libevent (currently 2.1.8)
|
|
|
|
|
|
=== Obtaining Stable OpenSSL ===
|
|
|
### Obtaining Stable OpenSSL
|
|
|
1. Go to https://www.openssl.org/source/
|
|
|
1. Download the latest stable OpenSSL tarball
|
|
|
1. Go to the Building OpenSSL from Source instructions below
|
|
|
|
|
|
=== Obtaining Development OpenSSL ===
|
|
|
### Obtaining Development OpenSSL
|
|
|
1. Go to https://github.com/openssl/openssl
|
|
|
1. Clone the latest development version of OpenSSL using git
|
|
|
1. Go to the Building OpenSSL from Source instructions below
|
|
|
|
|
|
=== Building OpenSSL from Source ===
|
|
|
### Building OpenSSL from Source
|
|
|
1. Run: ./Configure --prefix=/usr/local/ssl darwin64-x86_64-cc
|
|
|
1. Run: make depend
|
|
|
1. Run: make
|
... | ... | @@ -55,8 +56,8 @@ This installs libevent (currently 2.1.8) |
|
|
|
|
|
PGP keys used to verify the OpenSSL source can be found. https://www.openssl.org/community/omc.html
|
|
|
|
|
|
== Building Tor ==
|
|
|
=== Obtain Tor source code ===
|
|
|
## Building Tor
|
|
|
### Obtain Tor source code
|
|
|
Download a tor source tarball from https://dist.torproject.org/
|
|
|
|
|
|
PGP keys used to verify the Tor source. https://www.torproject.org/docs/signing-keys.html Roger Dingledine (0x28988BF5 and 0x19F78451) or Nick Mathewson (0xFE43009C4607B1FB with signing key 0x6AFEE6D49E92B601) used to sign the Tor source code tarballs.
|
... | ... | @@ -73,7 +74,7 @@ To build Tor from a just-cloned git repository: |
|
|
3. `sh autogen.sh`
|
|
|
After autogen is finished Continue to `Configure and Build Tor`
|
|
|
|
|
|
=== Configure, Build and install Tor ===
|
|
|
### Configure, Build and install Tor
|
|
|
1. Run: `./configure --prefix=/usr/local/tor --with-openssl-dir=/usr/local/ssl --with-libevent-dir=/usr/local/lib && make && make check && sudo make install`
|
|
|
|
|
|
Optional you can add `--disable-asciidoc` flag to the ./configure command to build without manpages.
|
... | ... | @@ -86,5 +87,5 @@ Enter `/usr/local/tor/bin/tor` into terminal and click `Return` to start Tor. |
|
|
|
|
|
,,`If you get a error similar to " Found linkable libevent in (system), but it does not seem to run, even with -R. Maybe specify another using --with-libevent-dir}" go to "Obtaining a Recent libevent"`,,
|
|
|
|
|
|
== Running Tor ==
|
|
|
## Running Tor
|
|
|
See https://trac.torproject.org/projects/tor/wiki/doc/MacRunOnBoot to run Tor under launchd. |
|
|
\ No newline at end of file |