跳到主要内容

Tor

  • DNSPort 9053
  • SocksPort 9050
  • ControlPort 9051
  • ORPort 9001
    • Onion Router Port
    • 与其他 Tor 节点通信
    • Tor Relay
    • Tor Exit Node
  • DirPort 9030
    • 发布和获取 Tor 网络目录信息
    • 网络拓扑结构信息,如中继节点列表、状态信息等
apk add tor
cat /etc/tor/torrc

tor -f /etc/tor/torrc --RunAsDaemon 0

service tor start

# 代理测试 注意 IsTor
# {"IsTor":true,"IP":"185.227.1.1"}
curl -x socks5h://127.0.0.1:9050 https://check.torproject.org/api/ip
curl 4.icanhazip.com
torrc
HardwareAccel 1
Log notice stdout
DNSPort 127.0.0.1:9053
SocksPort 127.0.0.1:9050
DataDirectory /var/lib/tor

关闭出口

ORPort 0
DirPort 0
ExitPolicy reject *:*
  • HiddenServicePort
    • redirect traffic to a specific port on your machine
  • /etc/tor/torrc
  • /etc/torrc.d/*.conf