【匿名通信】在Linux(Ununtu 16.04)環境下編譯運行tor源碼

1.準備工作
(1)安裝make工具

sudo apt-get install make


(2)安裝gcc

sudo apt-get install build-essential


(3)創建目錄

    mkdir tor-build
    cd tor-build


2.安裝libevent 
    

sudo apt-get install libevent-dev


3.安裝openssl
       

sudo apt-get install libssl-dev

4.安裝zlib  
  

sudo apt-get install zlib1g-dev

5.編譯安裝運行tor源碼
(1)官網下載源碼並且解壓
 

wget http://www.theonionrouter.com/dist/tor-0.3.3.9.tar.gz
tar zxvf  tor-0.3.3.9.tar.gz
cd tor-0.3.3.9

(2)運行配置文件

         

./configure

(3)編譯、安裝

         

make install

(4)運行

cd ./src/or

tor

 

運行結果:

Jul 20 18:55:34.380 [notice] Tor 0.3.3.9 (git-45028085ea188baf) running on Linux with Libevent 2.0.21-stable, OpenSSL 1.0.2g, Zlib 1.2.8, Liblzma N/A, and Libzstd N/A.
Jul 20 18:55:34.000 [warn] You are running Tor as root. You don't need to, and you probably shouldn't.
Jul 20 18:55:34.000 [notice] Bootstrapped 0%: Starting
Jul 20 18:55:34.000 [notice] Starting with guard context "default"
Jul 20 18:55:35.000 [notice] Bootstrapped 5%: Connecting to directory server
Jul 20 18:55:36.000 [notice] Bootstrapped 10%: Finishing handshake with directory server
Jul 20 18:55:37.000 [notice] Bootstrapped 15%: Establishing an encrypted directory connection
Jul 20 18:55:37.000 [notice] Bootstrapped 20%: Asking for networkstatus consensus
Jul 20 18:55:37.000 [notice] Bootstrapped 25%: Loading networkstatus consensus
Jul 20 18:55:39.000 [notice] I learned some more directory information, but not enough to build a circuit: We have no usable consensus.
Jul 20 18:55:39.000 [notice] Bootstrapped 40%: Loading authority key certs
Jul 20 18:55:39.000 [notice] Bootstrapped 45%: Asking for relay descriptors
Jul 20 18:55:39.000 [notice] I learned some more directory information, but not enough to build a circuit: We need more microdescriptors: we have 0/6473, and can only build 0% of likely paths. (We have 0% of guards bw, 0% of midpoint bw, and 0% of exit bw = 0% of path bw.)
Jul 20 18:55:41.000 [notice] Bootstrapped 50%: Loading relay descriptors
Jul 20 18:55:42.000 [notice] Bootstrapped 56%: Loading relay descriptors
Jul 20 18:55:42.000 [notice] Bootstrapped 65%: Loading relay descriptors
Jul 20 18:55:42.000 [notice] Bootstrapped 70%: Loading relay descriptors
Jul 20 18:55:44.000 [notice] Bootstrapped 77%: Loading relay descriptors
Jul 20 18:55:44.000 [notice] Bootstrapped 80%: Connecting to the Tor network
Jul 20 18:55:44.000 [notice] Bootstrapped 85%: Finishing handshake with first hop
Jul 20 18:55:45.000 [notice] Bootstrapped 90%: Establishing a Tor circuit
Jul 20 18:55:46.000 [notice] Tor has successfully opened a circuit. Looks like client functionality is working.
Jul 20 18:55:46.000 [notice] Bootstrapped 100%: Done

ps:如果接下來要執行其他命令,因爲ctrl+c會結束正在運行的tor進程,所以只能重新開一個窗口。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章