[zorp] Zorp and Traffic Control

Balazs Scheidler zorp@lists.balabit.hu
Tue, 27 May 2003 19:25:44 +0200

On Tue, May 27, 2003 at 12:30:36PM -0400, Philippe Lucas wrote:
> >you'd need a release from the development version which allows you to 
> >stack
> >proxies within HTTP. This means that another proxy module receives the 
> >data
> >portion of each HTTP request. What do you want to change in the HTTP body?
> >
> >It is currently not possible with plain 2.0. I'll schedule a release 
> >if you
> >are interested.
> I'm actually interested in compressing the HTTP data flow. Could you send
> me the development version so that I can start working on it?
> When did you plan on releasing the new version?

This would be possible by developing a GZIP proxy, which is currently not
available. The GZIP proxy would receive the data flow from the HTTP proxy,
compress it, and the only thing left would be to add a Content-Encoding
field from the HTTP proxy.

Something like this:

class GzipHttpProxy(HttpProxy):

	class EncodeGzipProxy(GzipProxy):
		def config(self):
			self.client_need_gzip = FALSE
			self.server_need_gzip = TRUE

	def config(self):
		self.response_headers["Content-Encoding"] = (HTTP_HDR_INSERT, "gzip")
		self.stack_proxy = EncodeGzipProxy

Implementing a gzip proxy is not difficult, simply reading all input and
compressing/decompressing it on the fly would not be too difficult.

(maybe a z_stream_gzip class would suffice and then a simple Plug proxy
could perform this task)

PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1