From ce48b8b7be4fbac5d81519167465c86ef82d5c37 Mon Sep 17 00:00:00 2001 From: koalasat Date: Wed, 24 Jul 2024 16:48:02 +0200 Subject: [PATCH 01/16] Use nostr as cache system --- compose/docker-compose.yml | 11 ++ compose/env-sample/clntn/robosats.env | 5 +- compose/env-sample/lndtn/compose.env | 3 + compose/env-sample/lndtn/robosats.env | 3 + compose/env-sample/lndtn/strfry.conf | 138 ++++++++++++++++++++++++++ compose/strfry/Dockerfile | 14 +++ compose/strfry/crontab | 24 +++++ compose/strfry/entrypoint.sh | 5 + compose/strfry/sync.sh | 8 ++ 9 files changed, 210 insertions(+), 1 deletion(-) create mode 100644 compose/env-sample/lndtn/strfry.conf create mode 100644 compose/strfry/Dockerfile create mode 100644 compose/strfry/crontab create mode 100644 compose/strfry/entrypoint.sh create mode 100644 compose/strfry/sync.sh diff --git a/compose/docker-compose.yml b/compose/docker-compose.yml index 5126bc4..6d3d45d 100644 --- a/compose/docker-compose.yml +++ b/compose/docker-compose.yml @@ -143,6 +143,17 @@ services: - redis network_mode: service:tor + strfry: + build: ./strfry + container_name: strfry${SUFFIX} + restart: always + volumes: + - ./strfry/sync.sh:/app/sync.sh + - ${STRFRY_CONF}:/app/strfry.conf + - ${STRFRY_DATA}/db:/app/strfry-db + - ${STRFRY_DATA}/log/:/var/log/ + network_mode: service:tor + # Example simple backup service (copy/paste to attached storage locations) # backup: # build: ./backup diff --git a/compose/env-sample/clntn/robosats.env b/compose/env-sample/clntn/robosats.env index 0ad1c66..7d8b340 100644 --- a/compose/env-sample/clntn/robosats.env +++ b/compose/env-sample/clntn/robosats.env @@ -174,4 +174,7 @@ MINIMUM_TARGET_CONF = 24 SLASHED_BOND_REWARD_SPLIT = 0.5 # Username for HTLCs escrows -ESCROW_USERNAME = 'admin' \ No newline at end of file +ESCROW_USERNAME = 'admin' + +#Social +NOSTR_NSEC = 'nsec1vxhs2zc4kqe0dhz4z2gfrdyjsrwf8pg3neeqx6w4nl8djfzdp0dqwd6rxh' \ No newline at end of file diff --git a/compose/env-sample/lndtn/compose.env b/compose/env-sample/lndtn/compose.env index 329279b..a0c5a1d 100644 --- a/compose/env-sample/lndtn/compose.env +++ b/compose/env-sample/lndtn/compose.env @@ -28,6 +28,9 @@ POSTGRES_PASSWORD='example' NGINX_CONFD='./nginx/tn.conf.d' WELLKNOWN='./nginx/tn.well-known' +STRFRY_CONF='./env-sample/lndtn/strfry.conf' +STRFRY_DATA='/custom_path/testnet/strfry' + # Port and number of HTTP server workers for the robosats backend WEB_LOCAL_PORT=8001 GUNICORN_WORKERS=2 diff --git a/compose/env-sample/lndtn/robosats.env b/compose/env-sample/lndtn/robosats.env index aa1474b..130ccfe 100644 --- a/compose/env-sample/lndtn/robosats.env +++ b/compose/env-sample/lndtn/robosats.env @@ -178,3 +178,6 @@ SLASHED_BOND_REWARD_SPLIT = 0.5 # Username for HTLCs escrows ESCROW_USERNAME = 'admin' + +#Social +NOSTR_NSEC = 'nsec1vxhs2zc4kqe0dhz4z2gfrdyjsrwf8pg3neeqx6w4nl8djfzdp0dqwd6rxh' diff --git a/compose/env-sample/lndtn/strfry.conf b/compose/env-sample/lndtn/strfry.conf new file mode 100644 index 0000000..01fb191 --- /dev/null +++ b/compose/env-sample/lndtn/strfry.conf @@ -0,0 +1,138 @@ +## +## Default strfry config +## + +# Directory that contains the strfry LMDB database (restart required) +db = "/app/strfry-db/" + +dbParams { + # Maximum number of threads/processes that can simultaneously have LMDB transactions open (restart required) + maxreaders = 256 + + # Size of mmap() to use when loading LMDB (default is 10TB, does *not* correspond to disk-space used) (restart required) + mapsize = 10995116277760 + + # Disables read-ahead when accessing the LMDB mapping. Reduces IO activity when DB size is larger than RAM. (restart required) + noReadAhead = false +} + +events { + # Maximum size of normalised JSON, in bytes + maxEventSize = 65536 + + # Events newer than this will be rejected + rejectEventsNewerThanSeconds = 900 + + # Events older than this will be rejected + rejectEventsOlderThanSeconds = 94608000 + + # Ephemeral events older than this will be rejected + rejectEphemeralEventsOlderThanSeconds = 60 + + # Ephemeral events will be deleted from the DB when older than this + ephemeralEventsLifetimeSeconds = 300 + + # Maximum number of tags allowed + maxNumTags = 2000 + + # Maximum size for tag values, in bytes + maxTagValSize = 1024 +} + +relay { + # Interface to listen on. Use 0.0.0.0 to listen on all interfaces (restart required) + bind = "0.0.0.0" + + # Port to open for the nostr websocket protocol (restart required) + port = 7777 + + # Set OS-limit on maximum number of open files/sockets (if 0, don't attempt to set) (restart required) + nofiles = 1000000 + + # HTTP header that contains the client's real IP, before reverse proxying (ie x-real-ip) (MUST be all lower-case) + realIpHeader = "" + + info { + # NIP-11: Name of this server. Short/descriptive (< 30 characters) + name = "Robosats" + + # NIP-11: Detailed information about relay, free-form + description = "Federation cache system." + + # NIP-11: Administrative nostr pubkey, for contact purposes + pubkey = "" + + # NIP-11: Alternative administrative contact (email, website, etc) + contact = "" + } + + # Maximum accepted incoming websocket frame size (should be larger than max event) (restart required) + maxWebsocketPayloadSize = 131072 + + # Websocket-level PING message frequency (should be less than any reverse proxy idle timeouts) (restart required) + autoPingSeconds = 55 + + # If TCP keep-alive should be enabled (detect dropped connections to upstream reverse proxy) + enableTcpKeepalive = false + + # How much uninterrupted CPU time a REQ query should get during its DB scan + queryTimesliceBudgetMicroseconds = 10000 + + # Maximum records that can be returned per filter + maxFilterLimit = 500 + + # Maximum number of subscriptions (concurrent REQs) a connection can have open at any time + maxSubsPerConnection = 3 + + writePolicy { + # If non-empty, path to an executable script that implements the writePolicy plugin logic + plugin = "" + } + + compression { + # Use permessage-deflate compression if supported by client. Reduces bandwidth, but slight increase in CPU (restart required) + enabled = true + + # Maintain a sliding window buffer for each connection. Improves compression, but uses more memory (restart required) + slidingWindow = false + } + + logging { + # Dump all incoming messages + dumpInAll = false + + # Dump all incoming EVENT messages + dumpInEvents = false + + # Dump all incoming REQ/CLOSE messages + dumpInReqs = false + + # Log performance metrics for initial REQ database scans + dbScanPerf = false + + # Log reason for invalid event rejection? Can be disabled to silence excessive logging + invalidEvents = true + } + + numThreads { + # Ingester threads: route incoming requests, validate events/sigs (restart required) + ingester = 3 + + # reqWorker threads: Handle initial DB scan for events (restart required) + reqWorker = 3 + + # reqMonitor threads: Handle filtering of new events (restart required) + reqMonitor = 3 + + # negentropy threads: Handle negentropy protocol messages (restart required) + negentropy = 2 + } + + negentropy { + # Support negentropy protocol messages + enabled = true + + # Maximum records that sync will process before returning an error + maxSyncEvents = 1000000 + } +} diff --git a/compose/strfry/Dockerfile b/compose/strfry/Dockerfile new file mode 100644 index 0000000..ef70fcc --- /dev/null +++ b/compose/strfry/Dockerfile @@ -0,0 +1,14 @@ +FROM dockurr/strfry:0.9.6 + +RUN apk add --no-cache dcron torsocks + +RUN echo "TorAddress 127.0.0.1" >> /etc/tor/torsocks.conf +RUN echo "TorPort 9050" >> /etc/tor/torsocks.conf + +ADD . /app + +COPY entrypoint.sh /etc/strfry/entrypoint.sh + +RUN chmod +x /etc/strfry/entrypoint.sh + +ENTRYPOINT ["/etc/strfry/entrypoint.sh"] diff --git a/compose/strfry/crontab b/compose/strfry/crontab new file mode 100644 index 0000000..ec45be6 --- /dev/null +++ b/compose/strfry/crontab @@ -0,0 +1,24 @@ +# Edit this file to introduce tasks to be run by cron. +# +# Each task to run has to be defined through a single line +# indicating with different fields when the task will be run +# and what command to run for the task +# +# To define the time you can provide concrete values for +# minute (m), hour (h), day of month (dom), month (mon), +# and day of week (dow) or use '*' in these fields (for 'any'). +# +# Notice that tasks will be started based on the cron's system +# daemon's notion of time and timezones. +# +# Output of the crontab jobs (including errors) is sent through +# email to the user the crontab file belongs to (unless redirected). +# +# For example, you can run a backup of all your user accounts +# at 5 a.m every week with: +# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/ +# +# For more information see the manual pages of crontab(5) and cron(8) +# +# m h dom mon dow command +*/1 * * * * torsocks /app/sync.sh diff --git a/compose/strfry/entrypoint.sh b/compose/strfry/entrypoint.sh new file mode 100644 index 0000000..b949e23 --- /dev/null +++ b/compose/strfry/entrypoint.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +crontab /app/crontab + +crond -f -l 8 & /app/strfry.sh diff --git a/compose/strfry/sync.sh b/compose/strfry/sync.sh new file mode 100644 index 0000000..efd1609 --- /dev/null +++ b/compose/strfry/sync.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +filters='{"kinds":[38383]}' + +/app/strfry --config /app/strfry.conf sync ws://ngdk7ocdzmz5kzsysa3om6du7ycj2evxp2f2olfkyq37htx3gllwp2yd.onion/nostr --filter "$filters" --dir both >> /var/log/cron.log 2>&1 +/app/strfry --config /app/strfry.conf sync ws://satstraoq35jffvkgpfoqld32nzw2siuvowanruindbfojowpwsjdgad.onion/nostr --filter "$filters" --dir both >> /var/log/cron.log 2>&1 +/app/strfry --config /app/strfry.conf sync ws://4t4jxmivv6uqej6xzx2jx3fxh75gtt65v3szjoqmc4ugdlhipzdat6yd.onion/nostr --filter "$filters" --dir both >> /var/log/cron.log 2>&1 +/app/strfry --config /app/strfry.conf sync ws://mmhaqzuirth5rx7gl24d4773lknltjhik57k7ahec5iefktezv4b3uid.onion/nostr --filter "$filters" --dir both >> /var/log/cron.log 2>&1 From ee48c05e9a9c147cb76523234fb1b7537fe135fc Mon Sep 17 00:00:00 2001 From: koalasat Date: Wed, 24 Jul 2024 16:48:45 +0200 Subject: [PATCH 02/16] Blank space --- compose/env-sample/clntn/robosats.env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compose/env-sample/clntn/robosats.env b/compose/env-sample/clntn/robosats.env index 7d8b340..92a85cc 100644 --- a/compose/env-sample/clntn/robosats.env +++ b/compose/env-sample/clntn/robosats.env @@ -177,4 +177,4 @@ SLASHED_BOND_REWARD_SPLIT = 0.5 ESCROW_USERNAME = 'admin' #Social -NOSTR_NSEC = 'nsec1vxhs2zc4kqe0dhz4z2gfrdyjsrwf8pg3neeqx6w4nl8djfzdp0dqwd6rxh' \ No newline at end of file +NOSTR_NSEC = 'nsec1vxhs2zc4kqe0dhz4z2gfrdyjsrwf8pg3neeqx6w4nl8djfzdp0dqwd6rxh' From afbc02b74e8f3f25efe0caf9c0119def884db199 Mon Sep 17 00:00:00 2001 From: koalasat Date: Wed, 24 Jul 2024 17:09:03 +0200 Subject: [PATCH 03/16] Fix unmutable conf --- compose/env-sample/lndtn/strfry.conf | 2 +- compose/strfry/Dockerfile | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/compose/env-sample/lndtn/strfry.conf b/compose/env-sample/lndtn/strfry.conf index 01fb191..8b8341d 100644 --- a/compose/env-sample/lndtn/strfry.conf +++ b/compose/env-sample/lndtn/strfry.conf @@ -47,7 +47,7 @@ relay { port = 7777 # Set OS-limit on maximum number of open files/sockets (if 0, don't attempt to set) (restart required) - nofiles = 1000000 + nofiles = 524288 # HTTP header that contains the client's real IP, before reverse proxying (ie x-real-ip) (MUST be all lower-case) realIpHeader = "" diff --git a/compose/strfry/Dockerfile b/compose/strfry/Dockerfile index ef70fcc..7cdebe1 100644 --- a/compose/strfry/Dockerfile +++ b/compose/strfry/Dockerfile @@ -5,8 +5,6 @@ RUN apk add --no-cache dcron torsocks RUN echo "TorAddress 127.0.0.1" >> /etc/tor/torsocks.conf RUN echo "TorPort 9050" >> /etc/tor/torsocks.conf -ADD . /app - COPY entrypoint.sh /etc/strfry/entrypoint.sh RUN chmod +x /etc/strfry/entrypoint.sh From fbb81b0af2eeda8bcb29e020913ade0dbc37e011 Mon Sep 17 00:00:00 2001 From: koalasat Date: Wed, 24 Jul 2024 17:18:24 +0200 Subject: [PATCH 04/16] Fix unmutable conf 2 --- compose/strfry/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/compose/strfry/Dockerfile b/compose/strfry/Dockerfile index 7cdebe1..c7c606a 100644 --- a/compose/strfry/Dockerfile +++ b/compose/strfry/Dockerfile @@ -5,6 +5,7 @@ RUN apk add --no-cache dcron torsocks RUN echo "TorAddress 127.0.0.1" >> /etc/tor/torsocks.conf RUN echo "TorPort 9050" >> /etc/tor/torsocks.conf +COPY crontab /app/crontab COPY entrypoint.sh /etc/strfry/entrypoint.sh RUN chmod +x /etc/strfry/entrypoint.sh From 4c130519a985cebb0355c5d471da463489113bed Mon Sep 17 00:00:00 2001 From: koalasat Date: Wed, 24 Jul 2024 17:42:25 +0200 Subject: [PATCH 05/16] Fix unmutable conf 3 --- compose/docker-compose.yml | 2 +- compose/strfry/sync.sh | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/compose/docker-compose.yml b/compose/docker-compose.yml index 6d3d45d..91d2791 100644 --- a/compose/docker-compose.yml +++ b/compose/docker-compose.yml @@ -149,7 +149,7 @@ services: restart: always volumes: - ./strfry/sync.sh:/app/sync.sh - - ${STRFRY_CONF}:/app/strfry.conf + - ${STRFRY_CONF}:/etc/strfry.conf - ${STRFRY_DATA}/db:/app/strfry-db - ${STRFRY_DATA}/log/:/var/log/ network_mode: service:tor diff --git a/compose/strfry/sync.sh b/compose/strfry/sync.sh index efd1609..debbd26 100644 --- a/compose/strfry/sync.sh +++ b/compose/strfry/sync.sh @@ -2,7 +2,7 @@ filters='{"kinds":[38383]}' -/app/strfry --config /app/strfry.conf sync ws://ngdk7ocdzmz5kzsysa3om6du7ycj2evxp2f2olfkyq37htx3gllwp2yd.onion/nostr --filter "$filters" --dir both >> /var/log/cron.log 2>&1 -/app/strfry --config /app/strfry.conf sync ws://satstraoq35jffvkgpfoqld32nzw2siuvowanruindbfojowpwsjdgad.onion/nostr --filter "$filters" --dir both >> /var/log/cron.log 2>&1 -/app/strfry --config /app/strfry.conf sync ws://4t4jxmivv6uqej6xzx2jx3fxh75gtt65v3szjoqmc4ugdlhipzdat6yd.onion/nostr --filter "$filters" --dir both >> /var/log/cron.log 2>&1 -/app/strfry --config /app/strfry.conf sync ws://mmhaqzuirth5rx7gl24d4773lknltjhik57k7ahec5iefktezv4b3uid.onion/nostr --filter "$filters" --dir both >> /var/log/cron.log 2>&1 +/app/strfry --config /etc/strfry.conf sync ws://ngdk7ocdzmz5kzsysa3om6du7ycj2evxp2f2olfkyq37htx3gllwp2yd.onion/nostr --filter "$filters" --dir both >> /var/log/cron.log 2>&1 +/app/strfry --config /etc/strfry.conf sync ws://satstraoq35jffvkgpfoqld32nzw2siuvowanruindbfojowpwsjdgad.onion/nostr --filter "$filters" --dir both >> /var/log/cron.log 2>&1 +/app/strfry --config /etc/strfry.conf sync ws://4t4jxmivv6uqej6xzx2jx3fxh75gtt65v3szjoqmc4ugdlhipzdat6yd.onion/nostr --filter "$filters" --dir both >> /var/log/cron.log 2>&1 +/app/strfry --config /etc/strfry.conf sync ws://mmhaqzuirth5rx7gl24d4773lknltjhik57k7ahec5iefktezv4b3uid.onion/nostr --filter "$filters" --dir both >> /var/log/cron.log 2>&1 From 658576e61271d28fc734ed3d49ee17522fdfbd6f Mon Sep 17 00:00:00 2001 From: koalasat Date: Wed, 24 Jul 2024 17:54:52 +0200 Subject: [PATCH 06/16] Nginx --- compose/nginx/mn.conf.d/local.conf | 8 ++++++++ compose/nginx/tn.conf.d/local.conf | 8 ++++++++ compose/strfry/sync.sh | 1 + 3 files changed, 17 insertions(+) diff --git a/compose/nginx/mn.conf.d/local.conf b/compose/nginx/mn.conf.d/local.conf index 0c14f91..ff8086f 100644 --- a/compose/nginx/mn.conf.d/local.conf +++ b/compose/nginx/mn.conf.d/local.conf @@ -52,6 +52,14 @@ server { limit_req zone=tenpersec burst=10; } + location /nostr { + proxy_pass http://127.0.0.1:7777; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "Upgrade"; + proxy_set_header Host $host; + } + location = /favicon.ico { access_log off; log_not_found off; } } diff --git a/compose/nginx/tn.conf.d/local.conf b/compose/nginx/tn.conf.d/local.conf index aed3905..2d906a1 100644 --- a/compose/nginx/tn.conf.d/local.conf +++ b/compose/nginx/tn.conf.d/local.conf @@ -49,6 +49,14 @@ server { proxy_set_header Host $host; } + location /nostr { + proxy_pass http://127.0.0.1:7777; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "Upgrade"; + proxy_set_header Host $host; + } + location = /favicon.ico { access_log off; log_not_found off; } } diff --git a/compose/strfry/sync.sh b/compose/strfry/sync.sh index debbd26..fd5af18 100644 --- a/compose/strfry/sync.sh +++ b/compose/strfry/sync.sh @@ -2,6 +2,7 @@ filters='{"kinds":[38383]}' +/app/strfry --config /etc/strfry.conf sync wss://nostr.satstralia.com --filter "$filters" --dir both >> /var/log/cron.log 2>&1 /app/strfry --config /etc/strfry.conf sync ws://ngdk7ocdzmz5kzsysa3om6du7ycj2evxp2f2olfkyq37htx3gllwp2yd.onion/nostr --filter "$filters" --dir both >> /var/log/cron.log 2>&1 /app/strfry --config /etc/strfry.conf sync ws://satstraoq35jffvkgpfoqld32nzw2siuvowanruindbfojowpwsjdgad.onion/nostr --filter "$filters" --dir both >> /var/log/cron.log 2>&1 /app/strfry --config /etc/strfry.conf sync ws://4t4jxmivv6uqej6xzx2jx3fxh75gtt65v3szjoqmc4ugdlhipzdat6yd.onion/nostr --filter "$filters" --dir both >> /var/log/cron.log 2>&1 From 2c3753d7e44cd4167d723b8df35ee39002c464f2 Mon Sep 17 00:00:00 2001 From: koalasat Date: Wed, 24 Jul 2024 18:10:27 +0200 Subject: [PATCH 07/16] Tesnet sync --- compose/docker-compose.yml | 2 +- compose/env-sample/lndtn/compose.env | 1 + compose/strfry/{sync.sh => mn.sync.sh} | 1 - compose/strfry/tn.sync.sh | 6 ++++++ 4 files changed, 8 insertions(+), 2 deletions(-) rename compose/strfry/{sync.sh => mn.sync.sh} (85%) create mode 100644 compose/strfry/tn.sync.sh diff --git a/compose/docker-compose.yml b/compose/docker-compose.yml index 91d2791..78a0945 100644 --- a/compose/docker-compose.yml +++ b/compose/docker-compose.yml @@ -148,7 +148,7 @@ services: container_name: strfry${SUFFIX} restart: always volumes: - - ./strfry/sync.sh:/app/sync.sh + - ${STRFRY_SYNC}:/app/sync.sh - ${STRFRY_CONF}:/etc/strfry.conf - ${STRFRY_DATA}/db:/app/strfry-db - ${STRFRY_DATA}/log/:/var/log/ diff --git a/compose/env-sample/lndtn/compose.env b/compose/env-sample/lndtn/compose.env index a0c5a1d..aa22388 100644 --- a/compose/env-sample/lndtn/compose.env +++ b/compose/env-sample/lndtn/compose.env @@ -29,6 +29,7 @@ NGINX_CONFD='./nginx/tn.conf.d' WELLKNOWN='./nginx/tn.well-known' STRFRY_CONF='./env-sample/lndtn/strfry.conf' +STRFRY_SYNC='./strfry/tn.sync.sh' STRFRY_DATA='/custom_path/testnet/strfry' # Port and number of HTTP server workers for the robosats backend diff --git a/compose/strfry/sync.sh b/compose/strfry/mn.sync.sh similarity index 85% rename from compose/strfry/sync.sh rename to compose/strfry/mn.sync.sh index fd5af18..debbd26 100644 --- a/compose/strfry/sync.sh +++ b/compose/strfry/mn.sync.sh @@ -2,7 +2,6 @@ filters='{"kinds":[38383]}' -/app/strfry --config /etc/strfry.conf sync wss://nostr.satstralia.com --filter "$filters" --dir both >> /var/log/cron.log 2>&1 /app/strfry --config /etc/strfry.conf sync ws://ngdk7ocdzmz5kzsysa3om6du7ycj2evxp2f2olfkyq37htx3gllwp2yd.onion/nostr --filter "$filters" --dir both >> /var/log/cron.log 2>&1 /app/strfry --config /etc/strfry.conf sync ws://satstraoq35jffvkgpfoqld32nzw2siuvowanruindbfojowpwsjdgad.onion/nostr --filter "$filters" --dir both >> /var/log/cron.log 2>&1 /app/strfry --config /etc/strfry.conf sync ws://4t4jxmivv6uqej6xzx2jx3fxh75gtt65v3szjoqmc4ugdlhipzdat6yd.onion/nostr --filter "$filters" --dir both >> /var/log/cron.log 2>&1 diff --git a/compose/strfry/tn.sync.sh b/compose/strfry/tn.sync.sh new file mode 100644 index 0000000..b69a749 --- /dev/null +++ b/compose/strfry/tn.sync.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +filters='{"kinds":[38383]}' + +/app/strfry --config /etc/strfry.conf sync wss://nostr.satstralia.com --filter "$filters" --dir both >> /var/log/cron.log 2>&1 +/app/strfry --config /etc/strfry.conf sync ws://testraliar7xkhos2gipv2k65obykofb4jqzl5l4danfryacifi4t7qd.onion/nostr --filter "$filters" --dir both >> /var/log/cron.log 2>&1 From 21007bd4c08bfd7ed14898837e198526dcba63d6 Mon Sep 17 00:00:00 2001 From: koalasat Date: Wed, 24 Jul 2024 18:11:03 +0200 Subject: [PATCH 08/16] Tesnet sync --- compose/strfry/tn.sync.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/compose/strfry/tn.sync.sh b/compose/strfry/tn.sync.sh index b69a749..dc9400f 100644 --- a/compose/strfry/tn.sync.sh +++ b/compose/strfry/tn.sync.sh @@ -2,5 +2,4 @@ filters='{"kinds":[38383]}' -/app/strfry --config /etc/strfry.conf sync wss://nostr.satstralia.com --filter "$filters" --dir both >> /var/log/cron.log 2>&1 /app/strfry --config /etc/strfry.conf sync ws://testraliar7xkhos2gipv2k65obykofb4jqzl5l4danfryacifi4t7qd.onion/nostr --filter "$filters" --dir both >> /var/log/cron.log 2>&1 From 4616f5160638c4e8ec4526aa54f433b6fb50cd3d Mon Sep 17 00:00:00 2001 From: koalasat Date: Wed, 24 Jul 2024 18:19:13 +0200 Subject: [PATCH 09/16] Tesnet onions --- compose/strfry/tn.sync.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/compose/strfry/tn.sync.sh b/compose/strfry/tn.sync.sh index dc9400f..85634e2 100644 --- a/compose/strfry/tn.sync.sh +++ b/compose/strfry/tn.sync.sh @@ -3,3 +3,6 @@ filters='{"kinds":[38383]}' /app/strfry --config /etc/strfry.conf sync ws://testraliar7xkhos2gipv2k65obykofb4jqzl5l4danfryacifi4t7qd.onion/nostr --filter "$filters" --dir both >> /var/log/cron.log 2>&1 +/app/strfry --config /etc/strfry.conf sync ws://jpp3w5tpxtyg6lifonisdszpriiapszzem4wod2zsdweyfenlsxeoxid.onion/nostr --filter "$filters" --dir both >> /var/log/cron.log 2>&1 +/app/strfry --config /etc/strfry.conf sync ws://ghbtv7lhoyhomyir4xvxaeyqgx4ylxksia343jaat3njqqlkqpdjqcyd.onion/nostr --filter "$filters" --dir both >> /var/log/cron.log 2>&1 +/app/strfry --config /etc/strfry.conf sync ws://wsjyhbashc4zrrex6vijpryujggbka5plry2o62dxqoz3pxinblnj4ad.onion/nostr --filter "$filters" --dir both >> /var/log/cron.log 2>&1 From 3a8c38b3042d6c41b7439b1fabfdd994e40b025e Mon Sep 17 00:00:00 2001 From: koalasat Date: Wed, 24 Jul 2024 18:31:53 +0200 Subject: [PATCH 10/16] Tesnet onions --- compose/docker-compose.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/compose/docker-compose.yml b/compose/docker-compose.yml index 78a0945..6cdbd5f 100644 --- a/compose/docker-compose.yml +++ b/compose/docker-compose.yml @@ -148,10 +148,10 @@ services: container_name: strfry${SUFFIX} restart: always volumes: - - ${STRFRY_SYNC}:/app/sync.sh - - ${STRFRY_CONF}:/etc/strfry.conf - - ${STRFRY_DATA}/db:/app/strfry-db - - ${STRFRY_DATA}/log/:/var/log/ + - ${STRFRY_SYNC}:/app/sync.sh:ro + - ${STRFRY_CONF}:/etc/strfry.conf:ro + - ${STRFRY_DATA}/db:/app/strfry-db:rw + - ${STRFRY_DATA}/log/:/var/log:rw network_mode: service:tor # Example simple backup service (copy/paste to attached storage locations) From 2bc9e66c3400234787897e4cce2e8f5a7eba19b4 Mon Sep 17 00:00:00 2001 From: koalasat Date: Wed, 24 Jul 2024 18:57:06 +0200 Subject: [PATCH 11/16] Logs to docker --- compose/docker-compose.yml | 1 - compose/strfry/Dockerfile | 7 +++++-- compose/strfry/entrypoint.sh | 2 -- compose/strfry/mn.sync.sh | 8 ++++---- compose/strfry/tn.sync.sh | 8 ++++---- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/compose/docker-compose.yml b/compose/docker-compose.yml index 6cdbd5f..0b2e05e 100644 --- a/compose/docker-compose.yml +++ b/compose/docker-compose.yml @@ -151,7 +151,6 @@ services: - ${STRFRY_SYNC}:/app/sync.sh:ro - ${STRFRY_CONF}:/etc/strfry.conf:ro - ${STRFRY_DATA}/db:/app/strfry-db:rw - - ${STRFRY_DATA}/log/:/var/log:rw network_mode: service:tor # Example simple backup service (copy/paste to attached storage locations) diff --git a/compose/strfry/Dockerfile b/compose/strfry/Dockerfile index c7c606a..578d0f5 100644 --- a/compose/strfry/Dockerfile +++ b/compose/strfry/Dockerfile @@ -1,11 +1,14 @@ FROM dockurr/strfry:0.9.6 -RUN apk add --no-cache dcron torsocks +RUN apk add --no-cache torsocks RUN echo "TorAddress 127.0.0.1" >> /etc/tor/torsocks.conf RUN echo "TorPort 9050" >> /etc/tor/torsocks.conf -COPY crontab /app/crontab +# Setting up crontab +COPY crontab /tmp/crontab +RUN cat /tmp/crontab > /etc/crontabs/root + COPY entrypoint.sh /etc/strfry/entrypoint.sh RUN chmod +x /etc/strfry/entrypoint.sh diff --git a/compose/strfry/entrypoint.sh b/compose/strfry/entrypoint.sh index b949e23..2ebe6b3 100644 --- a/compose/strfry/entrypoint.sh +++ b/compose/strfry/entrypoint.sh @@ -1,5 +1,3 @@ #!/bin/sh -crontab /app/crontab - crond -f -l 8 & /app/strfry.sh diff --git a/compose/strfry/mn.sync.sh b/compose/strfry/mn.sync.sh index debbd26..2828f5c 100644 --- a/compose/strfry/mn.sync.sh +++ b/compose/strfry/mn.sync.sh @@ -2,7 +2,7 @@ filters='{"kinds":[38383]}' -/app/strfry --config /etc/strfry.conf sync ws://ngdk7ocdzmz5kzsysa3om6du7ycj2evxp2f2olfkyq37htx3gllwp2yd.onion/nostr --filter "$filters" --dir both >> /var/log/cron.log 2>&1 -/app/strfry --config /etc/strfry.conf sync ws://satstraoq35jffvkgpfoqld32nzw2siuvowanruindbfojowpwsjdgad.onion/nostr --filter "$filters" --dir both >> /var/log/cron.log 2>&1 -/app/strfry --config /etc/strfry.conf sync ws://4t4jxmivv6uqej6xzx2jx3fxh75gtt65v3szjoqmc4ugdlhipzdat6yd.onion/nostr --filter "$filters" --dir both >> /var/log/cron.log 2>&1 -/app/strfry --config /etc/strfry.conf sync ws://mmhaqzuirth5rx7gl24d4773lknltjhik57k7ahec5iefktezv4b3uid.onion/nostr --filter "$filters" --dir both >> /var/log/cron.log 2>&1 +/app/strfry --config /etc/strfry.conf sync ws://ngdk7ocdzmz5kzsysa3om6du7ycj2evxp2f2olfkyq37htx3gllwp2yd.onion/nostr --filter "$filters" --dir both +/app/strfry --config /etc/strfry.conf sync ws://satstraoq35jffvkgpfoqld32nzw2siuvowanruindbfojowpwsjdgad.onion/nostr --filter "$filters" --dir both +/app/strfry --config /etc/strfry.conf sync ws://4t4jxmivv6uqej6xzx2jx3fxh75gtt65v3szjoqmc4ugdlhipzdat6yd.onion/nostr --filter "$filters" --dir both +/app/strfry --config /etc/strfry.conf sync ws://mmhaqzuirth5rx7gl24d4773lknltjhik57k7ahec5iefktezv4b3uid.onion/nostr --filter "$filters" --dir both diff --git a/compose/strfry/tn.sync.sh b/compose/strfry/tn.sync.sh index 85634e2..d79feb2 100644 --- a/compose/strfry/tn.sync.sh +++ b/compose/strfry/tn.sync.sh @@ -2,7 +2,7 @@ filters='{"kinds":[38383]}' -/app/strfry --config /etc/strfry.conf sync ws://testraliar7xkhos2gipv2k65obykofb4jqzl5l4danfryacifi4t7qd.onion/nostr --filter "$filters" --dir both >> /var/log/cron.log 2>&1 -/app/strfry --config /etc/strfry.conf sync ws://jpp3w5tpxtyg6lifonisdszpriiapszzem4wod2zsdweyfenlsxeoxid.onion/nostr --filter "$filters" --dir both >> /var/log/cron.log 2>&1 -/app/strfry --config /etc/strfry.conf sync ws://ghbtv7lhoyhomyir4xvxaeyqgx4ylxksia343jaat3njqqlkqpdjqcyd.onion/nostr --filter "$filters" --dir both >> /var/log/cron.log 2>&1 -/app/strfry --config /etc/strfry.conf sync ws://wsjyhbashc4zrrex6vijpryujggbka5plry2o62dxqoz3pxinblnj4ad.onion/nostr --filter "$filters" --dir both >> /var/log/cron.log 2>&1 +/app/strfry --config /etc/strfry.conf sync ws://testraliar7xkhos2gipv2k65obykofb4jqzl5l4danfryacifi4t7qd.onion/nostr --filter "$filters" --dir both +/app/strfry --config /etc/strfry.conf sync ws://jpp3w5tpxtyg6lifonisdszpriiapszzem4wod2zsdweyfenlsxeoxid.onion/nostr --filter "$filters" --dir both +/app/strfry --config /etc/strfry.conf sync ws://ghbtv7lhoyhomyir4xvxaeyqgx4ylxksia343jaat3njqqlkqpdjqcyd.onion/nostr --filter "$filters" --dir both +/app/strfry --config /etc/strfry.conf sync ws://wsjyhbashc4zrrex6vijpryujggbka5plry2o62dxqoz3pxinblnj4ad.onion/nostr --filter "$filters" --dir both From 3695d0956e4a079deb3549a19e750f8bd58cbe6c Mon Sep 17 00:00:00 2001 From: koalasat Date: Wed, 24 Jul 2024 19:21:35 +0200 Subject: [PATCH 12/16] executable sync --- compose/docker-compose.yml | 2 +- compose/env-sample/lndtn/compose.env | 2 +- compose/strfry/Dockerfile | 1 + compose/strfry/crontab | 2 +- compose/strfry/mn.onion_urls.txt | 4 ++++ compose/strfry/mn.sync.sh | 8 -------- compose/strfry/sync.sh | 7 +++++++ compose/strfry/tn.onion_urls.txt | 4 ++++ compose/strfry/tn.sync.sh | 8 -------- 9 files changed, 19 insertions(+), 19 deletions(-) create mode 100644 compose/strfry/mn.onion_urls.txt delete mode 100644 compose/strfry/mn.sync.sh create mode 100644 compose/strfry/sync.sh create mode 100644 compose/strfry/tn.onion_urls.txt delete mode 100644 compose/strfry/tn.sync.sh diff --git a/compose/docker-compose.yml b/compose/docker-compose.yml index 0b2e05e..08e1074 100644 --- a/compose/docker-compose.yml +++ b/compose/docker-compose.yml @@ -148,7 +148,7 @@ services: container_name: strfry${SUFFIX} restart: always volumes: - - ${STRFRY_SYNC}:/app/sync.sh:ro + - ${STRFRY_URLS}:/app/onion_urls.txt:ro - ${STRFRY_CONF}:/etc/strfry.conf:ro - ${STRFRY_DATA}/db:/app/strfry-db:rw network_mode: service:tor diff --git a/compose/env-sample/lndtn/compose.env b/compose/env-sample/lndtn/compose.env index aa22388..802227b 100644 --- a/compose/env-sample/lndtn/compose.env +++ b/compose/env-sample/lndtn/compose.env @@ -29,7 +29,7 @@ NGINX_CONFD='./nginx/tn.conf.d' WELLKNOWN='./nginx/tn.well-known' STRFRY_CONF='./env-sample/lndtn/strfry.conf' -STRFRY_SYNC='./strfry/tn.sync.sh' +STRFRY_URLS='./strfry/tn.onion_urls.txt' STRFRY_DATA='/custom_path/testnet/strfry' # Port and number of HTTP server workers for the robosats backend diff --git a/compose/strfry/Dockerfile b/compose/strfry/Dockerfile index 578d0f5..dd0612a 100644 --- a/compose/strfry/Dockerfile +++ b/compose/strfry/Dockerfile @@ -9,6 +9,7 @@ RUN echo "TorPort 9050" >> /etc/tor/torsocks.conf COPY crontab /tmp/crontab RUN cat /tmp/crontab > /etc/crontabs/root +COPY sync.sh /etc/strfry/sync.sh COPY entrypoint.sh /etc/strfry/entrypoint.sh RUN chmod +x /etc/strfry/entrypoint.sh diff --git a/compose/strfry/crontab b/compose/strfry/crontab index ec45be6..71a96d9 100644 --- a/compose/strfry/crontab +++ b/compose/strfry/crontab @@ -21,4 +21,4 @@ # For more information see the manual pages of crontab(5) and cron(8) # # m h dom mon dow command -*/1 * * * * torsocks /app/sync.sh +*/1 * * * * torsocks /etc/strfry/sync.sh diff --git a/compose/strfry/mn.onion_urls.txt b/compose/strfry/mn.onion_urls.txt new file mode 100644 index 0000000..2c81ddc --- /dev/null +++ b/compose/strfry/mn.onion_urls.txt @@ -0,0 +1,4 @@ +testraliar7xkhos2gipv2k65obykofb4jqzl5l4danfryacifi4t7qd.onion +jpp3w5tpxtyg6lifonisdszpriiapszzem4wod2zsdweyfenlsxeoxid.onion +ghbtv7lhoyhomyir4xvxaeyqgx4ylxksia343jaat3njqqlkqpdjqcyd.onion +wsjyhbashc4zrrex6vijpryujggbka5plry2o62dxqoz3pxinblnj4ad.onion \ No newline at end of file diff --git a/compose/strfry/mn.sync.sh b/compose/strfry/mn.sync.sh deleted file mode 100644 index 2828f5c..0000000 --- a/compose/strfry/mn.sync.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -filters='{"kinds":[38383]}' - -/app/strfry --config /etc/strfry.conf sync ws://ngdk7ocdzmz5kzsysa3om6du7ycj2evxp2f2olfkyq37htx3gllwp2yd.onion/nostr --filter "$filters" --dir both -/app/strfry --config /etc/strfry.conf sync ws://satstraoq35jffvkgpfoqld32nzw2siuvowanruindbfojowpwsjdgad.onion/nostr --filter "$filters" --dir both -/app/strfry --config /etc/strfry.conf sync ws://4t4jxmivv6uqej6xzx2jx3fxh75gtt65v3szjoqmc4ugdlhipzdat6yd.onion/nostr --filter "$filters" --dir both -/app/strfry --config /etc/strfry.conf sync ws://mmhaqzuirth5rx7gl24d4773lknltjhik57k7ahec5iefktezv4b3uid.onion/nostr --filter "$filters" --dir both diff --git a/compose/strfry/sync.sh b/compose/strfry/sync.sh new file mode 100644 index 0000000..338fb53 --- /dev/null +++ b/compose/strfry/sync.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +filters='{"kinds":[38383]}' + +while IFS= read -r line; do + /app/strfry --config /etc/strfry.conf sync ws://${line}/nostr --filter "$filters" --dir both +done < /app/onion_urls.txt diff --git a/compose/strfry/tn.onion_urls.txt b/compose/strfry/tn.onion_urls.txt new file mode 100644 index 0000000..2c81ddc --- /dev/null +++ b/compose/strfry/tn.onion_urls.txt @@ -0,0 +1,4 @@ +testraliar7xkhos2gipv2k65obykofb4jqzl5l4danfryacifi4t7qd.onion +jpp3w5tpxtyg6lifonisdszpriiapszzem4wod2zsdweyfenlsxeoxid.onion +ghbtv7lhoyhomyir4xvxaeyqgx4ylxksia343jaat3njqqlkqpdjqcyd.onion +wsjyhbashc4zrrex6vijpryujggbka5plry2o62dxqoz3pxinblnj4ad.onion \ No newline at end of file diff --git a/compose/strfry/tn.sync.sh b/compose/strfry/tn.sync.sh deleted file mode 100644 index d79feb2..0000000 --- a/compose/strfry/tn.sync.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -filters='{"kinds":[38383]}' - -/app/strfry --config /etc/strfry.conf sync ws://testraliar7xkhos2gipv2k65obykofb4jqzl5l4danfryacifi4t7qd.onion/nostr --filter "$filters" --dir both -/app/strfry --config /etc/strfry.conf sync ws://jpp3w5tpxtyg6lifonisdszpriiapszzem4wod2zsdweyfenlsxeoxid.onion/nostr --filter "$filters" --dir both -/app/strfry --config /etc/strfry.conf sync ws://ghbtv7lhoyhomyir4xvxaeyqgx4ylxksia343jaat3njqqlkqpdjqcyd.onion/nostr --filter "$filters" --dir both -/app/strfry --config /etc/strfry.conf sync ws://wsjyhbashc4zrrex6vijpryujggbka5plry2o62dxqoz3pxinblnj4ad.onion/nostr --filter "$filters" --dir both From d8091f53b81a836e4421620ba3f42d5392d1b668 Mon Sep 17 00:00:00 2001 From: koalasat Date: Wed, 24 Jul 2024 19:27:50 +0200 Subject: [PATCH 13/16] executable sync --- compose/strfry/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/compose/strfry/Dockerfile b/compose/strfry/Dockerfile index dd0612a..83f8760 100644 --- a/compose/strfry/Dockerfile +++ b/compose/strfry/Dockerfile @@ -13,5 +13,6 @@ COPY sync.sh /etc/strfry/sync.sh COPY entrypoint.sh /etc/strfry/entrypoint.sh RUN chmod +x /etc/strfry/entrypoint.sh +RUN chmod +x /etc/strfry/sync.sh ENTRYPOINT ["/etc/strfry/entrypoint.sh"] From 5579dfce418bc0018d31f976bd89d647f26bdba5 Mon Sep 17 00:00:00 2001 From: koalasat Date: Wed, 24 Jul 2024 19:44:11 +0200 Subject: [PATCH 14/16] mainnet onions --- compose/strfry/mn.onion_urls.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/compose/strfry/mn.onion_urls.txt b/compose/strfry/mn.onion_urls.txt index 2c81ddc..fc3a08c 100644 --- a/compose/strfry/mn.onion_urls.txt +++ b/compose/strfry/mn.onion_urls.txt @@ -1,4 +1,4 @@ -testraliar7xkhos2gipv2k65obykofb4jqzl5l4danfryacifi4t7qd.onion -jpp3w5tpxtyg6lifonisdszpriiapszzem4wod2zsdweyfenlsxeoxid.onion -ghbtv7lhoyhomyir4xvxaeyqgx4ylxksia343jaat3njqqlkqpdjqcyd.onion -wsjyhbashc4zrrex6vijpryujggbka5plry2o62dxqoz3pxinblnj4ad.onion \ No newline at end of file +ngdk7ocdzmz5kzsysa3om6du7ycj2evxp2f2olfkyq37htx3gllwp2yd.onion +satstraoq35jffvkgpfoqld32nzw2siuvowanruindbfojowpwsjdgad.onion +4t4jxmivv6uqej6xzx2jx3fxh75gtt65v3szjoqmc4ugdlhipzdat6yd.onion +mmhaqzuirth5rx7gl24d4773lknltjhik57k7ahec5iefktezv4b3uid.onion \ No newline at end of file From bc8de58a4f5ceccef9145ce49dfe3bd38eee20dc Mon Sep 17 00:00:00 2001 From: koalasat Date: Fri, 9 Aug 2024 11:03:20 +0200 Subject: [PATCH 15/16] strfry bug free version --- compose/strfry/Dockerfile | 31 +++++++++++++++++++++++++++---- compose/strfry/crontab | 2 +- compose/strfry/entrypoint.sh | 2 +- 3 files changed, 29 insertions(+), 6 deletions(-) diff --git a/compose/strfry/Dockerfile b/compose/strfry/Dockerfile index 83f8760..86a2b08 100644 --- a/compose/strfry/Dockerfile +++ b/compose/strfry/Dockerfile @@ -1,18 +1,41 @@ -FROM dockurr/strfry:0.9.6 +FROM ubuntu:jammy +ENV TZ=Europe/London -RUN apk add --no-cache torsocks +RUN apt update && apt install -y --no-install-recommends \ + git g++ make pkg-config libtool ca-certificates \ + libssl-dev zlib1g-dev liblmdb-dev libflatbuffers-dev \ + libsecp256k1-dev libzstd-dev + +# setup app +RUN git clone https://github.com/KoalaSat/strfry /app + +WORKDIR /app + +RUN git submodule update --init +RUN make setup-golpe +RUN make clean +RUN make -j4 + +RUN apt update && apt install -y --no-install-recommends \ + liblmdb0 libflatbuffers1 libsecp256k1-0 libb2-1 libzstd1 torsocks cron\ + && rm -rf /var/lib/apt/lists/* RUN echo "TorAddress 127.0.0.1" >> /etc/tor/torsocks.conf RUN echo "TorPort 9050" >> /etc/tor/torsocks.conf # Setting up crontab -COPY crontab /tmp/crontab -RUN cat /tmp/crontab > /etc/crontabs/root +COPY crontab /etc/cron.d/crontab +RUN chmod 0644 /etc/cron.d/crontab +RUN crontab /etc/cron.d/crontab +# Setting up entrypoints COPY sync.sh /etc/strfry/sync.sh COPY entrypoint.sh /etc/strfry/entrypoint.sh RUN chmod +x /etc/strfry/entrypoint.sh RUN chmod +x /etc/strfry/sync.sh +#Setting up logs +RUN touch /var/log/cron.log && chmod 0644 /var/log/cron.log + ENTRYPOINT ["/etc/strfry/entrypoint.sh"] diff --git a/compose/strfry/crontab b/compose/strfry/crontab index 71a96d9..fb04c49 100644 --- a/compose/strfry/crontab +++ b/compose/strfry/crontab @@ -21,4 +21,4 @@ # For more information see the manual pages of crontab(5) and cron(8) # # m h dom mon dow command -*/1 * * * * torsocks /etc/strfry/sync.sh +*/1 * * * * torsocks /etc/strfry/sync.sh >> /var/log/cron.log 2>&1 diff --git a/compose/strfry/entrypoint.sh b/compose/strfry/entrypoint.sh index 2ebe6b3..efb3062 100644 --- a/compose/strfry/entrypoint.sh +++ b/compose/strfry/entrypoint.sh @@ -1,3 +1,3 @@ #!/bin/sh -crond -f -l 8 & /app/strfry.sh +cron -f -l 8 & tail -f /var/log/cron.log & /app/strfry relay From c1edaba96a52c32fcf6fabfe9688d80afb0e5755 Mon Sep 17 00:00:00 2001 From: koalasat Date: Fri, 9 Aug 2024 16:32:17 +0200 Subject: [PATCH 16/16] Better urls --- compose/strfry/mn.onion_urls.txt | 8 ++++---- compose/strfry/sync.sh | 2 +- compose/strfry/tn.onion_urls.txt | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/compose/strfry/mn.onion_urls.txt b/compose/strfry/mn.onion_urls.txt index fc3a08c..6f593e0 100644 --- a/compose/strfry/mn.onion_urls.txt +++ b/compose/strfry/mn.onion_urls.txt @@ -1,4 +1,4 @@ -ngdk7ocdzmz5kzsysa3om6du7ycj2evxp2f2olfkyq37htx3gllwp2yd.onion -satstraoq35jffvkgpfoqld32nzw2siuvowanruindbfojowpwsjdgad.onion -4t4jxmivv6uqej6xzx2jx3fxh75gtt65v3szjoqmc4ugdlhipzdat6yd.onion -mmhaqzuirth5rx7gl24d4773lknltjhik57k7ahec5iefktezv4b3uid.onion \ No newline at end of file +ws://ngdk7ocdzmz5kzsysa3om6du7ycj2evxp2f2olfkyq37htx3gllwp2yd.onion/nostr +ws://satstraoq35jffvkgpfoqld32nzw2siuvowanruindbfojowpwsjdgad.onion/nostr +ws://4t4jxmivv6uqej6xzx2jx3fxh75gtt65v3szjoqmc4ugdlhipzdat6yd.onion/nostr +ws://mmhaqzuirth5rx7gl24d4773lknltjhik57k7ahec5iefktezv4b3uid.onion/nostr \ No newline at end of file diff --git a/compose/strfry/sync.sh b/compose/strfry/sync.sh index 338fb53..8c47617 100644 --- a/compose/strfry/sync.sh +++ b/compose/strfry/sync.sh @@ -3,5 +3,5 @@ filters='{"kinds":[38383]}' while IFS= read -r line; do - /app/strfry --config /etc/strfry.conf sync ws://${line}/nostr --filter "$filters" --dir both + /app/strfry --config /etc/strfry.conf sync ${line} --filter "$filters" --dir both done < /app/onion_urls.txt diff --git a/compose/strfry/tn.onion_urls.txt b/compose/strfry/tn.onion_urls.txt index 2c81ddc..92abf18 100644 --- a/compose/strfry/tn.onion_urls.txt +++ b/compose/strfry/tn.onion_urls.txt @@ -1,4 +1,4 @@ -testraliar7xkhos2gipv2k65obykofb4jqzl5l4danfryacifi4t7qd.onion -jpp3w5tpxtyg6lifonisdszpriiapszzem4wod2zsdweyfenlsxeoxid.onion -ghbtv7lhoyhomyir4xvxaeyqgx4ylxksia343jaat3njqqlkqpdjqcyd.onion -wsjyhbashc4zrrex6vijpryujggbka5plry2o62dxqoz3pxinblnj4ad.onion \ No newline at end of file +ws://testraliar7xkhos2gipv2k65obykofb4jqzl5l4danfryacifi4t7qd.onion/nostr +ws://jpp3w5tpxtyg6lifonisdszpriiapszzem4wod2zsdweyfenlsxeoxid.onion/nostr +ws://ghbtv7lhoyhomyir4xvxaeyqgx4ylxksia343jaat3njqqlkqpdjqcyd.onion/nostr +ws://wsjyhbashc4zrrex6vijpryujggbka5plry2o62dxqoz3pxinblnj4ad.onion/nostr \ No newline at end of file