From b1772a82e5609051d1960c9aa12a8a1674c9dc03 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Wed, 27 Apr 2022 21:44:39 +0200 Subject: system-proxy: T1741: migrate to get_config_dict() --- data/templates/system/proxy.j2 | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 data/templates/system/proxy.j2 (limited to 'data/templates') diff --git a/data/templates/system/proxy.j2 b/data/templates/system/proxy.j2 new file mode 100644 index 000000000..215c4c5c2 --- /dev/null +++ b/data/templates/system/proxy.j2 @@ -0,0 +1,7 @@ +# generated by system-proxy.py +{% if url is vyos_defined and port is vyos_defined %} +{# remove http:// prefix so we can inject a username/password if present #} +export http_proxy=http://{{ username ~ ':' ~ password ~ '@' if username is vyos_defined and password is vyos_defined }}{{ url | replace('http://', '') }}:{{ port }} +export https_proxy=$http_proxy +export ftp_proxy=$http_proxy +{% endif %} -- cgit v1.2.3