summaryrefslogtreecommitdiff
path: root/README.md
blob: 9d9ac41f94fe41fb00754ad82bf32354ec2ac004 (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

- Linux or Windows+MSYS2
- A proper C compiler toolchain.
- Make
- Autotools

For Arch Linux & MSYS2-MinGW64: `pacman -S base-devel`

# Usage

- 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.