bkw777 / mainline

Install mainline kernel packages from kernel.ubuntu.com
GNU General Public License v3.0
1.04k stars 72 forks source link

unrecognized proxy format #73

Closed ouonet closed 1 year ago

ouonet commented 3 years ago

all_proxy=socks5h://127.0.0.1:1080 mainline --check

mainline 1.0.12
Distribution: Ubuntu 20.04.1 LTS
Architecture: amd64
Running kernel: 5.9.0-050900-generic
E: Caught Error while parsing environment variable 'all_proxy'
Exception: [AbstractOptionHandler.cc:69] errorCode=28 We encountered a problem while processing the option '--all-proxy'.
  -> [OptionHandlerImpl.cc:520] errorCode=1 unrecognized proxy format

E: Internet connection is not active
E: Caught Error while parsing environment variable 'all_proxy'
Exception: [AbstractOptionHandler.cc:69] errorCode=28 We encountered a problem while processing the option '--all-proxy'.
  -> [OptionHandlerImpl.cc:520] errorCode=1 unrecognized proxy format

E: Internet connection is not active
Fetching index from kernel.ubuntu.com...
OK
bkw777 commented 3 years ago

The issue appears to be that aria2c does not support socksv5

https://github.com/aria2/aria2/issues/153

I have no proposed fix. Complain to aria2c or don't use socks5 or try to figure out how to "other ways to socksify aria2c" as mentioned in that issue, though I don't see any example directions how to actually do it.

I will add a "me too" to that thread.

bkw777 commented 3 years ago

Given that the aria2c ticket is actually ancient, and both wget and curl support the use case, and aria2c still doesn't 7 years after a ticket was opened for it... we have to assume this will never work with aria2c, and perhaps we should switch aout aria2c for curl or wget.

I don't think there is anything all that special we are getting from aria2c vs any other http download method. Our http download needs are simple. Even if we used a tool that had no fancy retry strategies built in, we could just do that in a shell script or directly in the vala main app code perfectly easily.

I will at least take a look at swapping out aria2c for curl. Or maybe an external but bundled shell script, so that the app can use any downloader as long as you write a wrapper script around it to implement a consistent interface with the app. So we could bundle 3 scripts to begin with, one each for wget, curl, and aria2c, and the user can select which one they want in the config screen. And for really special needs, the user can copy and modify one of the scripts to make a custom one to do whatever they need to deal with extra unusual network needs, without needing the app to support unpredictable new situations.

We could probably use libsoup or libcurl and have the http downloading built in, but an external wrapper/driver script lets the user handle upredictable new situations if they need to.

bkw777 commented 3 years ago

I just noticed that there are http-proxy options that may be specified in download list files https://aria2.github.io/manual/en/html/aria2c.html#id2

And we do in fact use a list file for downloads in DownloadManager.vala So maybe we add a few config options that will get added here? https://github.com/bkw777/mainline/blob/d3b91b092bc470afcdadf8d316559c576dbfad45/src/Common/DownloadManager.vala#L91

bkw777 commented 1 year ago

Proxy support has been added.