Skip to content

Commit 1c57560

Browse files
authored
Merge pull request #6 from n0-computer/rae/docs-review2
remove reliance on p2p language
2 parents 84e1915 + 0bffdaf commit 1c57560

18 files changed

+61
-56
lines changed

concepts/discovery.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ There are four different implementations of the discovery service in iroh. **By
2929
We want iroh to establish connections with as little friction as possible. Our
3030
first big push toward chipping away at this goal was adding [holepunching](/concepts/holepunching) into
3131
iroh. Now, devs no longer need to worry about opening up ports on their servers
32-
/ firewalls or be resigned to only creating peer-to-peer connections to
32+
/ firewalls or be resigned to only creating connections to
3333
computers inside their local NAT.
3434

3535
But even with holepunching, you need to know *where* to dial. Dialing an endpoint in

concepts/endpoints.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,22 @@ title: "Endpoints"
33
---
44

55
An _endpoint_ is the main API interface to create connections to, and accept
6-
connections from other iroh endpoints. The connections are peer-to-peer and
6+
connections from other iroh endpoints. The connections are
77
end-to-end encrypted. Endpoints have a `EndpointID` (the public half of an
88
Ed25519 keypair) and the private key used to sign and decrypt messages.
99

1010
Generally, an application will have a single endpoint instance. This ensures all
11-
the connections made share the same peer-to-peer connections to other iroh
11+
the connections made share the same connections to other iroh
1212
endpoints, while still remaining independent connections. This will result in
1313
more optimal network behaviour.
1414

1515

1616
## Connections
1717

18-
Because we're in a peer-to-peer context, either endpoint might be operating as
19-
the "server", so we use `connect` and `accept` to distinguish between the two.
20-
The `connect` method is used to create a new connection to a remote endpoint,
21-
while `accept` is used to accept incoming connections from a remote endpoint.
18+
Either endpoint might be operating as the "server", so we use `connect` and
19+
`accept` to distinguish between the two. The `connect` method is used to create
20+
a new connection to a remote endpoint, while `accept` is used to accept incoming
21+
connections from a remote endpoint.
2222

2323
Connections are full-fledged QUIC connections, giving you access to most
2424
features of QUIC / HTTP3, including bidirectional and unidirectional streams.

concepts/holepunching.mdx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,14 @@ Imagine you're trying to video call a friend. Both of you are behind routers at
1010
home. When you try to connect directly to each other, your routers' firewalls
1111
block the incoming connection because they don't recognize it as a response to
1212
something you requested. The combination of NAT (which translates addresses) and
13-
firewall rules (which filter traffic) makes direct peer-to-peer connections
13+
firewall rules (which filter traffic) makes direct connections
1414
challenging.
1515

1616
Traditionally, this problem was solved by:
1717
- **Port forwarding**: Manually configuring your router to allow specific connections (tedious and requires technical knowledge)
1818
- **Relay servers**: Routing all traffic through a third-party server (slow and expensive)
1919

20-
Neither solution is ideal for peer-to-peer applications.
21-
22-
## The Solution: Holepunching
20+
## The Innovation: Holepunching
2321

2422
**Holepunching** is a clever technique that works around NAT and firewall restrictions to allow direct connections between peers without manual configuration or relying entirely on relay servers.
2523

concepts/protocols.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@ behavior. Once you've established an iroh connection, protocols determine what
77
happens next: transferring files, syncing documents, broadcasting messages, or
88
whatever your application needs.
99

10-
iroh provides the encrypted, peer-to-peer connections - protocols define what to
10+
iroh provides the pool of encrypted QUIC connections - protocols define what to
1111
do with them.
1212

1313
## Peer-to-peer protocols
1414

15-
Unlike HTTP's client/server model where one side only sends requests and the other only responds, peer-to-peer protocols typically support **both** initiating and accepting connections on the same endpoint.
15+
Unlike HTTP's client/server model where one side only sends requests and the
16+
other only responds, peer-to-peer protocols typically support **both**
17+
initiating and accepting connections on the same endpoint.
1618

1719
This means:
1820
- Any peer can request data from any other peer

concepts/relays.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Relay code is open source! You can run your own relay server, or [pick a hosting
3737
provider](https://n0des.iroh.computer).
3838

3939

40-
### Why this architecture is powerful
40+
## Why this architecture is powerful
4141

4242
This approach makes uptime management significantly easier compared to
4343
traditional client-server architectures:

concepts/tickets.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ The postcard encoding keeps tickets compact despite containing multiple pieces o
6262

6363
## Security considerations
6464

65-
**Tickets contain IP addresses**: When you create a ticket, it embeds the IP addresses you're currently reachable at. Sharing a ticket means sharing your IP address with whoever receives it. This is intentional - it enables direct peer-to-peer connections without a central server.
65+
**Tickets contain IP addresses**: When you create a ticket, it embeds the IP addresses you're currently reachable at. Sharing a ticket means sharing your IP address with whoever receives it. This is intentional - it enables direct connections without a central server.
6666

6767
This is actually *better* than many P2P systems that broadcast your IP to all peers. With tickets, you form a "cozy network" between peers you explicitly choose to connect with.
6868

connecting/creating-endpoint.mdx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,8 @@ An endpoint is the core building block of an iroh node. It manages network
66
connections, handles incoming and outgoing traffic, and provides the necessary
77
infrastructure for implementing protocols.
88

9-
Once you have an Endpoint, you can use it to create connections or accept incoming connections from other endpoints.
10-
11-
Unlike HTTP servers, which listen on specific ports, iroh Endpoints use a peer-to-peer
12-
model to establish connections. This means that endpoints can connect directly
13-
to each other without relying on a central server.
14-
15-
This means that endpoints can be more resilient to network issues and can operate in
16-
a wider range of network environments.
9+
Once you have an Endpoint, you can use it to create connections or accept
10+
incoming connections from other endpoints.
1711

1812
## Creating an Endpoint
1913

deployment/dedicated-infrastructure.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ DNS and end-to-end encryption over relays. This infrastructure comprises:
88
1. [Relays](/concepts/relays)
99
2. [Discovery Servers (DNS)](/concepts/discovery)
1010

11-
Relays forward traffic when direct peer-to-peer connections are not possible as well
11+
Relays forward traffic when direct connections are not possible as well
1212
as facilitates holepunching for direct connections. These servers are managed and
1313
maintained by [the n0 team](https://n0.computer), and are shared by a global public network of
1414
developers.

deployment/wasm-browser-support.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@ This is because we can't port our hole-punching logic in iroh to browsers: They
2828
Keep in mind that *connections are end-to-end encrypted*, as always with iroh.
2929
So even though traffic from browsers is always relayed, it can't be decrypted by the relay.
3030

31-
There are other ways of getting peer-to-peer connections going, such as WebTransport with `serverCertificateHashes`, or WebRTC.
32-
We may expand iroh's browser support to make use of these to try to generate fully peer-to-peer connections even when a browser node is involved in the connection.
31+
There are other ways of getting direct connections going, such as WebTransport
32+
with `serverCertificateHashes`, or WebRTC. We may expand iroh's browser support
33+
to make use of these to try to generate direct connections even when a browser
34+
node is involved in the connection.
3335

3436
### `iroh` crate features
3537

docs.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"examples/examples",
2222
{
2323
"group": "How it works",
24+
"expanded": true,
2425
"pages": [
2526
"concepts/endpoints",
2627
"concepts/tickets",
@@ -43,7 +44,7 @@
4344
]
4445
},
4546
{
46-
"group": "Communicating over Iroh",
47+
"group": "Building your App",
4748
"pages": [
4849
"protocols/kv-crdts",
4950
"protocols/blobs",

0 commit comments

Comments
 (0)