R (CRAN) configuration

OSA Proxy supports CRAN-compatible repositories and checks downloaded R packages. The PACKAGES, PACKAGES.gz, and PACKAGES.rds indexes are proxied without modification, so R uses scan-package only.

OSA Proxy configuration

Use the https://cloud.r-project.org cloud mirror for public CRAN:

r:
  enabled: true
  repository:
    - name: r
      registry: https://cloud.r-project.org
      scan-package: true
      work-mode: strict_wait

Connecting R

Set the OSA Proxy route in the repos option for one session:

options(repos = c(CRAN = "https://osa-proxy.example.com/r"))
install.packages("jsonlite")

For persistent configuration, add the following to a user or project .Rprofile:

local({
  repos <- getOption("repos")
  repos["CRAN"] <- "https://osa-proxy.example.com/r"
  options(repos = repos)
})

Verify the configuration with:

Rscript -e 'print(getOption("repos")); install.packages("jsonlite")'

When a CodeScoring policy blocks a package, it remains visible in the CRAN index, but OSA Proxy blocks the source or binary archive download. R does not support the scan-manifest parameter.

Was this page helpful?