summaryrefslogtreecommitdiff
path: root/README.md
blob: baed43ff8c9ac603cc28738406c1a455c7edca90 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
This project helps build a static binary for Tor.

Some inspiration is taken from the
[tor-static](https://github.com/cretz/tor-static) Go library.

# Versions

This repo builds:

- Libevent 2.1.8
- OpenSSL 1.1.1b
- Tor 0.4.0.5
- zlib v1.2.11

# Requirements

- A proper C compiler toolchain.
- Make
- Autotools

# Usage

The build has only been tested on Linux so far, but I plan to add support for
Windows & OS X as well.

- Make sure you have all the required dependencies..
- Run `./build.sh`
- Wait.
- Discover that you suddenly have a working `tor-static` binary.

The generated binary is not *entirely* static because it still links against
your system libraries. If you have
[musl-cross](https://bitbucket.org/GregorR/musl-cross/) built and installed in
`/opt/cross`, then you can run `./x86_64-linux-musl.sh` to "cross"-compile a
fully static binary. Scripts for other arches are TBD.