forked from imksoo/nostr-filter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.env.sample
76 lines (64 loc) · 4.25 KB
/
.env.sample
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
NODE_ENV=development
LISTEN_PORT=8081
UPSTREAM_HTTP_URL=http://192.168.1.1:8080
UPSTREAM_WS_URL=ws://192.168.1.1:8080
# Comma separated blocked pubkeys (hex) e.g. hexpubkey1, hexpubkey2
BLOCKED_PUBKEYS=
# Comma separated whitelisted pubkeys (hex) e.g. hexpubkey1, hexpubkey2
WHITELISTED_PUBKEYS=
# Set true to filter proxy events
FILTER_PROXY_EVENTS=
# Set true to enable forwarding of request headers to upstream server
ENABLE_FORWARD_REQ_HEADERS=false
# Set maximum websocket server payload size (maximum allowed message size) in bytes
MAX_WEBSOCKET_PAYLOAD_SIZE=1000000
# Set maximum number of parallel concurrency limit when requesting classification events to relay
RELAY_REQUEST_CONCURRENCY_LIMIT=10
# Set true to enable rate limit for number of websocket message
ENABLE_RATE_LIMIT=false
# Set to "IP" to rate limit based on IP addresses otherwise using socketId
RATE_LIMIT_KEY="IP"
# Maximum number of websocket message (REQ, EVENT, etc) per second per IP/socketId
MAX_WEBSOCKET_MESSAGE_PER_SECOND=10
# Maximum number of websocket message (REQ, EVENT, etc) per minute per IP/socketId
MAX_WEBSOCKET_MESSAGE_PER_MINUTE=1000
# Regular expressions for content filtering. Each regular expression is stored as a separate environment variable.
# These regular expressions are used to match specific patterns in texts.
# The format for each regular expression is: /pattern/flags
# 'flags' can include 'i' for case-insensitive matching, 'g' for global matching, etc.
MUTE_FILTER_1=/avive/i # Matches 'avive' in a case-insensitive manner
MUTE_FILTER_2=/lnbc/ # Matches 'lnbc'
MUTE_FILTER_3=/t\.me/ # Matches 't.me', the backslash escapes the dot to match it literally
# Note: Add new regular expressions following the same format.
# Example: MUTE_FILTER_n=/your_pattern/your_flags
# Blocked IP addresses. (CIDR)
BLOCKED_IP_ADDR_1="43.205.189.224/32"
BLOCKED_IP_ADDR_2="34.173.202.51/32"
BLOCKED_IP_ADDR_3="129.205.113.128/25"
# (Default: true) Use NIP-32 Event Format (kind: 1985) or Deprecated Legacy Format (kind: 9978). Legacy format will be fully replaced by NIP-32 event format in the future.
USE_NIP_32_EVENT_FORMAT=true
# Use classification result from monitoring bot as filter data
NOSTR_MONITORING_BOT_PUBLIC_KEY=
# (Default: sfw, Options: all, sfw, partialsfw, and nsfw) Filter hate speech (toxic comment).
DEFAULT_FILTER_CONTENT_MODE=sfw
DEFAULT_FILTER_NSFW_CONFIDENCE=75
# (Default: all, Multiple Options: all, or other language code)
DEFAULT_FILTER_LANGUAGE_MODE=all
# (Default: 15, Options: 0-100) Default minimum probability/confidence score to determine the classification of language
DEFAULT_FILTER_LANGUAGE_CONFIDENCE=15
# (Default: no, Options: all, no, yes) Filter hate speech (toxic comment). "all" will disable filtering, "no" will filter out any detected hate speech content, "yes" will select only detected hate speech content
DEFAULT_FILTER_HATE_SPEECH_TOXIC_MODE=no
# (Default: 75, Options: 0-100) Default minimum probability/confidence score to determine the classification of hate speech (toxic comment)
DEFAULT_FILTER_HATE_SPEECH_TOXIC_CONFIDENCE=75
# (Default: max, Options: max, sum) Methods to determine toxic content by using max value from all toxic classes score or sum value of all toxic classes score
DEFAULT_FILTER_HATE_SPEECH_TOXIC_EVALUATION_MODE=max
# (Default: all, Multiple Options: all,negative,neutral,positive) Multiple options separated by comma (eg: neutral,positive => filter to get both neutral and positive sentiment)
DEFAULT_FILTER_SENTIMENT_MODE=all
# (Default: 35, Options: 0-100) Default minimum probability/confidence score in percentage to determine the classification of sentiment
DEFAULT_FILTER_SENTIMENT_CONFIDENCE=35
# (Default: all, Multiple Options: list of valid topic in atrifat/nostr-filter-relay Github) Multiple options separated by comma (eg: life,music,sport,science_and_technology => filter to get life (short version of: diaries_and_life), music, sport, science_and_technology)
DEFAULT_FILTER_TOPIC_MODE=all
# (Default: 35, Options: 0-100) Default minimum probability/confidence score in percentage to determine the classification of topic
DEFAULT_FILTER_TOPIC_CONFIDENCE=35
# (Default: all, Options: all, nostr, activitypub) Filter user type. "nostr" for native nostr users and "activitypub" for activitypub users coming from bridge
DEFAULT_FILTER_USER_MODE=all