[R] win110 + R 4.3.0 dowload only when method = "wininet"

Howard, Tim G (DEC) t|m@how@rd @end|ng |rom dec@ny@gov
Fri May 12 14:01:51 CEST 2023



Also note that with R version 4.2.1 and later, there's another change for computers within many corporate firewall systems (that monitor network traffic).  The result is that in the default settings R can't connect out to https connections (and thus can't install or update packages). You just get an error that R can't connect, it may be because of the super-special security in your network.


I don't know if this is your issue, but it seemed worth pointing out if so. (and worth getting the word out there for others...)



Here's the discussion of the bug and the patch.




https://bugs.r-project.org/show_bug.cgi?id=18379




If you are in this situation, the fix is to add a new User Environment Variable:



R_LIBCURL_SSL_REVOKE_BEST_EFFORT and set it to TRUE



Tim


>>>>>>
Date: Thu, 11 May 2023 09:39:25 +0300
From: Ivan Krylov <krylov.r00t using gmail.com>
To: =?UTF-8?B?U2ViYXN0acOhbg==?= Kruk Gencarelli
        <zloto_kruk using hotmail.com>
Cc: "r-help using r-project.org" <r-help using r-project.org>
Subject: Re: [R] win110 + R 4.3.0 dowload only when method = "wininet"
Message-ID: <20230511090040.2015ff59 using Tarkus>
Content-Type: text/plain; charset="utf-8"

On Wed, 10 May 2023 22:13:15 +0000
Sebasti�n Kruk Gencarelli <zloto_kruk using hotmail.com> wrote:

> I don�t know what kind of proxy is used by my system.

Do you at least know whether it's an HTTP proxy, a SOCKS proxy, or
something completely different? Do you need to authenticate to the
proxy?

> How I can add my proxy and port to my R configuration?

libcurl recognises the "http_proxy" environment variable, which can
include the protocol, the address and the port of the proxy server:
https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcurl.se%2Flibcurl%2Fc%2FCURLOPT_PROXY.html&data=05%7C01%7Ctim.howard%40dec.ny.gov%7Cba9855f6b8bd4d23531e08db52069dd1%7Cf46cb8ea79004d108ceb80e8c1c81ee7%7C0%7C0%7C638193960595128444%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=UHNtHLqF67%2FGq9%2FILSW6pHmuhhaHsdI1qwl%2FVXun5hI%3D&reserved=0<https://curl.se/libcurl/c/CURLOPT_PROXY.html>

For example, if you have a SOCKS5 hostname-resolving proxy on address
192.2.0.1 and port 1080, you can try calling Sys.setenv('http_proxy' =
'socks5h://192.2.0.1:1080'). For a different example, an HTTP proxy on
198.51.100.2, port 8080 can be set up as Sys.setenv('http_proxy' =
'https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2F198.51.100.2%3A8080%2F&data=05%7C01%7Ctim.howard%40dec.ny.gov%7Cba9855f6b8bd4d23531e08db52069dd1%7Cf46cb8ea79004d108ceb80e8c1c81ee7%7C0%7C0%7C638193960595128444%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=K8Lp3oLzHHA9LxIq6U5QrdQvEV63%2BTVOq930i6HABlw%3D&reserved=0<http://198.51.100.2:8080/>'). (In both cases, the proxy will be used by
curl for HTTP and HTTPS access, but not, say, FTP or other protocols.
For HTTPS via HTTP proxy, curl will be using the CONNECT verb.)

Detecting the right proxy for a given address (and yes, it's expected
to do that per-address) is hard�. It's been a "nice to have" feature in
curl for years: https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcurl.se%2Fdocs%2Ftodo.html%23auto_detect_proxy&data=05%7C01%7Ctim.howard%40dec.ny.gov%7Cba9855f6b8bd4d23531e08db52069dd1%7Cf46cb8ea79004d108ceb80e8c1c81ee7%7C0%7C0%7C638193960595128444%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Ucxe4e4OK%2BSUzB9dhhBPrtcb%2FlLF3bcq6tC1OocY8IM%3D&reserved=0<https://curl.se/docs/todo.html#auto_detect_proxy>, so
I'm afraid it won't happen any time soon. It's unfortunate that the
curl back-end will break something that used to work with wininet.

I wonder whether it could make sense to call
WinHttpGetIEProxyConfigForCurrentUser() [*] when setting up connections
on Windows. There's no simple way to deal with the proxy
auto-configuration file [**], but we could at least call
curl_easy_setopt(handle, CURLOPT_PROXY,
wchar_to_current_locale(proxy_config->lpszProxy)); to make the
transition from wininet to curl slightly less painful. Or would that
break even more installations? This won't help in the more complicated
cases [***], though.

--
Best regards,
Ivan

[*]
https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flearn.microsoft.com%2Fen-us%2Fwindows%2Fwin32%2Fapi%2Fwinhttp%2Fnf-winhttp-winhttpgetieproxyconfigforcurrentuser&data=05%7C01%7Ctim.howard%40dec.ny.gov%7Cba9855f6b8bd4d23531e08db52069dd1%7Cf46cb8ea79004d108ceb80e8c1c81ee7%7C0%7C0%7C638193960595128444%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=ERbQZxCXaR4wc8%2F5%2BRiVYdFt3lmFyCQ29tGYalcljqk%3D&reserved=0<https://learn.microsoft.com/en-us/windows/win32/api/winhttp/nf-winhttp-winhttpgetieproxyconfigforcurrentuser>

[**]
https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdeveloper.mozilla.org%2Fen-US%2Fdocs%2FWeb%2FHTTP%2FProxy_servers_and_tunneling%2FProxy_Auto-Configuration_PAC_file&data=05%7C01%7Ctim.howard%40dec.ny.gov%7Cba9855f6b8bd4d23531e08db52069dd1%7Cf46cb8ea79004d108ceb80e8c1c81ee7%7C0%7C0%7C638193960595128444%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=hFJ6iGbNMzUNZEAvVeFTnjdp%2FKFWBH78nL4HSjoBhlc%3D&reserved=0<https://developer.mozilla.org/en-US/docs/Web/HTTP/Proxy_servers_and_tunneling/Proxy_Auto-Configuration_PAC_file>
Then again, library(V8) is nowadays more or less required for R package
development if not R development proper.

[***]
https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstat.ethz.ch%2Fpipermail%2Fr-help%2F2022-September%2F475917.html&data=05%7C01%7Ctim.howard%40dec.ny.gov%7Cba9855f6b8bd4d23531e08db52069dd1%7Cf46cb8ea79004d108ceb80e8c1c81ee7%7C0%7C0%7C638193960595128444%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=cD%2F0IvD1AIjH1PNDdiW3%2B0u6bKRWMpLMgl4ZH4cGD%2F0%3D&reserved=0<https://stat.ethz.ch/pipermail/r-help/2022-September/475917.html>









	[[alternative HTML version deleted]]



More information about the R-help mailing list