proxy
This command specifies a proxy policy that associates a set of URLs with a specific HTTP proxy.
Syntax
proxy pattern off server port [username] [password]
proxy pattern on
no proxy [pattern]
Parameters
- pattern
- Specifies a shell-style match pattern that defines a URL set. The URL set is assigned to a specific HTTP proxy.
off- Specifies that the URL set that the match pattern defines is forwarded to an HTTP proxy. This setting is the default value.
on- Specifies that the URL set that the match pattern defines is not forwarded to an HTTP proxy.
- server
- Specifies the hostname or IP address of the HTTP proxy. With the port, this setting designates the HTTP proxy that services the URL set defined by the match pattern.
- port
- Specifies the listening port on the HTTP proxy. With the hostname or IP address, this setting designates the HTTP proxy that services the URL set defined by the match pattern.
- username
- Specifies the username for proxy authentication.
- password
- Specifies the password alias for proxy authentication.
Guidelines
The proxy command specifies a proxy policy that associates a set of URLs with a specific HTTP proxy. When multiple proxy policies are defined, URLs are evaluated against each policy in order.
Use the no proxy command with the match pattern to remove that specific match. To remove all match patterns, use the no proxy command without arguments.
Examples
- Create two HTTP proxy policies. URLs that match the
http://*.internal.example.compattern are directed to port 8080 onbackoffice. All other URLs are directed to port 8080 oninternet-gateway.# proxy http://*.internal.example.com off backoffice 8080 # proxy * off internet-gateway 8080 - Create two HTTP proxy policies. All URLs are directed to port 8080 on
internet-gateway. The second policy is never reached because all candidate URLs match the first policy.# proxy * off internet-gateway 8080 # proxy http://*.internal.example.com off backoffice 8080 - Create three HTTP proxy policies. URLs that match the
http://*.internal.example.compattern are directed to port 8080 onbackoffice. URLs that match thehttp://*.finance.example.compattern are dropped. All other URLs are directed to port 8080 oninternet-gateway.# proxy http://*.internal.example.com off backoffice 8080 # proxy http://*.finance.example.com on # proxy * off internet-gateway 8080 - Delete an HTTP proxy
policy.
# no proxy http://*.internal.datapower.com off backoffice 8080 - Delete all HTTP proxy policies.
# no proxy