Jump to content
David Jack Wange Olrik

http proxy environment variables are set incorrectly [Fixed 2.6 b372]

Recommended Posts

Hi,

 

A lot of workflows are not working when being used behind a proxy.

 

After some debugging it seems that you are just passing the proxy value from the system preferences, alas this will not work with a lot of languages and programs as the correct format for the http_proxy and https_proxy environment variables includes the protocol like so:

http_proxy=http://username:password@proxy:port
https_proxy=http://username:password@proxy:port

And for the system proxy to work, only an ip or a hostname can be specified.

 

I don't know of any way that you can obtain the correct protocol prefix from the system.

Prefixing with http:// should work in most(but not all) cases as most proxies are run on a non secure port.

 

If you can't find a way to get the prefix from the system, then you have to connect to the proxy and detect it there.

 

-- 
Best regards,
David Jack Wange Olrik <david@olrik.dk>       http://david.olrik.dk
GnuPG fingerprint 4171 FCB3 EE86 6A03 B436 5AED 5F41 087D 7AB1 A4B5
["The first rule of Perl club is  You do not talk about Perl club"]

 

Using v2.5.1 (308)

Share this post


Link to post
Share on other sites

After some debugging it seems that you are just passing the proxy value from the system preferences, alas this will not work with a lot of languages and programs as the correct format for the http_proxy and https_proxy environment variables includes the protocol like so:

http_proxy=http://username:password@proxy:port
https_proxy=http://username:password@proxy:port

And for the system proxy to work, only an ip or a hostname can be specified.

 

I don't know of any way that you can obtain the correct protocol prefix from the system.

Prefixing with http:// should work in most(but not all) cases as most proxies are run on a non secure port.

 

Interesting, I wasn't aware of this. As I don't want Alfred to be discovering the proxies, I may add an option along side the proxy option to say prefix http if missing.

Share this post


Link to post
Share on other sites

Interesting, I wasn't aware of this. As I don't want Alfred to be discovering the proxies, I may add an option along side the proxy option to say prefix http if missing.

 

Alfred wouldn't be discovering the proxy, just checking to see if it's http or https - but your proposed solution would work for me =)

Share this post


Link to post
Share on other sites

Alfred wouldn't be discovering the proxy, just checking to see if it's http or https - but your proposed solution would work for me =)

 

for now, have you prefixed http:// to OS X's setup for the proxies? this will likely be passed through and Alfred will work

Share this post


Link to post
Share on other sites

I tried that, and it works for Alfred - but it breaks Safari and other "normal" applications that use http/https.

 

Fair enough! I'll get that fixed up for the next release :)

Share this post


Link to post
Share on other sites

×
×
  • Create New...