Add local websocket proxy using xmpp-proxy to connect to any server#43
Add local websocket proxy using xmpp-proxy to connect to any server#43moparisthebest wants to merge 1 commit intoprocessone:mainfrom
Conversation
|
Hi @moparisthebest, many thanks for your contribution! In order for us to evaluate and accept your PR, we ask that you sign a contribution license agreement. It's all electronic and will take just minutes. |
There was a problem hiding this comment.
Pull request overview
This PR adds a local WebSocket proxy using the xmpp-proxy library to enable XMPP connections through a WebSocket interface. The proxy automatically starts on application launch and binds to port 10032 (or any available port if that's in use), with the port number accessible via a new Tauri command.
Changes:
- Adds xmpp-proxy and tokio dependencies for WebSocket proxy functionality
- Implements automatic proxy startup on application initialization
- Exposes proxy port to frontend via new
proxy_portTauri command
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 10 comments.
| File | Description |
|---|---|
| apps/fluux/src-tauri/src/main.rs | Adds proxy initialization logic, proxy_port Tauri command, and automatic startup in main() |
| apps/fluux/src-tauri/Cargo.toml | Adds tokio and xmpp-proxy dependencies |
| apps/fluux/src-tauri/Cargo.lock | Dependency resolution for new crates and their transitive dependencies |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
You did it @moparisthebest! Thank you for signing the ProcessOne Contribution License Agreement. We will have a look at your contribution! |
|
Hi ! |
|
Hi ! |
|
main has now xmpp_proxy.rs and support for direct TCP connection. |
It will print the websocket URL to stdout on startup, the default one is
ws://127.0.0.1:10032/wsbut it'll use any available port if that one isn't available.Ideally the front-end would call the added tauri command
proxy_portto get this automatically, and even fill it in as the default or something, but I'm not really a front end guy so didn't figure that out tonight. It would also be easy to make a command to start/stop the proxy, like maybe you could start+use it only if automatic discovery of the user's websocket server failed or they don't have one. Let me know if you want me to do something like this, if you can do the FE work that'd be quickest, otherwise tell me how you want it and I'll figure it out.I'm the author of the added dependency xmpp-proxy (AGPLv3 just like fluux <3) and also the tauri part of converse-tauri which uses this same approach.