File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -48,17 +48,24 @@ public static function setStorageDirectory($path)
48
48
/**
49
49
* Format ip:port or null to use direct connection
50
50
* @param $proxy_server
51
+ * @param $proxy_type
51
52
*/
52
- public function setProxy ($ proxy_server )
53
+ public function setProxy ($ proxy_server, $ proxy_type = CURLPROXY_HTTP )
53
54
{
54
55
$ this ->options [CURLOPT_PROXY ] = $ proxy_server ;
56
+ $ this ->options [CURLOPT_PROXYTYPE ] = $ proxy_type ;
55
57
}
56
58
57
59
public function getProxy ()
58
60
{
59
61
return !empty ($ this ->options [CURLOPT_PROXY ]) ? $ this ->options [CURLOPT_PROXY ] : null ;
60
62
}
61
63
64
+ public function getProxyType ()
65
+ {
66
+ return !empty ($ this ->options [CURLOPT_PROXYTYPE ]) ? $ this ->options [CURLOPT_PROXYTYPE ] : null ;
67
+ }
68
+
62
69
public function setCookieFile ($ cookie_file )
63
70
{
64
71
$ this ->cookie_file = $ cookie_file ;
You can’t perform that action at this time.
0 commit comments