Webhosting platform

Hosting powered by RESTENA

Outbound access via proxy

To avoid that errors (bugs) within hosted websites may be used to retrieve malicious code from third-parties, it is not possible to download code/ data or to call external web services directly.

To allow the use of external resources when necessary; a proxy has been setup that allows outbound HTTP and HTTPS access. Any resource access must be white-listed at proxy level which you can do from your webspace management interface. There you can check proxy log and edit proxy rules. Changes to proxy rules will take effect with a delay of a few minutes.

You can use PHP's curl API to access these resources through the proxy.

$ch = curl_init();
if ($ch) {
  curl_setopt($ch, CURLOPT_URL, "http://www.api.example/webservice?param");
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  curl_setopt($ch, CURLOPT_PROXYPORT, 3128);
  curl_setopt($ch, CURLOPT_PROXY, "proxy-out.restena.lu");
  curl_setopt($ch, CURLOPT_PROXYUSERPWD, "<FTP login>:<proxy password>");
  $response = curl_exec($ch);
  $resp_info = curl_getinfo($ch);
  if ($resp_info['http_code'] == 200) {
    // data processing

Via SSH access you can use curl which is pre-configured for the proxy with .curlrc configuration file (this file is ignored by PHP!).

Example of .curlrc:

proxy = "proxy-out.restena.lu:3128"
proxy-user = "<FTP user>:<proxy password>"

Example of .wgetrc:

http_proxy = proxy-out.restena.lu
https_proxy = proxy-out.restena.lu
proxy_user = <FTP user>
proxy_password = <proxy password>