Package org.microproxy
Class NoProxyRules
java.lang.Object
org.microproxy.NoProxyRules
Hosts that bypass the upstream proxy, in the comma-separated
NO_PROXY syntax used by
curl and most HTTP clients:
*matches every host;example.com,.example.comand*.example.commatch the domain and all its subdomains;- an IP literal matches that address, and CIDR notation (
10.0.0.0/8,fd00::/8) matches a range; addresses are compared only when the request names an IP literal (no DNS lookups); - any entry may end in
:portto apply to that port only.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanisEmpty()Reports whether there are no bypass rules.booleanWhether requests tohost:portshould bypass the proxy.static NoProxyRulesnone()Returns rules that never bypass the upstream proxy.static NoProxyRulesParses a comma-separated NO_PROXY rule list.
-
Method Details
-
none
Returns rules that never bypass the upstream proxy.- Returns:
- rules that never match a destination
-
parse
Parses a comma-separated NO_PROXY rule list.- Parameters:
list- the comma-separated NO_PROXY rule list- Returns:
- the parsed bypass rules
-
isEmpty
public boolean isEmpty()Reports whether there are no bypass rules.- Returns:
- whether there are no bypass rules
-
matches
Whether requests tohost:portshould bypass the proxy.- Parameters:
host- the destination host nameport- the destination port- Returns:
- whether requests to
host:portshould bypass the proxy
-