-
Notifications
You must be signed in to change notification settings - Fork 25
/
config.example
189 lines (139 loc) · 6.57 KB
/
config.example
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
# Expiry minimum time in minutes
UPLOAD_TIME_MIN = 0
# Expiry maximum time in minutes, setting to 0 will allow lifetime uploads
UPLOAD_TIME_MAX = 129600
# Expiry default time in minutes (must be within the range of 2 above options)
UPLOAD_TIME_DEFAULT = 1440
# Uploads storage physical path
UPLOAD_STORAGE_PATH = /mnt/disk1/uploads/
# Uploads file permissions
UPLOAD_FILE_PERMISSIONS = 0440
# Uploads manage URL path
UPLOAD_MANAGE_ROUTE = /a/
# When a duplicate sha sum match already existing file, create a link instead of creating file.
# If the original file is about to be deleted and there are links, turn one of the links into file.
UPLOAD_TRACK_DUPLICATES = 1
# Can be one of 1, 224, 256, 384, 512 (each value refers to the SHA* type)
# Note that if you change this during production, you will need to recreate your database
UPLOAD_TRACK_DUPLICATES_HASHTYPE = 1
# Enable hashsum calculation of each upload (default is on)
# Hash type is defined in UPLOAD_TRACK_DUPLICATES_HASHTYPE
UPLOAD_HASH_CALCULATION = 1
# clearnet domain via CDN
# UPLOAD_DOMAIN_CLEARNET_CDN = oshi.at
# UPLOAD_DOMAIN_CLEARNET_CDN_PROTO = https
# clearnet domain pointing to direct IP
UPLOAD_DOMAIN_CLEARNET = oshi.at
UPLOAD_DOMAIN_CLEARNET_PROTO = https
# Configure what domains to show in text download links info (console uploads)
# Valid options: ALL, UPLOAD_DOMAIN_CLEARNET, UPLOAD_DOMAIN_CLEARNET_CDN, UPLOAD_DOMAIN_ONION
# ALL shows all defined options
UPLOAD_DOMAINS_ENABLED = ALL
# onion domain
UPLOAD_DOMAIN_ONION = oshiatwowvdbshka.onion
UPLOAD_DOMAIN_ONION_PROTO = http
# domain used in documentation for TCP uploads, if omitted, UPLOAD_DOMAIN_MAIN is used
# UPLOAD_DOMAIN_TCP = oshi.at
# main domain used for admin url and other stuff, can be UPLOAD_DOMAIN_CLEARNET, UPLOAD_DOMAIN_CLEARNET_CDN or UPLOAD_DOMAIN_ONION
UPLOAD_DOMAIN_MAIN = UPLOAD_DOMAIN_CLEARNET
# Use current server's HTTP_HOST param instead of domains defined in config for giving dl links
UPLOAD_LINK_USE_HOST = 1
# max filename length in bytes (because 1 utf-8 char is >1 bytes)
UPLOAD_FILENAME_MAX_LENGTH = 255
# captcha token validity time in seconds
CAPTCHA_TOKEN_EXPIRE_TIME = 300
# require captcha for abuse reports
CAPTCHA_SHOW_FOR_ABUSE = 0
# Show content instead of forcing download when the size it less than indicated value in bytes
# Format is json with keys representing MIME types with or without subtypes. In case subtype isn't specified, any subtype will match.
CONTENT_VIEW_UNTIL_SIZE = { "text" : 5000000, "image" : 10000000, "image/svg" : 0, "application/pdf" : 10000000, "audio" : 50000000, "video" : 50000000 }
# Short URL minimal length
SHORTURL_LENGTH = 4
# Delete files after a number of downloads
DOWNLOAD_LIMIT_PER_FILE = 0
#########################################################################
# Engine admin URL path
ADMIN_ROUTE = /SuPeRsEcReTuRl/
# Engine admin Basic Auth username and password hashed in SHA256 ("hunter2" in config.example )
ADMIN_BASICAUTH_USER = admin
ADMIN_BASICAUTH_PASSWORDHASH = f52fbd32b2b3b86ff88ef6c490628285f482af15ddcb29541f94bcf526a3f6c7
# Engine admin HOST header restriction. It is safer to have separate domain
# for the admin panel (specially when you hide the IP behind Cloudflare, because
# we don't trust our private data to CDN's)
# Uncomment to enable
#ADMIN_HOST = oshiatwowvdbshka.onion
# Database information
# DB_TYPE must be "sqlite" or "mysql"
# DB_NAME can be a filename or full path in case DB_TYPE is sqlite
DB_TYPE = mysql
DB_HOST = localhost
#DB_PORT = 3306
DB_NAME = uploads
DB_USER = user1
DB_PASS = dummypass
# Launch `webapp.pl` and `tcp.pl` from oshi_run.pl
# Set this option to 0 to launch webapp.pl and tcp.pl manually
MODULES_AUTOSTART = 1
# General functions debug
DEBUG = 0
#########################################################################
# HTTP upload max file size in megabytes
HTTP_UPLOAD_FILE_MAX_SIZE = 1000
# HTTP main app & POST uploads listen address and port, * for listening on all interfaces
HTTP_APP_ADDRESS = *
HTTP_APP_PORT = 4019
# HTTP app workers to prefork
HTTP_APP_WORKERS = 4
# HTTP app pid file
#HTTP_APP_PIDFILE = /tmp/hypnotoad_oshi.pid
# HTTP PUT uploads listen address and port
#HTTP_PUT_ADDRESS = ::
#HTTP_PUT_PORT = 4020
# HTTP PUT uploads timeout for new connection without data
#HTTP_PUT_INACTIVE_TIMEOUT_CONNECTION = 4
# HTTP PUT timeout for connection with data
#HTTP_PUT_INACTIVE_TIMEOUT_UPLOAD = 30
# HTTP PUT server verbosity level from 0 to 2
#HTTP_PUT_DEBUG = 0
# A path to allow non-encrypted downloads/uploads via HTTP
# May be extremely useful in rare cases with very old browsers (i.e. download Firefox using IE on Windows XP)
# It requires specific reverse-proxy configuration to serve this path without SSL/TLS
# Setting this to a value like 'nossl' will make possible the following non-https requests:
# GET http://oshi.at/nossl (main page)
# GET http://oshi.at/nossl/somefile (downloads)
# POST http://oshi.at/nossl (uploads)
# PUT http://oshi.at/nossl/ (uploads)
HTTP_INSECUREPATH = nossl
#########################################################################
# TCP upload max file size in megabytes
TCP_UPLOAD_FILE_MAX_SIZE = 150
# TCP upload max RAM buffers size in megabytes
TCP_UPLOAD_MEMORY_MAX_SIZE = 2000
# TCP raw binary mode listen address and port
TCP_RAW_ADDRESS = ::
TCP_RAW_PORT = 7777
# TCP base64 mode listen address and port
TCP_BASE64_ADDRESS = ::
TCP_BASE64_PORT = 7778
# TCP hex mode listen address and port
TCP_HEX_ADDRESS = ::
TCP_HEX_PORT = 7779
# TCP uploads timeout for new connection without data
TCP_INACTIVE_TIMEOUT_CONNECTION = 4
# TCP uploads timeout for connection with data
TCP_INACTIVE_TIMEOUT_UPLOAD = 30
# TCP server verbosity level from 0 to 2
TCP_DEBUG = 0
#########################################################################
# Scan uploaded files with clamav that match MIME types listed in CLAMAV_SCANS_TYPES (space-separated)
# Infected files will be toggled to autodestroy=on and have that toggle locked for a user
# apt-get install clamav-daemon clamav-freshclam # to install clamav on Ubuntu/Debian
# Make sure clamd user (usually `clamav`) has access to the group of uploaded files (or modify UPLOAD_FILE_PERMISSIONS)
CLAMAV_SCANS_ENABLED = 0
CLAMAV_SCANS_TYPES = application/x-dosexec application/x-executable application/zip
CLAMAV_SCANS_LOG = /tmp/infected_uploads_log
# Enforce "Destroy after download" option on some file types (multiple mime types separated by space)
UPLOAD_FORCE_DESTROYONDL_TYPES = application/x-dosexec
UPLOAD_FORCE_DESTROYONDL_EXTENSIONS = exe apk
# Allow certain amount of downloads before removing the file affected by UPLOAD_FORCE_DESTROYONDL_* match
UPLOAD_FORCE_DESTROYONDL_AFTER_HITS = 4