-
-
Notifications
You must be signed in to change notification settings - Fork 197
(Deprecated) Setup
On Linux.
You need to have go, git and tor installed e.g.
sudo apt install git golang-go tor
sudo pacman -S tor go git
Clone this repo via git
git clone https://github.com/lu4p/ToRat
Then run the Setup Script
cd ./ToRat
./setup.sh
This will get and setup the following packages for you.
https://github.com/lu4p/ToRat_client
https://github.com/lu4p/ToRat_server
https://github.com/lu4p/genCert
Furthermore it will install tor and setup a hidden service and generate a TLS Certificate
On Linux.
To build the Server run
cd ./ToRat/ToRat_server
go build
On Windows.
- Download and install git https://git-scm.com/download/win
- Download and install golang https://golang.org/dl/
- Download and install the latest MSYS2 64-bit http://www.msys2.org/
You can build the client on Windows by executing the following, it may also be useful to remove all log calls.
To embed tor in the binary it is required to build tor statically this will take a while but is only required once.
set PATH=C:\msys64\usr\bin;%PATH%
set MSYSTEM=MINGW64
bash -lc "pacman -Sy --noconfirm --needed base-devel mingw-w64-i686-toolchain mingw-w64-x86_64-toolchain git mingw-w64-i686-cmake mingw-w64-x86_64-cmake"
cd %HOMEPATH%\go\src\github.com\cretz\
git clone github.com/cretz/tor-static --recursive
bash -lc "export PATH=/mingw64/bin:$PATH && cd c/Users/Your_USERNAME_HERE/go/src/github.com/cretz/tor-static && /c/go/bin/go run build.go build-all"
IMPORTANT: change the username to your current username in the last command
set PATH=C:\msys64\mingw64\bin;%PATH%
set MSYSTEM=MINGW64
go get -u github.com/cretz/bine/tor
cd %HOMEPATH%\go\src\github.com\cretz\tor-static
go test -v build_test.go -tor.verbose
set PATH=C:\msys64\usr\bin;%PATH%
set MSYSTEM=MINGW64
cd %HOMEPATH%\go\src\github.com\lu4p\ToRat_client
go build --ldflags "-s -w -H windowsgui"
For testing the -H windowsgui flag should be omitted.
On Linux.
sudo apt install build-essential libtool autopoint -y
cd ~/go/src/github.com/cretz/
git clone github.com/cretz/tor-static --recursive
cd ~/go/src/github.com/cretz/tor-static
go run build.go build-all
cd ./ToRat/ToRat_client
go build -ldflags "-s -w"
On Mac OS.
- Normal build tools (e.g. Xcode command line tools)
- Libtool (e.g. brew install libtool)
- Autoconf and Automake (e.g. brew install automake)
- autopoint (can be found in gettext, e.g. brew install gettext)
- Note, by default this is assumed to be at /usr/local/opt/gettext/bin. Use -autopoint-path to change it.
go get -u github.com/cretz/tor-static
cd ~/go/src/github.com/cretz/tor-static
go run build.go build-all
cd ~/go/src/github.com/lu4p/ToRat_client
go build -ldflags "-s -w"
On Linux.
cd ./ToRat/ToRat_client
env GOOS=linux go build -ldflags "-s -w" -tags "notor"
cd ./ToRat/ToRat_client
env GOOS=windows go build -ldflags "-s -w" -tags "notor"
cd ./ToRat/ToRat_client
env GOOS=darwin go build -ldflags "-s -w" -tags "notor"