Files
iroh-go/examples/README.md
cblgh b48ece9d40
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
examples: add http-client using net/http:Client
2026-10-22 16:08:21 +02:00

1.4 KiB

Examples

The examples in this directory show different parts of making an application that leverages iroh's functionality.

  • timeserve shows how one listener can serve many clients at once.
  • allowlist shows how to set up an allowlist, limiting connections to only those explicitly approved. The example also shows how you can derive an identity that will stay the same between runs (static iroh public keypair) and how to interact with iroh's tickets mechanism of exchanging address information.
  • connect is a barebones example showing how to send and read data.
  • connect-desktop shows how to build a go-based desktop application using iroh.
  • pairchat show how to setup a pairwise connection where both parties can read and receive data sent over an iroh connection.
  • simple-pipe sets up a directional pipe that can be used à la netcat to send files over iroh.
  • echosrv shows how to set up a simple HTTP echo server that is served only over iroh.
  • echo-endpoint sets up a HTTP echo server that can gate its HTTP routes based on the Iroh public key making requests.
  • http-dialer shows how to send a POST request over iroh using the net/http standard library approach