From 69efb531f714e99b6eac673714065257199d498b Mon Sep 17 00:00:00 2001 From: Anthony Accioly <1591739+aaccioly@users.noreply.github.com> Date: Thu, 19 Feb 2026 22:58:23 +0000 Subject: [PATCH 1/6] feat(config): add user-agent configuration for relay requests --- config.go | 7 ++++++- main.go | 8 +++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/config.go b/config.go index 38b5856..ebd2682 100644 --- a/config.go +++ b/config.go @@ -2,6 +2,7 @@ package main import ( "encoding/json" + "fmt" "log" "os" "runtime/debug" @@ -32,6 +33,7 @@ type Config struct { RelayBindAddress string `json:"relay_bind_address"` RelaySoftware string `json:"relay_software"` RelayVersion string `json:"relay_version"` + UserAgent string `json:"user_agent"` PrivateRelayName string `json:"private_relay_name"` PrivateRelayNpub string `json:"private_relay_npub"` PrivateRelayDescription string `json:"private_relay_description"` @@ -66,6 +68,8 @@ type Config struct { S3Config *S3Config `json:"s3_config"` } +const relaySoftware = "https://github.com/bitvora/haven" + func loadConfig() Config { _ = godotenv.Load(".env") @@ -78,8 +82,9 @@ func loadConfig() Config { RelayURL: getEnv("RELAY_URL"), RelayPort: getEnvInt("RELAY_PORT", 3355), RelayBindAddress: getEnvString("RELAY_BIND_ADDRESS", "0.0.0.0"), - RelaySoftware: "https://github.com/bitvora/haven", + RelaySoftware: relaySoftware, RelayVersion: getVersion(), + UserAgent: fmt.Sprintf("Haven/%s (+%s)", getVersion(), relaySoftware), PrivateRelayName: getEnv("PRIVATE_RELAY_NAME"), PrivateRelayNpub: getEnv("PRIVATE_RELAY_NPUB"), PrivateRelayDescription: getEnv("PRIVATE_RELAY_DESCRIPTION"), diff --git a/main.go b/main.go index 351e9df..e95aae0 100644 --- a/main.go +++ b/main.go @@ -38,7 +38,13 @@ func main() { log.Fatal("🚫 error creating blossom path:", err) } - pool = nostr.NewSimplePool(mainCtx, nostr.WithPenaltyBox()) + pool = nostr.NewSimplePool(mainCtx, + nostr.WithPenaltyBox(), + nostr.WithRelayOptions( + nostr.WithRequestHeader{ + "User-Agent": []string{config.UserAgent}, + }), + ) if len(os.Args) > 1 { switch os.Args[1] { From b01dd9f666601b326b87d6598af1708247e943a2 Mon Sep 17 00:00:00 2001 From: Anthony Accioly <1591739+aaccioly@users.noreply.github.com> Date: Thu, 19 Feb 2026 23:15:55 +0000 Subject: [PATCH 2/6] feat(import): add ensureImportRelays check before running import Add a safeguard to ensure import relays are set up properly before starting the import process. --- main.go | 1 + 1 file changed, 1 insertion(+) diff --git a/main.go b/main.go index e95aae0..80b5c2d 100644 --- a/main.go +++ b/main.go @@ -55,6 +55,7 @@ func main() { runRestore(mainCtx) return case "import": + ensureImportRelays() runImport(mainCtx) return case "help": From 7e331a1cf55344d794a995c4d040046381469b3c Mon Sep 17 00:00:00 2001 From: Anthony Accioly <1591739+aaccioly@users.noreply.github.com> Date: Thu, 19 Feb 2026 23:16:33 +0000 Subject: [PATCH 3/6] feat(config): update relay examples files with working relays --- relays_blastr.example.json | 25 ++++++++++++------------- relays_import.example.json | 25 ++++++++++++------------- 2 files changed, 24 insertions(+), 26 deletions(-) diff --git a/relays_blastr.example.json b/relays_blastr.example.json index 9ca6e8e..53cdc1d 100644 --- a/relays_blastr.example.json +++ b/relays_blastr.example.json @@ -1,22 +1,21 @@ [ - "relay.damus.io", + "no.str.cr", "nos.lol", - "relay.nostr.band", - "relay.snort.social", + "nostr.bitcoiner.social", "nostr.land", "nostr.mom", - "relay.nos.social", - "relay.primal.net", - "no.str.cr", + "nostr.oxtr.dev", "nostr21.com", - "nostrue.com", - "wot.utxo.one", "nostrelites.org", - "wot.nostr.party", - "wot.sovbit.host", - "wot.girino.org", + "offchain.pub", + "relay.damus.io", "relay.lexingtonbitcoin.org", - "zap.watch", + "relay.nos.social", + "relay.primal.net", + "relay.snort.social", "satsage.xyz", - "wons.calva.dev" + "wons.calva.dev", + "wot.girino.org", + "wot.nostr.party", + "wot.sovbit.host" ] diff --git a/relays_import.example.json b/relays_import.example.json index 9ca6e8e..53cdc1d 100644 --- a/relays_import.example.json +++ b/relays_import.example.json @@ -1,22 +1,21 @@ [ - "relay.damus.io", + "no.str.cr", "nos.lol", - "relay.nostr.band", - "relay.snort.social", + "nostr.bitcoiner.social", "nostr.land", "nostr.mom", - "relay.nos.social", - "relay.primal.net", - "no.str.cr", + "nostr.oxtr.dev", "nostr21.com", - "nostrue.com", - "wot.utxo.one", "nostrelites.org", - "wot.nostr.party", - "wot.sovbit.host", - "wot.girino.org", + "offchain.pub", + "relay.damus.io", "relay.lexingtonbitcoin.org", - "zap.watch", + "relay.nos.social", + "relay.primal.net", + "relay.snort.social", "satsage.xyz", - "wons.calva.dev" + "wons.calva.dev", + "wot.girino.org", + "wot.nostr.party", + "wot.sovbit.host" ] From 70e7d4a6c25e3a50e449025d469ab0e9535face5 Mon Sep 17 00:00:00 2001 From: Anthony Accioly <1591739+aaccioly@users.noreply.github.com> Date: Thu, 19 Feb 2026 23:58:22 +0000 Subject: [PATCH 4/6] feat(blastr) update relay list in relays_blastr.example.json Removed 'no.str.cr' and 'offchain.pub' from the relay list. Added 'nostr-pub.wellorder.net', 'relay.fountain.fm', and 'sendit.nosflare.com'. --- relays_blastr.example.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/relays_blastr.example.json b/relays_blastr.example.json index 53cdc1d..f3b91cf 100644 --- a/relays_blastr.example.json +++ b/relays_blastr.example.json @@ -1,19 +1,20 @@ [ - "no.str.cr", "nos.lol", + "nostr-pub.wellorder.net", "nostr.bitcoiner.social", "nostr.land", "nostr.mom", "nostr.oxtr.dev", "nostr21.com", "nostrelites.org", - "offchain.pub", "relay.damus.io", + "relay.fountain.fm", "relay.lexingtonbitcoin.org", "relay.nos.social", "relay.primal.net", "relay.snort.social", "satsage.xyz", + "sendit.nosflare.com", "wons.calva.dev", "wot.girino.org", "wot.nostr.party", From 1fe99403c1e7af722fa28bb2df58170051d7cd89 Mon Sep 17 00:00:00 2001 From: Anthony Accioly <1591739+aaccioly@users.noreply.github.com> Date: Fri, 20 Feb 2026 00:01:10 +0000 Subject: [PATCH 5/6] feat(import) add relay.fountain.fm to relays_import.example.json --- relays_import.example.json | 1 + 1 file changed, 1 insertion(+) diff --git a/relays_import.example.json b/relays_import.example.json index 53cdc1d..b804a1e 100644 --- a/relays_import.example.json +++ b/relays_import.example.json @@ -9,6 +9,7 @@ "nostrelites.org", "offchain.pub", "relay.damus.io", + "relay.fountain.fm", "relay.lexingtonbitcoin.org", "relay.nos.social", "relay.primal.net", From 99eee22d93c862577835058ba443db16bfa4a46d Mon Sep 17 00:00:00 2001 From: Anthony Accioly <1591739+aaccioly@users.noreply.github.com> Date: Fri, 20 Feb 2026 00:16:10 +0000 Subject: [PATCH 6/6] feat(blastr): replace one more relay in relays_blastr.example.json Replace nostr-pub.wellorder.net with nostr-01.yahikonne.com --- relays_blastr.example.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/relays_blastr.example.json b/relays_blastr.example.json index f3b91cf..27ac39d 100644 --- a/relays_blastr.example.json +++ b/relays_blastr.example.json @@ -1,6 +1,6 @@ [ + "nostr-01.yakihonne.com", "nos.lol", - "nostr-pub.wellorder.net", "nostr.bitcoiner.social", "nostr.land", "nostr.mom",