![](/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.