Git Product home page Git Product logo

Comments (8)

raphCode avatar raphCode commented on July 22, 2024 1

Nice catch, I can confirm it works with https_proxy and http_proxy.
It seems suckit makes https content retrieval and additional http requests for something else.
If I had to guess, there is some code that resolves URLs, which is responsible for the http requests. (I remember some unit test which try to resolve an invalid lwn.net URL and looks for a redirect.)

My public server IP got blocked from scraping a particular website, so I can tell it needs both kinds of proxies to circumvent the block.


For future readers:
For multithreading downloading via proxies to work, the constants MAX_EMPTY_RECEIVES and SLEEP_MILLIS may need to be adjusted upwards, otherwise all worker threads exit prematurely: They receive no work in the time interval because of the increased proxy latency.

from suckit.

Skallwar avatar Skallwar commented on July 22, 2024

Reqwest seems to support this. https://docs.rs/reqwest/latest/reqwest/struct.Proxy.html

We could read the environment variable before creating the Downloader

from suckit.

raphCode avatar raphCode commented on July 22, 2024

What I find strange, the environment variable is already read and processed somehow:

  • the download takes significantly longer with a proxy
  • bad proxy strings lead to failed downloads
  • running strings on the binary shows that the strings http_proxy and HTTP_PROXY are contained

But, the downloaded page does not show the proxy ip for the ifconfig.me website.

from suckit.

Skallwar avatar Skallwar commented on July 22, 2024

My knowledge on proxy is quite limited but I agree with you, something is not right

from suckit.

Skallwar avatar Skallwar commented on July 22, 2024

From what I read here it should "just works"™

from suckit.

Skallwar avatar Skallwar commented on July 22, 2024

This works for me (with some warning and retry for the proxy connection):

https_proxy=147.135.134.57:9300 suckit https://ifconfig.me
https_proxy=147.135.134.57:9300 suckit http://ifconfig.me

The ip I get is not my real ip

Note that I'm using https_proxy and not http_proxy. If I used your http_proxy with a random https_proxy this is not working. I think that for some reason we are doing https request even when specifying http.

from suckit.

Skallwar avatar Skallwar commented on July 22, 2024

My public server IP got blocked from scraping a particular website

Typical SuckIT

Should we close this?

from suckit.

raphCode avatar raphCode commented on July 22, 2024

As far as I am concerned, yes.
Except you want to keep it to open for the multiple proxy feature. This was just an idea, nothing where I would contribute personally.

from suckit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.