From 8906b0734e5c61016d9d4090507f010b2006292d Mon Sep 17 00:00:00 2001 From: Gonzalo Tornaria Date: Tue, 20 Dec 2016 21:30:43 +0000 Subject: add SOCKS upstream proxy support (socks4/socks5) original patch submitted in 2006 to debian mailing list: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=392848%29#12 this version was rebased to git and updated by Russ Dill in 2015 (the original patch used a different config file format). as discussed in #40. commit message by @rofl0r. --- src/upstream.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/upstream.h') diff --git a/src/upstream.h b/src/upstream.h index 34dad68..7855214 100644 --- a/src/upstream.h +++ b/src/upstream.h @@ -31,17 +31,20 @@ * Even if upstream support is not compiled into tinyproxy, this * structure still needs to be defined. */ +typedef enum {HTTP_TYPE, SOCKS4_TYPE, SOCKS5_TYPE} proxy_type; struct upstream { struct upstream *next; char *domain; /* optional */ char *host; int port; in_addr_t ip, mask; + proxy_type type; }; #ifdef UPSTREAM_SUPPORT +const char *proxy_type_name(proxy_type type); extern void upstream_add (const char *host, int port, const char *domain, - struct upstream **upstream_list); + proxy_type type, struct upstream **upstream_list); extern struct upstream *upstream_get (char *host, struct upstream *up); extern void free_upstream_list (struct upstream *up); #endif /* UPSTREAM_SUPPORT */ -- cgit v1.2.3