public class Strategy extends AbstractModel
header, skipSign
Constructor and Description |
---|
Strategy() |
Strategy(Strategy source)
NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy,
and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy.
|
Modifier and Type | Method and Description |
---|---|
String |
getArg()
Get Specifies the matching parameter.
|
Long |
getCaseNotSensitive()
Get Case-Sensitive.
|
String |
getCompareFunc()
Get Specifies the logic symbol.
|
String |
getContent()
Get Specifies the match content.
|
String |
getField()
Get Specifies the matching field.
|
void |
setArg(String Arg)
Set Specifies the matching parameter.
|
void |
setCaseNotSensitive(Long CaseNotSensitive)
Set Case-Sensitive.
|
void |
setCompareFunc(String CompareFunc)
Set Specifies the logic symbol.
|
void |
setContent(String Content)
Set Specifies the match content.
|
void |
setField(String Field)
Set Specifies the matching field.
|
void |
toMap(HashMap<String,String> map,
String prefix)
Internal implementation, normal users should not use it.
|
any, fromJsonString, getBinaryParams, GetHeader, getMultipartRequestParams, getSkipSign, isStream, set, SetHeader, setParamArrayObj, setParamArraySimple, setParamObj, setParamSimple, setSkipSign, toJsonString
public Strategy()
public Strategy(Strategy source)
public String getField()
Matching Field | Matching Parameter | Logical Symbol | Matching Content |
---|---|---|---|
IP (source IP) | Parameters are not supported. | ipmatch (match) ipnmatch (mismatch) | Multiple IP addresses are separated by commas. A maximum of 20 IP addresses are allowed. |
IPv6 (source IPv6) | Parameters are not supported. | ipmatch (match) ipnmatch (mismatch) | A single IPv6 address is supported. |
Referer (referer) | Parameters are not supported. | empty (Content is empty.) null (do not exist) eq (equal to) neq (not equal to) contains (contain) ncontains (do not contain) len_eq (length equals to) len_gt (length is greater than) len_lt (length is less than) strprefix (prefix matching) strsuffix (suffix matching) rematch (regular expression matching) | Enter the content, with a maximum of 512 characters. |
URL (request path) | Parameters are not supported. | eq (equal to) neq (not equal to) contains (contain) ncontains (do not contain) len_eq (length equals to) len_gt (length is greater than) len_lt (length is less than) strprefix (prefix matching) strsuffix (suffix matching) rematch (regular expression matching) | Enter the content starting with /, with a maximum of 512 characters. |
UserAgent (UserAgent) | Parameters are not supported. | Same logical symbols as the matching field Referer | Enter the content with a maximum of 512 characters. |
HTTP_METHOD (HTTP request method) | Parameters are not supported. | eq (equal to) neq (not equal to) | Enter the method name. The uppercase is recommended. |
QUERY_STRING (request string) | Parameters are not supported. | Same logical symbol as the matching field Request Path | Enter the content with a maximum of 512 characters. |
GET (GET parameter value) | Parameter entry is supported. | contains (contain) ncontains (do not contain) len_eq (length equals to) len_gt (length is greater than) len_lt (length is less than) strprefix (prefix matching) strsuffix (suffix matching) | Enter the content with a maximum of 512 characters. |
GET_PARAMS_NAMES (GET parameter name) | Parameters are not supported. | exist (Parameter exists.) nexist (Parameter does not exist.) len_eq (length equals to) len_gt (length is greater than) len_lt (length is less than) strprefix (prefix matching) strsuffix (suffix matching) | Enter the content with a maximum of 512 characters. |
POST (POST parameter value) | Parameter entry is supported. | Same logical symbol as the matching field GET Parameter Value | Enter the content with a maximum of 512 characters. |
GET_POST_NAMES (POST parameter name) | Parameters are not supported. | Same logical symbol as the matching field GET Parameter Name | Enter the content with a maximum of 512 characters. |
POST_BODY (complete body) | Parameters are not supported. | Same logical symbol as the matching field Request Path | Enter the body content with a maximum of 512 characters. |
COOKIE (cookie) | Parameters are not supported. | empty (Content is empty.) null (do not exist) rematch (regular expression matching) | Unsupported currently |
GET_COOKIES_NAMES (cookie parameter name) | Parameters are not supported. | Same logical symbol as the matching field GET Parameter Name | Enter the content with a maximum of 512 characters. |
ARGS_COOKIE (cookie parameter value) | Parameter entry is supported. | Same logical symbol as the matching field GET Parameter Value | Enter the content512 characters limit |
GET_HEADERS_NAMES (Header parameter name) | parameter not supported | exsit (parameter exists) nexsit (parameter does not exist) len_eq (LENGTH equal) len_gt (LENGTH greater than) len_lt (LENGTH less than) strprefix (prefix match) strsuffix (suffix matching) rematch (regular expression matching) | enter CONTENT, lowercase is recommended, up to 512 characters |
ARGS_Header (Header parameter value) | support parameter entry | contains (include) ncontains (does not include) len_eq (LENGTH equal) len_gt (LENGTH greater than) len_lt (LENGTH less than) strprefix (prefix match) strsuffix (suffix matching) rematch (regular expression matching) | enter CONTENT, up to 512 characters |
CONTENT_LENGTH (CONTENT-LENGTH) | support parameter entry | numgt (value greater than) numlt (value smaller than) numeq (value equal to) | enter an integer between 0-9999999999999 |
IP_GEO (source IP geolocation) | support parameter entry | GEO_in (belong) GEO_not_in (not_in) | enter CONTENT, up to 10240 characters, format: serialized JSON, format: [{"Country":"china","Region":"guangdong","City":"shenzhen"}] |
CAPTCHA_RISK (CAPTCHA RISK) | parameter not supported | eq (equal) neq (not equal to) belong (belong) not_belong (not belong to) null (nonexistent) exist (exist) | enter RISK level value, value range 0-255 |
CAPTCHA_DEVICE_RISK (CAPTCHA DEVICE RISK) | parameter not supported | eq (equal) neq (not equal to) belong (belong) not_belong (not belong to) null (nonexistent) exist (exist) | enter DEVICE RISK code, valid values: 101, 201, 301, 401, 501, 601, 701 |
CAPTCHAR_SCORE (CAPTCHA RISK assessment SCORE) | parameter not supported | numeq (value equal to) numgt (value greater than) numlt (value smaller than) numle (less than or equal to) numge (value is greater than or equal to) null (nonexistent) exist (exist) | enter assessment SCORE, value range 0-100 |
Matching Field | Matching Parameter | Logical Symbol | Matching Content |
---|---|---|---|
IP (source IP) | Parameters are not supported. | ipmatch (match) ipnmatch (mismatch) | Multiple IP addresses are separated by commas. A maximum of 20 IP addresses are allowed. |
IPv6 (source IPv6) | Parameters are not supported. | ipmatch (match) ipnmatch (mismatch) | A single IPv6 address is supported. |
Referer (referer) | Parameters are not supported. | empty (Content is empty.) null (do not exist) eq (equal to) neq (not equal to) contains (contain) ncontains (do not contain) len_eq (length equals to) len_gt (length is greater than) len_lt (length is less than) strprefix (prefix matching) strsuffix (suffix matching) rematch (regular expression matching) | Enter the content, with a maximum of 512 characters. |
URL (request path) | Parameters are not supported. | eq (equal to) neq (not equal to) contains (contain) ncontains (do not contain) len_eq (length equals to) len_gt (length is greater than) len_lt (length is less than) strprefix (prefix matching) strsuffix (suffix matching) rematch (regular expression matching) | Enter the content starting with /, with a maximum of 512 characters. |
UserAgent (UserAgent) | Parameters are not supported. | Same logical symbols as the matching field Referer | Enter the content with a maximum of 512 characters. |
HTTP_METHOD (HTTP request method) | Parameters are not supported. | eq (equal to) neq (not equal to) | Enter the method name. The uppercase is recommended. |
QUERY_STRING (request string) | Parameters are not supported. | Same logical symbol as the matching field Request Path | Enter the content with a maximum of 512 characters. |
GET (GET parameter value) | Parameter entry is supported. | contains (contain) ncontains (do not contain) len_eq (length equals to) len_gt (length is greater than) len_lt (length is less than) strprefix (prefix matching) strsuffix (suffix matching) | Enter the content with a maximum of 512 characters. |
GET_PARAMS_NAMES (GET parameter name) | Parameters are not supported. | exist (Parameter exists.) nexist (Parameter does not exist.) len_eq (length equals to) len_gt (length is greater than) len_lt (length is less than) strprefix (prefix matching) strsuffix (suffix matching) | Enter the content with a maximum of 512 characters. |
POST (POST parameter value) | Parameter entry is supported. | Same logical symbol as the matching field GET Parameter Value | Enter the content with a maximum of 512 characters. |
GET_POST_NAMES (POST parameter name) | Parameters are not supported. | Same logical symbol as the matching field GET Parameter Name | Enter the content with a maximum of 512 characters. |
POST_BODY (complete body) | Parameters are not supported. | Same logical symbol as the matching field Request Path | Enter the body content with a maximum of 512 characters. |
COOKIE (cookie) | Parameters are not supported. | empty (Content is empty.) null (do not exist) rematch (regular expression matching) | Unsupported currently |
GET_COOKIES_NAMES (cookie parameter name) | Parameters are not supported. | Same logical symbol as the matching field GET Parameter Name | Enter the content with a maximum of 512 characters. |
ARGS_COOKIE (cookie parameter value) | Parameter entry is supported. | Same logical symbol as the matching field GET Parameter Value | Enter the content512 characters limit |
GET_HEADERS_NAMES (Header parameter name) | parameter not supported | exsit (parameter exists) nexsit (parameter does not exist) len_eq (LENGTH equal) len_gt (LENGTH greater than) len_lt (LENGTH less than) strprefix (prefix match) strsuffix (suffix matching) rematch (regular expression matching) | enter CONTENT, lowercase is recommended, up to 512 characters |
ARGS_Header (Header parameter value) | support parameter entry | contains (include) ncontains (does not include) len_eq (LENGTH equal) len_gt (LENGTH greater than) len_lt (LENGTH less than) strprefix (prefix match) strsuffix (suffix matching) rematch (regular expression matching) | enter CONTENT, up to 512 characters |
CONTENT_LENGTH (CONTENT-LENGTH) | support parameter entry | numgt (value greater than) numlt (value smaller than) numeq (value equal to) | enter an integer between 0-9999999999999 |
IP_GEO (source IP geolocation) | support parameter entry | GEO_in (belong) GEO_not_in (not_in) | enter CONTENT, up to 10240 characters, format: serialized JSON, format: [{"Country":"china","Region":"guangdong","City":"shenzhen"}] |
CAPTCHA_RISK (CAPTCHA RISK) | parameter not supported | eq (equal) neq (not equal to) belong (belong) not_belong (not belong to) null (nonexistent) exist (exist) | enter RISK level value, value range 0-255 |
CAPTCHA_DEVICE_RISK (CAPTCHA DEVICE RISK) | parameter not supported | eq (equal) neq (not equal to) belong (belong) not_belong (not belong to) null (nonexistent) exist (exist) | enter DEVICE RISK code, valid values: 101, 201, 301, 401, 501, 601, 701 |
CAPTCHAR_SCORE (CAPTCHA RISK assessment SCORE) | parameter not supported | numeq (value equal to) numgt (value greater than) numlt (value smaller than) numle (less than or equal to) numge (value is greater than or equal to) null (nonexistent) exist (exist) | enter assessment SCORE, value range 0-100 |
public void setField(String Field)
Matching Field | Matching Parameter | Logical Symbol | Matching Content |
---|---|---|---|
IP (source IP) | Parameters are not supported. | ipmatch (match) ipnmatch (mismatch) | Multiple IP addresses are separated by commas. A maximum of 20 IP addresses are allowed. |
IPv6 (source IPv6) | Parameters are not supported. | ipmatch (match) ipnmatch (mismatch) | A single IPv6 address is supported. |
Referer (referer) | Parameters are not supported. | empty (Content is empty.) null (do not exist) eq (equal to) neq (not equal to) contains (contain) ncontains (do not contain) len_eq (length equals to) len_gt (length is greater than) len_lt (length is less than) strprefix (prefix matching) strsuffix (suffix matching) rematch (regular expression matching) | Enter the content, with a maximum of 512 characters. |
URL (request path) | Parameters are not supported. | eq (equal to) neq (not equal to) contains (contain) ncontains (do not contain) len_eq (length equals to) len_gt (length is greater than) len_lt (length is less than) strprefix (prefix matching) strsuffix (suffix matching) rematch (regular expression matching) | Enter the content starting with /, with a maximum of 512 characters. |
UserAgent (UserAgent) | Parameters are not supported. | Same logical symbols as the matching field Referer | Enter the content with a maximum of 512 characters. |
HTTP_METHOD (HTTP request method) | Parameters are not supported. | eq (equal to) neq (not equal to) | Enter the method name. The uppercase is recommended. |
QUERY_STRING (request string) | Parameters are not supported. | Same logical symbol as the matching field Request Path | Enter the content with a maximum of 512 characters. |
GET (GET parameter value) | Parameter entry is supported. | contains (contain) ncontains (do not contain) len_eq (length equals to) len_gt (length is greater than) len_lt (length is less than) strprefix (prefix matching) strsuffix (suffix matching) | Enter the content with a maximum of 512 characters. |
GET_PARAMS_NAMES (GET parameter name) | Parameters are not supported. | exist (Parameter exists.) nexist (Parameter does not exist.) len_eq (length equals to) len_gt (length is greater than) len_lt (length is less than) strprefix (prefix matching) strsuffix (suffix matching) | Enter the content with a maximum of 512 characters. |
POST (POST parameter value) | Parameter entry is supported. | Same logical symbol as the matching field GET Parameter Value | Enter the content with a maximum of 512 characters. |
GET_POST_NAMES (POST parameter name) | Parameters are not supported. | Same logical symbol as the matching field GET Parameter Name | Enter the content with a maximum of 512 characters. |
POST_BODY (complete body) | Parameters are not supported. | Same logical symbol as the matching field Request Path | Enter the body content with a maximum of 512 characters. |
COOKIE (cookie) | Parameters are not supported. | empty (Content is empty.) null (do not exist) rematch (regular expression matching) | Unsupported currently |
GET_COOKIES_NAMES (cookie parameter name) | Parameters are not supported. | Same logical symbol as the matching field GET Parameter Name | Enter the content with a maximum of 512 characters. |
ARGS_COOKIE (cookie parameter value) | Parameter entry is supported. | Same logical symbol as the matching field GET Parameter Value | Enter the content512 characters limit |
GET_HEADERS_NAMES (Header parameter name) | parameter not supported | exsit (parameter exists) nexsit (parameter does not exist) len_eq (LENGTH equal) len_gt (LENGTH greater than) len_lt (LENGTH less than) strprefix (prefix match) strsuffix (suffix matching) rematch (regular expression matching) | enter CONTENT, lowercase is recommended, up to 512 characters |
ARGS_Header (Header parameter value) | support parameter entry | contains (include) ncontains (does not include) len_eq (LENGTH equal) len_gt (LENGTH greater than) len_lt (LENGTH less than) strprefix (prefix match) strsuffix (suffix matching) rematch (regular expression matching) | enter CONTENT, up to 512 characters |
CONTENT_LENGTH (CONTENT-LENGTH) | support parameter entry | numgt (value greater than) numlt (value smaller than) numeq (value equal to) | enter an integer between 0-9999999999999 |
IP_GEO (source IP geolocation) | support parameter entry | GEO_in (belong) GEO_not_in (not_in) | enter CONTENT, up to 10240 characters, format: serialized JSON, format: [{"Country":"china","Region":"guangdong","City":"shenzhen"}] |
CAPTCHA_RISK (CAPTCHA RISK) | parameter not supported | eq (equal) neq (not equal to) belong (belong) not_belong (not belong to) null (nonexistent) exist (exist) | enter RISK level value, value range 0-255 |
CAPTCHA_DEVICE_RISK (CAPTCHA DEVICE RISK) | parameter not supported | eq (equal) neq (not equal to) belong (belong) not_belong (not belong to) null (nonexistent) exist (exist) | enter DEVICE RISK code, valid values: 101, 201, 301, 401, 501, 601, 701 |
CAPTCHAR_SCORE (CAPTCHA RISK assessment SCORE) | parameter not supported | numeq (value equal to) numgt (value greater than) numlt (value smaller than) numle (less than or equal to) numge (value is greater than or equal to) null (nonexistent) exist (exist) | enter assessment SCORE, value range 0-100 |
Field
- Specifies the matching field.
Different matching fields result in different matching parameters, logical operators, and matching contents. the details are as follows:.
Matching Field | Matching Parameter | Logical Symbol | Matching Content |
---|---|---|---|
IP (source IP) | Parameters are not supported. | ipmatch (match) ipnmatch (mismatch) | Multiple IP addresses are separated by commas. A maximum of 20 IP addresses are allowed. |
IPv6 (source IPv6) | Parameters are not supported. | ipmatch (match) ipnmatch (mismatch) | A single IPv6 address is supported. |
Referer (referer) | Parameters are not supported. | empty (Content is empty.) null (do not exist) eq (equal to) neq (not equal to) contains (contain) ncontains (do not contain) len_eq (length equals to) len_gt (length is greater than) len_lt (length is less than) strprefix (prefix matching) strsuffix (suffix matching) rematch (regular expression matching) | Enter the content, with a maximum of 512 characters. |
URL (request path) | Parameters are not supported. | eq (equal to) neq (not equal to) contains (contain) ncontains (do not contain) len_eq (length equals to) len_gt (length is greater than) len_lt (length is less than) strprefix (prefix matching) strsuffix (suffix matching) rematch (regular expression matching) | Enter the content starting with /, with a maximum of 512 characters. |
UserAgent (UserAgent) | Parameters are not supported. | Same logical symbols as the matching field Referer | Enter the content with a maximum of 512 characters. |
HTTP_METHOD (HTTP request method) | Parameters are not supported. | eq (equal to) neq (not equal to) | Enter the method name. The uppercase is recommended. |
QUERY_STRING (request string) | Parameters are not supported. | Same logical symbol as the matching field Request Path | Enter the content with a maximum of 512 characters. |
GET (GET parameter value) | Parameter entry is supported. | contains (contain) ncontains (do not contain) len_eq (length equals to) len_gt (length is greater than) len_lt (length is less than) strprefix (prefix matching) strsuffix (suffix matching) | Enter the content with a maximum of 512 characters. |
GET_PARAMS_NAMES (GET parameter name) | Parameters are not supported. | exist (Parameter exists.) nexist (Parameter does not exist.) len_eq (length equals to) len_gt (length is greater than) len_lt (length is less than) strprefix (prefix matching) strsuffix (suffix matching) | Enter the content with a maximum of 512 characters. |
POST (POST parameter value) | Parameter entry is supported. | Same logical symbol as the matching field GET Parameter Value | Enter the content with a maximum of 512 characters. |
GET_POST_NAMES (POST parameter name) | Parameters are not supported. | Same logical symbol as the matching field GET Parameter Name | Enter the content with a maximum of 512 characters. |
POST_BODY (complete body) | Parameters are not supported. | Same logical symbol as the matching field Request Path | Enter the body content with a maximum of 512 characters. |
COOKIE (cookie) | Parameters are not supported. | empty (Content is empty.) null (do not exist) rematch (regular expression matching) | Unsupported currently |
GET_COOKIES_NAMES (cookie parameter name) | Parameters are not supported. | Same logical symbol as the matching field GET Parameter Name | Enter the content with a maximum of 512 characters. |
ARGS_COOKIE (cookie parameter value) | Parameter entry is supported. | Same logical symbol as the matching field GET Parameter Value | Enter the content512 characters limit |
GET_HEADERS_NAMES (Header parameter name) | parameter not supported | exsit (parameter exists) nexsit (parameter does not exist) len_eq (LENGTH equal) len_gt (LENGTH greater than) len_lt (LENGTH less than) strprefix (prefix match) strsuffix (suffix matching) rematch (regular expression matching) | enter CONTENT, lowercase is recommended, up to 512 characters |
ARGS_Header (Header parameter value) | support parameter entry | contains (include) ncontains (does not include) len_eq (LENGTH equal) len_gt (LENGTH greater than) len_lt (LENGTH less than) strprefix (prefix match) strsuffix (suffix matching) rematch (regular expression matching) | enter CONTENT, up to 512 characters |
CONTENT_LENGTH (CONTENT-LENGTH) | support parameter entry | numgt (value greater than) numlt (value smaller than) numeq (value equal to) | enter an integer between 0-9999999999999 |
IP_GEO (source IP geolocation) | support parameter entry | GEO_in (belong) GEO_not_in (not_in) | enter CONTENT, up to 10240 characters, format: serialized JSON, format: [{"Country":"china","Region":"guangdong","City":"shenzhen"}] |
CAPTCHA_RISK (CAPTCHA RISK) | parameter not supported | eq (equal) neq (not equal to) belong (belong) not_belong (not belong to) null (nonexistent) exist (exist) | enter RISK level value, value range 0-255 |
CAPTCHA_DEVICE_RISK (CAPTCHA DEVICE RISK) | parameter not supported | eq (equal) neq (not equal to) belong (belong) not_belong (not belong to) null (nonexistent) exist (exist) | enter DEVICE RISK code, valid values: 101, 201, 301, 401, 501, 601, 701 |
CAPTCHAR_SCORE (CAPTCHA RISK assessment SCORE) | parameter not supported | numeq (value equal to) numgt (value greater than) numlt (value smaller than) numle (less than or equal to) numge (value is greater than or equal to) null (nonexistent) exist (exist) | enter assessment SCORE, value range 0-100 |
public String getCompareFunc()
public void setCompareFunc(String CompareFunc)
CompareFunc
- Specifies the logic symbol.
Logical symbols are divided into the following types:.
Empty (content is empty).
null (not found).
Eq (equal to).
neq (not equal to).
contains (contain).
ncontains (do not contain).
strprefix (prefix matching).
strsuffix (suffix matching).
Len_eq (length equals to).
Len_gt (length greater than).
Len_lt (length less than).
ipmatch (belong).
ipnmatch (not_in).
numgt (value greater than).
NumValue smaller than].
Value equal to.
numneq (value not equal to).
numle (less than or equal to).
numge (value is greater than or equal to).
geo_in (IP geographic belong).
geo_not_in (IP geographic not_in).
Specifies different logical operators for matching fields. for details, see the matching field table above.public String getContent()
public void setContent(String Content)
Content
- Specifies the match content.
Currently, when the match field is COOKIE (COOKIE), match content is not required. all others are needed.public String getArg()
public void setArg(String Arg)
Arg
- Specifies the matching parameter.
Configuration parameters are divided into two data types: parameter not supported and support parameters.
When the match field is one of the following four, the matching parameter can be entered, otherwise not supported.
GET (get parameter value).
POST (post parameter value).
ARGS_COOKIE (COOKIE parameter value).
ARGS_HEADER (HEADER parameter value).public Long getCaseNotSensitive()
public void setCaseNotSensitive(Long CaseNotSensitive)
CaseNotSensitive
- Case-Sensitive.
Case-Insensitive.Copyright © 2025. All rights reserved.