Compare commits
2
Commits
2c6e64d231
...
v0.2.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9c04b393ec
|
||
|
|
cb11817dcd
|
@@ -1,5 +1,5 @@
|
|||||||
node.default["strfry"]["repo"] = "https://github.com/hoytech/strfry.git"
|
node.default["strfry"]["repo"] = "https://github.com/hoytech/strfry.git"
|
||||||
node.default["strfry"]["revision"] = "1.0.1"
|
node.default["strfry"]["revision"] = "1.1.1"
|
||||||
node.default["strfry"]["download_url"] = nil
|
node.default["strfry"]["download_url"] = nil
|
||||||
node.default["strfry"]["checksum"] = nil
|
node.default["strfry"]["checksum"] = nil
|
||||||
node.default["strfry"]["user"] = "strfry"
|
node.default["strfry"]["user"] = "strfry"
|
||||||
@@ -9,11 +9,13 @@ node.default["strfry"]["config"] = {
|
|||||||
# db_params: {},
|
# db_params: {},
|
||||||
# events: {},
|
# events: {},
|
||||||
# relay: {
|
# relay: {
|
||||||
|
# auth: {},
|
||||||
# info: {},
|
# info: {},
|
||||||
# writePolicy: {},
|
# write_policy: {},
|
||||||
# compression: {},
|
# compression: {},
|
||||||
# logging: {},
|
# logging: {},
|
||||||
# num_threads: {},
|
# num_threads: {},
|
||||||
# negentropy: {}
|
# negentropy: {},
|
||||||
|
# filter_validation: {}
|
||||||
# }
|
# }
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -3,7 +3,7 @@ maintainer 'Kosmos'
|
|||||||
maintainer_email 'ops@kosmos.org'
|
maintainer_email 'ops@kosmos.org'
|
||||||
license 'MIT'
|
license 'MIT'
|
||||||
description 'Installs/configures strfry'
|
description 'Installs/configures strfry'
|
||||||
version '0.1.0'
|
version '0.2.0'
|
||||||
chef_version '>= 18.0'
|
chef_version '>= 18.0'
|
||||||
issues_url 'https://gitea.kosmos.org/kosmos/strfry-cookbook/issues'
|
issues_url 'https://gitea.kosmos.org/kosmos/strfry-cookbook/issues'
|
||||||
source_url 'https://gitea.kosmos.org/kosmos/strfry-cookbook'
|
source_url 'https://gitea.kosmos.org/kosmos/strfry-cookbook'
|
||||||
|
|||||||
+2
-3
@@ -23,9 +23,8 @@ else
|
|||||||
# Install by building from source
|
# Install by building from source
|
||||||
#
|
#
|
||||||
%w[
|
%w[
|
||||||
git build-essential libyaml-perl libtemplate-perl libregexp-grammars-perl
|
git build-essential libssl-dev zlib1g-dev liblmdb-dev libflatbuffers-dev
|
||||||
libssl-dev zlib1g-dev liblmdb-dev libflatbuffers-dev libsecp256k1-dev
|
libsecp256k1-dev libzstd-dev
|
||||||
libzstd-dev
|
|
||||||
].each do |pkg|
|
].each do |pkg|
|
||||||
package pkg
|
package pkg
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -48,27 +48,53 @@ relay {
|
|||||||
# HTTP header that contains the client's real IP, before reverse proxying (ie x-real-ip) (MUST be all lower-case)
|
# HTTP header that contains the client's real IP, before reverse proxying (ie x-real-ip) (MUST be all lower-case)
|
||||||
realIpHeader = "<%= @config.dig(:relay, :real_ip_header) || "" %>"
|
realIpHeader = "<%= @config.dig(:relay, :real_ip_header) || "" %>"
|
||||||
|
|
||||||
|
auth {
|
||||||
|
# Enable NIP-42 authentication
|
||||||
|
enabled = <%= @config.dig(:relay, :auth, :enabled) || "false" %>
|
||||||
|
|
||||||
|
# External relay URL (beginning with wss://). Required in order to validate challenge responses.
|
||||||
|
serviceUrl = "<%= @config.dig(:relay, :auth, :service_url) || "" %>"
|
||||||
|
}
|
||||||
|
|
||||||
# NIP-11
|
# NIP-11
|
||||||
info {
|
info {
|
||||||
# Name of this server. Short/descriptive (< 30 characters)
|
# NIP-11: Name of this server. Short/descriptive (< 30 characters)
|
||||||
name = "<%= @config.dig(:relay, :info, :name) || "strfry default" %>"
|
name = "<%= @config.dig(:relay, :info, :name) || "strfry default" %>"
|
||||||
|
|
||||||
# Detailed information about relay, free-form
|
# NIP-11: Detailed information about relay, free-form
|
||||||
description = "<%= @config.dig(:relay, :info, :description) || "This is a strfry instance." %>"
|
description = "<%= @config.dig(:relay, :info, :description) || "This is a strfry instance." %>"
|
||||||
|
|
||||||
# Administrative nostr pubkey, for contact purposes
|
# NIP-11: Administrative nostr pubkey (in npub or 32-byte HEX format), for contact purposes
|
||||||
pubkey = "<%= @config.dig(:relay, :info, :pubkey) || "" %>"
|
pubkey = "<%= @config.dig(:relay, :info, :pubkey) || "" %>"
|
||||||
|
|
||||||
# Alternative administrative contact (email, website, etc)
|
# NIP-11: Relay's own pubkey (in npub or 32-byte HEX format)
|
||||||
|
self = "<%= @config.dig(:relay, :info, :self) || "" %>"
|
||||||
|
|
||||||
|
# NIP-11: Alternative administrative contact (email, website, etc)
|
||||||
contact = "<%= @config.dig(:relay, :info, :contact) || "" %>"
|
contact = "<%= @config.dig(:relay, :info, :contact) || "" %>"
|
||||||
|
|
||||||
# URL pointing to an image to be used as an icon for the relay
|
# NIP-11: URL pointing to an image to be used as an icon for the relay
|
||||||
icon = "<%= @config.dig(:relay, :info, :icon) || "" %>"
|
icon = "<%= @config.dig(:relay, :info, :icon) || "" %>"
|
||||||
|
|
||||||
|
# NIP-11: URL pointing to an image to be used as an banner for the relay
|
||||||
|
banner = "<%= @config.dig(:relay, :info, :banner) || "" %>"
|
||||||
|
|
||||||
|
# NIP-11: Privacy policy URL
|
||||||
|
privacy = "<%= @config.dig(:relay, :info, :privacy) || "" %>"
|
||||||
|
|
||||||
|
# NIP-11: Terms of service URL
|
||||||
|
terms = "<%= @config.dig(:relay, :info, :terms) || "" %>"
|
||||||
|
|
||||||
|
# List of supported lists as JSON array, or empty string to use default. Example: "[1,2]"
|
||||||
|
nips = "<%= @config.dig(:relay, :info, :nips) || "" %>"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Maximum accepted incoming websocket frame size (should be larger than max event) (restart required)
|
# Maximum accepted incoming websocket frame size (should be larger than max event) (restart required)
|
||||||
maxWebsocketPayloadSize = <%= @config.dig(:relay, :max_websocket_payload_size) || "131072" %>
|
maxWebsocketPayloadSize = <%= @config.dig(:relay, :max_websocket_payload_size) || "131072" %>
|
||||||
|
|
||||||
|
# Maximum number of filters allowed in a REQ
|
||||||
|
maxReqFilterSize = <%= @config.dig(:relay, :max_req_filter_size) || "200" %>
|
||||||
|
|
||||||
# Websocket-level PING message frequency (should be less than any reverse proxy idle timeouts) (restart required)
|
# Websocket-level PING message frequency (should be less than any reverse proxy idle timeouts) (restart required)
|
||||||
autoPingSeconds = <%= @config.dig(:relay, :auto_ping_seconds) || "55" %>
|
autoPingSeconds = <%= @config.dig(:relay, :auto_ping_seconds) || "55" %>
|
||||||
|
|
||||||
@@ -81,12 +107,18 @@ relay {
|
|||||||
# Maximum records that can be returned per filter
|
# Maximum records that can be returned per filter
|
||||||
maxFilterLimit = <%= @config.dig(:relay, :max_filter_limit) || "500" %>
|
maxFilterLimit = <%= @config.dig(:relay, :max_filter_limit) || "500" %>
|
||||||
|
|
||||||
|
# Maximum records that can be counted by a COUNT request (set 0 to disable COUNT)
|
||||||
|
maxFilterLimitCount = <%= @config.dig(:relay, :max_filter_limit_count) || "1000000" %>
|
||||||
|
|
||||||
# Maximum number of subscriptions (concurrent REQs) a connection can have open at any time
|
# Maximum number of subscriptions (concurrent REQs) a connection can have open at any time
|
||||||
maxSubsPerConnection = <%= @config.dig(:relay, :max_subs_per_connection) || "20" %>
|
maxSubsPerConnection = <%= @config.dig(:relay, :max_subs_per_connection) || "200" %>
|
||||||
|
|
||||||
writePolicy {
|
writePolicy {
|
||||||
# If non-empty, path to an executable script that implements the writePolicy plugin logic
|
# If non-empty, path to an executable script that implements the writePolicy plugin logic
|
||||||
plugin = "<%= @config.dig(:relay, :write_policy, :plugin) || "" %>"
|
plugin = "<%= @config.dig(:relay, :write_policy, :plugin) || "" %>"
|
||||||
|
|
||||||
|
# Number of seconds to wait for a plugin to respond
|
||||||
|
timeoutSeconds = <%= @config.dig(:relay, :write_policy, :timeout_seconds) || "10" %>
|
||||||
}
|
}
|
||||||
|
|
||||||
compression {
|
compression {
|
||||||
@@ -135,4 +167,24 @@ relay {
|
|||||||
# Maximum records that sync will process before returning an error
|
# Maximum records that sync will process before returning an error
|
||||||
maxSyncEvents = <%= @config.dig(:relay, :negentropy, :max_sync_events) || "1000000" %>
|
maxSyncEvents = <%= @config.dig(:relay, :negentropy, :max_sync_events) || "1000000" %>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
filterValidation {
|
||||||
|
# Enable strict filter validation for REQ messages
|
||||||
|
enabled = <%= @config.dig(:relay, :filter_validation, :enabled) || "false" %>
|
||||||
|
|
||||||
|
# Maximum number of filters allowed per REQ (when validation enabled)
|
||||||
|
maxFiltersPerReq = <%= @config.dig(:relay, :filter_validation, :max_filters_per_req) || "3" %>
|
||||||
|
|
||||||
|
# Minimum number of filters required per REQ (when validation enabled)
|
||||||
|
minFiltersPerReq = <%= @config.dig(:relay, :filter_validation, :min_filters_per_req) || "1" %>
|
||||||
|
|
||||||
|
# Maximum number of kinds allowed per filter (when validation enabled)
|
||||||
|
maxKindsPerFilter = <%= @config.dig(:relay, :filter_validation, :max_kinds_per_filter) || "3" %>
|
||||||
|
|
||||||
|
# Comma-separated list of allowed kinds (empty = all allowed)
|
||||||
|
allowedKinds = "<%= @config.dig(:relay, :filter_validation, :allowed_kinds) || "" %>"
|
||||||
|
|
||||||
|
# Require at least one author, p tag, or e tag in each filter
|
||||||
|
requireAuthorOrTag = <%= @config.dig(:relay, :filter_validation, :require_author_or_tag) || "false" %>
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user