hoppscotch / hoppscotch-extension

🧩 Browser extensions to provide more capabilities to https://hoppscotch.io
https://hoppscotch.io
MIT License
255 stars 99 forks source link

[feature]: Websocket support on the extension #303

Open LuisMayo opened 1 year ago

LuisMayo commented 1 year ago

Is there an existing issue for this?

Summary

If available, websocket connections should be redirected through the browser extension, just like HTTP ones.

This has been already suggested in hoppscotch/hoppscotch#2194 but the issue was closed by the author as completed, even though it's not completed.

Why should this be worked on?

Because developing websockets is almost impossible else, since HTTPS pages can only connect to wss sockets, and in development TLS is usually skipped

HelixY2J commented 4 months ago

This is interesting, initial idea I have is to use an Nginx server to handle wss:// connection from client and proxy them to ws:// connections on the websocket server.This should ensure secure websocket communication over HTTPS. Can this issue be assigned to me under FOSS Hack and I can start working on it

amk-dev commented 4 months ago

Hey @HelixY2J

sorry for the late reply.

this is an issue that needs to be solved on the extension level. right now, you'll hit the websocket endpoint directly from the browser, we need to route this through the extension, so restrictions on normal webpages won' t cause issues with the connection.

here we're not looking to solve this using nginx or by asking the user to make changes to their setup.

can you think from this perspective and give an updated approch ?