canonical / cloud-gaming-demo

Apache License 2.0
9 stars 10 forks source link

not working for custom domain #18

Open springrider opened 2 years ago

springrider commented 2 years ago

because of self-signed certificate is not convenient(need to pass it manually). I have setup custom domain and installed certificate. After all set with anbox, I could visit cloud-gaming-demo with my custom domain. and the anbox dashboard works too. but the url returned from session api (the wss one) is still the old one, not using my custom domain. I even uninstall and reinstall this demo, but it still return the old domain url(self-signed). not sure what caused the problem, and how to fix it, I searched anbox documents and forum and find nothing about it....

adglkh commented 2 years ago

Sorry for the late reply. Since you setup custom domain and installed the certificate, to get the streaming working, you need to update the location of anbox-stream-gateway service to honor the DNS name, otherwise as you mentioned above the returned wss URL from session API still pointed to the old one, which blocked the peer connection from the establishment.

To update the location of anbox stream gateway service, simply run:

juju config -m appliance:anbox-cloud anbox-stream-gateway location=<dns_name>

Then launch a game from the cloud gaming demo, you should get the game up and running.

(For better support, I'd suggest using the launchpad over GH as the first place for quick response to bug reports or questions.)

adglkh commented 2 years ago

Besides that, you need to run the following command if you want this change to persist across reboot.

sudo snap set anbox-cloud-appliance experimental.location=<dns_name>

(Not sure how you installed the certificate and setup DNS name for your appliance, the page introduced a straight-forward way to setup TLS for appliance if you're interested in)