trick for today -> autoproxy

Featuring the Dragonfly web framework
Locked
newdep
Posts: 2038
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

trick for today -> autoproxy

Post by newdep »

;; Auto proxy discovery from network
;; straight grep from wpat.dat file
;; and set newlisp proxy
;; assumes host.domain
;;
(env "HTTP_PROXY"
(and
(regex "PROXY (.*); "
(get-url
(append "http://wpad."
(join (-2 (parse (net-lookup (net-interface)) "." )) ".") "/wpad.dat")))
(string "http://" $1)))
-- (define? (Cornflakes))

Locked