Skip to content

Commit 871a3dd

Browse files
authored
Refactor deadlight.conf.docker configuration format
1 parent 8a38681 commit 871a3dd

1 file changed

Lines changed: 82 additions & 168 deletions

File tree

deadlight.conf.docker

Lines changed: 82 additions & 168 deletions
Original file line numberDiff line numberDiff line change
@@ -1,193 +1,107 @@
1+
# Deadlight Proxy - Docker Configuration
2+
13
[core]
2-
#Listen port for proxy connections
3-
port=8080
4-
#IP address to bind to
5-
bind_address=0.0.0.0
6-
#Maximum concurrent connections
7-
max_connections=500
8-
#Connection timeout in seconds
9-
connection_timeout=30
10-
#Buffer size for data transfer
11-
buffer_size=65536
12-
#Log level: error, warning, info, debug
13-
log_level=info
14-
#Log file path (empty for stdout)
15-
log_file=
16-
# /home/thatch/.deadlight/LOGFILE.txt
17-
#Number of worker threads
18-
worker_threads=4
4+
port = 8080
5+
bind_address = 0.0.0.0
6+
max_connections = 500
7+
connection_timeout = 30
8+
buffer_size = 65536
9+
log_level = info
10+
log_file =
11+
worker_threads = 4
1912

2013
[ssl]
21-
#Enable SSL interception
22-
enabled=true
23-
#CA certificate file
24-
ca_cert_file=/home/thatch/.deadlight/ca/ca.crt
25-
#CA private key file
26-
ca_key_file=/home/thatch/.deadlight/ca/ca.key
27-
#Certificate cache directory
28-
cert_cache_dir=/tmp/deadlight_certs
29-
#Maximum cached certificates
30-
cert_cache_size=1000
31-
#Generated certificate validity period
32-
cert_validity_days=30
33-
#Allowed cipher suites
34-
cipher_suites=HIGH:!aNULL:!MD5
35-
#Allowed SSL/TLS protocols
36-
protocols=TLSv1.2,TLSv1.3
14+
enabled = true
15+
ca_cert_file = /etc/deadlight/ca.crt
16+
ca_key_file = /etc/deadlight/ca.key
17+
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
3722

3823
[protocols]
39-
#Enable HTTP support
40-
http_enabled=true
41-
#Enable HTTPS support
42-
https_enabled=true
43-
#Enable SOCKS4 support
44-
socks4_enabled=true
45-
#Enable SOCKS5 support
46-
socks5_enabled=true
47-
#Enable HTTP CONNECT support
48-
connect_enabled=true
49-
#Enable IMAP support
50-
imap_enabled=true
51-
#Enable IMAPS support
52-
imaps_enabled=true
53-
#Enable SMTP support
54-
smtp_enabled=true
55-
#Protocol detection timeout
56-
protocol_detection_timeout=5
24+
http_enabled = true
25+
https_enabled = true
26+
socks4_enabled = true
27+
socks5_enabled = true
28+
connect_enabled = true
29+
imap_enabled = true
30+
imaps_enabled = true
31+
smtp_enabled = true
32+
protocol_detection_timeout = 5
5733

5834
[network]
59-
#Upstream connection timeout
60-
upstream_timeout=30
61-
#Keep-alive timeout
62-
keepalive_timeout=300
63-
#DNS resolution timeout
64-
dns_timeout=5
65-
#Custom DNS servers (comma-separated)
66-
dns_servers=
67-
#Enable IPv6 support
68-
ipv6_enabled=true
69-
#Enable TCP_NODELAY
70-
tcp_nodelay=true
71-
#Enable TCP keepalive
72-
tcp_keepalive=true
73-
#Max connections per upstream host
74-
connection_pool_size=10
75-
#Idle connection timeout (seconds)
76-
connection_pool_timeout=300
77-
#Total pool size across all hosts
78-
connection_pool_max_total=500
79-
#Pool eviction policy: lru, fifo, none
80-
connection_pool_eviction_policy=lru
81-
#Connection health check interval (seconds)
82-
connection_pool_health_check_interval=60
83-
#Reuse SSL connections from pool
84-
connection_pool_reuse_ssl=true
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
8548

8649
[plugins]
87-
#Enable plugin system
88-
enabled=true
89-
#Plugin directory
90-
plugin_dir=./bin/plugins
91-
#Auto-load plugins
92-
autoload=adblocker,logger,stats
93-
#Enable built-in plugins
94-
builtin_enabled=true
50+
enabled = true
51+
plugin_dir = /usr/local/lib/deadlight/plugins
52+
autoload = adblocker
53+
builtin_enabled = true
9554

9655
[plugin.adblocker]
97-
#Enable ad blocker
98-
enabled=true
99-
#Blocklist URL
100-
blocklist_url=https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
101-
#Local blocklist file
102-
blocklist_file=/var/cache/deadlight/blocklist.txt
103-
#Blocklist update interval (seconds)
104-
update_interval=86400
105-
#Custom blocking rules file
106-
custom_rules=
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 =
10761

10862
[plugin.logger]
109-
#Enable request logging
110-
enabled=true
111-
#Log HTTP requests
112-
log_requests=true
113-
#Log HTTP responses
114-
log_responses=false
115-
#Log format: combined, common, json
116-
log_format=combined
117-
#Access log file
118-
log_file=/var/log/deadlight/access.log
119-
#Maximum log file size
120-
max_log_size=100MB
121-
#Log rotation: daily, weekly, size
122-
log_rotation=daily
63+
enabled = true
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
12370

12471
[plugin.stats]
125-
#Enable statistics collection
126-
enabled=true
127-
#Statistics update interval
128-
stats_interval=60
129-
#Statistics history size (minutes)
130-
history_size=1440
131-
#Enable web statistics interface
132-
web_interface=true
133-
#Web interface port
134-
web_port=8081
72+
enabled = true
73+
stats_interval = 60
74+
history_size = 1440
75+
web_interface = true
76+
web_port = 8081
13577

13678
[plugin.auth]
137-
#Enable authentication
138-
enabled=false
139-
#Authentication type: basic, digest
140-
auth_type=basic
141-
#Authentication file
142-
auth_file=/etc/deadlight/users.txt
143-
#Authentication realm
144-
auth_realm=Deadlight Proxy
145-
#Require authentication for all requests
146-
require_auth=false
79+
enabled = false
80+
auth_type = basic
81+
auth_file = /etc/deadlight/users.txt
82+
auth_realm = Deadlight Proxy
83+
require_auth = false
14784

14885
[cache]
149-
#Enable response caching
150-
enabled=true
151-
#Cache directory
152-
cache_dir=/tmp/deadlight_cache
153-
#Maximum cache size
154-
max_cache_size=1GB
155-
#Default cache TTL (seconds)
156-
default_ttl=3600
157-
#Cacheable HTTP methods
158-
cache_methods=GET,HEAD
159-
#Cacheable response codes
160-
cache_responses=200,301,302,404
86+
enabled = true
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
16192

16293
[security]
163-
#Add security headers
164-
enable_security_headers=true
165-
#Block requests to private IPs
166-
block_private_ips=false
167-
#Allowed domains (whitelist)
168-
allowed_domains=
169-
#Blocked domains (blacklist)
170-
blocked_domains=
171-
#Maximum request size
172-
max_request_size=10MB
173-
#Maximum header size
174-
max_header_size=8KB
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
175100

176101
[vpn]
177-
# Enable VPN gateway (requires root privileges)
178-
enabled=true
179-
device = tun0
180-
tun_device=tun0
181-
address = 10.8.0.1
182-
netmask = 255.255.255.0
183-
upstream_interface = 172.29.16.1 dev eth0 src 172.29.16.185 uid 1000
184-
gateway_ip=10.8.0.1
185-
client_subnet=10.8.0.0/24
186-
# TUN device configuration
187-
device = tun0
188-
address = 10.8.0.1
102+
enabled = false
103+
tun_device = tun0
104+
gateway_ip = 10.8.0.1
105+
client_subnet = 10.8.0.0/24
189106
netmask = 255.255.255.0
190-
# Client IP range
191-
client_network = 10.8.0.0/24
192-
# DNS servers to provide to clients (optional)
193107
dns_servers = 8.8.8.8,8.8.4.4

0 commit comments

Comments
 (0)