This article explains the proxy settings required for ESXi to access the internet.
VMware vSphere ESXi 7.0
VMware vSphere ESXi 8.0
ESXi does not download ISO images or patches from the internet. Consequently, there are no native proxy settings available for this purpose on the ESXi host itself.
vCenter Server has a functionality for retrieving ISO images and patches from the internet. Proxy settings can be configured via the vCenter Server Management (VAMI). For detailed instructions, please refer to Configure the DNS, IP Address, and Proxy Settings.