summaryrefslogtreecommitdiff
path: root/data/templates/system/proxy.j2
diff options
context:
space:
mode:
Diffstat (limited to 'data/templates/system/proxy.j2')
-rw-r--r--data/templates/system/proxy.j27
1 files changed, 7 insertions, 0 deletions
diff --git a/data/templates/system/proxy.j2 b/data/templates/system/proxy.j2
new file mode 100644
index 0000000..0737cd3
--- /dev/null
+++ b/data/templates/system/proxy.j2
@@ -0,0 +1,7 @@
+### autogenerated 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 %}