mirror of
https://github.com/mikedilger/chorus.git
synced 2026-08-01 07:21:39 +00:00
config param: allow_scrape_if_negentropy
This commit is contained in:
parent
2295f4b9fc
commit
0f94767f80
@ -197,6 +197,13 @@ allow_scrape_if_limited_to = 100
|
||||
allow_scrape_if_max_seconds = 7200
|
||||
|
||||
|
||||
# Within negentropy synchronization, allow scraping
|
||||
#
|
||||
# The default is true
|
||||
#
|
||||
allow_scrape_if_negentropy = true
|
||||
|
||||
|
||||
# This is an integer indicating the maximum number of subscriptions a connection can have open
|
||||
# at a given time.
|
||||
#
|
||||
|
||||
@ -168,6 +168,12 @@ See `allow_scraping` to learn the definition of a scrape.
|
||||
|
||||
The default is 7200.
|
||||
|
||||
### allow_scrape_if_negentropy
|
||||
|
||||
Within negentropy synchronization, allow scraping.
|
||||
|
||||
The default is true
|
||||
|
||||
### max_subscriptions
|
||||
|
||||
This is an integer indicating the maximum number of subscriptions a connection can have open at a given time.
|
||||
|
||||
@ -29,6 +29,7 @@ pub struct FriendlyConfig {
|
||||
pub allow_scraping: bool,
|
||||
pub allow_scrape_if_limited_to: u32,
|
||||
pub allow_scrape_if_max_seconds: u64,
|
||||
pub allow_scrape_if_negentropy: bool,
|
||||
pub max_subscriptions: usize,
|
||||
pub serve_ephemeral: bool,
|
||||
pub serve_relay_lists: bool,
|
||||
@ -69,6 +70,7 @@ impl Default for FriendlyConfig {
|
||||
allow_scraping: false,
|
||||
allow_scrape_if_limited_to: 100,
|
||||
allow_scrape_if_max_seconds: 7200,
|
||||
allow_scrape_if_negentropy: true,
|
||||
max_subscriptions: 128,
|
||||
serve_ephemeral: true,
|
||||
serve_relay_lists: true,
|
||||
@ -111,6 +113,7 @@ impl FriendlyConfig {
|
||||
allow_scraping,
|
||||
allow_scrape_if_limited_to,
|
||||
allow_scrape_if_max_seconds,
|
||||
allow_scrape_if_negentropy,
|
||||
max_subscriptions,
|
||||
serve_ephemeral,
|
||||
serve_relay_lists,
|
||||
@ -175,6 +178,7 @@ impl FriendlyConfig {
|
||||
allow_scraping,
|
||||
allow_scrape_if_limited_to,
|
||||
allow_scrape_if_max_seconds,
|
||||
allow_scrape_if_negentropy,
|
||||
max_subscriptions,
|
||||
serve_ephemeral,
|
||||
serve_relay_lists,
|
||||
@ -218,6 +222,7 @@ pub struct Config {
|
||||
pub allow_scraping: bool,
|
||||
pub allow_scrape_if_limited_to: u32,
|
||||
pub allow_scrape_if_max_seconds: u64,
|
||||
pub allow_scrape_if_negentropy: bool,
|
||||
pub max_subscriptions: usize,
|
||||
pub serve_ephemeral: bool,
|
||||
pub serve_relay_lists: bool,
|
||||
|
||||
@ -539,7 +539,7 @@ impl WebSocketService {
|
||||
let config = &*GLOBALS.config.read();
|
||||
GLOBALS.store.get().unwrap().find_events(
|
||||
&filter,
|
||||
config.allow_scraping,
|
||||
config.allow_scraping || config.allow_scrape_if_negentropy,
|
||||
config.allow_scrape_if_limited_to,
|
||||
config.allow_scrape_if_max_seconds,
|
||||
screen,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user