[TYPO3-caretaker] how to use caretaker behind a proxy
Tobias Schaefer
tobias.schaefer at ptb.de
Tue Aug 30 17:38:19 CEST 2011
> Hi,
>
> I'd like to to check TYPO3-instances hosted by external webhoster
> through
> a proxy.
> Is it possible to setup caretaker to use a proxy (via curl)?
> Cheers, Tobias
>
Hi again,
I solved the proxy-problem by myself. Unfortunately I had to modify 2 files.
I found the possibility to override the test configuration for the http-test
concerning the proxy-settings. The http-test is working now, but there're
no proxy-settings for the other services. And the override-curl-option has
only these possibilities:
CURLOPT_SSL_VERIFYPEER
CURLOPT_TIMEOUT_MS
CURLOPT_INTERFACE
CURLOPT_USERPWD (user:password)
CURLOPT_HTTPAUTH
but nothing like CURLOPT_PROXY.
To add this curlopt I modified these 2 files:
classes/nodes/class.tx_caretaker_InstanceNode.php: function getCurlOptions:
case 'CURLOPT_HTTPAUTH':
$value = intval($currentEl['value_httpauth']['vDEF']);
break;
case 'CURLOPT_PROXY':
$value = (string) $currentEl['value_proxy']['vDEF'];
break;
}
$curl_options[constant($currentEl['option']['vDEF'])] = $value;
res/flexform/ds.tx_caretaker_instance_testconfiguration.xml:
<numIndex index="6">
<numIndex index="0">CURLOPT_HTTPAUTH</numIndex>
<numIndex index="1">CURLOPT_HTTPAUTH</numIndex>
</numIndex>
<numIndex index="7">
<numIndex index="0">CURLOPT_PROXY (host:port)</numIndex>
<numIndex index="1">CURLOPT_PROXY</numIndex>
</numIndex>
</items>
...
</value_httpauth>
<value_proxy>
<TCEforms>
<displayCond>FIELD:option:IN:CURLOPT_PROXY</displayCond>
<label>Value</label>
<config>
<type>input</type>
<size>50</size>
<default></default>
</config>
</TCEforms>
</value_proxy>
</el>
</curl_option>
Cheers, Tobias
More information about the TYPO3-project-caretaker
mailing list