2020-12-29 09:01:31 +01:00
|
|
|
#!/usr/bin/env python3
|
2015-07-14 16:21:38 +02:00
|
|
|
|
|
|
|
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 16:49:37 +02:00
|
|
|
"tls-ticket-key-cipher",
|
2015-07-23 16:54:56 +02:00
|
|
|
"host-rewrite",
|
2015-07-25 15:22:17 +02:00
|
|
|
"tls-session-cache-memcached",
|
2016-02-11 14:56:45 +01:00
|
|
|
"tls-session-cache-memcached-tls",
|
2015-07-27 17:54:44 +02:00
|
|
|
"tls-ticket-key-memcached",
|
2015-07-27 18:02:33 +02:00
|
|
|
"tls-ticket-key-memcached-interval",
|
2015-07-27 18:17:29 +02:00
|
|
|
"tls-ticket-key-memcached-max-retry",
|
|
|
|
"tls-ticket-key-memcached-max-fail",
|
2015-10-05 17:10:42 +02:00
|
|
|
"mruby-file",
|
2015-09-06 11:39:32 +02:00
|
|
|
"accept-proxy-protocol",
|
2015-07-14 16:21:38 +02:00
|
|
|
"conf",
|
2015-10-03 00:32:58 +02:00
|
|
|
"fastopen",
|
2015-10-21 12:22:46 +02:00
|
|
|
"tls-dyn-rec-warmup-threshold",
|
2016-01-15 15:04:58 +01:00
|
|
|
"tls-dyn-rec-idle-timeout",
|
|
|
|
"add-forwarded",
|
|
|
|
"strip-incoming-forwarded",
|
|
|
|
"forwarded-by",
|
2016-02-06 04:25:34 +01:00
|
|
|
"forwarded-for",
|
|
|
|
"response-header-field-buffer",
|
2016-02-06 09:05:14 +01:00
|
|
|
"max-response-header-fields",
|
2016-02-06 09:22:23 +01:00
|
|
|
"request-header-field-buffer",
|
|
|
|
"max-request-header-fields",
|
|
|
|
"header-field-buffer",
|
|
|
|
"max-header-fields",
|
2021-04-02 15:31:15 +02:00
|
|
|
"no-http2-cipher-block-list",
|
2016-02-06 11:50:21 +01:00
|
|
|
"no-http2-cipher-black-list",
|
2016-02-06 16:16:14 +01:00
|
|
|
"backend-http1-tls",
|
2016-02-12 16:20:38 +01:00
|
|
|
"tls-session-cache-memcached-cert-file",
|
2016-02-13 10:17:11 +01:00
|
|
|
"tls-session-cache-memcached-private-key-file",
|
2016-02-13 10:45:23 +01:00
|
|
|
"tls-session-cache-memcached-address-family",
|
2016-02-13 10:17:11 +01:00
|
|
|
"tls-ticket-key-memcached-tls",
|
|
|
|
"tls-ticket-key-memcached-cert-file",
|
2016-02-13 10:45:23 +01:00
|
|
|
"tls-ticket-key-memcached-private-key-file",
|
|
|
|
"tls-ticket-key-memcached-address-family",
|
2016-02-27 16:06:40 +01:00
|
|
|
"backend-address-family",
|
|
|
|
"frontend-http2-max-concurrent-streams",
|
2016-02-28 09:11:12 +01:00
|
|
|
"backend-http2-max-concurrent-streams",
|
2016-02-28 13:35:26 +01:00
|
|
|
"backend-connections-per-frontend",
|
2016-02-28 14:15:49 +01:00
|
|
|
"backend-tls",
|
2016-03-19 15:41:21 +01:00
|
|
|
"backend-connections-per-host",
|
|
|
|
"error-page",
|
2016-05-06 16:10:09 +02:00
|
|
|
"no-kqueue",
|
2016-05-21 07:13:57 +02:00
|
|
|
"frontend-http2-settings-timeout",
|
|
|
|
"backend-http2-settings-timeout",
|
2016-06-04 10:24:54 +02:00
|
|
|
"api-max-request-body",
|
2016-06-21 17:13:43 +02:00
|
|
|
"backend-max-backoff",
|
2016-08-26 15:28:09 +02:00
|
|
|
"server-name",
|
2016-08-31 16:47:15 +02:00
|
|
|
"no-server-rewrite",
|
2016-09-08 15:49:36 +02:00
|
|
|
"frontend-http2-optimize-write-buffer-size",
|
|
|
|
"frontend-http2-optimize-window-size",
|
2016-09-09 14:05:37 +02:00
|
|
|
"frontend-http2-window-size",
|
|
|
|
"frontend-http2-connection-window-size",
|
|
|
|
"backend-http2-window-size",
|
|
|
|
"backend-http2-connection-window-size",
|
2016-09-12 15:53:02 +02: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 03:50:28 +02:00
|
|
|
"ecdh-curves",
|
2016-10-08 12:03:21 +02:00
|
|
|
"tls-sct-dir",
|
2016-10-10 15:50:41 +02:00
|
|
|
"backend-connect-timeout",
|
2016-12-10 09:48:28 +01:00
|
|
|
"dns-cache-timeout",
|
2016-12-10 16:50:16 +01:00
|
|
|
"dns-lookup-timeout",
|
|
|
|
"dns-max-try",
|
2016-12-23 03:01:29 +01:00
|
|
|
"frontend-keep-alive-timeout",
|
2017-01-07 15:42:51 +01:00
|
|
|
"psk-secrets",
|
2017-01-07 16:24:33 +01:00
|
|
|
"client-psk-secrets",
|
2021-04-02 15:31:15 +02:00
|
|
|
"client-no-http2-cipher-block-list",
|
2017-01-08 14:33:19 +01:00
|
|
|
"client-no-http2-cipher-black-list",
|
2017-01-08 14:40:58 +01:00
|
|
|
"client-ciphers",
|
2017-01-11 11:27:08 +01:00
|
|
|
"accesslog-write-early",
|
2017-02-13 15:34:45 +01:00
|
|
|
"tls-min-proto-version",
|
|
|
|
"tls-max-proto-version",
|
2017-02-18 10:23:06 +01:00
|
|
|
"redirect-https-port",
|
2017-02-20 15:36:50 +01:00
|
|
|
"frontend-max-requests",
|
2017-02-21 14:19:34 +01:00
|
|
|
"single-thread",
|
2017-04-06 12:53:39 +02:00
|
|
|
"single-process",
|
2017-04-05 15:50:18 +02:00
|
|
|
"no-add-x-forwarded-proto",
|
|
|
|
"no-strip-incoming-x-forwarded-proto",
|
2017-05-18 14:11:10 +02:00
|
|
|
"ocsp-startup",
|
2017-05-25 15:12:54 +02:00
|
|
|
"no-verify-ocsp",
|
2018-02-08 08:51:23 +01:00
|
|
|
"verify-client-tolerate-expired",
|
2018-08-28 10:50:01 +02:00
|
|
|
"ignore-per-pattern-mruby-error",
|
2018-09-08 12:22:30 +02:00
|
|
|
"tls-no-postpone-early-data",
|
2018-05-20 15:54:59 +02:00
|
|
|
"tls-max-early-data",
|
2018-09-09 09:32:34 +02:00
|
|
|
"tls13-ciphers",
|
|
|
|
"tls13-client-ciphers",
|
2018-09-09 15:37:22 +02:00
|
|
|
"no-strip-incoming-early-data",
|
2015-07-14 16:21:38 +02: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 14:39:33 +02:00
|
|
|
"tls_cipher",
|
|
|
|
"tls_protocol",
|
|
|
|
"tls_session_id",
|
|
|
|
"tls_session_reused",
|
2017-04-18 15:44:26 +02:00
|
|
|
"tls_sni",
|
2017-10-31 13:41:40 +01:00
|
|
|
"tls_client_fingerprint_sha256",
|
|
|
|
"tls_client_fingerprint_sha1",
|
2017-10-29 13:44:51 +01:00
|
|
|
"tls_client_subject_name",
|
2017-11-15 15:41:47 +01:00
|
|
|
"tls_client_issuer_name",
|
2017-11-16 13:40:33 +01:00
|
|
|
"tls_client_serial",
|
2016-08-04 17:04:47 +02:00
|
|
|
"backend_host",
|
|
|
|
"backend_port",
|
2020-09-19 16:58:37 +02:00
|
|
|
"method",
|
|
|
|
"path",
|
|
|
|
"path_without_query",
|
|
|
|
"protocol_version",
|
2015-07-14 16:21:38 +02:00
|
|
|
]
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
2018-10-17 04:21:06 +02: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')
|