Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proxy / PAC file support #869

Open
soredake opened this issue Dec 14, 2022 · 13 comments
Open

Proxy / PAC file support #869

soredake opened this issue Dec 14, 2022 · 13 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@soredake
Copy link

It will be nice if lychee can have support for proxy and PAC file, i have sites that are blocked in my country.

@mre
Copy link
Member

mre commented Dec 14, 2022

I'm guessing you mean files as described here?
Can you post an example so we can have a look?
I'm wondering if it already works if you pass it to lychee as an input e.g. lychee foo.pac or something.

@soredake
Copy link
Author

To clarify, i don't want to check PAC file, i want to use it with lychee like lychee --proxy-file my-pac-file.pac so it will use my configured proxies when checking url's.

@mre
Copy link
Member

mre commented Dec 15, 2022

Ooh, of course, sorry. That makes a lot of sense. We'd need to find a Rust crate, which parses the format and then pass the parameters to reqwest. I think they have support for that. (Can't check right now.)

@mre
Copy link
Member

mre commented Dec 15, 2022

I had a quick look and reqwest supports it just fine: https://docs.rs/reqwest/latest/reqwest/struct.Proxy.html
Now we only need a parser for the format.

@mre mre added enhancement New feature or request help wanted Extra attention is needed labels Aug 27, 2023
@sanmai-NL
Copy link

@mre It would be helpful if proxying support were separated from PAC file support.

@mre
Copy link
Member

mre commented Jan 5, 2024

The question is how that would look like. Any preferred syntax? Something like --proxy 127.0.0.1:8080 for example?

@sanmai-NL
Copy link

Supporting the proxying environment variables similar to curl (and other tools) would be the most convenient and standard starting point.

@mre
Copy link
Member

mre commented Jan 5, 2024

At some point I really need to look at the curl docs. So many great features.

@sanmai-NL
Copy link

Yeah, and this part of it is pretty conventional across tools.

@mre
Copy link
Member

mre commented Jan 5, 2024

We'll stick to that then.

@sanmai-NL
Copy link

https://curl.se/docs/manpage.html has an Environment section that contains the relevant information. SOCKS5 proxying is the most relevant feature as it can support TLS better.

@mre
Copy link
Member

mre commented Jan 5, 2024

I don't know much about socks.
Was thinking of

 lychee --proxy http://proxy.example https://example.com

Similar to the example they show in the docs (thanks for sharing!).
Would a socks proxy be a superset of an HTTP proxy, then? Is it a strict superset?

@sanmai-NL
Copy link

Do you mean a complement? It's a (strict) superset yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants