Deployment fails on RStudio Connect when proxy settings specified in local .Renvrion

I am currently using the latest version of RStudio connect, and am running into an issue with deploying to the connect server when I configure my corporations proxy settings in R via my local .Renviron. The Connect server is running on a virtual machine behind my corporations firewall and has a nginx server running on it as well so that a vanity path can be used to mask the port number in the url.

If I set my proxy information in my .Renvrion then I get the following:

Response []
  Date: 2018-05-04 13:32
  Status: 200
  Content-Type: text/html; charset=ISO-8859-1
  Size: 12.7 kB

If I run the same command for my connect server I get this:

Response [http://myserver/myconnect]
  Date: 2018-05-04 09:31
  Status: 503
  Content-Type: text/html; charset=utf-8
  Size: 760 B

However, when I remove the proxy settings from the .Renvrion my connect gives a successful response but I get a curl error for any outside site:

Error in curl::curl_fetch_memory(url, handle = handle) : 
  Timeout was reached: Connection timed out after 10016 milliseconds

and again for my connect server:

Response [http://myserver/myconnect]
  Date: 2018-05-04 13:27
  Status: 200
  Content-Type: text/html; charset=utf-8
  Size: 2.46 kB

So my question is whether or not there is a setting on the connect server (either for the connect or nginx) that will allow me to reach the connect server from my local machine while my proxy settings are in my .Renviron?

The reason this is an issue is because httr::GET() appears to be what is used during application deployment to the connect server, so deployment fails when the proxy is set up. However, it is also very tedious to have to enter my proxy settings in every R session that I want to connect to the internet for anything (i.e. github downloads, web scraping).

Hi Tyler,

Can you please email this same question to They'll be able to help you troubleshoot what is going on. This issue can occur if the corporate proxy is not configured to correctly direct traffic to internal servers.



1 Like

Not sure this is the culprit but it is possible that you don't need to a proxy to reach your connect server even if is is outside. Sometimes in company some urls are dealt differently.

Have you tried setting the NO_PROXY environment variable with you connect server domain ?
This variable is for ignoring the proxy for some domain. As google works with proxy, and your connect url not, Ithought of that.

As proxy setting is always painful, I made a :package: to help with that. Basically, it will set up all the environment variable for the session. It is very new and kind of experimental right now bu if you want to try it, feel free


This is great! I haven't tested it with deployment yet but I am able to get a successful response with httr::GET() which is used during deployment.

Your package looks super useful and will be sure to keep track of it!

1 Like

Nice !

It is very recent so it needs to be used and tested to validate some choices before any CRAN publication. I need to add some vignettes too. Also, I have some other ideas to include if needed by others too (Addins, httr proxy config, keyring support for credentials persistence, ...)

If you intend to use it or just test it, I would appreciate some feedbacks and ideas!