We're running a Clojure project with Google's CloudRun, which only allows http traffic. I was hoping to finagle an nREPL-connection via https. I see there are a couple of projects that probably did work at some point (drawbridge, catapult), but if there are people out there happily using those, I haven't been able to find them with my Google-fu. Does anyone in here use nREPL via http? Or tried to and gave up? Or know somewhere I can look? Cheers!
@magnars I'm guessing there's at least one https://blog.jakubholy.net/nrepl-over-http-with-drwabridge-in-2020/ ๐
I found that one, but it stopped working a couple leiningens ago. I think maybe the best way forward is a local proxy from socket to http, in an effort to also get CIDER on board.
I've done some work towards this: https://github.com/ivarref/yasp https://github.com/ivarref/yasp-client https://github.com/ivarref/locksmith (for generating mTLS server and client certs) yasp/yasp-client can also do (optional) mTLS termination It's not exactly polished, not finished, I'm on vacation, busy with 2 small children, etc., BUT I would be happy to help you if time allows. Example client configuration, which is what you would run at your computer:
:stage-repl {:deps {com.github.ivarref/yasp-client {:git/sha "2498d1c3889d3642b23fad961244557e9c8207c8"}}
:jvm-opts ["-Dclojure.main.report=stderr"]
:exec-fn com.github.ivarref.yasp-client/start-server!
:exec-args {:endpoint "" ; endpoint handled by yasp on the remote server
:local-port 7777
:remote-host "localhost"
:remote-port 9999
:tls-file "stage-authenticator-client.keys"}}
if the remote server listens to 127.0.0.1:9999 for nREPL you should be good to go... (and maybe drop tls-file when trying this out first in the start)yasp and yasp-client has worked well for me/us here, though the documentation is certainly lacking...
long time since I viewed this source... There is an example setup for aleph here: https://github.com/ivarref/yasp/tree/main/aleph-example Good luck!
(( https://github.com/ivarref/yasp/commit/c3cff95608b69d18973ae274390cbe7c3a4bfe48 ))
@ivar.refsdal Maybe you can add something on the topic in nREPL's docs?
(when you get to finishing it that is - no rush)