diff options
| author | bndw <ben@bdw.to> | 2026-02-14 09:58:28 -0800 |
|---|---|---|
| committer | bndw <ben@bdw.to> | 2026-02-14 09:58:28 -0800 |
| commit | d30459513ec44ab298fafd1bfe0edc08d6ab62e4 (patch) | |
| tree | 1e4442f940c11544cd60b6bf72f2038338da67ce /.ship/service | |
| parent | fe3708eaf495613cc6e2340b821795f25811d6ed (diff) | |
feat: rename allowed_pubkeys to allowed_npubs with normalization
- Config now accepts npub format only (human-readable)
- Automatically converts npubs to hex pubkeys at load time
- Updated InterceptorOptions.AllowedPubkeys -> AllowedNpubs
- Added validation to reject hex format in config (npub only)
- Updated documentation to clarify npub-only config
- Added comprehensive tests for npub normalization
Config is for humans (npub), internal code uses hex pubkeys.
Diffstat (limited to '.ship/service')
| -rw-r--r-- | .ship/service | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/.ship/service b/.ship/service new file mode 100644 index 0000000..9305ef4 --- /dev/null +++ b/.ship/service | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | [Unit] | ||
| 2 | Description=nostr-grpc | ||
| 3 | After=network.target | ||
| 4 | |||
| 5 | [Service] | ||
| 6 | Type=simple | ||
| 7 | User=nostr-grpc | ||
| 8 | WorkingDirectory=/var/lib/nostr-grpc | ||
| 9 | EnvironmentFile=/etc/ship/env/nostr-grpc.env | ||
| 10 | ExecStart=/usr/local/bin/nostr-grpc -db relay.db -grpc-addr localhost:50051 -ws-addr localhost:8006 -public-url nostr-grpc.x.bdw.to | ||
| 11 | Restart=always | ||
| 12 | RestartSec=5s | ||
| 13 | NoNewPrivileges=true | ||
| 14 | PrivateTmp=true | ||
| 15 | |||
| 16 | [Install] | ||
| 17 | WantedBy=multi-user.target | ||
