From 5ea289d82ea412b59bbabd1ddfff70d3d5f1ecb2 Mon Sep 17 00:00:00 2001 From: Robert James Kaes Date: Sun, 8 Jun 2008 18:50:23 -0400 Subject: Moved transparent proxy code into its own file Extracted the transparent proxy logic from reqs.c and placed it into a separate file. Signed-off-by: Robert James Kaes --- src/reqs.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'src/reqs.h') diff --git a/src/reqs.h b/src/reqs.h index 2748bab..de8730e 100644 --- a/src/reqs.h +++ b/src/reqs.h @@ -22,6 +22,28 @@ #ifndef _TINYPROXY_REQS_H_ #define _TINYPROXY_REQS_H_ +#include "common.h" + + +/* + * Port constants for HTTP (80) and SSL (443) + */ +#define HTTP_PORT 80 +#define HTTP_PORT_SSL 443 + +/* + * This structure holds the information pulled from a URL request. + */ +struct request_s { + char *method; + char *protocol; + + char *host; + uint16_t port; + + char *path; +}; + extern void handle_connection(int fd); extern void add_connect_port_allowed(int port); extern void upstream_add(const char *host, int port, const char *domain); -- cgit v1.2.3