summaryrefslogtreecommitdiffhomepage
path: root/src/upstream.c
AgeCommit message (Collapse)Author
2021-04-16make upstream site-spec ipv6 compatible, refactor acl coderofl0r
the acl.c code parsing a site-spec has been factored out into a new TU: hostspec. it was superior to the parsing code in upstream.c in that it properly deals with both ipv4 and ipv6. both upstream and acl now use the new code for parsing, and upstream also for checking for a match. acl.c still uses the old matching code as it has a lot of special case code for specifications containing a hostname, and in case such a spec is encountered, tries to do reverse name lookup to see if a numeric ip matches that spec. removing that code could break existing usecases, however since that was never implemented for upstream nobody will miss it there.
2020-09-30print linenumber from all conf-emitted warningsrofl0r
2020-09-07upstream: fix ip/mask calculation for types other than nonerofl0r
the code wrongly processed the site_spec (here: domain) parameter only when PT_TYPE == PT_NONE. re-arranged code to process it correctly whenever passed. additionally the mask is now also applied to the passed subnet/ip, so a site_spec like 127.0.0.1/8 is converted into 127.0.0.0/8. also the case where inet_aton fails now produces a proper error message. note that the code still doesn't process ipv6 addresses and mask. to support it, we should use the existing code in acl.c and refactor it so it can be used from both call sites. closes #83 closes #165
2020-08-19upstream: allow port 0 to be specifiedrofl0r
this is useful to use upstream directive to null-route a specific target domain. e.g. upstream http 0.0.0.0:0 ".adserver.com"
2018-03-23upstream: Fix case of empty string domain.Michael Adam
Found by compiler note. Signed-off-by: Michael Adam <obnox@samba.org>
2018-02-25config: unify upstream syntax for http,socks4,socks5 and nonerofl0r
closes #50
2018-02-25rename members of proxy_type enum to have a common prefixrofl0r
and add a NONE member.
2018-02-25implement HTTP basic auth for upstream proxiesrofl0r
loosely based on @valenbg1's code from PR #38 closes #38 closes #96
2018-02-06add SOCKS upstream proxy support (socks4/socks5)Gonzalo Tornaria
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.
2010-08-24upstream: clarify debug messagesMichael Adam
There are frequent questions "what does 'No proxy for ...' mean?" on the mailing list and IRC. Be more specific. (No upstream proxy ...) Correspondingly, log "Found upstream proxy ... for ..."
2009-12-07upstream: add free_upstream_list ()Michael Adam
Michael
2009-12-07upstream: Add upstream list parameter to upstream_get()Michael Adam
to abstract it from the concrete list in the config struct. Now upstream.c does not use any reference to config any more. Michael
2009-12-07upstream: add upstream list parameter to upstream_add()Michael Adam
to abstract it from the concrete list in the config struct. Michael
2009-12-06move handling of upstream list to new module upstream.{c,h}Michael Adam
Michael