{"id":13832835,"url":"https://github.com/0xtrr/chief","last_synced_at":"2025-07-09T19:33:34.721Z","repository":{"id":204121458,"uuid":"711155881","full_name":"0xtrr/chief","owner":"0xtrr","description":"A writepolicy plugin for Strfry relays","archived":false,"fork":false,"pushed_at":"2024-01-17T18:53:15.000Z","size":32,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-02-16T05:34:53.452Z","etag":null,"topics":["nostr","nostr-relay","plugin","strfry"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/0xtrr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2023-10-28T11:39:40.000Z","updated_at":"2024-01-23T22:30:51.000Z","dependencies_parsed_at":"2024-02-16T05:44:47.044Z","dependency_job_id":null,"html_url":"https://github.com/0xtrr/chief","commit_stats":null,"previous_names":["0xtrr/chief"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xtrr%2Fchief","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xtrr%2Fchief/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xtrr%2Fchief/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xtrr%2Fchief/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0xtrr","download_url":"https://codeload.github.com/0xtrr/chief/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225590781,"owners_count":17493137,"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":["nostr","nostr-relay","plugin","strfry"],"created_at":"2024-08-04T11:00:31.806Z","updated_at":"2024-11-20T16:30:18.099Z","avatar_url":"https://github.com/0xtrr.png","language":"Rust","funding_links":[],"categories":["Tools"],"sub_categories":["Client reviews and/or comparisons"],"readme":"# Chief\n\nChief is a write policy plugin for [Strfry](https://github.com/hoytech/strfry) (which is a [nostr](https://github.com/nostr-protocol/nostr) relay software).\nIt enables relay operators to blacklist or whitelist public keys, event kinds and specific words or sentences using either\na JSON file or a postgresql database.\n\n## Setup\n\n### Compile and configure\n\n1. Compile from source\n   - Run `cargo build --release`.\n2. Put the compiled binary where you want it to run from\n   - E.g. `sudo cp target/release/chief /usr/local/bin`.\n3. Create a folder in `/etc` where your configuration files will live and copy the example config to that folder\n    1. `sudo mkdir /etc/chief/`\n    2. `sudo cp docs/examples/example-config.toml /etc/chief/config.toml`.\n        - This path is currently hardcoded and cannot be changed.\n4. Configure strfry to use Chief as the write policy\n   - Under \"relay.writePolicy\", set the plugin to `/usr/local/bin/chief`\n```\n    writePolicy {\n        # If non-empty, path to an executable script that implements the writePolicy plugin logic\n        plugin = \"/usr/local/bin/chief\"\n    }\n```\n\n### Select a datasource\nThe datasource contains the public keys, kinds and/or words you want to either whitelist or blacklist.\nThis application supports two different datasources: a JSON file or a postgresql database.\n\n#### JSON\n\nTo use a JSON file as the datasource, please read [this document](docs/json_datasource.md).\n\n#### Postgresql database\n\nTo use a postgresql database as the datasource, please read [this document](docs/postgresql_datasource.md).\n\n### Filters\n\n- Pubkey filter to blacklist or whitelist specific public keys\n- Kinds filter to blacklist or whitelist specific note kinds\n- Content filter to blacklist certain words and/or sentences\n- Rate limiting filter to only allow a certain amount of events in a specific time period (measured in seconds)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xtrr%2Fchief","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0xtrr%2Fchief","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xtrr%2Fchief/lists"}