Created
January 16, 2021 11:51
-
-
Save davidtavarez/602cd65b558d485b95dcf02792819500 to your computer and use it in GitHub Desktop.
Static Tor compilation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
curl -fsSL "https://zlib.net/zlib-1.2.11.tar.gz" | tar zxvf - | |
cd zlib-1.2.11 | |
./configure --prefix=$PWD/install | |
make -j$(nproc) | |
make install | |
cd .. | |
curl -fsSL "https://www.openssl.org/source/old/1.0.1/openssl-1.0.1u.tar.gz" | tar zxvf - | |
cd openssl-1.0.1u | |
./config --prefix=$PWD/install no-shared no-dso | |
make -j$(nproc) | |
make install | |
cd .. | |
curl -fsSL "https://github.com/libevent/libevent/releases/download/release-2.1.12-stable/libevent-2.1.12-stable.tar.gz" | tar zxvf - | |
cd libevent-2.1.12-stable | |
PKG_CONFIG_PATH=$PWD/../openssl-1.0.1u/install/lib/pkgconfig/ ./configure --prefix=$PWD/install \ | |
--disable-shared \ | |
--enable-static \ | |
--with-pic | |
make -j$(nproc) | |
make install | |
curl -fsSL "https://dist.torproject.org/tor-0.4.4.6.tar.gz" | tar zxvf - | |
cd tor-0.4.4.6 | |
./configure --prefix=$PWD/install \ | |
--disable-module-relay --disable-module-dirauth \ | |
--disable-system-torrc \ | |
--disable-asciidoc --disable-manpage --disable-html-manual \ | |
--enable-static-tor \ | |
--disable-systemd \ | |
--with-libevent-dir=$PWD/../libevent-2.1.12-stable/install \ | |
--with-openssl-dir=$PWD/../openssl-1.0.1u/install \ | |
--with-zlib-dir=$PWD/../zlib-1.2.11/install | |
make -j$(nproc) | |
make install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment