Skip to content

AgregoreWeb/agregore-ipfs-daemon

Repository files navigation

agregore-ipfs-daemon

Work in progress

The go-ipfs directory is forked from go-ipfs v0.12.2, but the important part are the changes in gateway_handler.go and pubsub.go.

Other modules like go-libp2p-kad-dht and go-namesys have also been forked and included in this repo. They contain multiple changes to improve IPNS publish time. See this PR for details.

Building

While this gateway is designed for mobile usage, you can build it for desktop for debugging and development. Just run go build.

For mobile, an Android library file (.aar) is built, to be imported and used in an Android project. We have created a docker container that has all the required dependencies to make building easy. Just run:

docker run --rm -v "$PWD":/module makeworld/gomobile-android bind -target=android/arm -javapkg=moe.mauve.agregore.ipfs -o agregore-ipfs-daemon.aar ./gateway

Note: the container image is 4.1 GB uncompressed

Development

Currently Go 1.17 is required, Go 1.18 will not work due to this issue which affects the go-ipfs version included in this repo.

Instead of running go mod tidy run:

go mod tidy && go get -d golang.org/x/mobile/cmd/gomobile@447654d348e36cdac65810aa73b4fc8e7b3ceef1

go mod tidy will remove the dependency on golang.org/x/mobile which is required for the Android build. Running the command above will tidy things, but keep the dependency intact.

License

This repo is dual-licensed under the MIT and APACHE2 licenses. Please see LICENSE-MIT and LICENSE-APACHE2 for details.