Menu

#162 Add disable-proxy or disable-env-proxy configuration option

closed
nobody
None
5
2012-09-28
2009-12-28
Nezmer
No

I couldn't find a systematic way to bypass environment proxy without unsetting the environment variable in every shell/subshell aria2c runs inside. I want to use the proxy for everything but downloading.

I'm sure this would be useful to others too.

Discussion

  • tujikawa

    tujikawa - 2010-01-05

    How about creating alias?

    alias aria2c='http_proxy="" https_proxy="" ftp_proxy="" aria2c'

    You can put the above line in config file, for example, .bashrc if you use bash.

     
  • Nezmer

    Nezmer - 2010-01-07

    Thank you for commenting on this bug.

    I actually use a similar alias(with a different name because I don't want to override aria2c).

    I didn't really explain my use case.
    I move around a lot and connect to various networks. Sometimes I want to use no proxy at all. Sometimes I want to use proxy for aria2c only (So putting proxy settings in aria2.conf). Sometimes I want aria2c to bypass proxy or environment proxy settings. There is all kinds of combinations users might need.

    I use a script witch set all network settings according to the network I'm connecting to. Of course I could use sed and change the alias and resource .bashrc or .zshhrc but doing this through aria2.conf is cleaner especially If you switch networks without logging out and have a lot of shells/subshells open (so resourcing is not an option and has to be done manually).

    Am I missing something?

     
  • tujikawa

    tujikawa - 2010-01-09

    You can prepare 2 aria2.conf files: one for proxy, one for non-proxy connection and choose it using --conf-path option.
    But it still use environment variables. Currently, --{http|ftp|https|all}-proxy option only allows proxy URI and it means we cannot un-define them. So how about to make them accept empty string and it makes aria2 forget previous proxy setting.
    You usually put proxy setting in aria2.conf and when you want to bypass proxy, pass aria2 --all-proxy=""(of course, if you set proxy for each protocol, you have to set them all).

     
  • tujikawa

    tujikawa - 2010-01-15

    From ChangeLog r1813:

    Now --all-proxy, --http-proxy, --https-proxy and --ftp-proxy
    option accepts empty string "". When "" is given, it erases
    previously defined proxy.

     
  • tujikawa

    tujikawa - 2010-02-03

    Since aria2 1.8.1, you can disable proxy setting by specifying "" to --all-proxy, --http-proxy, --https-proxy and --ftp-proxy option. Closing the issue.

     

Log in to post a comment.

Auth0 Logo