2015-07-14 14:21:38 +00:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
|
|
|
from gentokenlookup import gentokenlookup
|
|
|
|
|
|
|
|
OPTIONS = [
|
|
|
|
"private-key-file",
|
|
|
|
"private-key-passwd-file",
|
|
|
|
"certificate-file",
|
|
|
|
"dh-param-file",
|
|
|
|
"subcert",
|
|
|
|
"backend",
|
|
|
|
"frontend",
|
|
|
|
"workers",
|
|
|
|
"http2-max-concurrent-streams",
|
|
|
|
"log-level",
|
|
|
|
"daemon",
|
|
|
|
"http2-proxy",
|
|
|
|
"http2-bridge",
|
|
|
|
"client-proxy",
|
|
|
|
"add-x-forwarded-for",
|
|
|
|
"strip-incoming-x-forwarded-for",
|
|
|
|
"no-via",
|
|
|
|
"frontend-http2-read-timeout",
|
|
|
|
"frontend-read-timeout",
|
|
|
|
"frontend-write-timeout",
|
|
|
|
"backend-read-timeout",
|
|
|
|
"backend-write-timeout",
|
|
|
|
"stream-read-timeout",
|
|
|
|
"stream-write-timeout",
|
|
|
|
"accesslog-file",
|
|
|
|
"accesslog-syslog",
|
|
|
|
"accesslog-format",
|
|
|
|
"errorlog-file",
|
|
|
|
"errorlog-syslog",
|
|
|
|
"backend-keep-alive-timeout",
|
|
|
|
"frontend-http2-window-bits",
|
|
|
|
"backend-http2-window-bits",
|
|
|
|
"frontend-http2-connection-window-bits",
|
|
|
|
"backend-http2-connection-window-bits",
|
|
|
|
"frontend-no-tls",
|
|
|
|
"backend-no-tls",
|
|
|
|
"backend-tls-sni-field",
|
|
|
|
"pid-file",
|
|
|
|
"user",
|
|
|
|
"syslog-facility",
|
|
|
|
"backlog",
|
|
|
|
"ciphers",
|
|
|
|
"client",
|
|
|
|
"insecure",
|
|
|
|
"cacert",
|
|
|
|
"backend-ipv4",
|
|
|
|
"backend-ipv6",
|
|
|
|
"backend-http-proxy-uri",
|
|
|
|
"read-rate",
|
|
|
|
"read-burst",
|
|
|
|
"write-rate",
|
|
|
|
"write-burst",
|
|
|
|
"worker-read-rate",
|
|
|
|
"worker-read-burst",
|
|
|
|
"worker-write-rate",
|
|
|
|
"worker-write-burst",
|
|
|
|
"npn-list",
|
|
|
|
"tls-proto-list",
|
|
|
|
"verify-client",
|
|
|
|
"verify-client-cacert",
|
|
|
|
"client-private-key-file",
|
|
|
|
"client-cert-file",
|
|
|
|
"frontend-http2-dump-request-header",
|
|
|
|
"frontend-http2-dump-response-header",
|
|
|
|
"http2-no-cookie-crumbling",
|
|
|
|
"frontend-frame-debug",
|
|
|
|
"padding",
|
|
|
|
"altsvc",
|
|
|
|
"add-request-header",
|
|
|
|
"add-response-header",
|
|
|
|
"worker-frontend-connections",
|
|
|
|
"no-location-rewrite",
|
|
|
|
"no-host-rewrite",
|
|
|
|
"backend-http1-connections-per-host",
|
|
|
|
"backend-http1-connections-per-frontend",
|
|
|
|
"listener-disable-timeout",
|
|
|
|
"tls-ticket-key-file",
|
|
|
|
"rlimit-nofile",
|
|
|
|
"backend-request-buffer",
|
|
|
|
"backend-response-buffer",
|
|
|
|
"no-server-push",
|
|
|
|
"backend-http2-connections-per-worker",
|
|
|
|
"fetch-ocsp-response-file",
|
|
|
|
"ocsp-update-interval",
|
|
|
|
"no-ocsp",
|
|
|
|
"include",
|
2015-07-28 14:49:37 +00:00
|
|
|
"tls-ticket-key-cipher",
|
2015-07-23 14:54:56 +00:00
|
|
|
"host-rewrite",
|
2015-07-25 13:22:17 +00:00
|
|
|
"tls-session-cache-memcached",
|
2016-02-11 13:56:45 +00:00
|
|
|
"tls-session-cache-memcached-tls",
|
2015-07-27 15:54:44 +00:00
|
|
|
"tls-ticket-key-memcached",
|
2015-07-27 16:02:33 +00:00
|
|
|
"tls-ticket-key-memcached-interval",
|
2015-07-27 16:17:29 +00:00
|
|
|
"tls-ticket-key-memcached-max-retry",
|
|
|
|
"tls-ticket-key-memcached-max-fail",
|
2015-10-05 15:10:42 +00:00
|
|
|
"mruby-file",
|
2015-09-06 09:39:32 +00:00
|
|
|
"accept-proxy-protocol",
|
2015-07-14 14:21:38 +00:00
|
|
|
"conf",
|
2015-10-02 22:32:58 +00:00
|
|
|
"fastopen",
|
2015-10-21 10:22:46 +00:00
|
|
|
"tls-dyn-rec-warmup-threshold",
|
2016-01-15 14:04:58 +00:00
|
|
|
"tls-dyn-rec-idle-timeout",
|
|
|
|
"add-forwarded",
|
|
|
|
"strip-incoming-forwarded",
|
|
|
|
"forwarded-by",
|
2016-02-06 03:25:34 +00:00
|
|
|
"forwarded-for",
|
|
|
|
"response-header-field-buffer",
|
2016-02-06 08:05:14 +00:00
|
|
|
"max-response-header-fields",
|
2016-02-06 08:22:23 +00:00
|
|
|
"request-header-field-buffer",
|
|
|
|
"max-request-header-fields",
|
|
|
|
"header-field-buffer",
|
|
|
|
"max-header-fields",
|
2016-02-06 10:50:21 +00:00
|
|
|
"no-http2-cipher-black-list",
|
2016-02-06 15:16:14 +00:00
|
|
|
"backend-http1-tls",
|
|
|
|
"backend-tls-session-cache-per-worker"
|
2015-07-14 14:21:38 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
LOGVARS = [
|
|
|
|
"remote_addr",
|
|
|
|
"time_local",
|
|
|
|
"time_iso8601",
|
|
|
|
"request",
|
|
|
|
"status",
|
|
|
|
"body_bytes_sent",
|
|
|
|
"remote_port",
|
|
|
|
"server_port",
|
|
|
|
"request_time",
|
|
|
|
"pid",
|
|
|
|
"alpn",
|
|
|
|
"ssl_cipher",
|
|
|
|
"ssl_protocol",
|
|
|
|
"ssl_session_id",
|
|
|
|
"ssl_session_reused",
|
|
|
|
]
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
gentokenlookup(OPTIONS, 'SHRPX_OPTID', value_type='char', comp_fun='util::strieq_l')
|
2015-07-14 14:36:44 +00:00
|
|
|
gentokenlookup(LOGVARS, 'SHRPX_LOGF', value_type='char', comp_fun='util::strieq_l', return_type='LogFragmentType', fail_value='SHRPX_LOGF_NONE')
|