Skip to content

Commit

Permalink
fix: no implicit filtering of proxied IPNI results (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
lidel authored Oct 30, 2024
1 parent 94cc5f7 commit 4903832
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ The following emojis are used to highlight certain changes:

### Security

## [v0.5.3]

### Fixed

- default config: restore proxying of all results from IPNI at `cid.contact` [#83](https://github.com/ipfs/someguy/pull/85)

## [v0.5.2]

### Changed
Expand Down
9 changes: 7 additions & 2 deletions server.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"github.com/CAFxX/httpcompression"
sddaemon "github.com/coreos/go-systemd/v22/daemon"
"github.com/felixge/httpsnoop"
"github.com/ipfs/boxo/routing/http/client"
drclient "github.com/ipfs/boxo/routing/http/client"
"github.com/ipfs/boxo/routing/http/server"
logging "github.com/ipfs/go-log/v2"
"github.com/libp2p/go-libp2p"
Expand Down Expand Up @@ -215,7 +215,12 @@ func getCombinedRouting(endpoints []string, dht routing.Routing) (router, error)
var routers []router

for _, endpoint := range endpoints {
drclient, err := client.New(endpoint, client.WithUserAgent(userAgent))
drclient, err := drclient.New(endpoint,
drclient.WithUserAgent("someguy/"+buildVersion()),
// override default filters, we want all results from remote endpoint, then someguy's user can use IPIP-484 to narrow them down
drclient.WithProtocolFilter([]string{}),
drclient.WithDisabledLocalFiltering(true),
)
if err != nil {
return nil, err
}
Expand Down
1 change: 0 additions & 1 deletion version.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ var versionJSON []byte

var name = "someguy"
var version = buildVersion()
var userAgent = name + "/" + version

func buildVersion() string {
// Read version from embedded JSON file.
Expand Down
2 changes: 1 addition & 1 deletion version.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "v0.5.2"
"version": "v0.5.3"
}

0 comments on commit 4903832

Please sign in to comment.