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

fix: Allow specifying the protocol (TCP, UDP, SCTP) to resolve the public assigned host port #1219

Merged
merged 7 commits into from
Jul 25, 2024

Conversation

wolfman42
Copy link
Contributor

@wolfman42 wolfman42 commented Jul 22, 2024

What does this PR do?

This PR fixes #1218 by allowing protocol qualifiers to be specified in public ushort GetMappedPublicPort(string containerPort).

Why is it important?

UDP port mapping is for example needed for SNMP protocol

Related issues

How to test this PR

Added unit test RandomUdpPortBinding

Copy link

netlify bot commented Jul 22, 2024

Deploy Preview for testcontainers-dotnet ready!

Name Link
🔨 Latest commit 86018da
🔍 Latest deploy log https://app.netlify.com/sites/testcontainers-dotnet/deploys/66a2042fc804dd00087550fc
😎 Deploy Preview https://deploy-preview-1219--testcontainers-dotnet.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@HofmeisterAn HofmeisterAn changed the title bug: fix UDP port mapping #1218 fix: Allow specifying the protocol (TCP, UDP, SCTP) to resolve the public assigned host port Jul 25, 2024
@HofmeisterAn HofmeisterAn added the bug Something isn't working label Jul 25, 2024
Copy link
Collaborator

@HofmeisterAn HofmeisterAn left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution and pull request. The changes look good. I added some documentation about specifying the protocol to get the public assigned host port. Thanks again 🙏.

@HofmeisterAn HofmeisterAn merged commit 21137c6 into testcontainers:develop Jul 25, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: UDP isn't fully supported for public mapped ports
2 participants