Commit Graph
5 Commits
Author SHA1 Message Date
Friedel ZiegelmayerandKasey dcbebe93f9 refactor(iroh)!: rework net_report (#3314)
## Description 

- Use more `Watchable` in  more places
- Drops STUN, ICMP and hairpin probes, they are not actually needed in
our world
- restructure report generation
- Keep QAD connections open, instead of recreating them on every report
- Removes `STUN` functionality from the relay server

**Fixes**

- https://github.com/n0-computer/iroh/issues/3315


## Breaking Changes

- removes `iroh_relay::protos::stun::StunError`
- removes `iroh_relay::server::testing::stun_config`
- removes `iroh_relay::protos::stun`
- removes `iroh_relay::quic::QuicClient::get_addr_and_latency`
- removes `DEFAULT_STUN_PORT`
 


## Depends on 

- [x] #3279 
- [x] https://github.com/n0-computer/net-tools/pull/27

---------

Co-authored-by: Kasey <kasey@n0.computer>
2025-06-24 13:31:24 +00:00
Friedel ZiegelmayerandAsmir Avdicevic a956319277 refactor!: remove default protocols and iroh-cli (#2928)
## Description

As previously announced and planned, this removes all protocol
implementations from the `iroh` crate, as well as removes the `iroh-cli`
crate.

The core functionality of those protocols, including RPC & CLI now is in
the individual crates.


## Remove from `iroh`

- [x] `iroh-docs`
- [x] `iroh-blobs`
- [x] `iroh-gossip`
 
## Examples

- [x] Move examples to the appropriate repos:
https://github.com/n0-computer/iroh-blobs/pull/15

## Tests

- [x] Move the remaining tests to the appropriate repos

CLI
- [x] Remove 

## Breaking Changes

- `iroh-cli` removed
  - the crate itself
- the ability to run `iroh` itself in a docker container, as there is no
binary anymore
- removed 
  - `iroh::blobs` use `iroh_blobs`
  - `iroh::docs` use `iroh_docs`
  - `iroh::gossip` use `iroh_gossip`
- `iroh::client::blobs` use `iroh_blobs::rpc::client`. a memory client
is available on Blobs
- `iroh::client::tags` use `iroh_blobs::rpc::client`. a memory client is
available on Blobs
- `iroh::client::gossip` use `iroh_gossip::rpc::client`. a memory client
is available on Gossip
- `iroh::client::docs` use `iroh_docs::rpc::client`. a memory client is
available on Docs
- `iroh::client::authors` use `iroh_docs::rpc::client`. a memory client
is available on Docs
  - `iroh::node::MemNode`, use `Node` directly
  - `iroh::node::FsNode`, use `Node` directly
  - `iroh::node::Node::local_pool_handle`
  - `iroh::node::builder::DocsStorage`
  - `iroh::node::builder::Builder::enable_gc_policy`
  - `iroh::node::builder::Builder::enable_docs`
  - `iroh::node::builder::Builder::register_cb_done`
  - `iroh::node::builder::ProtocolBuilder::local_pool_handle`
  - `iroh::node::builder::GcPolicy`
  - `iroh::util::progress`
  - `iroh::util::path::IrohPaths::BaoStoreDir`
  - `iroh::util::path::IrohPaths::DocsDatabase `
  - `iroh::util::path::IrohPaths::Console`
  - `iroh::util::path::IrohPaths::DefaultAuthor`
- `iroh::node::Builder` has no more generic parameters anymore
- `iroh::node::Node` has no more generic parameters anymore



## Notes & open questions



## 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: Asmir Avdicevic <asmir.avdicevic64@gmail.com>
2024-11-25 21:36:52 +00:00
Asmir Avdicevic d5672319d7 fix: docker CI performance & release builds (#2659)
## Description

- We now build the docker test CI jobs in a way that more closely
resembles the release process. It should compile the binaries and build
the image significantly faster now. (down from 8+ min to 2 min)
- Secrets are properly passed in to the reusable workflow so [release
docker builds should no longer
fail](https://github.com/n0-computer/iroh/actions/runs/10473026816/job/29005092378)

## 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

- [x] 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.
2024-08-22 14:49:42 +00:00
Asmir Avdicevic c0fa1f4e81 feat(ci): publish docker images (#2520)
## Description

Tested here:
https://github.com/n0-computer/iroh/actions/runs/9992457651/job/27617587850?pr=2520
Results here: 
- https://hub.docker.com/r/n0computer/iroh
- https://hub.docker.com/r/n0computer/iroh-relay
- https://hub.docker.com/r/n0computer/iroh-dns-server

Will only trigger on new releases.
Pretty happy, images are very slim and builds are pretty snappy.

Test it out with 
`docker run -p 9090:9090 -p 4919:4919/udp -Pit n0computer/iroh:latest
--rpc-addr 0.0.0.0:4919 start`

Closes #1371

## 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

- [ ] 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.
2024-07-18 17:04:27 +00:00
Asmir Avdicevicanddignifiedquire debc4fb8c2 feat: docker images for iroh (#2404)
## Description

- Enable binding of the RPC endpoint to arbitrary addresses
- Add Dockerfile for iroh

## Breaking Changes

- changed `iroh::node::Node::my_rpc_port` is now `my_rpc_addr` and
returns `Option<SocketAddr>`
- `iroh::node::Builder::rpc_endpoint` takes `Option<SocketAddr> instead
of `Option<u16>`
- added `iroh::node::Builder::enable_rpc_with_addr` allowing to specify
on which address + port to bind to

## Notes & open questions

<!-- Any notes, remarks or open questions you have to make about the PR.
-->

## Change checklist

- [x] Self-review.
- [x] Documentation updates if relevant.
- [ ] Tests if relevant.
- [ ] All breaking changes documented.

---------

Co-authored-by: dignifiedquire <me@dignifiedquire.com>
2024-07-08 11:17:31 +00:00