Repository navigation
Conversation
|
Thanks @hsdfat! Why not just change it to udp4? Why the if/else ? |
Codecov Report❌ Patch coverage is
❌ Your patch check has failed because the patch coverage (0.00%) is below the target coverage (70.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #301 +/- ##
==========================================
- Coverage 65.40% 65.29% -0.11%
==========================================
Files 27 27
Lines 1798 1801 +3
==========================================
Hits 1176 1176
- Misses 622 625 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
12ca224 to
2413ade
Compare
|
The if/else keeps the CLI's existing URI transport support: If you meant making this tool plain STUN over IPv4 only, I can simplify it that way. Is that the scope you prefer? |
Signed-off-by: phatlc <phatle.hsd@gmail.com>
|
Thanks, I updated this to use the functional options from #304. The new The update is in 9950834. The full race-enabled test suite and |
Description
stun-clientpreviously used a dual-stack UDP connection despite its intended IPv4 default. On a host with IPv6 connectivity it can therefore report an IPv6 address instead of the NAT-mapped IPv4 address.Add
WithIPVersion(4)/WithIPVersion(6)toDialURI, using the functional options introduced in #304. Omitting the option, or passing 0, retains dual-stack address selection. Unsupported versions returnErrUnsupportedIPVersion.The CLI now calls
DialURI(uri, WithIPVersion(4)). The URI still selects UDP, TCP, TLS, or DTLS; the option only restricts the IP family. TLS configuration and DTLS options remain available.Validation:
GOMAXPROCS=4 go test -race -p 2 ./...GOMAXPROCS=4 go vet ./...golangci-lint run --timeout=5m --new-from-rev=origin/main(0 new issues)Reference issue
Fixes #211