## Description
This mimics the Makefile.toml from noq, which is very useful and we
can mention in the PR template.
## Breaking Changes
n/a
## Notes & open questions
n/a
## Change checklist
- [x] Self-review.
- [x] Documentation updates following the [style
guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text),
if relevant.
- [x] Tests if relevant.
- [x] All breaking changes documented.
- [x] This PR was created by a human that thought critically about the
proposed change and wrote an as clear and concise description as
they could.
- [x] This PR isn't slop, and is carefully crafted to do have the
intented effect.
## Description
Same pricinple as https://github.com/n0-computer/noq/pull/788
Uses --locked to ensure we only use deps from the lock file
Adds cooldown period to dependabot
pins actions versions
introduces zizimor and pinact
## Breaking Changes
<!-- Optional, if there are any breaking changes document them,
including how to migrate older code. -->
## Notes & open questions
<!-- Any notes, remarks or open questions you have to make about the PR.
-->
## Change checklist
<!-- Remove any that are not relevant. -->
- [ ] Self-review.
- [ ] Documentation updates following the [style
guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text),
if relevant.
- [ ] Tests if relevant.
- [ ] All breaking changes documented.
- [ ] This PR was created by a human that thought critically about the
proposed change and wrote an as clear and concise description as
they could.
- [ ] This PR isn't slop, and is carefully crafted to do have the
intented effect.
## Description
This makes iroh-dns-server bind to both IPv4 and IPv6 by default for
HTTP, HTTPS, and DNS. The IPv6 wildcard (`::`) on Linux binds to both
IPv4 and IPv6, which is what we want for the default. People can still
override it via `bind_addr` in `config.toml`.
## Breaking Changes
<!-- Optional, if there are any breaking changes document them,
including how to migrate older code. -->
## Notes & open questions
<!-- Any notes, remarks or open questions you have to make about the PR.
-->
## Change checklist
<!-- Remove any that are not relevant. -->
- [x] Self-review.
- [x] Documentation updates following the [style
guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text),
if relevant.
- [x] Tests if relevant.
- [x] All breaking changes documented.
- [x] This PR was created by a human that thought critically about the
proposed change and wrote an as clear and concise description as
they could.
- [x] This PR isn't slop, and is carefully crafted to do have the
intented effect.
## Description
Define the list of allowed types per crate instead of globally, and add
a `cargo make` task to run the checks locally.
## Change checklist
- [x] Self-review.
## Description
Adds a first round of tests using our new network simulation framework,
[patchbay](https://github.com/n0-computer/patchbay). Patchbay uses Linux
network namespaces to create isolated network topologies with routers,
NATs, and link impairment. This lets us test actual holepunching and NAT
traversal in realistic conditions, without needing any external
infrastructure.
The test suite covers establishing a direct path in different scenarios:
- Holepunching: two devices behind destination-independent NATs connect
via relay, then upgrade to direct.
- Uplink switching: a device changes its network uplink (v4 and v6)
mid-connection and recovers a direct path.
- Interface changes: network interfaces are added or removed while
connected
- Link outage recovery: a device goes offline and comes back, direct
connection resumes
- Degraded links: increasing levels of impairment (latency, jitter,
packet loss) are applied to either side of a connection and holepunching
still succeeds
Some tests that iroh doesn't pass yet are included but marked
`#[ignore]`. They should be un-ignored as we improve things.
### Running the tests
On Linux, things just work with user namespace support:
```sh
cargo make patchbay
# expands to:
cargo nextest run -p iroh --features qlog --test patchbay --profile patchbay
# run a specific test with logs:
RUST_LOG=trace cargo make patchbay holepunch_simple --nocapture
```
Test output is saved in `./target/testdir-current/patchbay/<test-name>`.
Patchbay currently collects tracing logs for each device, qlog files (if
the feature is enabled), and endpoint metrics.
There's also a browser UI for viewing timelines, topologies, and logs.
The UI can also be used to compare different test runs.
```sh
cargo install --git https://github.com/n0-computer/patchbay patchbay-cli
patchbay serve --testdir --open
```
On macOS you'll need to run the patchbay tests in a VM or container. The
`patchbay` CLI includes a tool to set up a container or QEMU VM for
this.
```sh
# both commands default to the container backend on macOS and native on linux
patchbay test -p iroh --test patchbay
patchbay serve --testdir --open
# use --vm to force VM mode even on linux
```
See the [patchbay docs](https://n0-computer.github.io/patchbay/) and
[README](https://github.com/n0-computer/patchbay) for more details.
## Notes and open questions
There's a draft PR with some more tests: #4065, but they need more
thought and work to really cover what we want to test.
## Breaking Changes
None.
## Change checklist
- [x] Self-review.
- [x] Documentation updates following the [style
guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text),
if relevant.
- [x] Tests if relevant.
## Description
This enables the unstable rustfmt option to format the code in docs.
Should make our examples a lot more consistent.
## Breaking Changes
<!-- Optional, if there are any breaking changes document them,
including how to migrate older code. -->
## Notes & open questions
This is unstable, so there might be some churn or bad results. But I
don't think the churn should be much of an issue for us.
## Change checklist
- [x] Self-review.
- [x] Documentation updates following the [style
guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text),
if relevant.
- [x] Tests if relevant.
- [x] All breaking changes documented.
## Description
This enables a strict style in rustfmt to format imports statements. It
needs rust nightly for rustfmt to be able to do this.
To not make the `cargo fmt` from stable rust really noisy it does not
add a rustfmt.toml file, instead it adds a `cargo-make` task to automate
running this locally. This same task is used in CI to run the formatter.
The `Crate`m formatting will be preserved by the default configuration
of rust-analyzer, which makes external contributions easier as well,
most folks shouldn't be running into this formatter.
## Breaking Changes
<!-- Optional, if there are any breaking changes document them,
including how to migrate older code. -->
## Notes & open questions
I guess we need buy-in from everyone on the team for this.
## Change checklist
- [x] Self-review.
- [x] Documentation updates following the [style
guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text),
if relevant.
- [x] Tests if relevant.
- [x] All breaking changes documented.
---------
Co-authored-by: Diva M <divma@protonmail.com>
Co-authored-by: Divma <26765164+divagant-martian@users.noreply.github.com>