A VPN should not affect your tests. Judging by the symptoms, it looks like you are using a proxy, not a VPN. If it's true, the proxy server address should be specified using the --proxy
option as described here mentioned below.
--proxy <host>
Specifies the proxy server used in your local network to access the Internet.
testcafe chrome my-tests/**/*.js --proxy proxy.corp.mycompany.com
testcafe chrome my-tests/**/*.js --proxy 172.0.10.10:8080
You can also specify authentication credentials with the proxy host.
testcafe chrome my-tests/**/*.js --proxy username:password@proxy.mycorp.com
As for the --proxy-bypass
option, it has the opposite meaning. You can use it to specify resources that are not proxied, for example, the ones that are hosted inside of your local network.