{ "name": "HAProxy", "scopeName": "source.haproxy-config", "patterns": [ { "name": "meta.tag.haproxy-config", "match": "^(backend|defaults|frontend|global|listen|mailers|peers|ruleset|userlist)\\s*(\\S+)?\\s*((\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3})?:\\d{1,5})?(,)?((\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3})?:\\d{1,5})?", "captures": { "2": { "name": "string.unquoted.sectionname.haproxy-config" }, "3": { "name": "variable.parameter.ip-port.haproxy-config" }, "5": { "name": "punctuation.separator.ip.haproxy-config" }, "6": { "name": "variable.parameter.ip-port.haproxy-config" } } }, { "name": "comment.line.number-sign.haproxy-config", "match": "#.+$" }, { "name": "variable.parameter.ip-port.haproxy-config", "match": "(\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3})?:\\d{1,5}" }, { "name": "constant.numeric.haproxy-config", "match": "\\b[0-9]+([\\.:][0-9]+)*[a-z]?\\b" }, { "name": "keyword.other.no-validate-params.haproxy-config", "match": "^\\s*(acl|appsession|backlog|balance|bind|bind-process|block|clitimeout|compression|contimeout|cookie|default-server|default_backend|description|disabled|dispatch|enabled|errorfile|errorloc|errorloc302|errorloc303|filter|force-persist|fullconn|grace|hash-type|http-request|http-response|http-reuse|http-send-name-header|id|ignore-persist|load-server-state-from-file|log|log-format|log-format-sd|log-tag|max-keep-alive-queue|maxconn|mode|monitor-net|monitor-uri|redirect|redisp|redispatch|reqadd|reqallow|reqdel|reqdeny|reqiallow|reqidel|reqideny|reqipass|reqirep|reqitarpit|reqpass|reqrep|reqtarpit|retries|rspadd|rspdel|rspdeny|rspidel|rspideny|rspirep|rsprep|server|server-state-file-name|server-template|source|srvtimeout|stick-table|transparent|unique-id-format|unique-id-header|use-server|use_backend)\\b" }, { "name": "keyword.other.no-validate-params.haproxy-config", "match": "^\\s*(51degrees-cache-size|51degrees-data-file|51degrees-property-name-list|51degrees-property-separator|ca-base|chroot|cpu-map|crt-base|daemon|debug|description|deviceatlas-json-file|deviceatlas-log-level|deviceatlas-properties-cookie|deviceatlas-separator|external-check|gid|group|hard-stop-after|log|log-send-hostname|log-tag|lua-load|max-spread-checks|maxcompcpuusage|maxcomprate|maxconn|maxconnrate|maxpipes|maxsessrate|maxsslconn|maxsslrate|maxzlibmem|nbproc|nbthread|node|noepoll|nogetaddrinfo|nokqueue|nopoll|noreuseport|nosplice|pidfile|presetenv|quiet|resetenv|server-state-base|server-state-file|setenv|spread-checks|ssl-default-bind-ciphers|ssl-default-bind-ciphersuites|ssl-default-bind-options|ssl-default-server-ciphers|ssl-default-server-ciphersuites|ssl-default-server-options|ssl-dh-param-file|ssl-engine|ssl-mode-async|ssl-server-verify|stats|tune.buffers.limit|tune.buffers.reserve|tune.bufsize|tune.chksize|tune.comp.maxlevel|tune.h2.header-table-size|tune.h2.initial-window-size|tune.h2.max-concurrent-streams|tune.http.cookielen|tune.http.logurilen|tune.http.maxhdr|tune.idletimer|tune.lua.forced-yield|tune.lua.maxmem|tune.lua.service-timeout|tune.lua.session-timeout|tune.lua.task-timeout|tune.maxaccept|tune.maxpollevents|tune.maxrewrite|tune.pattern.cache-size|tune.pipesize|tune.rcvbuf.client|tune.rcvbuf.server|tune.recv_enough|tune.sndbuf.client|tune.sndbuf.server|tune.ssl.cachesize|tune.ssl.capture-cipherlist-size|tune.ssl.default-dh-param|tune.ssl.force-private-cache|tune.ssl.lifetime|tune.ssl.maxrecord|tune.ssl.ssl-ctx-cache-size|tune.vars.global-max-size|tune.vars.proc-max-size|tune.vars.reqres-max-size|tune.vars.sess-max-size|tune.vars.txn-max-size|tune.zlib.memlevel|tune.zlib.windowsize|uid|ulimit-n|unix-bind|unsetenv|user|wurfl-cache-size|wurfl-data-file|wurfl-engine-mode|wurfl-information-list|wurfl-information-list-separator|wurfl-useragent-priority)\\b" }, { "name": "keyword.other.no-validate-params.haproxy-config", "match": "\\s+(mailer|timeout)(?=\\s+|$)" }, { "name": "keyword.other.no-validate-params.haproxy-config", "match": "\\s+(disabled|enable|peer)(?=\\s+|$)" }, { "name": "keyword.other.no-validate-params.haproxy-config", "match": "^\\s*(capture|declare|email-alert|external-check|http-check|monitor|option|persist|rate-limit|stats|stick|tcp-check|tcp-request|tcp-response|timeout)\\b" }, { "name": "variable.language.reserved.haproxy-config", "match": "\\s+(abortonclose|accept-invalid-http-request|accept-invalid-http-response|admin|allbackups|auth|capture|check|checkcache|client|client-fin|clitcpka|clitimeout|command|connect|connection|content|contimeout|contstats|cookie|disable-on-404|dontlog-normal|dontlognull|enable|expect|external-check|fail|forceclose|forwardfor|from|hide-version|http-buffer-request|http-ignore-probes|http-keep-alive|http-no-delay|http-pretend-keepalive|http-request|http-server-close|http-tunnel|http-use-proxy-header|http_proxy|httpchk|httpclose|httplog|independent-streams|inspect-delay|ldap-check|level|log-health-checks|log-separate-errors|logasap|mailers|match|myhostname|mysql-check|nolinger|on|originalto|path|persist|pgsql-check|prefer-last-server|queue|rdp-cookie|realm|redis-check|redispatch|refresh|scope|send|send-binary|send-state|server|server-fin|session|sessions|show-desc|show-legends|show-node|smtpchk|socket-stats|splice-auto|splice-request|splice-response|spop-check|srvtcpka|srvtimeout|ssl-hello-chk|store-request|store-response|tarpit|tcp-check|tcp-smart-accept|tcp-smart-connect|tcpka|tcplog|to|transparent|tunnel|uri)(?=\\s+|$)" }, { "name": "variable.language.reserved.haproxy-config", "match": "\\s+(accept-netscaler-cip|accept-proxy|allow-0rtt|alpn|backlog|ca-file|ca-ignore-err|ca-sign-file|ca-sign-pass|ciphers|ciphersuites|crl-file|crt|crt-ignore-err|crt-list|curves|defer-accept|ecdhe|expose-fd|force-sslv3|force-tlsv10|force-tlsv11|force-tlsv12|force-tlsv13|generate-certificates|gid|group|id|interface|level|maxconn|mode|mss|name|namespace|nice|no-ca-names|no-sslv3|no-tls-tickets|no-tlsv10|no-tlsv11|no-tlsv12|no-tlsv13|npn|prefer-client-ciphers|process|severity-output|ssl|ssl-max-ver|ssl-min-ver|strict-sni|tcp-ut|tfo|tls-ticket-keys|transparent|uid|user|v4v6|v6only|verify)(?=\\s+|$)" }, { "name": "variable.language.reserved.haproxy-config", "match": "\\s+(addr|agent-addr|agent-check|agent-inter|agent-port|agent-send|backup|ca-file|check|check-send-proxy|check-sni|check-ssl|ciphers|ciphersuites|cookie|crl-file|crt|disabled|downinter|enabled|error-limit|fall|fastinter|force-sslv3|force-tlsv10|force-tlsv11|force-tlsv12|force-tlsv13|id|init-addr|inter|maxconn|maxqueue|minconn|namespace|no-agent-check|no-backup|no-check|no-check-ssl|no-send-proxy|no-send-proxy-v2|no-send-proxy-v2-ssl|no-send-proxy-v2-ssl-cn|no-ssl|no-ssl-reuse|no-sslv3|no-tls-tickets|no-tlsv10|no-tlsv11|no-tlsv12|no-tlsv13|no-verifyhost|non-stick|observe|on-error|on-marked-down|on-marked-up|port|redir|resolve-net|resolve-opts|resolve-prefer|resolvers|rise|send-proxy|send-proxy-v2|send-proxy-v2-ssl|send-proxy-v2-ssl-cn|slowstart|sni|source|ssl|ssl-max-ver|ssl-min-ver|ssl-reuse|stick|tcp-ut|tls-tickets|track|verify|verifyhost|weight)(?=\\s+|$)" }, { "name": "variable.language.reserved.haproxy-config", "match": "\\s+(type|size|expire|nopurge|peers|store)(?=\\s+)" }, { "name": "variable.language.reserved.haproxy-config", "match": "\\s+(allow|auth|redirect|reject|tarpit|deny|deny_status|add-header|set-challenge|set-header|set-src|set-status|capture|len|id|del-header|set-nice|set-log-level|replace-header|replace-value|set-method|set-uri|add-acl|del-acl|del-map|set-map|set-var|unset-var|track-sc0|track-sc1|track-sc2|sc-inc-gpc0|sc-inc-gpc1|sc-set-gpt0|silent-drop|send-spoe-group|cache-store|cache-use)(?=\\s+)" }, { "name": "variable.language.reserved.extra.haproxy-config", "match": "\\s+(roundrobin|static-rr|leastconn|first|url_param|health|global|httplog|except|kern|user|mail|daemon|auth|syslog|lpr|news|uucp|cron|auth2|ftp|ntp|audit|alert|cron2|local0|local1|local2|local3|local4|local5|local6|local7|emerg|crit|err|warning|notice|info|debug|rewrite|insert|nocache|postonly|indirect|prefix|location|scheme|code|request|response|header|check|cookie|weight|usesrc|http|tcp)(?=\\s+)" }, { "name": "constant.character.escape.haproxy-config", "match": "\\\\" }, { "name": "entity.name.function.hdr.haproxy-config", "match": "\\s+((base|cook|hdr|path|shdr|url|urlp)(_beg|_dir|_dom|_end|_len|_reg|_sub)?)\\b" }, { "name": "keyword.control.directive.module.http.rewrite", "match": "\\b(if|rewrite)\\b" }, { "name": "variable.language.other.haproxy-config", "match": "%\\[[^\\]]+\\]" }, { "name": "keyword.operator.logical.haproxy-config", "match": "\\s+(or|\\|\\||!)\\s+" } ] }