How to make Google Drive work with Squid

After I enable HTTPS decryption and filtering (SSL Bump) on Squid the Google Drive client application stops working. Why?

Google Drive application uses SSL Certificate Pinning, when the application knows what certificate to expect when accessing remote Google Drive servers. When you enable HTPS decryption of proxy, default HTTPS certificate is replaced with a ‘mimicked’ one; the application detects that and refuses to function.

In order to exclude Google Drive from HTTPS filtering add the following domain names to UI / Squid / Exclusions / Domain Name. Click ‘Save and Restart’ green button in the top right corner afterwards. Please note the dot at the beginning of some domain names is important!

accounts.google.com
.googleapis.com
drive.google.com
dl.google.com
one.google.com
play.google.com

After reboot of the client machine Google Drive will work. If anything still does not work, see the log of the Google Drive application at C:\Users\YOURUSER\AppData\Local\Google\Drive\user_default\sync_log.log.