Sync gateway connectivity issue with VPN

We get the below error in our .NET couchbase lite project whenever we try to connect to the sync gateway using VPN from home network. Please advise
Is there any settings we need to do at VPN server?

(POSIXDomain / 108): Unable to read data from the transport connection: An established connection was aborted by the software in your host machine…, activity = Offline

There shouldn’t be. As long as you can access Sync Gateway in your browser Couchbase Lite should be able to talk to it.

Thanks Jim. The other thing is that once we access sync gateway in browser then we are able to connect from CBLite code (using wss://). Don’t know why?

VPN is a complicated business so it will be really hard to say what is happening in that case unfortunately. If it works after a browser access then perhaps you could try accessing it with an HttpClient when your app launches and see if whatever the browser is doing can be emulated.

Yes we do that by using WebClient in .NET Core. But still of no use. Should we use HttpClient?

using (var client = new WebClient())
    client.UseDefaultCredentials = true;
    using (client.OpenRead(InternetConnectionCheckUrl))
        SendNotificationMessage(2002, "Online");

I can’t be sure. VPNs and proxies are complex situations that are almost never the same.