Skip to content

Add local websocket proxy using xmpp-proxy to connect to any server#43

Closed
moparisthebest wants to merge 1 commit intoprocessone:mainfrom
moparisthebest:xmpp-proxy
Closed

Add local websocket proxy using xmpp-proxy to connect to any server#43
moparisthebest wants to merge 1 commit intoprocessone:mainfrom
moparisthebest:xmpp-proxy

Conversation

@moparisthebest
Copy link
Copy Markdown

It will print the websocket URL to stdout on startup, the default one is ws://127.0.0.1:10032/ws but it'll use any available port if that one isn't available.

Ideally the front-end would call the added tauri command proxy_port to 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.

Copilot AI review requested due to automatic review settings January 29, 2026 06:41
@p1bot
Copy link
Copy Markdown
Collaborator

p1bot commented Jan 29, 2026

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.

@p1bot p1bot added the cla-missing Contributor needs to sign Agreement (CLA) label Jan 29, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_port Tauri 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.

Comment thread apps/fluux/src-tauri/src/main.rs
Comment thread apps/fluux/src-tauri/src/main.rs
Comment thread apps/fluux/src-tauri/src/main.rs
Comment thread apps/fluux/src-tauri/src/main.rs
Comment thread apps/fluux/src-tauri/src/main.rs
Comment thread apps/fluux/src-tauri/src/main.rs
Comment thread apps/fluux/src-tauri/src/main.rs
Comment thread apps/fluux/src-tauri/Cargo.toml
Comment thread apps/fluux/src-tauri/src/main.rs
Comment thread apps/fluux/src-tauri/src/main.rs
@p1bot
Copy link
Copy Markdown
Collaborator

p1bot commented Feb 6, 2026

You did it @moparisthebest!

Thank you for signing the ProcessOne Contribution License Agreement.

We will have a look at your contribution!

@p1bot p1bot removed the cla-missing Contributor needs to sign Agreement (CLA) label Feb 6, 2026
@mremond
Copy link
Copy Markdown
Member

mremond commented Feb 6, 2026

Hi !
Thanks for the PR !
I am not sure if the CLA contribute your Rust proxy as well. It could be a problem to provide commercial package if needed by some customers.
As we do not need something as complete as you proxy, I will check to see if I could implement a minimal proxy covering just the websocket to TCP part.

@mremond mremond self-assigned this Feb 6, 2026
@mremond
Copy link
Copy Markdown
Member

mremond commented Feb 10, 2026

Hi !
Thanks for the PR.
As your proxy is full-featured and we needed a much simpler implementation, I got inspired by your approach, but made a simpler and straightforward implementation. This allow to project to have full control and knowledge on the proxy feature.
Thanks again !

@mremond
Copy link
Copy Markdown
Member

mremond commented Feb 10, 2026

main has now xmpp_proxy.rs and support for direct TCP connection.

@mremond mremond closed this Feb 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants