![](/img/trans.png)
[英]Need to restart python in Terminal every time a change is made to script
[英]Python change proxy every time
只需安装tor并利用 tor 将您的 ip 地址更改为 python tor sdk 包,如torpy
或stem
。 当然,您可以避免使用包并在您的操作系统中通过subprocess
进程运行新的 ip 设置器命令。
例如,您可以将此要点用于 ubuntu:
apt update && apt install -y tor
echo "ControlPort 9051" >> /etc/tor/torrc
echo HashedControlPassword $(tor --hash-password "password" | tail -n 1) >> /etc/tor/torrc
service tor start
curl ifconfig.me
torify curl ifconfig.me
对于这些 curl 请求,您将获得不同的 IP。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.