diff --git a/params/bind-options.go b/params/bind-options.go index 6724352..07d7384 100644 --- a/params/bind-options.go +++ b/params/bind-options.go @@ -218,6 +218,7 @@ func getBindOptions() []BindOption { &BindOptionValue{Name: "quic-socket"}, &BindOptionValue{Name: "nbconn"}, &BindOptionValue{Name: "guid-prefix"}, + &BindOptionValue{Name: "default-crt"}, } } diff --git a/params/server-options.go b/params/server-options.go index 978454d..99fa7f8 100644 --- a/params/server-options.go +++ b/params/server-options.go @@ -267,6 +267,8 @@ func getServerOptions() []ServerOption { &ServerOptionValue{Name: "log-bufsize"}, &ServerOptionValue{Name: "guid"}, &ServerOptionIDValue{Name: "set-proxy-v2-tlv-fmt"}, + &ServerOptionValue{Name: "pool-conn-name"}, + &ServerOptionValue{Name: "hash-key"}, } } diff --git a/tests/bind_generated_test.go b/tests/bind_generated_test.go index e37c1a6..e191524 100644 --- a/tests/bind_generated_test.go +++ b/tests/bind_generated_test.go @@ -150,11 +150,12 @@ func TestBind(t *testing.T) { "bind :443 nbconn 1": true, "bind :443 nbconn +2": true, "bind :443 guid-prefix guid-example": true, - "bind": false, - "bind :443 quic-cc-algo something": false, - "bind :443 quic-socket something": false, - "---": false, - "--- ---": false, + "bind :443 default-crt foobar.pem.rsa default-crt foobar.pem.ecdsa": true, + "bind": false, + "bind :443 quic-cc-algo something": false, + "bind :443 quic-socket something": false, + "---": false, + "--- ---": false, } parser := &parsers.Bind{} for command, shouldPass := range tests { diff --git a/tests/configs/haproxy_generated.cfg.go b/tests/configs/haproxy_generated.cfg.go index 7f40fea..0a821b5 100644 --- a/tests/configs/haproxy_generated.cfg.go +++ b/tests/configs/haproxy_generated.cfg.go @@ -2026,6 +2026,7 @@ frontend test bind :443 nbconn 1 bind :443 nbconn +2 bind :443 guid-prefix guid-example + bind :443 default-crt foobar.pem.rsa default-crt foobar.pem.ecdsa bind-process all email-alert from admin@example.com email-alert to a@z,x@y @@ -3122,6 +3123,8 @@ var configTests = []configTest{{` command spoa-mirror --runtime 0 --mirror-url {` bind :443 nbconn +2 `, 1}, {` bind :443 guid-prefix guid-example +`, 1}, + {` bind :443 default-crt foobar.pem.rsa default-crt foobar.pem.ecdsa `, 1}, {` dgram-bind :80,:443 `, 1}, diff --git a/tests/integration/frontend_data_test.go b/tests/integration/frontend_data_test.go index 7e1d709..d5b7032 100644 --- a/tests/integration/frontend_data_test.go +++ b/tests/integration/frontend_data_test.go @@ -569,6 +569,10 @@ const frontend_bind443guidprefixguidexample = ` frontend test bind :443 guid-prefix guid-example ` +const frontend_bind443defaultcrtfoobarpemrsadef = ` +frontend test + bind :443 default-crt foobar.pem.rsa default-crt foobar.pem.ecdsa +` const frontend_bindprocessall = ` frontend test bind-process all diff --git a/tests/integration/frontend_test.go b/tests/integration/frontend_test.go index da425da..bcb85e4 100644 --- a/tests/integration/frontend_test.go +++ b/tests/integration/frontend_test.go @@ -68,6 +68,7 @@ func TestWholeConfigsSectionsFrontend(t *testing.T) { {"frontend_bind443crtignoreerrall", frontend_bind443crtignoreerrall}, {"frontend_bind443crtlistcert1pem", frontend_bind443crtlistcert1pem}, {"frontend_bind443curvesECDHECDSAECDHEECDSA", frontend_bind443curvesECDHECDSAECDHEECDSA}, + {"frontend_bind443defaultcrtfoobarpemrsadef", frontend_bind443defaultcrtfoobarpemrsadef}, {"frontend_bind443deferaccept", frontend_bind443deferaccept}, {"frontend_bind443ecdheECDHECDSAECDHEECDSAE", frontend_bind443ecdheECDHECDSAECDHEECDSAE}, {"frontend_bind443exposefdlisteners", frontend_bind443exposefdlisteners}, diff --git a/types/types.go b/types/types.go index 2c635f4..4228d07 100644 --- a/types/types.go +++ b/types/types.go @@ -259,6 +259,7 @@ type ACL struct { //test:ok:bind :443 nbconn 1 //test:ok:bind :443 nbconn +2 //test:ok:bind :443 guid-prefix guid-example +//test:ok:bind :443 default-crt foobar.pem.rsa default-crt foobar.pem.ecdsa type Bind struct { Path string // can be address:port or socket path Params []params.BindOption