mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-11 17:56:37 +08:00
refactor
This commit is contained in:
@@ -0,0 +1,84 @@
|
||||
# This file is generated by OpenFlare. Do not edit manually.
|
||||
worker_processes auto;
|
||||
worker_rlimit_nofile 65535;
|
||||
pid logs/nginx.pid;
|
||||
error_log /data/var/log/openflare/error.log warn;
|
||||
|
||||
events {
|
||||
worker_connections 4096;
|
||||
use epoll;
|
||||
multi_accept on;
|
||||
}
|
||||
|
||||
http {
|
||||
include mime.types;
|
||||
default_type application/octet-stream;
|
||||
map $http_upgrade $connection_upgrade {
|
||||
default upgrade;
|
||||
'' "";
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80 default_server;
|
||||
server_name _;
|
||||
|
||||
return 421;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl default_server;
|
||||
listen 443 quic reuseport default_server;
|
||||
server_name _;
|
||||
|
||||
ssl_reject_handshake on;
|
||||
}
|
||||
log_format openflare_json escape=json '{"ts":"$time_iso8601","host":"$host","path":"$request_uri","remote_addr":"$remote_addr","status":$status,"request_time":$request_time,"bytes_sent":$body_bytes_sent,"request_length":$request_length}';
|
||||
access_log /data/var/log/openflare/access.log openflare_json;
|
||||
sendfile on;
|
||||
tcp_nopush on;
|
||||
tcp_nodelay on;
|
||||
keepalive_timeout 20;
|
||||
keepalive_requests 1000;
|
||||
client_header_timeout 15;
|
||||
client_body_timeout 15;
|
||||
client_max_body_size 64m;
|
||||
large_client_header_buffers 4 16k;
|
||||
send_timeout 30;
|
||||
proxy_connect_timeout 3;
|
||||
proxy_send_timeout 60;
|
||||
proxy_read_timeout 60;
|
||||
proxy_request_buffering off;
|
||||
proxy_buffering on;
|
||||
proxy_buffers 16 16k;
|
||||
proxy_buffer_size 8k;
|
||||
proxy_busy_buffers_size 64k;
|
||||
gzip on;
|
||||
gzip_min_length 1024;
|
||||
gzip_comp_level 5;
|
||||
limit_conn_zone $server_name zone=openflare_conn_per_server:10m;
|
||||
limit_conn_zone $binary_remote_addr zone=openflare_conn_per_ip:10m;
|
||||
lua_shared_dict openflare_observability 10m;
|
||||
lua_shared_dict openflare_pow_challenges 10m;
|
||||
lua_shared_dict openflare_pow_sessions 10m;
|
||||
lua_shared_dict openflare_pow_config 1m;
|
||||
lua_shared_dict openflare_waf_config 1m;
|
||||
init_worker_by_lua_file /data/etc/nginx/lua/observability/init.lua;
|
||||
log_by_lua_file /data/etc/nginx/lua/observability/log.lua;
|
||||
|
||||
server {
|
||||
listen 127.0.0.1:18081;
|
||||
server_name openflare-observability;
|
||||
access_log off;
|
||||
|
||||
location = /openflare/stub_status {
|
||||
stub_status;
|
||||
}
|
||||
|
||||
location = /openflare/observability {
|
||||
default_type application/json;
|
||||
content_by_lua_file /data/etc/nginx/lua/observability/read.lua;
|
||||
}
|
||||
}
|
||||
|
||||
include /data/etc/nginx/conf.d/openflare_routes.conf;
|
||||
}
|
||||
Reference in New Issue
Block a user