深度阅读

slpash启用tor代理

作者
作者
2023年08月22日
更新时间
8.39 分钟
阅读时间
0
阅读量

启用docker

bash sudo docker run -d --name splash -p 8050:8050 -v /mnt/data/proxy:/etc/splash/proxy-profiles -p 5023:5023 scrapinghub/splash --max-timeout 3600

创建一个tor.ini

[proxy]

; required
host=107.12.96.188
port=9050

; optional, default is no auth
;username=username
;password=password

; optional, default is HTTP. Allowed values are HTTP and SOCKS5
type=SOCKS5

;[rules]
; optional, default ".<em>"
;whitelist=
;    .</em>mywebsite.com.*

; optional, default is no blacklist
;blacklist=
;    .<em>.js.</em>
;    .<em>.css.</em>
;    .*.png

只需要在请求参数中加入&proxy=tor 即可。

bash curl 'http://localhost:8050/render.html?url=http://mywebsite.com/page-with-javascript.html&proxy=mywebsite'
Splash HTTP API - Splash 3.5 documentation

相关标签

博客作者

热爱技术,乐于分享,持续学习。专注于Web开发、系统架构设计和人工智能领域。