public final class ProxyAutoConfig extends HtmlUnitScriptable
org.htmlunit.corejs.javascript.ScriptableObject.DescriptorInfo, org.htmlunit.corejs.javascript.ScriptableObject.KeyComparator, org.htmlunit.corejs.javascript.ScriptableObject.LambdaGetterFunction, org.htmlunit.corejs.javascript.ScriptableObject.LambdaSetterFunctionCONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONSTNOT_FOUND| Modifier and Type | Method and Description |
|---|---|
static long |
convertAddr(String ip)
Concatenates the four dot-separated bytes into one 4-byte word and converts it to decimal.
|
static boolean |
dateRange(String value1,
Object value2,
Object value3,
Object value4,
Object value5,
Object value6,
Object value7)
Checks if today is included in the specified range.
|
static boolean |
dnsDomainIs(String host,
String domain)
Returns true if the domain of hostname matches.
|
static int |
dnsDomainLevels(String host)
Returns the number (integer) of DNS domain levels (number of dots) in the hostname.
|
static String |
dnsResolve(String host)
Resolves the given DNS hostname into an IP address, and returns it in the dot separated format as a string.
|
static boolean |
isInNet(String host,
String pattern,
String mask)
Returns true if the IP address of the host matches the specified IP address pattern.
|
static boolean |
isPlainHostName(String host)
Returns true if there is no domain name in the hostname (no dots).
|
static boolean |
isResolvable(String host)
Tries to resolve the hostname.
|
static boolean |
localHostOrDomainIs(String host,
String hostdom)
Returns true if the hostname matches exactly the specified hostname,
or if there is no domain name part in the hostname, but the unqualified hostname matches.
|
static String |
myIpAddress()
Returns the IP address of the local host, as a string in the dot-separated integer format.
|
static boolean |
shExpMatch(String str,
String shexp)
Matches the specified string against a shell expression, not regular expression.
|
static boolean |
timeRange(String value1,
Object value2,
Object value3,
Object value4,
Object value5,
Object value6,
Object value7)
Checks if the time now is included in the specified range.
|
static boolean |
weekdayRange(String wd1,
Object wd2,
Object gmt)
Checks if today is included in the specified range.
|
clone, equivalentValues, get, getBrowserVersion, getClassName, getDefaultValue, getDomNodeOrDie, getDomNodeOrNull, getPrototype, getScriptableFor, getWindow, getWindow, getWindowFromTopCallScope, getWithPreemption, has, hasInstance, initParentScope, makeScriptableFor, put, setClassName, setDomNode, setDomNode, setParentScope, setupPromise, setupRejectedPromiseapplyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkNotSealed, checkPropertyChangeForSlot, checkPropertyChangeForSlot, checkPropertyDefinition, checkSlotRemoval, defineBuiltinProperty, defineBuiltinProperty, defineBuiltInProperty, defineBuiltInProperty, defineBuiltInProperty, defineBuiltInProperty, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, delete, deleteProperty, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureScriptableObjectButNotSymbol, ensureSymbolScriptable, ensureType, get, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGeneratorFunctionPrototype, getGetterOrSetter, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getProperty, getPropertyIds, getPrototype, getSuperProperty, getSuperProperty, getSuperProperty, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, hasProperty, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, put, putConst, putConstProperty, putOwnProperty, putOwnProperty, putOwnProperty, putProperty, putProperty, putProperty, putSuperProperty, putSuperProperty, putSuperProperty, querySlot, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setAttributes, setCommonDescriptorProperties, setExternalArrayData, setGetterOrSetter, setPrototype, sizecreateSlotMappublic static boolean isPlainHostName(String host)
host - the hostname from the URL (excluding port number).public static boolean dnsDomainIs(String host, String domain)
host - the hostname from the URLdomain - the domain name to test the hostname againstpublic static boolean localHostOrDomainIs(String host, String hostdom)
host - the hostname from the URLhostdom - fully qualified hostname to match againstpublic static boolean isResolvable(String host)
host - the hostname from the URL.public static boolean isInNet(String host, String pattern, String mask)
host - a DNS hostname, or IP address.
If a hostname is passed, it will be resolved into an IP address by this function.pattern - an IP address pattern in the dot-separated formatmask - mask for the IP address pattern informing which parts of the IP address should be matched against.
0 means ignore, 255 means matchpublic static String dnsResolve(String host)
host - the hostname to resolvepublic static String myIpAddress()
public static int dnsDomainLevels(String host)
host - the hostname from the URLpublic static boolean shExpMatch(String str, String shexp)
str - a string to matchshexp - the shell expressionpublic static boolean weekdayRange(String wd1, Object wd2, Object gmt)
wd1 - week day 1wd2 - week day 2, optionalgmt - string of "GMT", or not specifiedpublic static boolean dateRange(String value1, Object value2, Object value3, Object value4, Object value5, Object value6, Object value7)
value1 - the value 1value2 - the value 2value3 - the value 3value4 - the value 4value5 - the value 5value6 - the value 6value7 - the value 7public static boolean timeRange(String value1, Object value2, Object value3, Object value4, Object value5, Object value6, Object value7)
value1 - the value 1value2 - the value 2value3 - the value 3value4 - the value 4value5 - the value 5value6 - the value 6value7 - the value 7public static long convertAddr(String ip)
ip - any dotted address such as an IP address or mask.Copyright © 2002–2025 Gargoyle Software Inc.. All rights reserved.