Allow specification of HTTPS proxy; default: DIRECT

This commit is contained in:
Alexander Weidinger 2018-04-27 21:55:44 +02:00
commit c4efef8861
3 changed files with 9 additions and 2 deletions

View file

@ -1,3 +1,3 @@
{% from "apt-cacher/ng/map.jinja" import apt_cacher_ng with context %} {% from "apt-cacher/ng/map.jinja" import apt_cacher_ng with context -%}
Acquire::http::Proxy "http://{{ apt_cacher_ng.server_address }}:{{ apt_cacher_ng.server_port }}"; Acquire::http::Proxy "http://{{ apt_cacher_ng.server_address }}:{{ apt_cacher_ng.server_port }}";
Acquire::https::Proxy "DIRECT"; Acquire::https::Proxy "{{ apt_cacher_ng.https_proxy }}";

View file

@ -13,5 +13,6 @@
'service': 'apt-cacher-ng', 'service': 'apt-cacher-ng',
'credentials': '/etc/apt-cacher-ng/security.conf', 'credentials': '/etc/apt-cacher-ng/security.conf',
'client_config': '/etc/apt/apt.conf.d/80proxy', 'client_config': '/etc/apt/apt.conf.d/80proxy',
'https_proxy': 'DIRECT',
}, },
}, merge=salt['pillar.get']('apt_cacher_ng')) %} }, merge=salt['pillar.get']('apt_cacher_ng')) %}

View file

@ -29,3 +29,9 @@ apt_cacher_ng:
# http://<server_adress>:<server_port>/acng-report.html # http://<server_adress>:<server_port>/acng-report.html
admin_account: root admin_account: root
admin_passwd: admin admin_passwd: admin
# HTTPS proxy
# "special keyword DIRECT meaning to use no proxies"
# - https://linux.die.net/man/5/apt.conf
# Default value ignores proxy for HTTPS connections
https_proxy: DIRECT