Skip to content

Commit 8a38681

Browse files
authored
Enhance deadlight.conf with additional settings
Added new configuration options for plugins, logging, and caching.
1 parent 9f3b2d5 commit 8a38681

1 file changed

Lines changed: 74 additions & 22 deletions

File tree

deadlight.conf.example

Lines changed: 74 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,99 @@
1+
# Deadlight Proxy - Native Configuration
2+
13
[core]
24
port = 8080
35
bind_address = 0.0.0.0
46
max_connections = 500
7+
connection_timeout = 30
8+
buffer_size = 65536
59
log_level = info
10+
log_file =
611
worker_threads = 4
712

813
[ssl]
914
enabled = true
15+
ca_cert_file = /home/thatch/.deadlight/ca.crt
1016
ca_key_file = /home/thatch/.deadlight/ca.key
1117
cert_cache_dir = /tmp/deadlight_certs
18+
cert_cache_size = 1000
19+
cert_validity_days = 30
20+
cipher_suites = HIGH:!aNULL:!MD5
21+
protocols = TLSv1.2,TLSv1.3
1222

1323
[protocols]
1424
http_enabled = true
1525
https_enabled = true
26+
socks4_enabled = true
27+
socks5_enabled = true
1628
connect_enabled = true
29+
imap_enabled = true
30+
imaps_enabled = true
31+
smtp_enabled = true
32+
protocol_detection_timeout = 5
1733

18-
[plugins]
19-
enabled = false
34+
[network]
35+
upstream_timeout = 30
36+
keepalive_timeout = 300
37+
dns_timeout = 5
38+
dns_servers =
39+
ipv6_enabled = true
40+
tcp_nodelay = true
41+
tcp_keepalive = true
42+
connection_pool_size = 10
43+
connection_pool_timeout = 300
44+
connection_pool_max_total = 500
45+
connection_pool_eviction_policy = lru
46+
connection_pool_health_check_interval = 60
47+
connection_pool_reuse_ssl = true
2048

21-
[imap]
22-
# The upstream IMAP server to proxy connections to.
23-
upstream_host = imap.gmail.com
24-
upstream_port = 143
49+
[plugins]
50+
enabled = true
51+
plugin_dir = bin/plugins
52+
autoload = adblocker
53+
builtin_enabled = true
2554

26-
[imaps]
27-
# The upstream IMAPS server to proxy connections to.
28-
# This uses SSL/TLS on port 993.
29-
upstream_host = imap.gmail.com
30-
upstream_port = 993
55+
[plugin.adblocker]
56+
enabled = true
57+
blocklist_url = https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
58+
blocklist_file = /var/cache/deadlight/blocklist.txt
59+
update_interval = 86400
60+
custom_rules =
3161

32-
[smtp]
62+
[plugin.logger]
3363
enabled = true
34-
bridge_mode = true
35-
api_endpoint = https://deadlight.boo/api/email/receive
36-
upstream_host =
37-
upstream_port = 25
64+
log_requests = true
65+
log_responses = false
66+
log_format = combined
67+
log_file = /var/log/deadlight/access.log
68+
max_log_size = 100MB
69+
log_rotation = daily
3870

39-
[api]
71+
[plugin.stats]
4072
enabled = true
41-
blog_endpoint = https://deadlight.boo/api
42-
auth_token_file = /home/thatch/.deadlight/blog_token
73+
stats_interval = 60
74+
history_size = 1440
75+
web_interface = true
76+
web_port = 8081
77+
78+
[plugin.auth]
79+
enabled = false
80+
auth_type = basic
81+
auth_file = /etc/deadlight/users.txt
82+
auth_realm = Deadlight Proxy
83+
require_auth = false
4384

44-
[federation]
85+
[cache]
4586
enabled = true
46-
domain = deadlight.boo
47-
email_address = blog@deadlight.boo
87+
cache_dir = /tmp/deadlight_cache
88+
max_cache_size = 1GB
89+
default_ttl = 3600
90+
cache_methods = GET,HEAD
91+
cache_responses = 200,301,302,404
92+
93+
[security]
94+
enable_security_headers = true
95+
block_private_ips = false
96+
allowed_domains =
97+
blocked_domains =
98+
max_request_size = 10MB
99+
max_header_size = 8KB

0 commit comments

Comments
 (0)