summaryrefslogtreecommitdiff
path: root/src/settings.c
diff options
context:
space:
mode:
authorLars-Dominik Braun <PromyLOPh@gmail.com>2008-06-16 11:38:19 +0200
committerLars-Dominik Braun <PromyLOPh@gmail.com>2008-06-16 11:38:19 +0200
commit5708e1a023c349af53383d8bfe52e2af65c597bc (patch)
treee09b659c08674808345cb36b0cf42f8f9d222d98 /src/settings.c
parent852e19a64893fe3109a42719782c3099ec6ce3d5 (diff)
downloadpianobar-windows-5708e1a023c349af53383d8bfe52e2af65c597bc.tar.gz
pianobar-windows-5708e1a023c349af53383d8bfe52e2af65c597bc.tar.bz2
pianobar-windows-5708e1a023c349af53383d8bfe52e2af65c597bc.zip
client: Proxy type config option added
Diffstat (limited to 'src/settings.c')
-rw-r--r--src/settings.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/settings.c b/src/settings.c
index 40a5064..588a34f 100644
--- a/src/settings.c
+++ b/src/settings.c
@@ -90,6 +90,19 @@ void readSettings (BarSettings_t *settings) {
}
if (strcmp ("control_proxy", key) == 0) {
settings->controlProxy = strdup (val);
+ } else if (strcmp ("control_proxy_type", key) == 0) {
+ if (strcmp ("http", val) == 0) {
+ settings->controlProxyType = CURLPROXY_HTTP;
+ } else if (strcmp ("socks4", val) == 0) {
+ settings->controlProxyType = CURLPROXY_SOCKS4;
+ } else if (strcmp ("socks4a", val) == 0) {
+ settings->controlProxyType = CURLPROXY_SOCKS4A;
+ } else if (strcmp ("socks5", val) == 0) {
+ settings->controlProxyType = CURLPROXY_SOCKS5;
+ } else {
+ /* error: don't use proxy at all */
+ settings->controlProxyType = -1;
+ }
} else if (strcmp ("user", key) == 0) {
settings->username = strdup (val);
} else if (strcmp ("password", key) == 0) {