This module allows you to manage proxy settings
salt '*' network.get_http_proxy
salt.modules.proxy.
get_ftp_proxy
(network_service='Ethernet')¶Returns the current ftp proxy settings
The network service to apply the changes to, this only necessary on macOS
CLI Example:
salt '*' proxy.get_ftp_proxy Ethernet
salt.modules.proxy.
get_http_proxy
(network_service='Ethernet')¶Returns the current http proxy settings
The network service to apply the changes to, this only necessary on macOS
CLI Example:
salt '*' proxy.get_http_proxy Ethernet
salt.modules.proxy.
get_https_proxy
(network_service='Ethernet')¶Returns the current https proxy settings
The network service to apply the changes to, this only necessary on macOS
CLI Example:
salt '*' proxy.get_https_proxy Ethernet
salt.modules.proxy.
get_proxy_bypass
(network_service='Ethernet')¶Returns the current domains that can bypass the proxy
The network service to get the bypass domains from, this is only necessary on macOS
CLI Example:
salt '*' proxy.get_proxy_bypass
salt.modules.proxy.
get_proxy_win
()¶Gets all of the proxy settings in one call, only available on Windows
CLI Example:
salt '*' proxy.get_proxy_win
salt.modules.proxy.
set_ftp_proxy
(server, port, user=None, password=None, network_service='Ethernet', bypass_hosts=None)¶Sets the ftp proxy settings
The proxy server to use
The port used by the proxy server
The username to use for the proxy server if required
The password to use if required by the server
The network service to apply the changes to, this only necessary on macOS
The hosts that are allowed to by pass the proxy. Only used on Windows for other OS's use set_proxy_bypass to edit the bypass hosts.
CLI Example:
salt '*' proxy.set_ftp_proxy example.com 1080 user=proxy_user password=proxy_pass network_service=Ethernet
salt.modules.proxy.
set_http_proxy
(server, port, user=None, password=None, network_service='Ethernet', bypass_hosts=None)¶Sets the http proxy settings. Note: On Windows this will override any other proxy settings you have, the preferred method of updating proxies on windows is using set_proxy.
The proxy server to use
The port used by the proxy server
The username to use for the proxy server if required
The password to use if required by the server
The network service to apply the changes to, this only necessary on macOS
The hosts that are allowed to by pass the proxy. Only used on Windows for other OS's use set_proxy_bypass to edit the bypass hosts.
CLI Example:
salt '*' proxy.set_http_proxy example.com 1080 user=proxy_user password=proxy_pass network_service=Ethernet
salt.modules.proxy.
set_https_proxy
(server, port, user=None, password=None, network_service='Ethernet', bypass_hosts=None)¶Sets the https proxy settings. Note: On Windows this will override any other proxy settings you have, the preferred method of updating proxies on windows is using set_proxy.
The proxy server to use
The port used by the proxy server
The username to use for the proxy server if required
The password to use if required by the server
The network service to apply the changes to, this only necessary on macOS
The hosts that are allowed to by pass the proxy. Only used on Windows for other OS's use set_proxy_bypass to edit the bypass hosts.
CLI Example:
salt '*' proxy.set_https_proxy example.com 1080 user=proxy_user password=proxy_pass network_service=Ethernet
salt.modules.proxy.
set_proxy_bypass
(domains, network_service='Ethernet')¶Sets the domains that can bypass the proxy
An array of domains allowed to bypass the proxy
The network service to apply the changes to, this only necessary on macOS
CLI Example:
salt '*' proxy.set_proxy_bypass "['127.0.0.1', 'localhost']"
salt.modules.proxy.
set_proxy_win
(server, port, types=None, bypass_hosts=None)¶Sets the http proxy settings, only works with Windows.
The proxy server to use
The password to use if required by the server
The types of proxy connections should be setup with this server. Valid types are:
http
https
ftp
The hosts that are allowed to by pass the proxy.
CLI Example:
salt '*' proxy.set_http_proxy example.com 1080 types="['http', 'https']"