Skip to content
Snippets Groups Projects
Commit 110624be authored by Jiří Kozlovský's avatar Jiří Kozlovský Committed by Demian Katz
Browse files

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"
parent fc8213c3
Branches
Tags
No related merge requests found
...@@ -835,6 +835,9 @@ url = https://www.myendnoteweb.com/EndNoteWeb.html ...@@ -835,6 +835,9 @@ url = https://www.myendnoteweb.com/EndNoteWeb.html
;host = your.proxy.server ;host = your.proxy.server
;port = 8000 ;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 ; Default HTTP settings can be loaded here. These values will be passed to
; the \Zend\Http\Client's setOptions method. ; the \Zend\Http\Client's setOptions method.
[Http] [Http]
......
...@@ -353,6 +353,9 @@ class Factory ...@@ -353,6 +353,9 @@ class Factory
if (isset($config->Proxy->port)) { if (isset($config->Proxy->port)) {
$options['proxy_port'] = $config->Proxy->port; $options['proxy_port'] = $config->Proxy->port;
} }
if (isset($config->Proxy->type)) {
$options['proxy_type'] = $config->Proxy->type;
}
} }
$defaults = isset($config->Http) $defaults = isset($config->Http)
? $config->Http->toArray() : []; ? $config->Http->toArray() : [];
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment