You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i added in private function create_curl_handle(), before: return $handle;
this code:
` global $CFG;
// check for proxy
if (!empty($CFG->proxyhost) and !is_proxybypass($uri)) {
// SOCKS supported in PHP5 only
if (!empty($CFG->proxytype) and ($CFG->proxytype == 'SOCKS5')) {
if (defined('CURLPROXY_SOCKS5')) {
curl_setopt($handle, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);
} else {
curl_close($handle);
print_error( 'socksnotsupported','mnet' );
}
}
curl_setopt($handle, CURLOPT_HTTPPROXYTUNNEL, false);
if (empty($CFG->proxyport)) {
curl_setopt($handle, CURLOPT_PROXY, $CFG->proxyhost);
} else {
curl_setopt($handle, CURLOPT_PROXY, $CFG->proxyhost.':'.$CFG->proxyport);
}
if (!empty($CFG->proxyuser) and !empty($CFG->proxypassword)) {
curl_setopt($handle, CURLOPT_PROXYUSERPWD, $CFG->proxyuser.':'.$CFG->proxypassword);
if (defined('CURLOPT_PROXYAUTH')) {
// any proxy authentication if PHP 5.1
curl_setopt($handle, CURLOPT_PROXYAUTH, CURLAUTH_BASIC | CURLAUTH_NTLM);
}
}
}`
but I cannot create users, maybe should put proxy code somewhere else?
The text was updated successfully, but these errors were encountered:
HI Matarum
Were you able to solve the problem?
We are also trying to use WebEx plugin in Totara placed behind a proxy server but realized it does not use Totara/Moodle proxy settings. I assume the code above is the way to make it use the Proxy settings.
BTW - does it have to use SOCKS5? our proxy supports HTTP.
i added in private function create_curl_handle(), before:
return $handle;
this code:
` global $CFG;
// check for proxy
if (!empty($CFG->proxyhost) and !is_proxybypass($uri)) {
// SOCKS supported in PHP5 only
if (!empty($CFG->proxytype) and ($CFG->proxytype == 'SOCKS5')) {
if (defined('CURLPROXY_SOCKS5')) {
curl_setopt($handle, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);
} else {
curl_close($handle);
print_error( 'socksnotsupported','mnet' );
}
}
but I cannot create users, maybe should put proxy code somewhere else?
The text was updated successfully, but these errors were encountered: