An open API service indexing awesome lists of open source software.

https://github.com/ipfs/someguy

A Delegated Routing V1 server and client for all your HTTP/IPFS routing needs.
https://github.com/ipfs/someguy

ipfs p2p

Last synced: 17 days ago
JSON representation

A Delegated Routing V1 server and client for all your HTTP/IPFS routing needs.

Awesome Lists containing this project

README

          

# 🤷 Someguy

[![Official Part of IPFS Project](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech)
[![Discourse Forum](https://img.shields.io/discourse/posts?server=https%3A%2F%2Fdiscuss.ipfs.tech)](https://discuss.ipfs.tech)
[![Matrix](https://img.shields.io/matrix/ipfs-space%3Aipfs.io?server_fqdn=matrix.org)](https://matrix.to/#/#ipfs-space:ipfs.io)
[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/someguy/go-test.yml?branch=main)](https://github.com/ipfs/someguy/actions)
[![Code Coverage](https://codecov.io/gh/ipfs/someguy/branch/main/graph/badge.svg?token=9eG7d8fbCB)](https://codecov.io/gh/ipfs/someguy)
[![GitHub Release](https://img.shields.io/github/v/release/ipfs/someguy?filter=!*rc*)](https://github.com/ipfs/someguy/releases)
[![Go Reference](https://pkg.go.dev/badge/github.com/ipfs/someguy.svg)](https://pkg.go.dev/github.com/ipfs/someguy)

Someguy is an [HTTP Delegated Routing V1](https://specs.ipfs.tech/routing/http-routing-v1/) server that proxies requests to the [Amino DHT](https://docs.ipfs.tech/concepts/glossary/#amino) and other Delegated Routing servers such as the [Network Indexer](https://cid.contact).

[Shipyard](https://ipshipyard.com/) also runs a [public Someguy instance](https://docs.ipfs.tech/concepts/public-utilities/#delegated-routing-endpoint) at `https://delegated-ipfs.dev/routing/v1`.

## Build

```bash
go build -o someguy
```

## Install

```bash
go install github.com/ipfs/someguy@latest
```

### Docker

Automated Docker container releases are available from the [Github container registry](https://github.com/ipfs/someguy/pkgs/container/someguy):

- 🟢 Releases
- `latest` always points at the latest stable release
- `vN.N.N` point at a specific [release tag](https://github.com/ipfs/someguy/releases)
- 🟠 Unreleased developer builds
- `main-latest` always points at the `HEAD` of the `main` branch
- `main-YYYY-DD-MM-GITSHA` points at a specific commit from the `main` branch
- ⚠️ Experimental, unstable builds
- `staging-latest` always points at the `HEAD` of the `staging` branch
- `staging-YYYY-DD-MM-GITSHA` points at a specific commit from the `staging` branch
- This tag is used by developers for internal testing, not intended for end users

When using Docker, pass configuration via `-e`:
```console
$ docker pull ghcr.io/ipfs/someguy:main-latest
$ docker run --rm -it --net=host ghcr.io/ipfs/someguy:main-latest
```

See [`/docs/environment-variables.md`](./docs/environment-variables.md).

## Usage

Run `someguy` as a client or as a server.

### Server

Start the server with `someguy start`. By default it proxies requests to the [IPFS Amino DHT](https://blog.ipfs.tech/2023-09-amino-refactoring/) and the [cid.contact](https://cid.contact) indexer (IPNI) node.

For more details, run `someguy start --help`.

### Client

To query an existing server without running one yourself, use `someguy ask ` to look up a provider, peer, or IPNS record.

For more details, run `someguy ask --help`.

### AutoConf

Automatic configuration of bootstrap peers and delegated routing endpoints. When enabled (default), Someguy replaces the `auto` placeholder with network-recommended values fetched from a remote URL.

Configuration:
- `--autoconf` / [`SOMEGUY_AUTOCONF`](docs/environment-variables.md#someguy_autoconf)
- `--autoconf-url` / [`SOMEGUY_AUTOCONF_URL`](docs/environment-variables.md#someguy_autoconf_url)
- `--autoconf-refresh` / [`SOMEGUY_AUTOCONF_REFRESH`](docs/environment-variables.md#someguy_autoconf_refresh)

Endpoint flags (default to `auto`):
- `--provider-endpoints` / [`SOMEGUY_PROVIDER_ENDPOINTS`](docs/environment-variables.md#someguy_provider_endpoints)
- `--peer-endpoints` / [`SOMEGUY_PEER_ENDPOINTS`](docs/environment-variables.md#someguy_peer_endpoints)
- `--ipns-endpoints` / [`SOMEGUY_IPNS_ENDPOINTS`](docs/environment-variables.md#someguy_ipns_endpoints)

To use custom endpoints instead of `auto`:
```bash
someguy start --ipns-endpoints https://example.com
```

See [environment-variables.md](docs/environment-variables.md) for URL formats and configuration details.

## Deployment

For self-hosting, run the [prebuilt Docker image](#docker).

## Release

1. Create a PR from branch `release-vX.Y.Z` against `main` that:
1. Updates [`CHANGELOG.md`](CHANGELOG.md) with entries for the current release
2. Updates the [`version.json`](./version.json) file
2. Once the release checker creates a draft release, copy-paste the changelog into the draft
3. Merge the PR; the release workflow tags and publishes automatically

## License

Dual-licensed under [MIT + Apache 2.0](LICENSE.md)