Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: no implicit filtering of proxied IPNI results #85

Merged
merged 5 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
}
Loading