{"id":16561552,"url":"https://github.com/jcnelson/bitcoin-p2p-firewall","last_synced_at":"2025-04-12T18:41:35.855Z","repository":{"id":76940279,"uuid":"242776223","full_name":"jcnelson/bitcoin-p2p-firewall","owner":"jcnelson","description":"TCP proxy to selectively block Bitcoin p2p messages","archived":false,"fork":false,"pushed_at":"2025-01-07T22:33:28.000Z","size":62,"stargazers_count":2,"open_issues_count":1,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-26T12:51:16.801Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jcnelson.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-24T15:48:22.000Z","updated_at":"2025-01-07T22:33:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"53061931-611a-4ded-ad02-57c22204a869","html_url":"https://github.com/jcnelson/bitcoin-p2p-firewall","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/jcnelson%2Fbitcoin-p2p-firewall","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcnelson%2Fbitcoin-p2p-firewall/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcnelson%2Fbitcoin-p2p-firewall/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcnelson%2Fbitcoin-p2p-firewall/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jcnelson","download_url":"https://codeload.github.com/jcnelson/bitcoin-p2p-firewall/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248616605,"owners_count":21134105,"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":[],"created_at":"2024-10-11T20:33:31.863Z","updated_at":"2025-04-12T18:41:35.849Z","avatar_url":"https://github.com/jcnelson.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bitcoin P2P Firewall\n\nThis small program creates a \"firewall\" for Bitcoin p2p messages, allowing you\nto filter out p2p messages from downstream clients.  It's meant to allow you to\nrun a Bitcoin regtest node in \"read-only\" mode, so that clients can download\nblocks and ping the node but not reorg the chain.\n\n## Installation\n\nYou will need Rust and Cargo.\n\n```\n$ cargo build\n$ cargo install\n```\n\nThis package only needs the `mio` crate, which works on most major operating systems.\n\n## Usage\n\n```\n$ ./bitcoin-p2p-firewalld [-v DEBUG_VERBOSITY] \n                          [-n NETWORK_NAME]\n                          [-a ALLOWED_MESSAGES]\n                          [-d DENIED_MESSAGES]\n                          port\n                          upstream_bitcoind_address\n```\n\nYou can increase verbosity by passing `-v 2`, `-v 3`, or `-v 4`.  The highest\nverbosity is `-v 4`.\n\nThe valid options for `-n` are `mainnet`, `testnet`, or `regtest`.  If\nunspecified, the default is `mainnet`.\n\nEither `-b` or `-w` can be specified but not both.  Both arguments take a\ncomma-separated list of Bitcoin commands.  Any command string will be accepted,\nbut see [the list of Bitcoin\ncommands](https://en.bitcoin.it/wiki/Protocol_documentation#Message_types).\n\nThe `port` argument is the _public_ port to bind on.  Use the port your\n`bitcoind` would otherwise have bound on.\n\nThe `upstream_bitcoind_address` is the `host:port` of your upstream `bitcoind`\nnode's p2p address.\n\n### Example\n\n```\n$ ./bitcoin-p2p-firewalld -v 4 -n regtest -d block,cmpctblock 18444 127.0.0.1:18445\n```\n\nHere, the firewall will bind on port 18444, and will send filtered messages to\n127.0.0.1:18445.  Blocks and compact blocks will be filtered from remote\nclients, thereby ensuring that the `bitcoind` node running on 127.0.0.1:18445\nwill never see them\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcnelson%2Fbitcoin-p2p-firewall","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjcnelson%2Fbitcoin-p2p-firewall","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcnelson%2Fbitcoin-p2p-firewall/lists"}