mirror of
https://github.com/scsibug/nostr-rs-relay.git
synced 2024-12-22 16:35:51 -05:00
refactor: whitespace
This commit is contained in:
parent
dad6911807
commit
9e22776227
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,4 +1,4 @@
|
|||
**/target/
|
||||
nostr.db
|
||||
nostr.db-*
|
||||
justfile
|
||||
justfile
|
||||
|
|
|
@ -203,7 +203,7 @@ reject_future_seconds = 1800
|
|||
#api_secret = "<ln bits api>"
|
||||
|
||||
# Nostr direct message on signup
|
||||
#direct_message=true
|
||||
#direct_message=true
|
||||
|
||||
# Terms of service
|
||||
#terms_message = """
|
||||
|
|
|
@ -22,12 +22,12 @@ api_secret = "<LNbits api key>"
|
|||
# Terms of service
|
||||
terms_message = """This service ....
|
||||
"""
|
||||
# Whether or not new sign ups should be allowed
|
||||
sign_ups = true
|
||||
# Whether or not new sign ups should be allowed
|
||||
sign_ups = true
|
||||
secret_key = "<nostr secret key to send dms>"
|
||||
```
|
||||
|
||||
The LNBits instance must have a signed HTTPS a self signed certificate will not work.
|
||||
The LNBits instance must have a signed HTTPS a self signed certificate will not work.
|
||||
|
||||
## Design Overview
|
||||
|
||||
|
@ -54,7 +54,7 @@ Invoice information is stored in a dedicated table. This tracks:
|
|||
* `created_at` timestamp of creation
|
||||
* `confirmed_at` timestamp of payment
|
||||
|
||||
### Event Handling
|
||||
### Event Handling
|
||||
|
||||
If "pay to relay" is enabled, all incoming events are evaluated to determine whether the author is on the relay's whitelist or if they have paid the admission fee and accepted the terms. If "pay per note" is enabled, there is an additional check to ensure that the author has enough balance, which is then reduced by the cost per note. If the author is on the whitelist, this balance check is not necessary.
|
||||
|
||||
|
@ -77,9 +77,8 @@ simply to demonstrate a mitigation is possible.
|
|||
|
||||
*Mitigation*: Rate limit number of new sign ups
|
||||
|
||||
### Admitted Author Spamming
|
||||
### Admitted Author Spamming
|
||||
|
||||
*Threat*: An attacker gains write access by paying the admission fee, and then floods the relay with a large number of spam events.
|
||||
|
||||
*Mitigation*: The attacker's admission can be revoked and their admission fee will not be refunded. Enabling "cost per event" and increasing the admission cost can also discourage this type of behavior.
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ We want to place the nostr-rs-relay binary and the config.toml file where they b
|
|||
2. `sudo cp config.toml /etc/nostr-rs-relay`
|
||||
|
||||
### Create the Systemd service file
|
||||
We need to create a new Systemd service file. These files are placed in the `/etc/systemd/system/` folder where you will find many other services running.
|
||||
We need to create a new Systemd service file. These files are placed in the `/etc/systemd/system/` folder where you will find many other services running.
|
||||
|
||||
1. `sudo vim /etc/systemd/system/nostr-rs-relay.service`
|
||||
2. Paste in the contents of [this service file](../contrib/nostr-rs-relay.service). Remember to replace the `User` value with your own username.
|
||||
|
@ -36,4 +36,4 @@ To get the service running, we need to reload the systemd daemon and enable the
|
|||
### Tips
|
||||
|
||||
#### Logs
|
||||
The application will write logs to the journal. To read it, execute `sudo journalctl -f -u nostr-rs-relay`
|
||||
The application will write logs to the journal. To read it, execute `sudo journalctl -f -u nostr-rs-relay`
|
||||
|
|
Loading…
Reference in New Issue
Block a user