MoffKalast / vizanti

A mission planner and visualizer for controlling outdoor ROS robots.
https://wiki.ros.org/vizanti
BSD 3-Clause "New" or "Revised" License
133 stars 25 forks source link

vizanti via HTTPS #82

Closed gxomalis closed 1 month ago

gxomalis commented 1 month ago

Hey there!

I just converted my web app from http to https, and I was using an iframe to get localhost:5000 to my web app to show vizanti inside a page. After the conversion the iframe did not work as i got a mixed content error, because my web app is https and vizanti is http. So I did my research, worked around vizanti's server files. I managed to make vizanti run on https but I cant figure how to make rosbridge run on https or wss. No matter what I do, its always up on http://localhost:5001/. So my question is, is it possible to make rosbridge also run on https so it communicates with the https vizanti and finally show it on my https web app? If so, can you guide me on how to achieve that?

MoffKalast commented 1 month ago

Afaik if launching rosbridge with ssl set to true and a valid ssl cert is given as the certfile and keyfile then it should just work, something along the lines of this. I think I last tried that sometime on Kinetic though so I'm not sure how well it's supported on Humble or if the param names have changed.

One thing that would definitely need to be edited is changing ws to wss in rosbridge.js so that the client connects to it properly. If that works, then it should be simple to send it along the other launch params that already need to be set so it doesn't have to be hardcoded, or we could just check if the page is being loaded as https I suppose.