cURL
curl --request PATCH \
--url https://cmd.illusory.io/v1/proxies/auth/whitelist/{proxyName} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"authorize_ip": "123.123.23,456.456.56/24,789.789.89"
}
'import requests
url = "https://cmd.illusory.io/v1/proxies/auth/whitelist/{proxyName}"
payload = { "authorize_ip": "123.123.23,456.456.56/24,789.789.89" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({authorize_ip: '123.123.23,456.456.56/24,789.789.89'})
};
fetch('https://cmd.illusory.io/v1/proxies/auth/whitelist/{proxyName}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://cmd.illusory.io/v1/proxies/auth/whitelist/{proxyName}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'authorize_ip' => '123.123.23,456.456.56/24,789.789.89'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://cmd.illusory.io/v1/proxies/auth/whitelist/{proxyName}"
payload := strings.NewReader("{\n \"authorize_ip\": \"123.123.23,456.456.56/24,789.789.89\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://cmd.illusory.io/v1/proxies/auth/whitelist/{proxyName}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"authorize_ip\": \"123.123.23,456.456.56/24,789.789.89\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://cmd.illusory.io/v1/proxies/auth/whitelist/{proxyName}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"authorize_ip\": \"123.123.23,456.456.56/24,789.789.89\"\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"message": "Successfully updated and enabled the whitelist IP(s).",
"data": {
"proxy_name": "ILL-US-AU1-9999",
"last_auth_change": "2050-12-04T17:43:16.407+00:00",
"whitelist": "123.123.23,456.456.56/24,789.789.89"
}
}{
"ok": false,
"data": {
"proxy_name": "ILL-US-AU1-9999"
},
"message": "Proxy not found"
}Proxy Authentication
Update Proxy Whitelist
Sets the whitelisted IP addresses authorized for a proxy server.
PATCH
/
v1
/
proxies
/
auth
/
whitelist
/
{proxyName}
cURL
curl --request PATCH \
--url https://cmd.illusory.io/v1/proxies/auth/whitelist/{proxyName} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"authorize_ip": "123.123.23,456.456.56/24,789.789.89"
}
'import requests
url = "https://cmd.illusory.io/v1/proxies/auth/whitelist/{proxyName}"
payload = { "authorize_ip": "123.123.23,456.456.56/24,789.789.89" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({authorize_ip: '123.123.23,456.456.56/24,789.789.89'})
};
fetch('https://cmd.illusory.io/v1/proxies/auth/whitelist/{proxyName}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://cmd.illusory.io/v1/proxies/auth/whitelist/{proxyName}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'authorize_ip' => '123.123.23,456.456.56/24,789.789.89'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://cmd.illusory.io/v1/proxies/auth/whitelist/{proxyName}"
payload := strings.NewReader("{\n \"authorize_ip\": \"123.123.23,456.456.56/24,789.789.89\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://cmd.illusory.io/v1/proxies/auth/whitelist/{proxyName}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"authorize_ip\": \"123.123.23,456.456.56/24,789.789.89\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://cmd.illusory.io/v1/proxies/auth/whitelist/{proxyName}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"authorize_ip\": \"123.123.23,456.456.56/24,789.789.89\"\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"message": "Successfully updated and enabled the whitelist IP(s).",
"data": {
"proxy_name": "ILL-US-AU1-9999",
"last_auth_change": "2050-12-04T17:43:16.407+00:00",
"whitelist": "123.123.23,456.456.56/24,789.789.89"
}
}{
"ok": false,
"data": {
"proxy_name": "ILL-US-AU1-9999"
},
"message": "Proxy not found"
}Whitelist Authentication is a method of restricting access to a proxy server based on the client’s IP address. This is a useful method of restricting access to a proxy server to only those who need it.
By default, all proxies upon deployment utilize a randomly generated basic authorization in the format of username:password. You can disable this basic authorization by updating the proxy’s whitelisted IPs authorized to access the proxy server.
Basic authorization will be disabled upon successfully updating whitelist authorization.
Authorizations
The Authorization header is used to authenticate with the API using your Master API key. Value is of the format Bearer YOUR_KEY_HERE.
Path Parameters
Replace {proxyName} in the url path with YOUR_PROXY.
Body
application/json
Whitelist authentication details
Set the IP address to authorize. Use commas to specify multiple IP addresses. e.g. 123.123.23,456.456.56/24,789.789.89.
Example:
"123.123.23,456.456.56/24,789.789.89"
Was this page helpful?