jbroadway / elefant

Elefant, the refreshingly simple PHP CMS and web framework.
http://www.elefantcms.com
MIT License
209 stars 39 forks source link

cURL calls: Proxy configuration added. #243

Closed olegiv closed 9 years ago

olegiv commented 9 years ago

cURL calls fail In case of server behind a network proxy with no proxy properties been provided to curl. Added global setting: [Proxy] url, port, skip_urls, skip_ips. Added function curl_setproxy ($ch, $url) in /lib/Functions.php which sets proxy properties. Local addresses and URLs accessed directly with no proxy parameters provided to curl.

jbroadway commented 9 years ago

These are actually part of 3rd party libraries, so adding a custom function to Elefant that they call would break being able to easily update them later.

Fortunately, I believe the Twitter.php class may no longer be in use, and ActiveResource was removed from Ruby on Rails 4, so it can probably be removed entirely at some point. It's not actually used for anything in Elefant itself, just as a library I had included because of a project I used Elefant for on early in its development.

The Analog library is one I maintain separately here:

https://github.com/jbroadway/analog

I'd be happy to have proxy settings added to Analog.

I googled around for SimplePie and LightOpenID proxy support and didn't find much of anything. That may mean the RSS viewer for embedding external RSS feeds (which is all SimplePie is used for) and OpenID support just won't work through a proxy.

Otherwise the changes to Elefant itself look good to me.

olegiv commented 9 years ago

Thank you, I will create another pull request with Elefant only changes.