Skip to content

Add suport for TLS based HTTP connections.#158

Merged
mariocandela merged 3 commits intobeelzebub-labs:mainfrom
bryannolen:main
Feb 13, 2025
Merged

Add suport for TLS based HTTP connections.#158
mariocandela merged 3 commits intobeelzebub-labs:mainfrom
bryannolen:main

Conversation

@bryannolen
Copy link
Contributor

Add support for TLS in the HTTP strategy.

This adds 2 new optional fields to the Strategy configuration - TLSKeyPath and TLSCertPath. These are passed as provided to the http.ListenAndServeTLS function if they are not empty. Missing and invalid file path errors are handled by the underlying library.

Also correct a function typo (Fprintf was used, but no format string was provided), and reorder imports to improve readbility.


All Submissions:

  • [X ] Have you followed the guidelines in our Contributing document?
  • [ X] Have you checked to ensure there aren't other open Pull Requests for the same update/change?

New Feature Submissions:

  1. [X ] Does your submission pass tests?
  2. [X ] Have you lint your code locally before submission?

Changes to Core Features:

  • [ X] Have you added an explanation of what your changes do and why you'd like us to include them?
  • [ X] Have you written new tests for your core changes, as applicable?
  • [ X] Have you successfully run tests with your changes locally?

@mariocandela
Copy link
Collaborator

Hi @bryannolen,

Thank you for contributing to beelzebub ❤️, very appreciated.
I will review the changes next few days 😄

Copy link
Collaborator

@mariocandela mariocandela left a comment

Choose a reason for hiding this comment

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

You did a great job, thank you so much for the time you invested. ❤️

I’ve left some comments; once these issues are resolved, what do you think about adding an integration test for this new scenario?

If you don’t have the time, I can make these changes.

Thanks a lot!

@bryannolen
Copy link
Contributor Author

Happy to help, its a cool project. I have some ideas for adding TLS support to TCP Socket connections, but that will require some thought.

@bryannolen
Copy link
Contributor Author

As for the integration test, I don't have time until next month to do that, but good idea though.

@mariocandela
Copy link
Collaborator

As for the integration test, I don't have time until next month to do that, but good idea though.

Don't worry Bryan, we'll add these tests later on. I'll open an issue for that. Thank you so much for your contribution! I hope to see you here again. If you're interested in writing a blog post for Beelzebub Labs, you're more than welcome. I’ve read your blog, and your articles are very interesting ❤️

@mariocandela
Copy link
Collaborator

As for the integration test, I don't have time until next month to do that, but good idea though.

#159 🚀

@mariocandela mariocandela merged commit db80447 into beelzebub-labs:main Feb 13, 2025
3 checks passed
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.

2 participants