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",
|
2016-02-12 15:20:38 +00:00
|
|
|
"tls-session-cache-memcached-cert-file",
|
2016-02-13 09:17:11 +00:00
|
|
|
"tls-session-cache-memcached-private-key-file",
|
2016-02-13 09:45:23 +00:00
|
|
|
"tls-session-cache-memcached-address-family",
|
2016-02-13 09:17:11 +00:00
|
|
|
"tls-ticket-key-memcached-tls",
|
|
|
|
"tls-ticket-key-memcached-cert-file",
|
2016-02-13 09:45:23 +00:00
|
|
|
"tls-ticket-key-memcached-private-key-file",
|
|
|
|
"tls-ticket-key-memcached-address-family",
|
2016-02-27 15:06:40 +00:00
|
|
|
"backend-address-family",
|
|
|
|
"frontend-http2-max-concurrent-streams",
|
2016-02-28 08:11:12 +00:00
|
|
|
"backend-http2-max-concurrent-streams",
|
2016-02-28 12:35:26 +00:00
|
|
|
"backend-connections-per-frontend",
|
2016-02-28 13:15:49 +00:00
|
|
|
"backend-tls",
|
2016-03-19 14:41:21 +00:00
|
|
|
"backend-connections-per-host",
|
|
|
|
"error-page",
|
2016-05-06 14:10:09 +00:00
|
|
|
"no-kqueue",
|
2016-05-21 05:13:57 +00:00
|
|
|
"frontend-http2-settings-timeout",
|
|
|
|
"backend-http2-settings-timeout",
|
2016-06-04 08:24:54 +00:00
|
|
|
"api-max-request-body",
|
2016-06-21 15:13:43 +00:00
|
|
|
"backend-max-backoff",
|
2016-08-26 13:28:09 +00:00
|
|
|
"server-name",
|
2016-08-31 14:47:15 +00:00
|
|
|
"no-server-rewrite",
|
2016-09-08 13:49:36 +00:00
|
|
|
"frontend-http2-optimize-write-buffer-size",
|
|
|
|
"frontend-http2-optimize-window-size",
|
2016-09-09 12:05:37 +00:00
|
|
|
"frontend-http2-window-size",
|
|
|
|
"frontend-http2-connection-window-size",
|
|
|
|
"backend-http2-window-size",
|
|
|
|
"backend-http2-connection-window-size",
|
2016-09-12 13:53:02 +00:00
|
|
|
"frontend-http2-encoder-dynamic-table-size",
|
|
|
|
"frontend-http2-decoder-dynamic-table-size",
|
|
|
|
"backend-http2-encoder-dynamic-table-size",
|
|
|
|
"backend-http2-decoder-dynamic-table-size",
|
2016-10-08 01:50:28 +00:00
|
|
|
"ecdh-curves",
|
2016-10-08 10:03:21 +00:00
|
|
|
"tls-sct-dir",
|
2016-10-10 13:50:41 +00:00
|
|
|
"backend-connect-timeout",
|
2016-12-10 08:48:28 +00:00
|
|
|
"dns-cache-timeout",
|
2016-12-10 15:50:16 +00:00
|
|
|
"dns-lookup-timeout",
|
|
|
|
"dns-max-try",
|
2016-12-23 02:01:29 +00:00
|
|
|
"frontend-keep-alive-timeout",
|
2017-01-07 14:42:51 +00:00
|
|
|
"psk-secrets",
|
2017-01-07 15:24:33 +00:00
|
|
|
"client-psk-secrets",
|
2017-01-08 13:33:19 +00:00
|
|
|
"client-no-http2-cipher-black-list",
|
2017-01-08 13:40:58 +00:00
|
|
|
"client-ciphers",
|
2017-01-11 10:27:08 +00:00
|
|
|
"accesslog-write-early",
|
2017-02-13 14:34:45 +00:00
|
|
|
"tls-min-proto-version",
|
|
|
|
"tls-max-proto-version",
|
2017-02-18 09:23:06 +00:00
|
|
|
"redirect-https-port",
|
2017-02-20 14:36:50 +00:00
|
|
|
"frontend-max-requests",
|
2017-02-21 13:19:34 +00:00
|
|
|
"single-thread",
|
2017-04-06 10:53:39 +00:00
|
|
|
"single-process",
|
2017-04-05 13:50:18 +00:00
|
|
|
"no-add-x-forwarded-proto",
|
|
|
|
"no-strip-incoming-x-forwarded-proto",
|
2017-05-18 12:11:10 +00:00
|
|
|
"ocsp-startup",
|
2017-05-25 13:12:54 +00:00
|
|
|
"no-verify-ocsp",
|
2018-02-08 07:51:23 +00:00
|
|
|
"verify-client-tolerate-expired",
|
2018-08-28 08:50:01 +00:00
|
|
|
"ignore-per-pattern-mruby-error",
|
2018-09-08 10:22:30 +00:00
|
|
|
"tls-no-postpone-early-data",
|
2018-05-20 13:54:59 +00:00
|
|
|
"tls-max-early-data",
|
2018-09-09 07:32:34 +00:00
|
|
|
"tls13-ciphers",
|
|
|
|
"tls13-client-ciphers",
|
2018-09-09 13:37:22 +00:00
|
|
|
"no-strip-incoming-early-data",
|
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",
|
2017-04-18 12:39:33 +00:00
|
|
|
"tls_cipher",
|
|
|
|
"tls_protocol",
|
|
|
|
"tls_session_id",
|
|
|
|
"tls_session_reused",
|
2017-04-18 13:44:26 +00:00
|
|
|
"tls_sni",
|
2017-10-31 12:41:40 +00:00
|
|
|
"tls_client_fingerprint_sha256",
|
|
|
|
"tls_client_fingerprint_sha1",
|
2017-10-29 12:44:51 +00:00
|
|
|
"tls_client_subject_name",
|
2017-11-15 14:41:47 +00:00
|
|
|
"tls_client_issuer_name",
|
2017-11-16 12:40:33 +00:00
|
|
|
"tls_client_serial",
|
2016-08-04 15:04:47 +00:00
|
|
|
"backend_host",
|
|
|
|
"backend_port",
|
2020-09-19 14:58:37 +00:00
|
|
|
"method",
|
|
|
|
"path",
|
|
|
|
"path_without_query",
|
|
|
|
"protocol_version",
|
2015-07-14 14:21:38 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
2018-10-17 02:21:06 +00:00
|
|
|
gentokenlookup(OPTIONS, 'SHRPX_OPTID_', value_type='char', comp_fun='util::strieq_l')
|
|
|
|
gentokenlookup(LOGVARS, 'LogFragmentType::', value_type='char', comp_fun='util::strieq_l', return_type='LogFragmentType', fail_value='LogFragmentType::NONE')
|