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

Add DualMode support for Endpoints to listen on IPv4 and IPv6 at the same time #1267

Merged
merged 3 commits into from
Mar 27, 2024

Conversation

Badgerati
Copy link
Owner

Description of the Change

Adds a new -DualMode switch on Add-PodeEndpoint, to enable support for listening on both IPv4 and IPv6 for an -Address (if IPv6 is supported).

Related Issue

Resolves #1251

Examples

Add-PodeEndpoint -Address * -Port 8080 -Protocol Http -DualMode

@Badgerati Badgerati added this to the 2.10.0 milestone Mar 25, 2024
@Badgerati Badgerati self-assigned this Mar 25, 2024
@mdaneri
Copy link
Contributor

mdaneri commented Mar 25, 2024

You hit the issue with 7.4.1 on Windows

@Badgerati
Copy link
Owner Author

@mdaneri What issue's that? 👀

@mdaneri
Copy link
Contributor

mdaneri commented Mar 25, 2024

The issue is that on Windows with pwsh 7.4.x, without any apparent reason, the endpoint refuses any incoming connection.

If you go back to 7.3.x or you are using Linux or Mac, the problem never manifests itself

@mdaneri
Copy link
Contributor

mdaneri commented Mar 25, 2024

I forgot to mention that when the test fails, it always happens with the restful test

@Badgerati
Copy link
Owner Author

Interesting, I do have 7.4.1 locally and only tend to see it happen in a GitHub; I'll have to run it several times locally see if I can get it to trigger 🤔

@mdaneri
Copy link
Contributor

mdaneri commented Mar 25, 2024

My Windows is virtual and fails almost every time

@mdaneri
Copy link
Contributor

mdaneri commented Mar 26, 2024

I think I found the source of the trouble
Invoke-RestMethod If I replace the cmdlet with curl.exe, everything works super fast without any problem.

Looks like the Invoke-RestMethod needs some work
we can modify the test to use curl instead of invoke
to capture the codes we can use curl -s -o /dev/null -w "%{http_code}" "$Endpoint/eek" -k

@mdaneri
Copy link
Contributor

mdaneri commented Mar 26, 2024

@Badgerati I "fixed" the restful HTTPS test with 7.4.x
the fix is committed to Migration to Pester 5.5 #1262
Please merge #1262 before your 1267, and should solve your test issue

@Badgerati Badgerati merged commit dd9d544 into develop Mar 27, 2024
8 checks passed
@Badgerati Badgerati deleted the Issue-1251 branch March 27, 2024 09:31
@Badgerati Badgerati mentioned this pull request Apr 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pode cannot listen on both ipv6 and ipv4 unspecified addresses at the same time - it should be able to
2 participants