惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Engineering at Meta
Engineering at Meta
博客园_首页
J
Java Code Geeks
Jina AI
Jina AI
B
Blog RSS Feed
量子位
有赞技术团队
有赞技术团队
M
MIT News - Artificial intelligence
L
LangChain Blog
Microsoft Security Blog
Microsoft Security Blog
小众软件
小众软件
博客园 - 聂微东
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 三生石上(FineUI控件)
Last Week in AI
Last Week in AI
MongoDB | Blog
MongoDB | Blog
I
InfoQ
罗磊的独立博客
H
Hackread – Cybersecurity News, Data Breaches, AI and More
爱范儿
爱范儿
Y
Y Combinator Blog
Vercel News
Vercel News
雷峰网
雷峰网

OhYee 博客

小鹏辅助驾驶测评|OhYee 博客 小鹏非支持手机开启自动解锁|OhYee 博客 使用函数计算实现 301 重定向|OhYee 博客 针对 HTML 内容使用 Ant Design 图片弹框|OhYee 博客 博客进程泄露及僵尸进程解决|OhYee 博客 蓝易云服务器体验|OhYee 博客 SSH 调起本地 VSCode|OhYee 博客 【2022 秋招内推】阿里云后端研发工程师|OhYee 博客 使用函数计算获取 IP 地址信息|OhYee 博客 正确获取客户端 IP/HTTP Header 也可能重复|OhYee 博客 评测 Oculus Quest2 及 BigScreen|OhYee 博客 NextJS 热重载保留状态|OhYee 博客 如何优雅地贴 gist 代码|OhYee 博客 Linux 精细化文件权限|OhYee 博客 VSCode 容器开发环境|OhYee 博客 Clash 的不兼容更新排查|OhYee 博客 Zeek 导出 PCAP|OhYee 博客 记一次 ssh 配置问题|OhYee 博客 Git Commit 规范化工具|OhYee 博客 谈谈《星之卡比-探索发现》|OhYee 博客 VSCode 快捷键绑定 Shell 命令|OhYee 博客 ASN.1 语法及 X.509 证书格式解析解析|OhYee 博客 腾讯企业邮箱忽略 MX 记录发信|OhYee 博客 Chrome/Edge 标签组插件|OhYee 博客 【应届内推】阿里云后端研发工程师|OhYee 博客 损坏的 Typecho 备份处理为 JSON|OhYee 博客 VS Code VIM 插件高效使用|OhYee 博客 SSH 正反向代理|OhYee 博客 Let's Encrypt 根证书过期引发的问题|OhYee 博客 OpenWRT 忽略内核依赖|OhYee 博客
编译Tor|OhYee 博客
2020-02-17 · via OhYee 博客

这是一篇最后编辑于 6 年前 的文章,其内容可能与目前实际情况差异较大,请注意甄别

安装

Tor笔记目录索引

下载源码

git clone git@github.com:torproject/tor.git

环境配置

首先需要使用./autogen.sh生成相应的配置文件(需要先安装automakeautoconf系列的工具:yay -Sy automake autoconf

接着运行./configure来让程序检测相应的环境,并生成相应的文件

如果遇到

checking for libevent directory... configure: WARNING: Could not find a linkable libevent.  If you have it installed somewhere unusual, you can specify an explicit path using --with-libevent-dir
configure: error: Missing libraries; unable to proceed.

可则需要安装libevent-devel,Arch下使用yay -Sy libevent安装

在生成文档的过程,需要asciidoc

  • 可以选择安装:yay -Sy asciidoc
  • 也可以选择跳过:./configure --disabled-asciidoc

最终配置输出为

Tor Version: Tor 0.4.4.0-alpha-dev 

Build Features
  Compiler:                                                      gcc
  Host OS:                                                       linux-gnu

  Warnings are fatal (--enable-fatal-warnings):                  no
  Rust support (--enable-rust):                                  no
  Cargo Online Fetch (--enable-cargo-online-mode):               no
  Android support (--enable-android):                            no

Static Build
  tor (--enable-static-tor):                                     no
  libevent (--enable-static-libevent):                           no
  libssl (--enable-static-openssl):                              no
  zlib1g (--enable-static-zlib):                                 no

Optional Libraries
  libnss (--enable-nss):                                         no
  libseccomp (--disable-seccomp):                                yes
  libscrypt (--disable-libscrypt):                               yes
  Systemd support (--enable-systemd):                            no
  liblzma (--enable-lzma):                                       no
  libzstd (--enable-zstd):                                       no

Hardening
  Compiler Hardening (--disable-gcc-hardening):                  yes
  Linker Hardening (--disable-linker-hardening):                 yes
  Fragile Hardening (--enable-fragile-hardening, dev only):      no

Modules
  relay (--disable-module-relay):                                yes
  dirauth (--disable-module-dirauth):                            yes
  dircache (--disable-module-dircache):                          yes

Documentation
  AsciiDoc (--disable-asciidoc):                                 yes
  Man Pages (--disable-manpage):                                 yes
  HTML Manual (--disable-html-manual):                           yes

Tests
  Unit tests (--disable-unittests):                              yes
  assert()s enabled (--enable-asserts-in-tests, dev only):       no
  Code Coverage (--enable-coverage):                             no
  libFuzzer support (--enable-libfuzzer):                        no
  OSS-Fuzz support (--enable-oss-fuzz):                          no

Install Directories
  Binaries:                                                      /usr/local/bin
  Configuration:                                                 /usr/local/etc/tor
  Man Pages:                                                     /usr/local/share/man

Configure Line: ./configure 

编译并安装

接下来是正式的编译安装过程:make && make install

make编译的过程会很漫长,make install安装则可能需要root权限保证能安装到/usr/bin等目录

安装后可以使用make uninstall卸载

完成后即可运行tor启动Tor服务了

配置

tor的配置文件torrc会存放在/usr/local/etc/tor/torrc
可以在里面写入HTTPSProxy 127.0.0.1:1081SOCKS5Proxy 127.0.0.1:1080来通过代理连接目录服务器

需要额外注意,如果要使用V2ray作为前置代理,需要关闭domainOverride以及流量探测

使用

看到100%后,接着便可使用SOCKS://127.0.0.1:9050作为代理匿名上网了

这里不涉及洋葱浏览器的使用,因此Tor本身相当于启用了一个本地服务,给你提供了一个匿名的代理。
同时,使用Tor本身不会被作为中继
如果希望成为中继结点,则需要在torrc中写入

Nickname xxx
ContactInfo xxx@xxx.com
RelayBandwidthRate 1300 KBytes
RelayBandwidthBurst 2400 KBytes