Skip to content

Commit

Permalink
feat!: ask delegated-ipfs.dev in addition to DHT and cid.contact
Browse files Browse the repository at this point in the history
  • Loading branch information
hacdias committed Mar 6, 2024
1 parent 2eee2ed commit 23ff9b8
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ You can use `someguy` as a client, or as a server.

### Server

You can start the server with `someguy start`. This will, by default, run a Delegated Routing V1 server that 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.
You can start the server with `someguy start`. This will, by default, run a Delegated Routing V1 server that proxies requests to the [IPFS Amino DHT](https://blog.ipfs.tech/2023-09-amino-refactoring/), [delegated-ipfs.dev](https://delegated-ipfs.dev) and [cid.contact](https://cid.contact).

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

### Client

If you don't want to run a server yourself, but want to query some other server, you can run `someguy ask` and choose any of the subcommands and ask for a provider, a peer, or even an IPNS record.
If you don't want to run a server yourself, but want to query some other server, you can run `someguy ask` and choose any of the subcommands and ask for a provider, a peer, or even an IPNS record. By default, [delegated-ipfs.dev](https://delegated-ipfs.dev) is the server used.

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

Expand Down
6 changes: 3 additions & 3 deletions docs/environment-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,19 @@ Default: `true`

Comma-separated list of other Delegated Routing V1 endpoints to proxy provider requests to.

Default: `https://cid.contact`
Default: `https://cid.contact,https://delegated-ipfs.dev`

### `SOMEGUY_PEER_ENDPOINTS`

Comma-separated list of other Delegated Routing V1 endpoints to proxy peer requests to.

Default: none
Default: `https://delegated-ipfs.dev`

### `SOMEGUY_IPNS_ENDPOINTS`

Comma-separated list of other Delegated Routing V1 endpoints to proxy IPNS requests to.

Default: none
Default: `https://delegated-ipfs.dev`

## Logging

Expand Down
13 changes: 8 additions & 5 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ import (
"github.com/urfave/cli/v2"
)

const cidContactEndpoint = "https://cid.contact"
const (
cidContactEndpoint = "https://cid.contact"
delegatedIpfsEndpoint = "https://delegated-ipfs.dev"
)

func main() {
app := &cli.App{
Expand All @@ -36,19 +39,19 @@ func main() {
},
&cli.StringSliceFlag{
Name: "provider-endpoints",
Value: cli.NewStringSlice(cidContactEndpoint),
Value: cli.NewStringSlice(cidContactEndpoint, delegatedIpfsEndpoint),

Check warning on line 42 in main.go

View check run for this annotation

Codecov / codecov/patch

main.go#L42

Added line #L42 was not covered by tests
EnvVars: []string{"SOMEGUY_PROVIDER_ENDPOINTS"},
Usage: "other Delegated Routing V1 endpoints to proxy provider requests to",
},
&cli.StringSliceFlag{
Name: "peer-endpoints",
Value: cli.NewStringSlice(),
Value: cli.NewStringSlice(delegatedIpfsEndpoint),

Check warning on line 48 in main.go

View check run for this annotation

Codecov / codecov/patch

main.go#L48

Added line #L48 was not covered by tests
EnvVars: []string{"SOMEGUY_PEER_ENDPOINTS"},
Usage: "other Delegated Routing V1 endpoints to proxy peer requests to",
},
&cli.StringSliceFlag{
Name: "ipns-endpoints",
Value: cli.NewStringSlice(),
Value: cli.NewStringSlice(delegatedIpfsEndpoint),

Check warning on line 54 in main.go

View check run for this annotation

Codecov / codecov/patch

main.go#L54

Added line #L54 was not covered by tests
EnvVars: []string{"SOMEGUY_IPNS_ENDPOINTS"},
Usage: "other Delegated Routing V1 endpoints to proxy IPNS requests to",
},
Expand All @@ -62,7 +65,7 @@ func main() {
Flags: []cli.Flag{
&cli.StringFlag{
Name: "endpoint",
Value: cidContactEndpoint,
Value: delegatedIpfsEndpoint,
Usage: "the Delegated Routing V1 endpoint to ask",
},
&cli.BoolFlag{
Expand Down

0 comments on commit 23ff9b8

Please sign in to comment.