【问题标题】:Passing tor proxy to splash in WSL2将 tor 代理传递给 WSL2
【发布时间】:2021-06-16 12:55:04
【问题描述】:

我目前正在尝试将代理传递给在从 WSL 启动的 docker Desktop 上运行的启动实例。
我开始使用sudo service tor start

为了确保我的 WSL tor 服务与 Windows 通信,我将其作为代理传递给 Firefox,并使用以下参数:

  • IP:127.0.0.1
  • 端口:9050
  • 代理类型:SOCKS5

然后我去https://check.torproject.org/ 和tadaa 它工作

我使用以下命令运行我的容器:
sudo docker run -p 8050:8050 -p 5023:5023 scrapinghub/splash --disable-browser-caches

我发现测试它的最简单方法是转到 localhost:8050 并输入以下行:

  splash:on_request(function(request)
    request:set_proxy{
      host = "127.0.0.1",
      port = 9050,
      username = "",
      password = "",
      type = "SOCKS5"
    }
  end
  )
  assert(splash:go(args.url))
  assert(splash:wait(0.5))
  return {
    html = splash:html(),
    png = splash:png(),
    har = splash:har(),
  }
end

我查询 https://check.torproject.org/ ,我得到错误 99。

我在这里遗漏了什么重要的东西吗?

【问题讨论】:

    标签: tor wsl-2 scrapy-splash


    【解决方案1】:

    你看过proxy profiles吗?它们看起来是使用 docker Splash 容器附加代理的首选方式。

    【讨论】:

      猜你喜欢
      • 2014-04-06
      • 2023-03-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-11-22
      • 1970-01-01
      • 1970-01-01
      • 2019-03-10
      相关资源
      最近更新 更多