diff options
author | Alexey Yakovenko <wakeroid@gmail.com> | 2010-05-02 20:50:12 +0200 |
---|---|---|
committer | Alexey Yakovenko <wakeroid@gmail.com> | 2010-05-02 20:50:12 +0200 |
commit | 8cb6665f0ebdf0825b48984efa8086a08dc51c63 (patch) | |
tree | 7f81da1db32092c1a1c9d9785cfb154d8f3479c6 /plugins/lastfm | |
parent | 2700bbbc3d62c36d9e35e3b2778547754f934fbc (diff) |
added proxy username/password authentication support
Diffstat (limited to 'plugins/lastfm')
-rw-r--r-- | plugins/lastfm/lastfm.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/plugins/lastfm/lastfm.c b/plugins/lastfm/lastfm.c index d427b82a..06e462f8 100644 --- a/plugins/lastfm/lastfm.c +++ b/plugins/lastfm/lastfm.c @@ -156,6 +156,13 @@ curl_req_send (const char *req, const char *post) { } #endif curl_easy_setopt (curl, CURLOPT_PROXYTYPE, curlproxytype); + + const char *proxyuser = deadbeef->conf_get_str ("network.proxy.username", ""); + const char *proxypass = deadbeef->conf_get_str ("network.proxy.password", ""); + if (*proxyuser || *proxypass) { + curl_easy_setopt (curl, CURLOPT_PROXYUSERNAME, proxyuser); + curl_easy_setopt (curl, CURLOPT_PROXYUSERNAME, proxypass); + } } int status = curl_easy_perform(curl); curl_easy_cleanup (curl); |