Closed RickyGrassmuck closed 2 years ago
Makes sense.
I am currently considering to rework the communication protocol and introduce some kind of broker server, so that providers would be clients rather than servers.
That would make this feature obsolete. It might be a while, so I would still merge this in the meantime.
Makes sense.
I am currently considering to rework the communication protocol and introduce some kind of broker server, so that providers would be clients rather than servers.
I was actually thinking while poking around on this that it would be pretty nifty if a user was able to manage this in their user preferences on Lichess. Basically, pre-configure external engine providers you would like to be able to use in the users preferences and then on the analysis board settings, you could pick the engine you want to use from a list. Something like this:
When navigating to
http://<external-engine>:<port>
, theurl
query parameter generated and used in the redirect relies on the value supplied by the--bind <BIND>
option to theremote-uci
command.In order to facilitate binding the service to Localhost and utilizing a reverse-proxy for handling incoming connections, an option to specify a custom address to be used in the generated
ws://
address would be a welcome addition.Example Scenario
I have deployed the
external-engine
docker image on a server using the equivalent to the command below. This command essentially provides access to the remote-uci api through a pre-configured Traefik reverse-proxy using the host namestockfish.example.com
.When navigating to https://stockfish.example.com using the above deployment, the redirect generated contains a
url
query parameter value that does not work (url=ws://0.0.0.0:9670/socket
)Proposed Solution
Simply adding an optional
--external-address
command line option that is used to populate the URL template is likely sufficient for 99% of use-cases. An argument could be made for allowing more granular control by having the option to separately set thehost
andport
separately.I haven't used Rust much in the past but I may take a stab at implementing this feature as an excuse to poke the language a bit.