-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathreference.pxls.conf
190 lines (160 loc) · 3.66 KB
/
reference.pxls.conf
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
// The canvas code, especially useful for external sites to know that the canvas has rolled over
canvascode: "1"
server {
port: 4567
// The directory the server places board files and backups in
storage: .
// If you're using a reverse proxy, you need to set this up to identify the users' real IPs
// If the connecting client's IP matches "server.proxy.localhosts", it will look up each header in the "headers" field
// in sequence until it finds a non-local IP, and will use that IP throughout for rate limiting and storage
proxy {
// If you have a custom load balancer, reverse proxy, DDoS protector, etc, put its IP in here
localhosts: ["127.0.0.1", "0:0:0:0:0:0:0:1"]
headers: []
}
limits {
// time is a rate limit time frame
// count is how many times a request can be made in that time frame before 429ing
signup {
count: 4
time: 1h
}
auth {
count: 3
time: 10m
}
lookup {
count: 20
time: 2m
}
undo {
count: 3
time: 1m
}
chat {
count: 2
time: 1s
}
}
}
html {
title: Pxls
head: ""
info: "resource:/public/info.html"
}
database {
// The driver to use, currently only mysql is supported
driver: mysql
user: ""
pass: ""
// The URI of the format "mariadb://<host>:<port>/<db>"
// Example: "mariadb://localhost:3306/pxls"
url: ""
}
pixelCounts {
countTowardsAlltime: true,
countTowardsCurrent: true
}
board {
width: 1000
height: 1000
palette: [
"#FFFFFF",
"#E4E4E4",
"#888888",
"#222222",
"#FFA7D1",
"#E50000",
"#E59500",
"#A06A42",
"#E5D900",
"#94E044",
"#02BE01",
"#00D3DD",
"#0083C7",
"#0000EA",
"#CF6EE4",
"#820080"
]
defaultColor: 0
// See cooldown below
heatmapCooldown: 3h
saveInterval: 5s
backupInterval: 5m
}
// See https://github.com/typesafehub/config/blob/master/HOCON.md#duration-format
// raw numbers will be interpreted as milliseconds
cooldown: 3m
useStaticCooldown: false
undo {
window: 5s
}
// Cooldown increase based on authed user count
activityCooldown {
enabled: true
// This multiplies the final cooldown in seconds
multiplier: 1
}
selfPixelTimeIncrease: true
// Cooldown multiplier for placing on non-background pixels
backgroundPixel {
enabled: true
// This multiplies the final cooldown in seconds
multiplier: 1.6
}
// System host, used for various things, including auth. MUST be set correctly or you'll have a bad time trying to debug auth. Should be set to your domain - or IP if testing locally - without port.
host: ""
captcha {
// Captcha will show rougly 1/<threshold> times
threshold: 5
key: ""
secret: ""
maxPixels: 0
allTime: true
}
stacking {
cooldownMultiplier: 3,
maxStacked: 5
}
whoamiAllowedOrigin: "https://pxls.space"
oauth {
useIp: false
// Should be your url + /auth (for example, http://pxls.space/auth)
callbackBase: ""
enableRegistration: true
// Create at https://www.reddit.com/prefs/apps
reddit {
key: ""
secret: ""
minAge: 1d
}
// Create at https://console.developers.google.com/
google {
key: ""
secret: ""
}
// Create at https://discordapp.com/developers/applications/me
discord {
key: ""
secret: ""
minAge: 1d
}
// Create at https://vk.com/apps?act=manage
vk {
key: ""
secret: ""
}
// Create at https://www.tumblr.com/oauth/apps
tumblr {
key: ""
secret: ""
}
}
chat {
filter {
enabled: true
static: []
regex: ["n([i1]+)g+([e3a4])[2r]?[5sz]?", "f[a4]g+[sz5]?([o0][7t]+)?", "k[1i]+k[e3]+[5sz]?"] //"nigger, faggot, kike" and their short/1337/plural alternatives
}
trimInput: true
}