torly-rendezvous.env raw

   1  # A relay for nostrino gateway rendezvous and tunnel traffic, and nothing else.
   2  #
   3  # The write policy is the part that expresses "this relay is for one job": the presence record
   4  # (kind 30333) is stored and may only be signed by the registered gateway, the two ephemeral
   5  # frame kinds are open to any wallet but rate-limited per connection, and every other kind is
   6  # refused. See docs/POLICY.md.
   7  
   8  TORLY_APP_NAME=torly rendezvous
   9  TORLY_DESCRIPTION=nostrino gateway rendezvous and tunnel relay
  10  
  11  # The relay's own write gate is off: the policy asks for NIP-42 only on the kinds that need it,
  12  # which keeps wallets from having to authenticate before sending ephemeral frames.
  13  TORLY_AUTH_REQUIRED=false
  14  TORLY_POLICY_FILE=/etc/torly/policy/rendezvous.json
  15  
  16  # Nothing here serves blobs.
  17  TORLY_BLOSSOM_ENABLED=false
  18  
  19  # The policy is what makes the two directions different: kind 23197 (gateway to wallet, the
  20  # bulk of a sync) is gateway-only and has no rate, while kind 23196 (wallet to gateway requests
  21  # and acks) is open but rate- and byte-limited per connection.
  22  #
  23  # Tunnel frames are NIP-44 ciphertext of up to the tunnel MTU (32 KiB default), so the event
  24  # limit has to be above the frame plus its tags and base64 expansion. 128 KiB covers the default
  25  # MTU and leaves room to raise it to 64 KiB.
  26  TORLY_MAX_EVENT_BYTES=131072
  27  
  28  # A presence record is renewed every five minutes; expired ones are purged on this interval.
  29  TORLY_EXPIRY_INTERVAL=60
  30  
  31  # Inbound is capped, outbound is not. Delivery to wallets (the gateway's kind-23197 frames) is
  32  # whatever the line will carry; this ceiling is the relay's inbound line rate, so a flood is
  33  # dropped instead of queued, and a connection that keeps exceeding it is closed. Set it to the
  34  # link's inbound capacity: too low throttles sync, too high lets a flood fill the buffers.
  35  TORLY_INBOUND_BYTES_PER_SEC=16777216
  36  TORLY_ABUSE_CLOSE_AFTER=100
  37  
  38  # A client may ask for its stream once; asking again and again gets no answer. The tunnel's own
  39  # retry logic is what re-establishes a stream, not a request loop.
  40  TORLY_QUERY_PER_SEC=5
  41  TORLY_QUERY_BURST=10
  42  
  43  # Delivery to wallets is the bulk of the traffic. Leave it at the line rate (0) unless one
  44  # syncing wallet must not take the whole uplink; a value here paces delivery per connection and
  45  # never drops a frame, so a slower cap slows sync rather than breaking it.
  46  TORLY_OUTBOUND_BYTES_PER_SEC=0
  47  
  48  # Frames are live traffic: they are broadcast, never stored. These caps bound the live fan-out
  49  # per connection, not retention.
  50  TORLY_MAX_SUBS_PER_CONN=16
  51  TORLY_MAX_FILTERS=8
  52  TORLY_MAX_LIMIT=500
  53  TORLY_QUERY_LIMIT=500
  54  
  55  TORLY_LOG_LEVEL=info
  56