Device Proxy. A reverse HTTP Proxy that can inspect and manipulate HTTP Headers before sending upstream.
Project description
device-proxy
============
Inspects incoming HTTP requests adds some HTTP headers and proxies upstream.
Has ability to add extra cookies for HTTP responses being sent back to the
client.
Installation
------------
Installation is pegged to the latest GPL version of Wurfl.
Assuming you're living in a virtualenv::
$ pip install -r requirements.pip
$ ./get-wurfl-2.1-db.sh
Running
-------
Run with `twistd`::
$ twistd -n devproxy --config config.yaml
Configuration
-------------
This is what the processing chain looks like::
+------------------+
| |
| Header & Cookie set
v |
(1) HAProxy -> (2) *n* DeviceProxies
|
(3)
| (if Cookie or Header set)
+--------------------------------> (4) *n* Backend Apps
1. Haproxy receives incoming traffic from Nginx
2. Request is passed to *n* number of Device Proxies running.
HTTP headers are inserted (possibly from cached WURFL or OpenDDR lookups).
Device Proxy has the option of inserting Cookies into the HTTP response
which can cache the Device Lookup (for subsequent requests HAProxy (1)
could use these cookie values to skip DeviceProxy completely for the
lifetime of the Cookie.)
DeviceProxy reverse proxies back to HAProxy with HTTP headers inserted.
3. HAProxy inspects the HTTP headers & cookies received and selects appropriate
backend application for the request. HAProxy can have a default fallback
backend. If the Cookie is already set then the DeviceProxies are skipped.
4. The Backend application renders the request with a template set suitable for
the given HTTP request.
--------------------------------------------------------------------------------
**NOTE:**
By default DeviceProxy only caches the lookup in Memcache, not in the Cookie.
--------------------------------------------------------------------------------
============
Inspects incoming HTTP requests adds some HTTP headers and proxies upstream.
Has ability to add extra cookies for HTTP responses being sent back to the
client.
Installation
------------
Installation is pegged to the latest GPL version of Wurfl.
Assuming you're living in a virtualenv::
$ pip install -r requirements.pip
$ ./get-wurfl-2.1-db.sh
Running
-------
Run with `twistd`::
$ twistd -n devproxy --config config.yaml
Configuration
-------------
This is what the processing chain looks like::
+------------------+
| |
| Header & Cookie set
v |
(1) HAProxy -> (2) *n* DeviceProxies
|
(3)
| (if Cookie or Header set)
+--------------------------------> (4) *n* Backend Apps
1. Haproxy receives incoming traffic from Nginx
2. Request is passed to *n* number of Device Proxies running.
HTTP headers are inserted (possibly from cached WURFL or OpenDDR lookups).
Device Proxy has the option of inserting Cookies into the HTTP response
which can cache the Device Lookup (for subsequent requests HAProxy (1)
could use these cookie values to skip DeviceProxy completely for the
lifetime of the Cookie.)
DeviceProxy reverse proxies back to HAProxy with HTTP headers inserted.
3. HAProxy inspects the HTTP headers & cookies received and selects appropriate
backend application for the request. HAProxy can have a default fallback
backend. If the Cookie is already set then the DeviceProxies are skipped.
4. The Backend application renders the request with a template set suitable for
the given HTTP request.
--------------------------------------------------------------------------------
**NOTE:**
By default DeviceProxy only caches the lookup in Memcache, not in the Cookie.
--------------------------------------------------------------------------------
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
device-proxy-0.1c.tar.gz
(12.4 kB
view details)
File details
Details for the file device-proxy-0.1c.tar.gz
.
File metadata
- Download URL: device-proxy-0.1c.tar.gz
- Upload date:
- Size: 12.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 598022a5403b1befb21e3dbcef82e3cca3da0ee6177c9570c450891422af3198 |
|
MD5 | 69caccddb866d479861e588e484086eb |
|
BLAKE2b-256 | bcb8533b1325260501cc7e0643c80aa99b606c8c3c3b0b333227472c28154a16 |