126 lines
5.4 KiB
YAML
126 lines
5.4 KiB
YAML
# -----------------------
|
|
# EXAMPLE CONFIGURATION
|
|
# -----------------------
|
|
|
|
# Rename this file to "config.yml" before you start Tytanium,
|
|
# or copy the contents of this file to a file named "config.yml"
|
|
# that you made beforehand.
|
|
|
|
# NOTE: At the very minimum, you must set the value MasterKey under Security.
|
|
|
|
Storage: # Configure options relating to file storage.
|
|
# If there is another directory you want to save files to (instead of "files" in the executable's
|
|
# directory), then specify an absolute path here.
|
|
Directory:
|
|
# The size (in bytes) a file can be.
|
|
# There will always be 2048 bytes added on top of this so that the server can respond.
|
|
MaxSize:
|
|
# The ID length to use. (e.g: xxxxx.png has an ID length of 5).
|
|
# IDs are composed of alphanumeric characters only (A-Z, a-z, 0-9).
|
|
IDLength:
|
|
# How many times an ID should be checked to see if a duplicate exists.
|
|
# If it exceeds this number, the file is not created and returns an error instead.
|
|
CollisionCheckAttempts:
|
|
|
|
RateLimit: # Limit the amount of requests users are allowed to make.
|
|
# When to reset the rate limit imposed on an IP, in milliseconds.
|
|
ResetAfter:
|
|
Path: # Rate limits per path.
|
|
# Handles the /upload path alone. This means that the rate limit for this path is exclusive to the path only.
|
|
# If not specified there will be no rate limit for the upload path.
|
|
Upload:
|
|
# This is the GLOBAL rate limit.
|
|
# All requests to the server are limited to this number, per minute.
|
|
# If a per-route rate limit exceeds this number it will be overridden by this number.
|
|
# If not specified a rate limit will not exist.
|
|
Global:
|
|
Bandwidth: # Limit the amount of data IPs can download/upload.
|
|
# When to reset the bandwidth rate limit, in milliseconds.
|
|
ResetAfter:
|
|
# How many bytes an IP address can download/upload in the allotted time frame (specified by resetafter).
|
|
# These default values are download 50 MB in 5 minutes or upload 250 MB in 5 minutes.
|
|
# If they are not specified there will be no restrictions on bandwidth.
|
|
Download:
|
|
Upload:
|
|
|
|
Filter: # Configure which file types are allowed to be uploaded.
|
|
# A list of mime types to block from loading completely.
|
|
# If no values are given, a blacklist will not be set.
|
|
# This default list blocks unknown file types and unwanted files (typically), mainly applications.
|
|
Blacklist:
|
|
- application/octet-stream
|
|
- application/vnd.microsoft.portable-executable
|
|
- application/x-msdos-program
|
|
- application/x-executable
|
|
- application/x-sqlite3
|
|
- application/x-object
|
|
- application/x-elf
|
|
# If this list is populated, then Tytanium will ONLY allow these mime types to be displayed.
|
|
# If a mime type from this list is also in the sanitize list, it will be sanitized.
|
|
# If a mime type from this list is also in the blacklist, it will be blacklisted anyway.
|
|
# If no values are given, a whitelist will not be set.
|
|
Whitelist:
|
|
# A list of mime types to render as text/plain. Effective against documents like HTML to prevent phishing.
|
|
# If no values are given, no mime types will be sanitized. It is highly recommended you at least keep text/html.
|
|
Sanitize:
|
|
- text/html
|
|
- text/x-php
|
|
- application/javascript
|
|
- application/x-python
|
|
- text/x-lua
|
|
- text/x-perl
|
|
|
|
Security: # Options relating to security and authorization.
|
|
# The key that allows uploading.
|
|
MasterKey:
|
|
|
|
Server: # Configure the way the HTTP server behaves.
|
|
# The port to listen on. The default is 3030.
|
|
Port:
|
|
# How many TOTAL requests the server can handle at once.
|
|
# Requests will not be served to ANYONE if the # of simultaneous connections is above this number.
|
|
# It is recommended you keep this value around 512 to avoid issues with high-traffic situations.
|
|
Concurrency:
|
|
# How long (in milliseconds) the server has to read the request body.
|
|
# Default is 300000 (5 minutes).
|
|
ReadTimeout:
|
|
# How long (in milliseconds) the server has to write a response back to the client.
|
|
# Default is 300000 (5 minutes).
|
|
WriteTimeout:
|
|
|
|
Redis: # Configure the Redis connection. The values in this section are self-explanatory.
|
|
URI:
|
|
Password:
|
|
DB: 0
|
|
|
|
# A boolean. Set this value to true if you want to have /stats show more data, including memory usage.
|
|
MoreStats:
|
|
|
|
# Force zero-width URLs, regardless or not if ?zerowidth=1 is specified in the POST request.
|
|
ForceZeroWidth: false
|
|
|
|
# How often (in milliseconds) the server should update the stats of the server. Default is 30000.
|
|
StatsCollectionInterval:
|
|
|
|
Logging: # Configure logging behavior.
|
|
# Should events be logged to a text file in the first place? (Default is true)
|
|
Enabled:
|
|
|
|
# If logging is enabled, where should logs be written to? (Default is "log.txt" file in the project dir)
|
|
LogFile:
|
|
|
|
Encryption: # Configure encryption behavior.
|
|
# The length of the encryption key that is used in the query string (enc_key) when decoding files.
|
|
# Try not to make it too long or URLs will be abnormally long.
|
|
# By default, the length is 12.
|
|
EncryptionKeyLength:
|
|
|
|
# The string which helps in creating the encryption key for files.
|
|
# You don't have to keep it private, and it can be any string.
|
|
# Keep in mind that if you change this, files previously encrypted using this nonce will be impossible to decrypt.
|
|
Nonce:
|
|
|
|
# The URL from which this server will be accessible from, for example, https://example.com.
|
|
# If you have multiple proxy domains, pick one of them to use here;
|
|
# it doesn't matter as long as it connects to the server.
|
|
Domain: |