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 <russ.dill@gmail.com>
in 2015 (the original patch used a different config file format).

as discussed in #40.

commit message by @rofl0r.
This commit is contained in:
Gonzalo Tornaria authored and rofl0r committed 2018-02-06 16:11:39 +00:00
1 parent 116e59e933
commit 8906b0734e
4 files changed
+146 -17

No files matched your search

+4 -1
View File
@@ -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 */