{"id":20561281,"url":"https://github.com/tzdybal/cidtrack","last_synced_at":"2026-04-21T14:03:21.911Z","repository":{"id":57637896,"uuid":"297156244","full_name":"tzdybal/cidtrack","owner":"tzdybal","description":"Per CID bandwidth tracking for IPFS","archived":false,"fork":false,"pushed_at":"2020-10-16T00:03:10.000Z","size":129,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-16T19:24:28.919Z","etag":null,"topics":["ipfs"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tzdybal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-09-20T20:17:04.000Z","updated_at":"2021-01-08T20:09:25.000Z","dependencies_parsed_at":"2022-09-26T20:21:04.316Z","dependency_job_id":null,"html_url":"https://github.com/tzdybal/cidtrack","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tzdybal%2Fcidtrack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tzdybal%2Fcidtrack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tzdybal%2Fcidtrack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tzdybal%2Fcidtrack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tzdybal","download_url":"https://codeload.github.com/tzdybal/cidtrack/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242171527,"owners_count":20083553,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ipfs"],"created_at":"2024-11-16T03:57:33.733Z","updated_at":"2025-12-05T14:01:20.315Z","avatar_url":"https://github.com/tzdybal.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Go](https://github.com/tzdybal/cidtrack/workflows/Go/badge.svg)](https://github.com/tzdybal/cidtrack/actions/)\n[![Go Report Card](https://goreportcard.com/badge/github.com/tzdybal/cidtrack)](https://goreportcard.com/report/github.com/tzdybal/cidtrack)\n\n# cidtrack\nPer CID bandwidth tracking for IPFS daemon.\n\nCIDTrack is a ipfs daemon plugin that counts how many times a block was sent to the network.\nCurrently it's a low level utility that counts raw block usage, without taking care about subblocks (see https://docs.ipfs.io/how-to/work-with-blocks/). \n\n## Building\nBuilding is done out of tree (of go-ipfs). Currently you have to checkout go-ipfs and manually update go-bitswap dependency, because change adding `WireTap` is merged into master but not yet released.\n\nDaemon:\n1. `git clone https://github.com/ipfs/go-ipfs.git`\n1. `cd go-ipfs`\n1. `go get -v github.com/ipfs/go-bitswap@bc3df6b`\n1. `go build`\n\nPlugin:\n1. `git clone https://github.com/tzdybal/cidtrack.git`\n1. `cd cidtrack`\n1. `make go.mod IPFS_VERSION=/ABSOLUTE/PATH/TO/go-ipfs`\n1. `make install`\n\n## Configuration\nBy default CIDTracker listen on \":5002\" (port 5002 on all addresses).\nThis can be changed using `listenAddress` configuration, for example:\n```\n  \"Plugins\": {\n    \"Plugins\": {\n      \"CIDtrack\": {\n        \"Config\": {\n          \"listenAddress\": \"127.0.0.1:8888\"\n        }\n      }\n    }\n  }\n```\n\n## Usage\nPlugin can be accessed via HTTP endpoint, listening on `listenAddress`, default address (`http://127.0.0.1:5002`) will be used in examples.\n### get\n`http://127.0.0.1:5002/get` returns all statistics gathered by CIDTracker.\nData is returned as JSON as associative array (object), where key is a CID of block, and valuue is a number of times given block was sent.\nFor example:\n```\ncurl localhost:5002/get\n{\"Qma5RSy8wpWUpnXfegzNz6iJnLSwWUQdrpmxEar3sZT5GX\":1,\"QmapJQeFtp3rtZs3N1nKPxKgcRhGkRjxjNjYkafjoQXJNf\":1}\n```\n\n`http://127.0.0.1:5002/get/reset` returns all stats and then resets/clears all collected data.\n\n### reset\n`http://127.0.0.1:5002/reset` resets/clears all collected data (without returning any value).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftzdybal%2Fcidtrack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftzdybal%2Fcidtrack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftzdybal%2Fcidtrack/lists"}