Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Added *no-proxy-domains*. #33

Merged
merged 1 commit into from

2 participants

@AeroNotix

Proxy whitelist will allow you to specify a list of hosts which will
not be subjected to being routed via the specified proxy.

@AeroNotix

This would implement #32

@AeroNotix AeroNotix Added *no-proxy-domains*.
Proxy whitelist will allow you to specify a list of hosts which will
not be subjected to being routed via the specified proxy.
28dab0a
@hanshuebner hanshuebner merged commit 5a11578 into edicl:master
@AeroNotix

Awesome :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 28, 2013
  1. @AeroNotix

    Added *no-proxy-domains*.

    AeroNotix authored
    Proxy whitelist will allow you to specify a list of hosts which will
    not be subjected to being routed via the specified proxy.
This page is out of date. Refresh to see the latest.
Showing with 15 additions and 1 deletion.
  1. +1 −0  packages.lisp
  2. +11 −1 request.lisp
  3. +3 −0  specials.lisp
View
1  packages.lisp
@@ -38,6 +38,7 @@
#:*body-format-function*
#:*remove-duplicate-cookies-p*
#:*default-http-proxy*
+ #:*no-proxy-domains*
#:*drakma-default-external-format*
#:*header-stream*
#:*ignore-unparseable-cookie-dates-p*
View
12 request.lisp
@@ -204,6 +204,7 @@ headers of the chunked stream \(if any) as a second value."
(accept "*/*")
range
(proxy *default-http-proxy*)
+ (no-proxy-domains *no-proxy-domains*)
proxy-basic-authorization
real-host
additional-headers
@@ -376,7 +377,13 @@ integer denoting the port to use \(which will default to 80
otherwise). Defaults to *default-http-proxy*.
PROXY-BASIC-AUTHORIZATION is used like
BASIC-AUTHORIZATION, but for the proxy, and only if PROXY is
-true.
+true. If the host portion of the uri is present in the
+*no-proxy-domains* or the NO-PROXY-DOMAINS list then the proxy
+setting will be ignored for this request.
+
+If NO-PROXY-DOMAINS is set then it will supersede the
+*no-proxy-domains* variable. Inserting domains into this list will
+allow them to ignore the proxy setting.
If REAL-HOST is not NIL, request is sent to the denoted host instead
of the URI host. When specified, REAL-HOST supersedes PROXY.
@@ -481,6 +488,9 @@ PARAMETERS will not be used."
(when proxy
(when (atom proxy)
(setq proxy (list proxy 80))))
+ ;; Ignore the proxy for whitelisted hosts.
+ (when (member (uri-host uri) no-proxy-domains :test #'string=)
+ (setq proxy '()))
;; make sure we don't get :CRLF on Windows
(let ((*default-eol-style* :lf)
(file-parameters-p (find-if-not (lambda (thing)
View
3  specials.lisp
@@ -260,6 +260,9 @@ otherwise).")
;; and <http://www.cliki.net/hyperdoc>
;; also used by LW-ADD-ONS
+(defvar *no-proxy-domains* nil
+ "A list of domains for which a proxy should not be used.")
+
(defvar *hyperdoc-base-uri* "http://weitz.de/drakma/")
(let ((exported-symbols-alist
Something went wrong with that request. Please try again.