From 110624be3ea7b6be5353b6ff9cd97647c0c618be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Kozlovsk=C3=BD?= <mail@jkozlovsky.cz> Date: Fri, 28 Aug 2015 10:54:17 -0400 Subject: [PATCH] Proxy type can now be specified in config.ini Can be used for example to force using SOCKS 5 proxy. The config would look like: [Proxy] host = localhost port = 5000 type = socks5 Note that turning an SOCKS 5 proxy on is as easy as executing "ssh -D 5000 username@hostname" --- config/vufind/config.ini | 3 +++ module/VuFind/src/VuFind/Service/Factory.php | 3 +++ 2 files changed, 6 insertions(+) diff --git a/config/vufind/config.ini b/config/vufind/config.ini index aa43cf35834..478a39fa00c 100644 --- a/config/vufind/config.ini +++ b/config/vufind/config.ini @@ -835,6 +835,9 @@ url = https://www.myendnoteweb.com/EndNoteWeb.html ;host = your.proxy.server ;port = 8000 +; Uncomment following line to set proxy type to SOCKS 5 +;type = socks5 + ; Default HTTP settings can be loaded here. These values will be passed to ; the \Zend\Http\Client's setOptions method. [Http] diff --git a/module/VuFind/src/VuFind/Service/Factory.php b/module/VuFind/src/VuFind/Service/Factory.php index e9e7db3fec2..4f20f5105a8 100644 --- a/module/VuFind/src/VuFind/Service/Factory.php +++ b/module/VuFind/src/VuFind/Service/Factory.php @@ -353,6 +353,9 @@ class Factory if (isset($config->Proxy->port)) { $options['proxy_port'] = $config->Proxy->port; } + if (isset($config->Proxy->type)) { + $options['proxy_type'] = $config->Proxy->type; + } } $defaults = isset($config->Http) ? $config->Http->toArray() : []; -- GitLab