0

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))))
Jonathan Hall
  • 75,165
  • 16
  • 143
  • 189
  • 1
    Can we assume, that the problem you are facing is the proxy you attempted to setup not being used at all? E.g. proxy not hit by request or connection error stating so and the `e` there gives an error accordingly? – cfrick Mar 02 '21 at 12:12
  • @cfrick I think you are right. I have looked up [all configuration keys](https://github.com/clj-commons/aleph) mentioned in [clj-commons/aleph](https://github.com/clj-commons/aleph). But I can't find out how to set proxy configuration in function `aleph.http/websocket-client` – caiyingyi Mar 03 '21 at 02:24

0 Answers0