This project is not covered by Drupal’s security advisory policy.

Proxy provides a simple HTTP proxy API. This is mostly an API module, meaning that unless you need it for development or another module, there is not much reason to download this module.

Installation and Setup

This module depends on the Chaos tools suite, so install that first. Otherwise, it's a normal Drupal module installation. This module does not work out of the box, because it uses a whitelist system for domains that the proxy can access. This greatly reduces the ability for the proxy to be abused, but it does mean you will have to update the whitelist settings after install (you can also turn off this feature if you want). Then set permissions appropriately.

API Basics

Core function is proxy(), which is basically a fancy wrapper around drupal_http_request().

  $params['request_uri'] = 'http://drupal.org';
  $content_object = proxy($params);

This module also provides a menu router item. This is helpful for cross-domain scripting. The following is an example path:

http://example.com/proxy?request=http://drupal.org

Features and Status

The following are either current features or features in development. See below for what specifically is working and what is not.

  • Menu router: Described above; provides a menu item to route the proxy through.
  • Caching: By default, the cache is set to 5 minutes, but can be adjusted easily so that you can balance performance and the number of requests.
  • Processing: This feature is mostly working. This involves things like processing links of a web page to use the proxy, or removing images, or removing JS, etc. PHProxy is a good start on this.
  • Security: At the moment, this module uses a flood control system (with an optional auto-ban feature) and a whitelist system by default.
  • Performance: Currently the Proxy module utilizes the Drupal function, drupal_http_request() to get content. This could be probably be improved for performance. Guessing, I would say optimizing for PHP5 could help, but I have not looked into this yet.

Project Information

Downloads