set_proxy: Configure the proxy for internet connection

Description Usage Arguments Value Proxy Environment Variable Examples

View source: R/set.R

Description

this will help to set up the proxy configuration using environment variable

You can set a proxy url across sessions by setting option "proxyconfig.proxy".

Usage

1
2
set_proxy(proxy = getOption("proxyconfig.proxy", default = NA_character_),
  username = NULL, password = NULL, noproxy = NULL, https = TRUE)

Arguments

proxy

a character giving the proxy url. By default, it will fetch for option proxyconfig.proxy that can be set accross sessions in .Rprofile or Rprofile.site.

username

character. If NULL, user will be prompted

password

character. If NULL, user will be prompted

noproxy

character vector of domain that proxy should ignore

https

logical. If TRUE HTTPS_PROXY will be used

Value

TRUE invisibly if no error. Side effects are the environment variables for proxy being set for the session. You can check them with base::Sys.getenv()

FALSE invisibly with a warning if a proxy configuration was already set. You need to unset the configuration with unset_proxy() before setting a new one.

Proxy Environment Variable

The proxy is set using environment variables

This configuration is used by curl for internet connection and other method. See Setting Proxies in utils::download.file()

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
 set_proxy(proxy = "http://10.132.23.444:3232",
           username = "",
           password = "",
           noproxy = ".mycompany.com",
           https = TRUE)
is_proxy_activated(verbose = TRUE)

## End(Not run)

cderv/proxyconfig documentation built on Oct. 7, 2019, 4:33 p.m.