【问题标题】:Send requests through TOR using httr package使用 httr 包通过 TOR 发送请求
【发布时间】:2021-05-03 07:15:25
【问题描述】:

我想使用 Tor 代理和 R httr 包发送 GET 请求。我在这里找到了简单的代码:https://gist.github.com/jeroen/5127c288f8914bdb20be,但是当我尝试时:

library(httr)
GET("https://httpbin.org/get", use_proxy("socks5://localhost:9050"))

我遇到了一个错误:

Error in curl::curl_fetch_memory(url, handle = handle) : 
  Failed to connect to localhost port 9050: Connection refused

我在发送执行请求之前已经打开了 Tor 浏览器。 我也尝试过使用端口 9001。

【问题讨论】:

    标签: r tor httr


    【解决方案1】:

    适用于 9150 端口

    library(httr)
    GET("https://httpbin.org/get", use_proxy("socks5://localhost:9150"))
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-11-26
      • 1970-01-01
      • 2016-01-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多