clj-http
clj-http copied to clipboard
socks proxy uses local DNS resolution
(require '[clj-http.client :as http])
(require '[clj-http.conn-mgr :as conn-mgr])
(http/request {:url "http://hidden-to-local/example"
:method :get
:connection-manager
(conn-mgr/make-socks-proxied-conn-manager "127.0.0.1" 12345))
;; => UnknownHostException
Effectively, the host ip for hidden-to-local ends up getting resolved with the local DNS, but should be resolved with the remote one (if only when provided a particular option/flag perhaps?).
This stackoverflow answer outlines how to get the remote side of the proxy to perform the DNS lookup.
PR #529 may help with the implementation of a fix here, or used to hack a workaround.