|
Junior Member
Join Date: Aug 2017
Location: /dev/null
|
12-23-2021
, 03:21
Re: [ANY] ProxyKiller - Configurable Proxy & VPN player manager
|
#26
|
Quote:
Originally Posted by MUN
How do we interact with an array?
Example API I wish to work with:
Code:
[
{
"ip": "1.1.1.1",
"asn": {
"name": "CLOUDFLARENET - Cloudflare, Inc.",
"number": 13335,
"network": "1.1.1.0",
"cidr": 24
},
"detection": {
"bogon": false,
"cloud": false,
"hosting": true,
"proxy": true,
"spamhaus": false,
"tor": false
},
"suggestion": "block"
},
{
"ip": "8.8.8.8",
"asn": {
"name": "GOOGLE - Google LLC",
"number": 15169,
"network": "8.8.8.0",
"cidr": 24
},
"detection": {
"bogon": false,
"cloud": true,
"hosting": false,
"proxy": false,
"spamhaus": false,
"tor": false
},
"suggestion": "block"
}
]
|
Sorry, I very rarely check these threads, you can unfortunately only work with a single element of the array (within the response.value property) and you also do not have filtering options.
The "magic" for this can be found here: https://bitbucket.org/Sikarii/proxyk...sp#lines-66:80
Code:
"ProxyKiller"
{
"YourService"
{
"method" "GET"
"url" "http://example.com/{ip}"
"response"
{
"type" "json"
"object" "[0].detection.proxy" // or [0].suggestion
"value" "true" // or "block" if using suggestion
}
}
}
Last edited by OfficialSikari; 12-23-2021 at 03:23.
Reason: Added reference to code.
|
|
|
|