-
-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathconfig.example.yaml
More file actions
301 lines (269 loc) · 8.78 KB
/
Copy pathconfig.example.yaml
File metadata and controls
301 lines (269 loc) · 8.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
# Proxy server configuration
# Copy to config.yaml and modify as needed
# Server listen address
listen: ":8080"
# Public URL where this proxy is accessible
# Used for rewriting package metadata URLs
base_url: "http://localhost:8080"
# Artifact storage configuration
storage:
# Storage backend URL
# Supported schemes:
# - file:///path/to/dir - Local filesystem (default)
# - s3://bucket-name - Amazon S3
# - s3://bucket?endpoint=http://localhost:9000 - S3-compatible (MinIO)
#
# For S3, configure credentials via environment variables:
# AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_REGION
url: ""
# Local filesystem path (used when url is empty)
# Deprecated: Use url with file:// scheme instead
path: "./cache/artifacts"
# Maximum cache size (e.g., "10GB", "500MB")
# When exceeded, least recently used artifacts are evicted
# Empty or "0" means unlimited
max_size: ""
# Redirect cached artifact downloads to presigned storage URLs (HTTP 302)
# instead of streaming through the proxy. Only effective for S3 and Azure.
# Leave disabled if clients reach the proxy through an authenticating gateway,
# since presigned URLs bypass it.
direct_serve: false
# How long presigned URLs remain valid (e.g. "5m", "1h"). Default: "15m".
direct_serve_ttl: "15m"
# Public base URL to substitute into presigned URLs. Set this when the
# proxy reaches storage at an internal address (127.0.0.1, a Docker
# service name) but clients must use a public hostname. Only scheme and
# host are used; the signed path and query are preserved. For S3/MinIO
# the reverse proxy at this address must forward requests with the
# internal Host header or the SigV4 signature will not validate.
# direct_serve_base_url: "https://minio.example.com"
# Database configuration
database:
# Database driver: "sqlite" (default) or "postgres"
driver: "sqlite"
# SQLite database file path (used when driver is "sqlite")
path: "./cache/proxy.db"
# PostgreSQL connection URL (used when driver is "postgres")
# Example: "postgres://user:password@localhost:5432/proxy?sslmode=disable"
url: ""
# Logging configuration
log:
# Minimum log level: "debug", "info", "warn", "error"
level: "info"
# Log format: "text" or "json"
format: "text"
# Ecosystem support - routes and upstream repositories
#
# This section is optional, since 'include_default' in each section
# defaults to 'true' and the route map will be populated with all of
# the default routes if no configuration is provided.
ecosystem:
cargo:
include_default: true
# the default route for crates.io
# route:
# - path: /cargo
# upstream:
# - name: crates.io
# index: https://index.crates.io
# crates: https://static.crates.io/crates
composer:
include_default: true
# the default route for packagist.org
# route:
# - path: /composer
# upstream:
# - name: packagist.org
# upstream: https://packagist.org
# repository: https://repo.packagist.org
conan:
include_default: true
# the default route for conan.io
# route:
# - path: /conan
# upstream:
# - name: conan.io
# upstream: https://center.conan.io
conda:
include_default: true
# the default route for anaconda.org
# route:
# - path: /conda
# upstream:
# - name: anaconda.org
# upstream: https://conda.anaconda.org
cran:
include_default: true
# the default route for r-project.org
# route:
# - path: /cran
# upstream:
# - name: r-project.org
# upstream: https://cloud.r-project.org
debian:
include_default: true
# the default route for debian.org
# route:
# - path: /debian
# upstream:
# - name: debian.org
# upstream: http://deb.debian.org/debian
gem:
include_default: true
# the default route for rubygems.org
# route:
# - path: /gem
# upstream:
# - name: rubygems.org
# upstream: https://rubygems.org
go:
include_default: true
# the default route for golang.org
# route:
# - path: /go
# upstream:
# - name: golang.org
# upstream: https://proxy.golang.org
hex:
include_default: true
# the default route for hex.pm
# route:
# - path: /hex
# upstream:
# - name: hex.pm
# upstream: https://repo.hex.pm
maven:
include_default: true
# the default route for maven.org
# route:
# - path: /maven
# upstream:
# - name: maven.org
# upstream: https://repo1.maven.org/maven2
npm:
include_default: true
# the default route for npmjs.org
# route:
# - path: /npm
# upstream:
# - name: npmjs.org
# upstream: https://registry.npmjs.org
nuget:
include_default: true
# the default route for nuget.org
# route:
# - path: /nuget
# upstream:
# - name: nuget.org
# upstream: https://api.nuget.org
oci:
include_default: true
# the default route for docker.io
# route:
# - path: /v2
# upstream:
# - name: docker.io
# registry: https://registry-1.docker.io
# auth: https://auth.docker.io
pub:
include_default: true
# the default route for pub.dev
# route:
# - path: /pub
# upstream:
# - name: pub.dev
# upstream: https://pub.dev
pypi:
include_default: true
# the default route for pypi.org
# route:
# - path: /pypi
# upstream:
# - name: pypi.org
# index: https://pypi.org
# files_host: files.pythonhosted.org
rpm:
include_default: true
# the default route for fedoraproject.org
# route:
# - path: /rpm
# upstream:
# - name: fedoraproject.org
# upstream: https://dl.fedoraproject.org/pub/fedora/linux
# Upstream registry URLs and authentication
upstream:
# npm registry URL
npm: "https://registry.npmjs.org"
# Maven repository URL (used by /maven endpoint)
maven: "https://repo1.maven.org/maven2"
# Gradle Plugin Portal Maven URL (fallback for plugin marker artifacts)
gradle_plugin_portal: "https://plugins.gradle.org/m2"
# Cargo sparse index URL
cargo: "https://index.crates.io"
# Cargo crate download URL
cargo_download: "https://static.crates.io/crates"
# Authentication for upstream registries
# Keys are URL prefixes matched against request URLs.
# Values can reference environment variables using ${VAR_NAME} syntax.
#
# Supported auth types:
# - bearer: Authorization header with Bearer token
# - basic: Authorization header with Basic auth (username:password)
# - header: Custom header name and value
auth:
# Example: npm with bearer token
# "https://registry.npmjs.org":
# type: bearer
# token: "${NPM_TOKEN}"
# Example: GitHub npm registry
# "https://npm.pkg.github.com":
# type: bearer
# token: "${GITHUB_TOKEN}"
# Example: PyPI with basic auth
# "https://pypi.org":
# type: basic
# username: "__token__"
# password: "${PYPI_TOKEN}"
# Example: Custom header for private registry
# "https://maven.mycompany.com":
# type: header
# header_name: "X-Auth-Token"
# header_value: "${MAVEN_TOKEN}"
# Gradle HttpBuildCache configuration
gradle:
build_cache:
# Set to true to disable PUT uploads (read-only cache mode)
read_only: false
# Maximum accepted Gradle cache upload body size
# Required and must be > 0
max_upload_size: "100MB"
# Evict entries older than this age (set to "0" to disable age-based eviction)
max_age: "168h"
# Cap total Gradle cache size; oldest entries are deleted first
# ("0" disables size-based eviction)
# max_size: "20GB"
# How often eviction runs when max_age or max_size is set
sweep_interval: "10m"
# Health endpoint configuration.
health:
# Minimum time between storage backend probes.
# The /health endpoint runs a write/read/verify/delete round-trip
# against the configured storage backend and caches the result for
# this interval. Set to "0" to probe on every request.
# Default: "30s".
storage_probe_interval: "30s"
# Version cooldown configuration
# Hides package versions published too recently, giving the community time
# to spot malicious releases before they're pulled into projects.
# Supported durations: "7d" (days), "48h" (hours), "30m" (minutes), "0" (disabled)
cooldown:
# Global default cooldown for all ecosystems
# default: "3d"
# Per-ecosystem overrides
# ecosystems:
# npm: "7d"
# cargo: "0"
# Per-package overrides (keyed by PURL)
# packages:
# "pkg:npm/lodash": "0"
# "pkg:npm/@babel/core": "14d"