* Add SOCKS5 proxy support via pluggable stream provider
Introduces MQTTnet.Extensions.Socks5, enabling SOCKS5 proxy support for MQTTnet TCP transport. Adds IMqttClientStreamProvider interface, Socks5StreamProvider implementation, and related configuration options. Updates MqttTcpChannel to support stream providers and TLS layering. Includes unit tests with a fake SOCKS5 server and usage samples. Solution and project references updated accordingly.
* Add SOCKS5 options validation for invalid configurations
* Tighten SOCKS5 RFC compliance checks
---------
Co-authored-by: Copilot <Copilot@users.noreply.github.com>
When a publish, subscribe or unsubscribe request was cancelled or
timed out client-side, the corresponding awaitable was removed from
the packet dispatcher. A subsequent PUBACK / PUBCOMP / SUBACK /
UNSUBACK arriving from the broker then fell through to the default
case and raised an MqttProtocolViolationException, which forced a
disconnect. Under high publish load (issue #2079) and from multiple
threads (issue #2078) this manifested as sporadic connection drops.
Match these acknowledgement packets explicitly and log a warning
when no awaiter is registered, instead of treating it as a protocol
violation. The connection is now preserved.
Also documents the thread-safety guarantees of IMqttClient: publish,
subscribe, unsubscribe and ping operations are safe to invoke
concurrently. Connect / disconnect must still be coordinated.
Co-authored-by: meisa <meisa@MAFDEL>
Co-authored-by: christian <6939810+chkr1011@users.noreply.github.com>
* Add support for binary user properties in MQTT 5.0
* Optimize byte array reversal in SubscriptionTopicHashTests
* Use InvariantCulture for topic string conversion in Load_Tests
* switched to `Microsoft.Testing.Platform`
* Refactor CI workflow to separate signed and unsigned package builds
* Add condition to sign job to prevent execution on external pull requests
* Remove fallback to value as string in MqttUserProperty
* Refactor MqttUserProperty handling to use byte arrays for improved performance and add deprecation warnings for legacy methods
* Add Directory.Build.props.
* Adjust Analysis related properties and add conditional enablement for ContinuousIntegrationBuild.
* Adopt new changes in master
---------
Co-authored-by: christian <6939810+chkr1011@users.noreply.github.com>
* Issues #2091 Improve the performance of RetainedMessages without subscribing to RetainedMessageChangedEvent.
* Fix build errors
* Update release notes
---------
Co-authored-by: Christian <6939810+chkr1011@users.noreply.github.com>
* Make use of language features line AsyncDispose, init etc.
* Fix build errors
* Improve Unit Tests
* Improve Unit Tests
* Improve Unit Tests
* Update samples
* Remove obsolete benchmarks
* Code cleanup
* Improve unit tests
* Improve Unit Tests
* Fix Unit Tests
* Improve Unit Tests
* Improve Unit Tests
* Restore unit tests
* Exclude load tests from unit tests
* Corrected Cancellation Source for KeepAlive Messages
* Use half of the keep alive value for the ping timeout
* Update release notes
* Update ReleaseNotes.md
* Update ReleaseNotes.md
* Update ReleaseNotes.md
---------
Co-authored-by: christian <6939810+chkr1011@users.noreply.github.com>
* Improve session message injection methods
* Add more tests for session injection
* Change return type from MqttPublishPacket to MqttPacketWithIdentifier
* Use dedicated type for MattApplicationMessage injection result
* Code review minor fixes
* Apply project code style
* Update release notes
---------
Co-authored-by: Anton Smolkov <anton.smolkov@idp.zyfra.com>
Co-authored-by: christian <6939810+chkr1011@users.noreply.github.com>
* Implement enhanced authentication for client and server.
* Update samples
* Add abstraction layer
* Merge master
* Use dedicated class for public API.
* Update release notes
* Rename methods to fit naming scheme
* Fix unit tests and samples
* fix: unused tryPrivate parameter in WithTryPrivate
* Fix wrong usage of try private
* feat: add option to provide deflate compression options to WebSocketOptionsBuilder
---------
Co-authored-by: christian <6939810+chkr1011@users.noreply.github.com>
* Improve the compatibility of MqttClientOptionsBuilder.WithConnectionUri() method.
* Force UseTls to true for secure schemes.
* Add support for UnixDomainSocket.