sudo 服务 tor 重新加载
* Reloading tor daemon configuration... [fail]
/var/log/tor/日志
Jan 08 08:01:25.000 [notice] Tor 0.2.7.6 (git-605ae665009853bd) opening new log file.
Jan 08 10:19:40.000 [notice] Heartbeat: Tor's uptime is 3 days 0:00 hours, with 0 circuits open. I've sent 1.17 MB and received 28.04 MB.
Jan 08 12:31:58.000 [notice] Received reload signal (hup). Reloading config and resetting internal state.
Jan 08 12:31:58.000 [notice] Read configuration file "/usr/share/tor/tor-service-defaults-torrc".
Jan 08 12:31:58.000 [notice] Read configuration file "/etc/tor/torrc".
Jan 08 12:31:58.000 [notice] Based on detected system memory, MaxMemInQueues is set to 5988 MB. You can override this by setting MaxMemInQueues by hand.
Jan 08 12:31:58.000 [notice] Opening OR listener on 0.0.0.0:443
Jan 08 12:31:58.000 [warn] **Could not bind to 0.0.0.0:443: Permission denied**
Jan 08 12:31:58.000 [warn] Failed to parse/validate config: Failed to bind one of the listener ports.
Jan 08 12:31:58.000 [err] Reading config failed--see warnings above. For usage, try -h.
Jan 08 12:31:58.000 [warn] Restart failed (config error?). Exiting.
配置 /etc/tor/torrc
ORPort 443
Nickname ididnteditheconfig
RelayBandwidthRate 1000 KBytes # Throttle traffic to 100KB/s (800Kbps)
RelayBandwidthBurst 2000 KBytes # But allow bursts up to 200KB (1600Kb)
ExitPolicy reject *:*
本地开放443端口:
ss -tunlp | grep 443
tcp LISTEN 0 128 *:443 *:*
tcp LISTEN 0 128 :::443 :::*
答案1
如果没有 root 权限,您无法绑定较低端口。
你必须这么做才能做到这一点。
sudo setcap CAP_NET_BIND_SERVICE=+eip /path/to/binary
对我来说,它效果很好,但也有其他方法。
欲了解更多信息和更好的解释,请阅读此文。
https://superuser.com/questions/710253/allow-non-root-process-to-bind-to-port-80-and-443