Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(connection): ALPN protocols support #1399

Merged
merged 1 commit into from
Aug 17, 2023
Merged

feat(connection): ALPN protocols support #1399

merged 1 commit into from
Aug 17, 2023

Conversation

twankamp
Copy link
Contributor

PR Checklist

If you have any questions, you can refer to the Contributing Guide

What is the current behavior?

No support for setting ALPN Protocols

Issue Number

Example: #916

What is the new behavior?

Support for setting ALPN Protocols

Does this PR introduce a breaking change?

  • Yes
  • No

Specific Instructions

Are there any specific instructions or things that should be known prior to review?

Other information

@ysfscream ysfscream added feature This pr is a feature desktop MQTTX Desktop labels Aug 14, 2023
@ysfscream ysfscream added this to the v2.0.0-beta.1 milestone Aug 14, 2023
@ysfscream ysfscream linked an issue Aug 14, 2023 that may be closed by this pull request
@ysfscream
Copy link
Member

ysfscream commented Aug 15, 2023

Thank you so much for your PR, @twankamp! We genuinely appreciate your contribution to the project. However, before moving forward, could we ask for some more details?

  1. Would you be able to provide a more in-depth description or documentation about this feature update? It would be especially helpful to have usage steps accompanied by screenshots.

  2. Is the ALPN implementation a universally recognized capability, or is it primarily specific to AWS? We want to ensure that our feature integrations serve a broader audience.

Again, thank you for your efforts, and we look forward to collaborating closely to enhance our codebase.

@twankamp
Copy link
Contributor Author

twankamp commented Aug 15, 2023

@ysfscream certainly

  1. This feature is applicable if you are using a TLS connection (so e.g. MQTTS or WSS) and the server needs the client to specify ALPN protocol for connecting. In that case when you select SSL/TLS in the MQTTX desktop app, it will unfold extra options like SSL Secure and Certificate, and in there now also ALPN is added. Then you simply specify the desired ALPN protocol in that field alongside all other parameters you need, then click connect and it will work. If you don't need it you can leave it on the default empty. Note that officially ALPN can be an array but that is an extremely niche use-case so I didn't want to mention about it in the UI to avoid confusion. However just in case if the user specifies multiple protocols in a way like p1,p2 or something like [p1, p2 ] then I made sure it will work as well.

image

  1. This is a universally recognized capability, it doesn't have anything specific to do with AWS or any other place where you decide to host your broker. I think the person in the feature request [Feature] ALPN protocol support #916 (whom I don't know) just used it as an example. This feature is used to improve performance if you host multiple protocols on the same port (for example a broker that supports both mqtts and wss on 443, or a reverse proxy that covers both an https and mqtts server). Even the library you use (mqtt.js) already supports it out of the box, so the only thing I did was expose it in the UI so users of the desktop app can actually use it. Other clients support it as well (e.g. https://mosquitto.org/man/mosquitto_pub-1.html), but the benefit of your app is that it has a GUI.

@ysfscream ysfscream modified the milestones: v2.0.0-beta.1, v1.9.6 Aug 17, 2023
@ysfscream ysfscream merged commit 737e73b into emqx:main Aug 17, 2023
2 checks passed
@ysfscream
Copy link
Member

@twankamp A huge thanks for your contribution! 🚀 We're excited to roll this out in our upcoming release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
desktop MQTTX Desktop feature This pr is a feature
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[Feature] ALPN protocol support
2 participants