summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-07-15 20:56:53 +0200
committerChristian Poessinger <christian@poessinger.com>2020-07-15 20:56:53 +0200
commit63052b8906871dc314945922e7f27ef24e114a45 (patch)
treec9d8dcb7182f1fca288fc86ff3735ad98f4c1d9f /data
parentbee479c9baa92bab3c367d1660061cb8542a67bc (diff)
downloadvyos-1x-63052b8906871dc314945922e7f27ef24e114a45.tar.gz
vyos-1x-63052b8906871dc314945922e7f27ef24e114a45.zip
http-client: T2651: support specifying source-interface/address for curl
Please note that either interface or address can be configured. system { options { http-client { source-interface eth0 source-address 1.1.1.1 } } }
Diffstat (limited to 'data')
-rw-r--r--data/templates/system/curlrc.tmpl8
1 files changed, 8 insertions, 0 deletions
diff --git a/data/templates/system/curlrc.tmpl b/data/templates/system/curlrc.tmpl
new file mode 100644
index 000000000..675e35a0c
--- /dev/null
+++ b/data/templates/system/curlrc.tmpl
@@ -0,0 +1,8 @@
+{% if http_client is defined %}
+{% if http_client.source_interface is defined %}
+--interface "{{ http_client.source_interface }}"
+{% endif %}
+{% if http_client.source_address is defined %}
+--interface "{{ http_client.source_address }}"
+{% endif %}
+{% endif %}