forked from lox/apt-proxy
-
Notifications
You must be signed in to change notification settings - Fork 30
Expand file tree
/
Copy pathapt-proxy.yaml
More file actions
86 lines (67 loc) · 2.28 KB
/
apt-proxy.yaml
File metadata and controls
86 lines (67 loc) · 2.28 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
# APT Proxy Configuration Example
# Copy this file to one of the following locations:
# - ./apt-proxy.yaml (current directory)
# - /etc/apt-proxy/apt-proxy.yaml (system-wide)
# - ~/.config/apt-proxy/apt-proxy.yaml (user config)
# - ~/.apt-proxy.yaml (user config)
#
# Or specify a custom path with: apt-proxy --config=/path/to/config.yaml
# Environment variable: APT_PROXY_CONFIG_FILE=/path/to/config.yaml
#
# Configuration priority: CLI flags > Environment variables > Config file > Defaults
# Server configuration
server:
# Network interface to bind to
host: 0.0.0.0
# Port to listen on
port: 3142
# Enable verbose debug logging
debug: false
# Cache configuration
cache:
# Directory to store cached packages
dir: /var/cache/apt-proxy
# Maximum cache size in GB (0 to disable size limit).
# When exceeded, least-recently-used files are evicted automatically to keep total size within the limit.
max_size_gb: 20
# Cache TTL in hours (0 to disable TTL-based eviction)
# Default: 168 (7 days)
ttl_hours: 168
# Cache cleanup interval in minutes (0 to disable automatic cleanup)
# Default: 60 (1 hour)
cleanup_interval_min: 60
# Optional: path to distributions/mirrors YAML (distributions.yaml)
# Enables adding or editing distributions and mirrors without recompiling.
# Hot-reload with SIGHUP or POST /api/mirrors/refresh
# distributions_config: ./config/distributions.yaml
# Mirror configuration
# Use full URLs or shortcuts (e.g., cn:tsinghua, cn:ustc, cn:aliyun)
mirrors:
# Ubuntu mirror
ubuntu: cn:tsinghua
# Ubuntu Ports mirror (for ARM, etc.)
ubuntu_ports: ""
# Debian mirror
debian: cn:ustc
# CentOS mirror
centos: ""
# Alpine mirror
alpine: ""
# TLS/HTTPS configuration
tls:
# Enable TLS
enabled: false
# Path to TLS certificate file
cert_file: /etc/ssl/certs/apt-proxy.crt
# Path to TLS private key file
key_file: /etc/ssl/private/apt-proxy.key
# Security configuration
security:
# API key for protected management endpoints
# Supports environment variable expansion: ${APT_PROXY_API_KEY}
api_key: ${APT_PROXY_API_KEY}
# Enable API authentication (automatically enabled when api_key is set)
enable_api_auth: true
# Distribution mode
# Options: all, ubuntu, ubuntu-ports, debian, centos, alpine
mode: all