-
Notifications
You must be signed in to change notification settings - Fork 15
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
Huber on Linux does not work behind a proxy #118
Comments
+1 |
Hi, this is super critical to us as we currently can't use Note: Currently we are getting around this by using WSL on Windows as it uses the Windows proxy and to Linux in WSL it just works. However we can't use this on a real Linux box so we can't use Thank you. |
I have some ideas about how to set up a test environment for this. Not everyone has a proxy server or enterprise networking restrictions to test behind; and it's potentially non-trivial for many home-labbers to set up. No promise on a timeline, I'm just a random SRE that really likes I think you might have nerd-sniped me by asking an interesting question that should be totally tractable. especially " |
I went digging and I found that most of the HTTP work is actually inside I also had a sudden "hunch" to try explicitly specifying
is it perhaps that the library is actually differentiating between HTTP and HTTPS, and because all the Github API Commands operate over HTTPS, the correct environment variable to set is only another research note, I think it was the I also observed that it does seem to expect a protocol, it's not going to assume one for you. |
@DanceMore Thanks for looking into this. We really appreciate it. We set all six possible variables, i.e. HTTP_PROXY
HTTPS_PROXY
http_proxy
https_proxy
NO_PROXY
no_proxy |
and what kind of errors / output do you get when it fails ? |
uses
I will see matching logs on Squid for |
Here is the trace output when I get when trying to search huber: > HTTPS_PROXY="http://corporate.proxy.local:8080" huber search -l trace
2024-02-28T18:34:02.306Z DEBUG simpledi_rs::di > adding Config { log_level: "TRACE", output_format: Console, home_dir: "/home/awddude/.huber", github_token: None, github_key: None } to DI system
2024-02-28T18:34:02.306Z TRACE simpledi_rs::di > getting mutable "huber_common::model::config::Config" from DI system
2024-02-28T18:34:02.306Z DEBUG simpledi_rs::di > adding PackageService { container: None } to DI system
2024-02-28T18:34:02.306Z TRACE simpledi_rs::di > getting mutable "huber::service::package::PackageService" from DI system
2024-02-28T18:34:02.306Z DEBUG simpledi_rs::di > adding ReleaseService { container: None } to DI system
2024-02-28T18:34:02.306Z TRACE simpledi_rs::di > getting mutable "huber::service::release::ReleaseService" from DI system
2024-02-28T18:34:02.306Z DEBUG simpledi_rs::di > adding CacheService { container: None } to DI system
2024-02-28T18:34:02.306Z TRACE simpledi_rs::di > getting mutable "huber::service::cache::CacheService" from DI system
2024-02-28T18:34:02.306Z DEBUG simpledi_rs::di > adding HuberUpdateService { container: None } to DI system
2024-02-28T18:34:02.306Z TRACE simpledi_rs::di > getting mutable "huber::service::update::HuberUpdateService" from DI system
2024-02-28T18:34:02.306Z DEBUG simpledi_rs::di > adding RepoService { container: None } to DI system
2024-02-28T18:34:02.306Z TRACE simpledi_rs::di > getting mutable "huber::service::repo::RepoService" from DI system
2024-02-28T18:34:02.306Z DEBUG simpledi_rs::di > adding ConfigService { container: None } to DI system
2024-02-28T18:34:02.306Z TRACE simpledi_rs::di > getting mutable "huber::service::config::ConfigService" from DI system
2024-02-28T18:34:02.306Z DEBUG simpledi_rs::di > initializing DI system
2024-02-28T18:34:02.306Z TRACE simpledi_rs::di > getting immutable "huber::service::package::PackageService" from DI system
2024-02-28T18:34:02.306Z TRACE simpledi_rs::di > getting immutable "huber::service::release::ReleaseService" from DI system
2024-02-28T18:34:02.306Z TRACE simpledi_rs::di > getting immutable "huber::service::cache::CacheService" from DI system
2024-02-28T18:34:02.306Z TRACE simpledi_rs::di > getting immutable "huber::service::update::HuberUpdateService" from DI system
2024-02-28T18:34:02.306Z TRACE simpledi_rs::di > getting immutable "huber::service::repo::RepoService" from DI system
2024-02-28T18:34:02.306Z TRACE simpledi_rs::di > getting immutable "huber::service::config::ConfigService" from DI system
2024-02-28T18:34:02.306Z TRACE simpledi_rs::di > getting immutable "huber_common::model::config::Config" from DI system
2024-02-28T18:34:02.306Z TRACE simpledi_rs::di > getting immutable "huber::cmd::search::SearchCmd" from DI system
2024-02-28T18:34:02.306Z TRACE simpledi_rs::di > getting immutable "huber::service::package::PackageService" from DI system
2024-02-28T18:34:02.306Z TRACE simpledi_rs::di > getting immutable "huber::service::cache::CacheService" from DI system
2024-02-28T18:34:02.306Z INFO huber::service::cache > Updating repos
2024-02-28T18:34:02.306Z TRACE simpledi_rs::di > getting immutable "huber_common::model::config::Config" from DI system
2024-02-28T18:34:02.306Z INFO huber::service::cache > Updating "/home/awddude/.huber/repos/huber"
⢹ Updating managed repos 2024-02-28T18:34:02.350Z INFO huber::component::github > Cloning huber github repo
2024-02-28T18:34:02.350Z DEBUG huber::component::github > Merging huber repo update
⡧ Updating managed repos 2024-02-28T18:36:12.931Z DEBUG huber::component::github > Failed to fetch huber github repo, failed to connect to github.com: Connection timed out; class=Os (2)
2024-02-28T18:36:12.940Z INFO huber::component::github > Cloning huber repo via https
error: failed to connect to github.com: Connection timed out; class=Os (2)awddude@awddudelxpc:~/source As you can see it fails to connect to github. For comparison here is the output I get when cloning the huber repo using > HTTPS_PROXY="http://corporate.proxy.local:8080" git clone https://github.com/innobead/huber.git
Cloning into 'huber'...
remote: Enumerating objects: 6489, done.
remote: Counting objects: 100% (992/992), done.
remote: Compressing objects: 100% (467/467), done.
remote: Total 6489 (delta 583), reused 880 (delta 523), pack-reused 5497
Receiving objects: 100% (6489/6489), 1.07 MiB | 7.72 MiB/s, done.
Resolving deltas: 100% (4160/4160), done.
Thanks again for looking into this for us. |
Gave up. |
When running Huber from behind a proxy it is unable to talk to Github so
huber search
and any other command that need to talk to Github do not work.I think you just need to configure
reqwest
to use theHTTP_PROXY
,HTTPS_PROXY
andNO_PROXY
vars if they exist.See: https://docs.rs/reqwest/latest/reqwest/struct.Proxy.html
NOTE:
reqwest
docs say:So something must be interfering with this or turning it off.
Please let me know if need someone to test changes.
The text was updated successfully, but these errors were encountered: