A VPN as fine as long as proxies are not needed. If you have to specify proxies, then Homebrew needs some environment variables for the Terminal environment.
export http_proxy=http://url.of.proxy.server:nnnn # where nnnn is the proxy server port number
export https_proxy=http://url.of.proxy.server:nnnn # where nnnn is the proxy server port number
But this is ONLY necessary if your VPN requires you setup proxy information when using the VPN. Generally this is not the case for home VPN users, but it is very common for employees that have to VPN into their corporate network which isolates the corporate internal network behind a corporate firewall, and the proxy server is needed to get out to the public Internet.