Skip to content

tests: Add tests for easy-hard NAT combinations#685

Merged
flub merged 3 commits into
mainfrom
flub/test-hard-nat
Jun 3, 2026
Merged

tests: Add tests for easy-hard NAT combinations#685
flub merged 3 commits into
mainfrom
flub/test-hard-nat

Conversation

@flub
Copy link
Copy Markdown
Collaborator

@flub flub commented Jun 2, 2026

Description

We should be able to traverse NATs with a combination of a "very easy"
and "hard" NAT. Adjust the SimpleFirewallRouting to allow emulating
that behaviour.

Verified by reverting c20a684 and
then test_hard_nat_server_opens_path fails.

Breaking Changes

none

Notes & open questions

Look how simple this was. #675 was a red herring.

Change checklist

  • Self-review.
  • Documentation updates following the style guide, if relevant.
  • Tests if relevant.

We should be able to traverse NATs with a combination of a "very easy"
and "hard" NAT. Adjust the SimpleFirewallRouting to allow emulating
that behaviour.

Verified by reverting c20a684 and
then test_hard_nat_server_opens_path fails.
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 2, 2026

Documentation for this PR has been generated and is available at: https://n0-computer.github.io/noq/pr/685/docs/noq/

Last updated: 2026-06-03T10:36:05Z

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 2, 2026

Performance Comparison Report

103d729bad3218d4748e39ae3691ce7719e991c4 - artifacts

Raw Benchmarks (localhost)

Scenario noq upstream Delta CPU (avg/max)
large-single 5406.0 Mbps 7876.7 Mbps -31.4% 92.9% / 97.9%
medium-concurrent 5492.6 Mbps 7926.6 Mbps -30.7% 94.5% / 100.0%
medium-single 3609.8 Mbps 4658.9 Mbps -22.5% 93.5% / 101.0%
small-concurrent 3842.0 Mbps 5311.8 Mbps -27.7% 97.5% / 154.0%
small-single 3495.3 Mbps 4746.6 Mbps -26.4% 98.8% / 154.0%

Netsim Benchmarks (network simulation)

Condition noq upstream Delta
ideal 3104.8 Mbps 3959.7 Mbps -21.6%
lan 782.4 Mbps 812.9 Mbps -3.8%
lossy 69.8 Mbps 55.9 Mbps +25.0%
wan 83.8 Mbps 83.8 Mbps ~0%

Summary

noq is 26.9% slower on average

---
e65f1378b4212b795a030784b1c6abf41f499163 - artifacts

Raw Benchmarks (localhost)

Scenario noq upstream Delta CPU (avg/max)
large-single 5487.7 Mbps 7890.9 Mbps -30.5% 94.4% / 99.0%
medium-concurrent 5445.2 Mbps 7871.2 Mbps -30.8% 94.7% / 98.6%
medium-single 3587.6 Mbps 4746.4 Mbps -24.4% 96.6% / 149.0%
small-concurrent 3779.1 Mbps 5269.9 Mbps -28.3% 89.9% / 98.4%
small-single 3561.7 Mbps 4858.2 Mbps -26.7% 92.3% / 102.0%

Netsim Benchmarks (network simulation)

Condition noq upstream Delta
ideal N/A 4065.7 Mbps N/A
lan N/A 810.3 Mbps N/A
lossy N/A 55.9 Mbps N/A
wan N/A 83.8 Mbps N/A

Summary

noq is 28.6% slower on average

---
d4892df2e117e6d02d716c0ae49fee506175b431 - artifacts

Raw Benchmarks (localhost)

Scenario noq upstream Delta CPU (avg/max)
large-single 5368.4 Mbps 7989.1 Mbps -32.8% 95.6% / 100.0%
medium-concurrent 5341.7 Mbps 7581.2 Mbps -29.5% 97.0% / 148.0%
medium-single 3584.8 Mbps 4749.1 Mbps -24.5% 88.8% / 97.0%
small-concurrent 3714.9 Mbps 5042.7 Mbps -26.3% 95.2% / 103.0%
small-single 3489.7 Mbps 4875.6 Mbps -28.4% 94.3% / 102.0%

Netsim Benchmarks (network simulation)

Condition noq upstream Delta
ideal 3100.6 Mbps 4123.2 Mbps -24.8%
lan 782.4 Mbps 810.3 Mbps -3.4%
lossy 69.8 Mbps 69.8 Mbps ~0%
wan 83.8 Mbps 83.8 Mbps ~0%

Summary

noq is 27.7% slower on average

@n0bot n0bot Bot added this to iroh Jun 2, 2026
@github-project-automation github-project-automation Bot moved this to 🚑 Needs Triage in iroh Jun 2, 2026
Copy link
Copy Markdown
Collaborator

@divagant-martian divagant-martian left a comment

Choose a reason for hiding this comment

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

minor docs request but looks good!

Comment thread noq-proto/src/tests/multipath.rs
Comment thread noq-proto/src/tests/multipath.rs
Copy link
Copy Markdown
Member

@matheus23 matheus23 left a comment

Choose a reason for hiding this comment

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

Just the nits above, but apart from that, I can confirm this fails when I revert c20a684.

flub and others added 2 commits June 3, 2026 09:36
Co-authored-by: Philipp Krüger <philipp.krueger1@gmail.com>
@flub flub enabled auto-merge June 3, 2026 10:34
@flub flub added this pull request to the merge queue Jun 3, 2026
Merged via the queue into main with commit cc8822e Jun 3, 2026
39 checks passed
@flub flub deleted the flub/test-hard-nat branch June 3, 2026 10:52
@github-project-automation github-project-automation Bot moved this from 🚑 Needs Triage to ✅ Done in iroh Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

3 participants