Hi:) I'm not sure if this is the right place to ask this question, but I have a remote server that also starts an nrepl on a socket, doing something like (nrpel/start-server :socket "/tmp/hello.nrepl") . Is there a way to connect to that socket from cider?
I'm thinking about connecting to the remote server via ssh, and starting a new nrepl process that proxies to the already running service, and then connect to that from cider via an ssh tunnel.
clj -Sdeps '{:deps {nrepl/nrepl {:mvn/version "1.0.0"} cider/cider-nrepl {:mvn/version "0.28.5"}} :aliases {:cider/nrepl {:main-opts ["-m" "nrepl.cmdline" "--middleware" "[cider.nrepl/cider-middleware]"]}}}' -M:cider/nrepl -b 0.0.0.0 -p 11111 -c -s "/tmp/hello.nrepl"
Isn't working, but it's something like that I'm looking for, or is there a better way?I am not very familiar with neither cider, file sockets (+ssh) and such, but that setup sounds complicated.. Is there anything stopping you from binding to 127.0.0.1 on the remote server and then using ssh + port forwarding? The latest nREPL also supports TLS: https://nrepl.org/nrepl/usage/tls.html if that helps your case/CIDER-integration. It also has a TCP TLS proxy utility.
Yeah, you're right, it might be too complicated, and what you are suggesting could definitely be a solution, thanks:) I think I just wanted to see how to make use of the socket option in nrepl, and at the same time I'm a bit concerned about exposing the repl on the network.