The default download method used for downloading files and installing packages on Windows was changed from wininet to libcurl in R 4.2.0. And wininet was apparently deprecated in R 4.1.1. Could that have been the cause?
Proxy settings are configured different between wininet and libcurl. wininet uses Internet Options and libcurl uses http[s]_proxy environment variables, which I guess would explain why the .Renviron solution worked.
CHANGES IN R 4.2.0
DEPRECATED AND DEFUNCT
- On Windows,
download.file(method = "wininet") no longer supports ‘ftp://’ URIs. (It is no longer the default method, which is "libcurl" and does.)
On Windows, the deprecated method = "wininet" now gives a warning for ‘http://’ and ‘https://’ URIs for both download.file() and url(). (It is no longer the default method.)
CHANGES IN R 4.1.1
DEPRECATED AND DEFUNCT
- On Windows,
method = "wininet" is deprecated for ‘http://’, ‘https://’ and ‘ftp://’ URIs for both download.file and url. (A warning is only given for ‘ftp://’.)
R: R News
Setting Proxies
For the Windows-only method "wininet", the ‘Internet Options’ of the system are used to choose proxies and so on; these are set in the Control Panel and are those used for system browsers.
For the "libcurl" and "curl" methods, proxies can be set via the environment variables http_proxy or ftp_proxy. See libcurl - programming tutorial for further details.
R: Download File from the Internet