Make it possible to have stateful connections
Maintainers usually reply within 2 days
@Frando is already working on this.
Since Oct 27, 2026.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 42/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- rust
Research direction
Start with the auth.rs example and the RemoteConnection implementations for irpc over QUIC and irpc-iroh, then trace how irpc::Client handles reconnects. Define a connection-lifecycle mechanism for stateful setup, and verify that authentication is sent before application requests after every reconnect.
Written by the indexing model from the issue text.
Description
A typical usecase involves authenticating to a remote server.
I first thought this would be easy enough: See this example https://github.com/n0-computer/irpc/blob/main/irpc-iroh/examples/auth.rs
There's a Auth message that contains whatever authentication token you are using. The server expects the first message on a connection to be that message, and aborts the connection if not or if the token doesn't verify. From the server side, all is good.
On the client side however, it seems to be fine to just issue an Auth rpc call when constructing a client. However, it is not: the RemoteConnection impls for both irpc over quic and irpc-iroh support reconnects-on-demand: If the previous connection was aborted by the server in-between (e.g. because the server was restarted), irpc will reconnect to the server with the same args (alpn and node addr) than in the initial connection. The request submitted by the application will then be sent on the new connection - which will fail, because the server expects an Auth message as the first message on each connection.
It is currently completely invisible to the irpc::Client and application code if and when such reconnections happend, therefore there's no way currently to "send an Auth request first whenever a reconnect happens".
Fixing this is quite important to me, I have multiple uses of irpc that would need this. The only alternative currently is to send a token with each and every request, which is wasteful and cumbersome.
- Dominant language
- Rust
- Stars
- 59
- Forks
- 10
- Avg merge
- 3d 15h
- Merged PRs (30d)
- 21
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from n0-computer/irpc
-
Difficulty 4/5 3-5 days Newbie friendliness 43/100
n0-computer/irpc#178 ·
Maintainers usually reply within 2 days
-
Would be nice to have a way to get the current RTT (and possibly other information) from the underlying connectionPossibly taken @rklaehn claimed this 12 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 45/100
n0-computer/irpc#95 · 4 comments · 1 reaction ·
Maintainers usually reply within 2 days
-
Rate limiting for irpc (quinn and iroh) server sideMay be free again @rklaehn claimed this 281 days ago, and no pull request is open. Openenhancement
n0-computer/irpc#93 · 1 assignee ·
Maintainers usually reply within 2 days
-
Difficulty 1/5 1-3 hours Newbie friendliness 45/100
n0-computer/irpc#49 ·
Maintainers usually reply within 2 days
-
Add connection idOpen
Difficulty 3/5 1-2 days Newbie friendliness 45/100
n0-computer/irpc#13 ·
Maintainers usually reply within 2 days
All issues in n0-computer/irpc
Similar issues
-
area:web kind:bug priority:p2 ready
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
Maintainers usually reply within 1 day
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 84/100
sims1253/r-typeshed#140 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
storytold/craft-libs#2867 ·
Maintainers usually reply within 1 day
-
help wanted needs investigation priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 62/100