Skip to content

Conversation

@chadknutson
Copy link

This pull requests supports TLS connections from clients to amqproxy. I cannot think of a compelling reason to support both TLS and non-TLS connections simulteneously, so either TLS or non-TLS can be utilized. I think that should keep the management of the connection pools simpler.

@chadknutson chadknutson requested a review from a team as a code owner December 16, 2025 18:34
end

private def reload_tls_context
return unless tls = @tls_context

Choose a reason for hiding this comment

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

Hmm i might be missing some Crystal. But I dont understand this??

Copy link
Author

Choose a reason for hiding this comment

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

I copy/pasted much of the TLS functionality from LavinMQ. Commented lines (mentioned in your other comment) are from a testing procedure -- they either did not work or were not necessary. Such commented lines should be removed

Copy link
Member

Choose a reason for hiding this comment

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

It's a nil guard. @tls_context may be nil, but the thanks to the guard tls won't be nil.

Comment on lines +3 to +12
module AMQProxy
class ConnectionInfo
getter remote_address : IPAddress
getter local_address : IPAddress
property? ssl : Bool = false
property? ssl_verify : Bool = false
property ssl_version : String?
property ssl_cipher : String?
property ssl_key_alg : String?
property ssl_sig_alg : String?

Choose a reason for hiding this comment

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

LMQ codebase spotted!!! 🔥

Comment on lines +76 to +77
# ensure
# @listeners.delete(s)

Choose a reason for hiding this comment

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

Any reason for those comments?

Copy link

@lukas8219 lukas8219 left a comment

Choose a reason for hiding this comment

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

Are you planning to add specs @chadknutson ?

@chadknutson
Copy link
Author

Are you planning to add specs @chadknutson ?

Specs are definitely needed!

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