apprise icon indicating copy to clipboard operation
apprise copied to clipboard

Using other environment variables to set proxy

Open TigerCubDen opened this issue 2 years ago • 3 comments

:bulb: The Idea

There is a well-known reason that in China lots of listed services has been blocked by GFW, which caused the connection is not possible unless proxy server is used.

on issue #387 it has already talked about setting for proxy server. I consider that the environment variables are so universal that unexpected behaviors happen. Most of the time we just need to set proxy server for apprise alone instead of a whole program which includes this library.

There are some example variables only effective for apprise.

For http proxy:

APPRISE_PROXY=http://127.0.0.1:3128

For socks5 proxy:

APPRISE_PROXY=sock5h://127.0.0.1:1080

:hammer: Breaking Feature

No breaking modification.

TigerCubDen avatar Mar 24 '22 15:03 TigerCubDen

Hi, i guess i'm curious what the advantage is of setting APPRISE_PROXY=http://127.0.0.1:3128 when under the hood, i'll just end up setting HTTP_PROXY.

I'm curious if setting HTTP_PROXY works already, perhaps the best thing i could do here is add documentation to describe this for users?

Thoughts?

caronc avatar Apr 28 '22 23:04 caronc

Thanks for your reply.

HTPP_PROXY is a common environmental variable, using it will cause other programs to proxy. if I want the proxy only effective on Apprise, the dedicated variable will be useful.

For example, I run a app , the app uses Apprise as notification service, I want set the proxy for Apprise rather than the app.

In any case, it's a good idea to add documentation to describe how to set proxy when there are some people not aware of that Apprise have supported proxy.

TigerCubDen avatar Apr 29 '22 06:04 TigerCubDen

By the way, you can provide both HTTP_PROXY and APPRISE_PROXY, either needn’t be deprecated.

TigerCubDen avatar Apr 29 '22 07:04 TigerCubDen