How to config proxy in aleph.http/websocket-client?

79 views Asked by At

Could anyone tell how to set proxy configuration with funciton aleph.http/websocket-client of
clj-commons/aleph "0.4.7-alpha7"

Here is my code:

(def proxy-config
  {:connection-options {:proxy-options {:host      "127.0.0.1"
                                        :port     7890
                                        :protocol :socks5}}})

(defn create-connection [url proxy-config]
  (try
    (let [conn @(aleph.http/websocket-client url proxy-config)]
      (info "websocket connection established, url:" url ".")
      conn)
    (catch Exception e
      (error "websocket connection established failed, url:" url "." e))))
0

There are 0 answers