forked from computernewb/collabvm-1.2.ts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.example.toml
More file actions
179 lines (164 loc) · 6.73 KB
/
config.example.toml
File metadata and controls
179 lines (164 loc) · 6.73 KB
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
[http]
host = "0.0.0.0"
port = 6004
# (To disable proxying, set it to false) IPs allowed to access the server in proxy mode.
# 99% of the time this will only be 127.0.0.1
proxyAllowedIps = ["127.0.0.1"]
# (To disable, set it to false) Origins to accept connections from.
originAllowedDomains = ["mycoolcollaborativevmwebapp.yay"]
[geoip]
# Enables support for showing country flags next to usernames.
enabled = false
# Directory to store and load GeoIP databases from.
directory = "geoip/"
# MaxMind license key and account ID (https://www.maxmind.com/en/accounts/current/license-key)
accountID = ""
licenseKey = ""
[auth]
# Enables the CollabVM account authentication system
# Requires an authentication server (https://git.computernewb.com/collabvm/CollabVMAuthServer)
enabled = false
apiEndpoint = ""
secretKey = "hunter2"
# When account authentication is enabled, this section defines what guests can and can't do
# Has no effect if auth is disabled
[auth.guestPermissions]
chat = true
turn = false
callForReset = true
vote = false
[vm]
# Configures the type of VM this server will use
# Supported values:
# "qemu" - Runs a QEMU VM
# "vncvm" - Connects to an existing VNC server
type = "qemu"
# QEMU options
# Only used if vm.type is set to "qemu"
[qemu]
qemuArgs = "qemu-system-x86_64"
# VNC port to be used for this VM. Must be unique among all VMs. Only used on Windows, as unix sockets are used on Linux.
vncPort = 5900
snapshots = true
# Sound options (NOT WORKING!!!!)
audioEnabled = false
audioFrequency = 48000 # 48 khz (48000) or 44.1 khz (44100) is supported
audioId = "sound" # you can change this to whatever you want, but it must be unique
audioDevice = "hda-duplex" # example: ac97, es1370, sb16, hda-duplex
# Resource limits.
# Only works on Linux, with `Delegate=yes` set in your .service file. No-op on other platforms.
#
# cpuUsageMax is an optional value specifies the max CPU usage as percentage in the common top notation.
# 200% means 2 CPUs, 400% is 4 CPUs.
#
# A general reccomendation is to set this to 100*[vCPU count].
# For example, if your QEMU command line contains -smp cores=2, then cpuUsageMax should be 200.
# For an overcomitted host, you can use lower values,
# but it *can* get noticable if you throttle CPU too low.
#
# runOnCpus is an optional array that specifies what CPUs the VM is allowed to run on.
# This option will *not* work if you do not use a system service. (effectively, it will be a loud no-op that logs an error on startup).
#
# periodMs is an optional value in milliseconds that specifies the cgroup's CPU accounting period.
# The default is 100 ms (which matches the cgroups2 defaults), and should work in pretty much all cases, but
# it's a knob provided for any addl. tuning purposes.
#
# limitProcess is an optional boolean (default false) that determines if only qemu vCPU threads are put into the cgroup,
# or the entire QEMU process (incl. all its threads). The default behaviour of only limiting vCPU threads
# is more than likely what you want, so the example configuration omits specifying this key.
#
# Commenting or removing this table from the configuration disables resource limiting entirely.
#resourceLimits = { cpuUsageMax = 100, runOnCpus = [ 2, 4 ] }
# VNC options
# Only used if vm.type is set to "vncvm"
[vncvm]
vncHost = "127.0.0.1"
vncPort = 5900
# startCmd = ""
# stopCmd = ""
# rebootCmd = ""
# restoreCmd = ""
[mysql]
# Configures the MySQL database. This is ONLY required if you use the internal cvmban banning system (configured below)
enabled = false
host = "127.0.0.1"
username = "root"
password = "hunter2"
database = "cvmts"
# This section configures banning users. Note that if you leave this default, banning will NOT function and will be as effective as a kick.
[bans]
# If defined, a command that is run to ban a user from the VM.
# Use $IP to specify an ip and (optionally) use $NAME to specify a username
# bancmd = ""
# If true, enables the internal banning of users using the above MySQL database
cvmban = false
[collaborativevm]
# Node ID for this server
# Make sure this is unique among all the other nodes in a webapp
node = "acoolvm"
# HTML display name shown on the VM list
displayname = "a cool vm!<br>The best CollaborativeVM Instance"
# HTML message shown in the chat when a user joins
motd = "welcome to my vm!"
# Maximum amount of active connections allowed from the same IP.
maxConnections = 2
# Guest username (e.g.: user123)
guestUsername = "user{random:3}"
# The VM screen quality (0-100)
screenQuality = 35
# List of disallowed usernames
usernameblacklist = ["collaborativevm", "system", "hilter", "nazi"]
# Maximum length of a chat message
maxChatLength = 150
# Maximum messages in the chat history buffer before old messages are overwritten
maxChatHistoryLength = 20
# (To disable, set it to false) Limit the amount of users allowed in the turn queue at the same time from the same IP
turnlimit = 2 # maximum
# (To disable, set it to false) Temporarily mute a user if they send more than x messages in n seconds
automute = { seconds = 5, messages = 5 }
# How long a temporary mute lasts, in seconds
tempMuteTime = 40
# How long a turn lasts, in seconds
turnTime = 16
# How long a reset vote lasts, in seconds
voteTime = 80
# How long until another vote can be started, in seconds
voteCooldown = 155
# SHA256 sum of the admin and mod passwords. This can be generated with the following command:
# printf "<password>" | sha256sum -
# Example hash is hunter2 and hunter3
adminpass = "f52fbd32b2b3b86ff88ef6c490628285f482af15ddcb29541f94bcf526a3f6c7"
# To disable the moderator rank, set it to false instead of the SHA256sum
modpass = "fb8c2e2b85ca81eb4350199faddd983cb26af3064614e737ea9f479621cfa57a"
# (To disable, set it to false) SHA256 sum for the password to take a turn. If set to an empty string or not provided, only admins and mods can take turns
turnpass = false
# (To disable the real-time card, set it to 0) Define a real-time minimum limit refresh rate to your VM card on the webapp
cardRefreshRate = 3 # in seconds
# COMING SOON!
[collaborativevm.anyos]
enabled = false
isos = ["computernewb.com/isos/*", "/srv/bestvm/isos/*", "crustywindo.ws/collection/*"]
# A Discord webhook status auto-notifier
[discord.status]
webhookUrl = "https://discord.com/api/v10/webhooks/WEBHOOK_ID/WEBHOOK_TOKEN"
# both can be disabled by changing the string to false
onlineMsg = "hi bestvm is online ;D"
offlineMsg = "hi bestvm is.. off :("
# or false
webhookCustomization = { name = "BestVM Status", icon = "http://example.net/lorem.png" }
# What a moderator can and can't do
[collaborativevm.modPerms]
restore = true
reboot = true
ban = true
forceVote = true
mute = true
kick = true
bypassTurn = true
indefiniteTurn = false
rename = true
grabIP = false
xss = true
hideScreen = false
# "cut" the screen to a client (the screen disappear)
cutScreen = false