Go to file
Ruben Koster f8c6334461 Added README 2019-02-14 10:10:35 +01:00
cache Document cache package 2019-02-14 09:57:10 +01:00
vendor Extract cache package 2019-02-13 12:21:46 +01:00
.envrc Allow artifactory configuration via environment variables 2019-02-13 15:43:19 +01:00
.gitignore Added build script 2019-02-14 09:57:31 +01:00
README.md Added README 2019-02-14 10:10:35 +01:00
build.sh Added README 2019-02-14 10:10:35 +01:00
go.mod Extract cache package 2019-02-13 12:21:46 +01:00
go.sum Extract cache package 2019-02-13 12:21:46 +01:00
main.go Allow artifactory configuration via environment variables 2019-02-13 15:43:19 +01:00
test.sh Handle redirects for bosh.io 2019-02-13 15:38:49 +01:00

README.md

Artifactory Cache Proxy

This project implements a HTTP proxy which caches all GET requests into Artifactory. It can be configured to use an HTTP proxy itself to access the internet.

Usage

Please follow these instructions to configure your Artifactory repo.

To get a local Artifactory using docker run:

docker run --name artifactory -d \
    -p 8081:8081 docker.bintray.io/jfrog/artifactory-oss:latest

Now lets build and run the proxy:

./build.sh
export ARTIFACTORY_URL=http://localhost:8081/artifactory
export ARTIFACTORY_TOKEN={token from instructions above}
export ARTIFACTORY_REPO={repo name from instructions above}

# optionally configure a proxy to reach the internet
export http_proxy=http://example.com:8080
export https_proxy=http://example.com:8080
./proxy-linux &

# now update proxy config to point to the process
export http_proxy=localhost:8080
export https_proxy=localhost:8080

To test if it works run the following:

curl -k --proxy localhost:8080 https://example.com
# This should give you a response and trigger a caching request

curl -k --proxy localhost:8080 https://example.com
# This request should be served from artifactory