Create a new proxy port

API endpoint: POST /api/proxies
POST body
  • proxy [JSON object]
    • port [integer] - Port for the HTTP proxy
    • proxy_type=persist[string] - Set to "persist" to save proxy into the configuration file.
    • multiply[integer] - Multiply the port definition given number of times
    • multiply_users[boolean]
    • users[array] - List of users. This option has to be used along with "multiply_users"
      • user[string]
    • ssl[boolean] - Enable SSL analyzing
    • tls_lib=open_ssl|flex_tls[string] - SSL library
    • iface[string] - Interface or IP to listen on
    • customer[string] - Customer name
    • zone[string] - Zone name
    • password[string] - Zone password
    • proxy[string] - Hostname or IP of super proxy
    • proxy_port[integer] - Super proxy port
    • proxy_connection_type=http|https|socks[string] - Determines what kind of connection will be used between Proxy Manager and Super Proxy
    • proxy_retry[integer] - Automatically retry on super proxy failure
    • insecure[boolean] - Enable SSL connection/analyzing to insecure hosts
    • country[string] - Country
    • state[string] - State
    • city[string] - City
    • asn[string] - ASN
    • ip[string] - Data Center IP
    • vip[integer] - gIP
    • ext_proxies[array] - A list of proxies from external vendors. Format: [username:password@]ip[:port]
      • proxy[string]
    • ext_proxy_username[string] - Default username for external vendor ips
    • ext_proxy_password[string] - Default password for external vendor ips
    • ext_proxy_port[integer] - Default port for external vendor ips
    • dns=local|remote[string] - DNS resolving
    • reverse_lookup_dns[boolean] - Process reverse lookup via DNS
    • reverse_lookup_file[string] - Process reverse lookup via file
    • reverse_lookup_values[array] - Process reverse lookup via value
    • session=^[^\.\-]*$[string] - Session for all proxy requests
    • sticky_ip[boolean] - Use session per requesting host to maintain IP per host
    • pool_size[integer]
    • rotate_session[boolean] - Session pool size
    • throttle[integer] - Throttle requests above given number
    • rules={...}[array] - Proxy request rules
    • route_err[string] - Block or allow requests to be automatically sent through super proxy on error
    • smtp[array]
    • override_headers=[string][boolean]
    • os[string] - Operating System of the Peer IP
    • headers[array] - Request headers
      • name[string]
      • value[string]
    • debug=full|none[string] - Request debug info
    • lpm_auth[string] - x-lpm-authorization header
    • const[boolean]
    • socket_inactivity_timeout[integer]
    • multiply_ips[boolean]
    • multiply_vips[boolean]
    • max_ban_retries[integer]
    • preset[string]
    • ua[boolean] - Unblocker Mobile UA
    • timezone[string] - Timezone ID to be used by the browser
    • resolution[string] - Browser screen size
    • webrtc[string] - WebRTC plugin behavior in the browser
    • bw_limit[object] - BW limit params
      • days[integer]
      • bytes[integer]
      • renewable[boolean] - Renew limit of bytes each period or use single period and stop usage once last day of period is reached. Default is true
  • create_users[boolean]
Sample response:
{"port":24000,"zone":"YOUR_ZONE","proxy_type":"persist","customer":"YOUR_CUSTOMER_ID","password":"PASSWORD","whitelist_ips":[]}
 
Shell
curl "http://127.0.0.1:22999/api/proxies" -H "Content-Type: application/json" -d "{\"proxy\":{\"port\":24000,\"zone\":\"ZONE\",\"proxy_type\":\"persist\",\"customer\":\"CUSTOMER\",\"password\":\"PASSWORD\",\"whitelist_ips\":[]}}"

Node.js

#!/usr/bin/env node
require('request-promise')({
	method: 'POST',
	url: 'http://127.0.0.1:22999/api/proxies',
	json: {'proxy':{'port':24000,'zone': 'ZONE','proxy_type':'persist','customer':'CUSTOMER','password':'PASSWORD','whitelist_ips':[]}}
}).then(function(data){ console.log(data); },
	function(err){ console.error(err); });

Java

package example;

import org.apache.http.HttpHost;
import org.apache.http.client.fluent.*;

public class Example {
  public static void main(String[] args) throws Exception {
String body = "{\"proxy\":{\"port\":24000,\"zone\":\"ZONE\",\"proxy_type\":\"persist\",\"customer\":\"CUSTOMER\",\"password\":\"PASSWORD\",\"whitelist_ips\":[]}}"; String res = Executor.newInstance()

.execute(Request.Post("http://127.0.0.1:22999/api/proxies")
.bodyString(body, ContentType.APPLICATION_JSON))

.returnContent().asString();
System.out.println(res) }

}

C#

using System;
using System.Net;
using System.Net.Http;
using System.Net.Http.Headers;

public class Program {
  public static async Task Main() {
    var client = new HttpClient();
    var requestMessage = new HttpRequestMessage {
      Method = HttpMethod.Post,
RequestUri = new Uri("http://127.0.0.1:22999/api/proxies"),
Content = new StringContent(JsonConvert.SerializeObject(new {
proxy = new {
port = 24000, zone = "ZONE", proxy_type = "persist", customer = "CUSTOMER", password = "PASSWORD", whitelist_ips = []
}
}), Encoding.UTF8, "application/json")) }; var response = await client.SendAsync(requestMessage); var responseString = await response.Content.ReadAsStringAsync(); Console.WriteLine(responseString); } }

Python

#!/usr/bin/env python
print('If you get error "ImportError: No module named requests", please install it:\n$ sudo pip install requests');
import requests

data = {'proxy':{'port':24000,'zone': 'ZONE','proxy_type':'persist','customer':'CUSTOMER','password':'PASSWORD','whitelist_ips':[]}} r = requests.post('http://127.0.0.1:22999/api/proxies', data=json.dumps(data)) print(r.content)

Was this article helpful?