About the dns configuration of haproxy2.5

I really like the power of haproxy, it has excellent load capabilities, and a powerful customizable configuration that makes me love it. Since I have been using the 1.8 function, after seeing the official 2.5 version quic today, I have the urge to upgrade, so I installed the 2.5 version, but I seem to encounter some difficult problems, because I am not a professional operation and maintenance, Just a hobbyist, so please help me change the 1.8 config to its 2.5 usable config.

The following is the configuration available in my previous version 1.8. The function to be implemented is that example1.domain.com is bound to a dynamic domain name. If the ip of example1.domain.com changes, it can be checked through resolvers dns check and attached My record:

frontend layer4_forward
	mode tcp
	bind :443

	tcp-request inspect-delay 3s
	tcp-request content accept if { req.ssl_hello_type 1 }

	use_backend exp1.com if { req_ssl_sni -i exp1.com }
	use_backend exp2.com if { req_ssl_sni -i exp2.com }

backend exp1.com
	mode tcp
	server upstream exp1.com:80 resolvers dns check

backend exp2.com
	mode tcp
	server upstream exp2.com:80 resolvers dns check

resolvers dns
        nameserver googledns 8.8.8.8:53
	hold valid           1s

However, it seems that when I switch to version 2.5, I don’t know much about the configuration. At present, I can only implement the following:

frontend layer4_forward
	mode tcp
	bind :443

	tcp-request inspect-delay 3s
	tcp-request content accept if { req.ssl_hello_type 1 }

	use_backend exp1.com if { req_ssl_sni -i exp1.com }
	use_backend exp2.com if { req_ssl_sni -i exp2.com }

backend exp1.com
	mode tcp
	server upstream exp1.com:80

backend exp2.com
	mode tcp
	server upstream exp2.com:80

I hope the 2.5 version of haproxy also has 1.8 dns resolution, how to configure it? Can you give me a ready-made template (help me modify it on the basis of my template)

I really hope that I can enjoy the fun that 2.5 gives me, and I urge you to help me, thank you very much!