@luminati-io/luminati-proxy
Version:
A configurable local proxy for brightdata.com
1,269 lines • 71.2 kB
JSON
{
"swagger": "2.0",
"info": {
"version": "1.519.10",
"title": "Proxy Manager",
"license": {
"name": "MIT",
"url": "http://opensource.org/licenses/MIT"
}
},
"host": "127.0.0.1:22999",
"basePath": "/api/v2",
"schemes": ["http"],
"consumes": ["application/json"],
"produces": ["application/json"],
"paths": {
"/swagger": {
"get": {
"description": "Returns the swagger definition json",
"tags": [
"Manager"
],
"responses": {
"200": {
"description": "Successful response"
}
}
}
},
"/version": {
"get": {
"description": "Returns the version of the running Proxy Manager\n",
"tags": [
"Manager"
],
"responses": {
"200": {
"description": "Successful response",
"schema": {
"type": "object",
"properties": {
"version": {
"description": "Proxy Manager version",
"type": "string"
},
"argv": {
"description": "Command line arguments passed to Proxy Manager",
"type": "string"
}
}
}
}
}
}
},
"/last_version": {
"get": {
"description": "Returns the latest public version available\n",
"tags": [
"Manager"
],
"responses": {
"200": {
"description": "Successful response",
"schema": {
"type": "object",
"properties": {
"version": {
"description": "Latest Proxy Manager version",
"type": "string"
},
"newer": {
"description": "Whether or not latest version is newer than current Proxy Manager version",
"type": "boolean"
},
"versions": {
"description": "Proxy Manager versions changelog",
"type": "array",
"items": {
"type": "object",
"properties": {
"ver": {"type": "string"},
"type": {
"type": "string",
"enum": ["stable", "dev"]
},
"changes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["star", "sparkles", "bug", "boom"]
},
"text": {"type": "string"}
}
}
}
}
}
}
}
}
}
}
}
},
"/node_version": {
"get": {
"description": "Return the currently running node version\n",
"tags": ["Manager"],
"responses": {
"200": {
"description": "Successful response",
"schema": {
"type": "object",
"properties": {
"current": {
"type": "object",
"properties": {
"raw": {"type": "string"},
"major": {"type": "number"},
"minor": {"type": "number"},
"patch": {"type": "number"},
"prerelease": {
"type": "array",
"items": {"type": "string"}
},
"build": {
"type": "array",
"items": {"type": "string"}
},
"version": {"type": "string"}
},
"description": "Current Node information"
},
"recommended": {
"type": "string",
"description": "Recommended Node version"
},
"satisfied": {
"type": "boolean",
"description": "Whether or not recommended Node version condition is satisfied"
}
}
}
}
}
}
},
"/gen_token": {
"get": {
"description": "Generate token for token based authentication",
"tags": ["Manager"],
"responses": {
"200": {
"description": "Successful response",
"schema": {
"type": "object",
"properties": {
"token": {"type": "string"}
}
}
}
}
}
},
"/add_wip": {
"post": {
"deprecated": true,
"description": "An alternative to adding IPs to whitelist in the UI. This call needs to be authenticated by token and does not need to be sent from whitelisted IP",
"tags": ["Manager"],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "Authorization token",
"type": "string"
},
{
"name": "options",
"in": "body",
"required": true,
"schema": {
"type": "object",
"required": ["ip"],
"properties": {
"ip": {
"type": "string",
"description": "IP to whitelist",
"example": "10.0.0.0"
}
}
}
}
],
"responses": {
"200": {
"description": "Successful response"
},
"400": {
"description": "Bad request. No IP was passed"
},
"403": {
"description": "Forbidden. No authentication provided"
},
"422": {
"description": "Unprocessable entity. Invalid IP was passed"
}
}
}
},
"/wip": {
"put": {
"description": "An alternative to adding IPs to whitelist in the UI. This call needs to be authenticated by token and does not need to be sent from whitelisted IP",
"tags": ["Manager"],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "Authorization token",
"type": "string"
},
{
"name": "options",
"in": "body",
"required": true,
"schema": {
"type": "object",
"required": ["ip"],
"properties": {
"ip": {
"type": "string",
"description": "IP to whitelist",
"example": "10.0.0.0"
}
}
}
}
],
"responses": {
"200": {
"description": "Successful response"
},
"400": {
"description": "Bad request. No IP was passed"
},
"403": {
"description": "Forbidden. No authentication provided"
},
"422": {
"description": "Unprocessable entity. Invalid IP was passed"
}
}
},
"delete": {
"description": "An alternative to removing IP from whitelist in the UI. This call needs to be authenticated by token and does not need to be sent from whitelisted IP",
"tags": ["Manager"],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "Authorization token",
"type": "string"
},
{
"name": "options",
"in": "body",
"required": true,
"schema": {
"type": "object",
"required": ["ip"],
"properties": {
"ip": {
"type": "string",
"description": "IP to remove",
"example": "10.0.0.0"
}
}
}
}
],
"responses": {
"200": {
"description": "Successful response"
},
"400": {
"description": "Bad request. No IP was passed"
},
"403": {
"description": "Forbidden. No authentication provided"
},
"404": {
"description": "Not Found. IP is not whitelisted"
},
"422": {
"description": "Unprocessable entity. Invalid IP was passed"
}
}
}
},
"/add_whitelist_ip": {
"post": {
"deprecated": true,
"description": "Grants access to an IP to browse admin UI",
"tags": ["Manager"],
"parameters": [
{
"name": "options",
"in": "body",
"required": true,
"schema": {
"type": "object",
"required": ["ip"],
"properties": {
"ip": {
"type": "string",
"description": "IP to whitelist",
"example": "10.0.0.0"
}
}
}
}
],
"responses": {
"200": {
"description": "Successful response"
},
"400": {
"description": "Bad request. No IP was passed"
},
"422": {
"description": "Unprocessable entity. Invalid IP was passed"
}
}
}
},
"/whitelist_ip": {
"put": {
"description": "Grants access to an IP to browse admin UI",
"tags": ["Manager"],
"parameters": [
{
"name": "options",
"in": "body",
"required": true,
"schema": {
"type": "object",
"required": ["ip"],
"properties": {
"ip": {
"type": "string",
"description": "IP to whitelist",
"example": "10.0.0.0"
}
}
}
}
],
"responses": {
"200": {
"description": "Successful response"
},
"400": {
"description": "Bad request. No IP was passed"
},
"422": {
"description": "Unprocessable entity. Invalid IP was passed"
}
}
},
"delete": {
"description": "Remove access to browse admin UI for IP",
"tags": ["Manager"],
"parameters": [
{
"name": "options",
"in": "body",
"required": true,
"schema": {
"type": "object",
"required": ["ip"],
"properties": {
"ip": {
"type": "string",
"description": "IP to remove",
"example": "10.0.0.0"
}
}
}
}
],
"responses": {
"200": {
"description": "Successful response"
},
"400": {
"description": "Bad request. No IP was passed"
},
"404": {
"description": "Not Found. IP is not whitelisted"
},
"422": {
"description": "Unprocessable entity. Invalid IP was passed"
}
}
}
},
"/proxies_running": {
"get": {
"description": "Return the effective configuration for all running proxies\n",
"tags": ["Proxy", "Manager"],
"responses": {
"200": {
"description": "Successful response",
"schema": {
"type": "array",
"items": {"$ref": "#/definitions/proxy"}
}
}
}
}
},
"/recent_stats": {
"get": {
"description": "Return recent stats of all proxies",
"tags": ["Manager"],
"responses": {
"200": {
"description": "Successful response",
"schema": {
"type": "object",
"properties": {
"hostname": {
"type": "array",
"items": {
"$ref": "#/definitions/stat"
},
"description": "An array containing statistics grouped by host name"
},
"ports": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"$ref": "#/definitions/stat"
}
},
"description": "An object containing statistics grouped by proxy port",
"example": {
"24001": {
"key": 24007,
"in_bw": 1453,
"out_bw": 579,
"reqs": 2,
"success": 2
},
"24002": {
"key": 24257,
"in_bw": 728,
"out_bw": 277,
"reqs": 1,
"success": 1
}
}
},
"protocol": {
"type": "array",
"items": {
"$ref": "#/definitions/stat"
},
"description": "An array containing statistics grouped by protocol"
},
"status_code": {
"type": "array",
"items": {
"$ref": "#/definitions/stat"
},
"description": "An array containing statistics grouped by status code"
},
"ssl_enable": {
"type": "boolean",
"description": "Whether or not SSL Analyzing is enabled on all proxy ports"
},
"success": {
"type": "number",
"description": "Total number of successful requests"
},
"total": {
"type": "number",
"description": "Total number of requests"
}
}
}
}
}
}
},
"/proxies": {
"get": {
"description": "Return the explicit configuration for all running proxies\n",
"tags": ["Proxy", "Manager"],
"responses": {
"200": {
"description": "Successful response",
"schema": {
"type": "array",
"items": {"$ref": "#/definitions/proxy"}
}
}
}
},
"post": {
"description": "Add a new proxy",
"tags": ["Proxy"],
"parameters": [
{
"name": "proxy",
"in": "body",
"description": "The proxy explicit configuration",
"schema": {
"type": "object",
"properties": {
"proxy": {
"$ref": "#/definitions/proxy"
}
}
},
"required": true
}
],
"responses": {
"200": {
"description": "Successful response",
"schema": {
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/proxy"
}
}
}
},
"400": {
"description": "Error response",
"schema": {
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"msg": {"type": "string"},
"field": {"type": "string"}
}
}
}
}
}
}
}
}
},
"/zones": {
"get": {
"description": "Return current customer's enabled zones' information",
"tags": ["Manager"],
"responses": {
"200": {
"description": "Successful response",
"schema": {
"type": "object",
"properties": {
"zones": {
"description": "Zones' information",
"type": "array",
"items": {
"$ref": "#/definitions/zone"
}
},
"def": {
"description": "Current default zone",
"type": "string"
}
}
}
}
}
}
},
"/enable_ssl": {
"post": {
"description": "Enables SSL Analyzing on all proxy ports",
"tags": ["Manager"],
"responses": {
"200": {
"description": "Successful response"
}
}
}
},
"/shutdown": {
"post": {
"description": "Shutdown Proxy Manager",
"tags": ["Manager"],
"responses": {
"200": {
"description": "Successful response"
}
}
}
},
"/upgrade": {
"post": {
"description": "Upgrade Proxy Manager",
"tags": ["Manager"],
"responses": {
"200": {
"description": "Successful response"
}
}
}
},
"/restart": {
"post": {
"description": "Restart Proxy Manager",
"tags": ["Manager"],
"responses": {
"200": {
"description": "Successful response"
}
}
}
},
"/proxies/delete": {
"post": {
"description": "Delete existing proxies",
"tags": ["Proxy"],
"parameters": [
{
"name": "options",
"in": "body",
"required": true,
"schema": {
"type": "object",
"required": ["ports"],
"properties": {
"ports": {
"type": "array",
"items": {"type": "number"},
"description": "Existing proxy ports",
"example": [24000, 24001]
}
}
}
}
],
"responses": {
"204": {
"description": "Successful response"
}
}
}
},
"/proxies/{port}": {
"put": {
"description": "Update existing proxy",
"tags": ["Proxy"],
"parameters": [
{
"name": "port",
"in": "path",
"description": "Existing proxy port",
"required": true,
"type": "integer"
},
{
"name": "proxy",
"in": "body",
"description": "The proxy explicit configuration",
"schema": {
"type": "object",
"properties": {
"proxy": {
"$ref": "#/definitions/proxy"
}
}
},
"required": true
}
],
"responses": {
"200": {
"description": "Successful response",
"schema": {
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/proxy"
}
}
}
},
"400": {
"description": "Error response"
}
}
},
"delete": {
"description": "Delete existing proxy",
"tags": ["Proxy"],
"parameters": [
{
"name": "port",
"in": "path",
"description": "Existing proxy port",
"required": true,
"type": "integer"
}
],
"responses": {
"204": {
"description": "Successful response"
}
}
}
},
"/proxies/{port}/banip": {
"post": {
"description": "Ban an IP on a specific port for a certain amount of time",
"tags": ["Proxy"],
"parameters": [
{
"name": "port",
"in": "path",
"description": "Existing proxy port",
"required": true,
"type": "integer"
},
{
"name": "options",
"in": "body",
"required": true,
"description": "IP ban options",
"schema": {
"type": "object",
"required": ["ip"],
"properties": {
"ip": {
"type": "string",
"example": "10.0.0.0"
},
"domain": {
"type": "string",
"example": "facebook.com"
},
"ms": {
"type": "integer",
"example": 60000
}
}
}
}
],
"responses": {
"204": {"description": "Successful response"}
}
}
},
"/proxies/{port}/unbanip": {
"post": {
"description": "Unban an IP on a specific port ban",
"tags": ["Proxy"],
"parameters": [
{
"name": "port",
"in": "path",
"description": "Existing proxy port",
"required": true,
"type": "integer"
},
{
"name": "options",
"in": "body",
"required": true,
"description": "IP unban options",
"schema": {
"type": "object",
"required": ["ip"],
"properties": {
"ip": {
"type": "string",
"example": "10.0.0.0"
},
"domain": {
"type": "string",
"example": "geo.brdtest.com"
}
}
}
}
],
"responses": {
"200": {
"description": "Successful response",
"schema": {
"type": "object",
"properties": {
"ips": {
"type": "array",
"items": {
"type": "object",
"properties": {
"ip": {
"type": "string"
},
"domain": {
"type": "string"
},
"to": {
"type": "number",
"description": "Timestamp of when this IP will be unbanned in millisseconds"
}
}
}
}
}
}
}
}
}
},
"/proxies/{port}/unbanips": {
"post": {
"description": "Unban all IPs on a specific port",
"tags": ["Proxy"],
"parameters": [
{
"name": "port",
"in": "path",
"description": "Existing proxy port",
"required": true,
"type": "integer"
}
],
"responses": {
"200": {
"description": "Successful response"
}
}
}
},
"/banlist/{port}": {
"get": {
"description": "Get the banned IPs of a specific port",
"tags": ["Proxy"],
"parameters": [
{
"name": "port",
"in": "path",
"description": "Existing proxy port",
"required": true,
"type": "integer"
}
],
"responses": {
"200": {
"description": "Successful response",
"schema": {
"type": "object",
"properties": {
"ips": {
"type": "array",
"items": {"type": "string"},
"example": ["10.0.0.0", "10.0.0.1"]
}
}
}
},
"400": {
"description": "Server with port does not exist"
}
}
}
},
"/proxies/{port}/banips": {
"post": {
"description": "Ban a list of IPs on a specific port for a certain amunt of time",
"tags": ["Proxy"],
"parameters": [
{
"name": "port",
"in": "path",
"description": "Existing proxy port",
"required": true,
"type": "integer"
},
{
"name": "options",
"in": "body",
"required": true,
"description": "Ips ban options",
"schema": {
"type": "object",
"required": ["ips"],
"properties": {
"ips": {
"type": "array",
"items": {"type": "string"},
"example": ["10.0.0.0", "10.0.0.1"]
},
"domain": {
"type": "string",
"example": "facebook.com"
},
"ms": {
"type": "integer",
"example": 60000
}
}
}
}
],
"responses": {
"200": {"description": "Successful response"}
}
}
},
"/banip": {
"post": {
"description": "Ban an IP on all ports for a certain amount of time",
"tags": ["Proxy"],
"parameters": [
{
"name": "options",
"in": "body",
"required": true,
"description": "IP ban options",
"schema": {
"type": "object",
"required": ["ip"],
"properties": {
"ip": {
"type": "string",
"example": "10.0.0.0"
},
"domain": {
"type": "string",
"example": "facebook.com"
},
"ms": {
"type": "integer",
"example": 60000
}
}
}
}
],
"responses": {
"204": {"description": "Successful response"}
}
}
},
"/refresh_sessions/{port}": {
"get": {
"deprecated": true,
"description": "Switch luminati sessions to new sessions (get new IPs)",
"tags": ["Proxy"],
"parameters": [
{
"name": "port",
"in": "path",
"description": "Proxy port",
"required": true,
"type": "integer"
}
],
"responses": {
"200": {
"description": "Successful response"
}
}
},
"post": {
"description": "Switch luminati sessions to new sessions (get new IPs)",
"tags": ["Proxy"],
"parameters": [
{
"name": "port",
"in": "path",
"description": "Proxy port",
"required": true,
"type": "integer"
}
],
"responses": {
"200": {
"description": "Successful response"
}
}
}
},
"/proxy_status/{port}": {
"get": {
"description": "Return the status of the proxy",
"tags": ["Proxy"],
"parameters": [
{
"name": "port",
"in": "path",
"description": "Proxy port",
"required": true,
"type": "integer"
},
{
"name": "force",
"in": "query",
"description": "Force an updated check of the status",
"type": "boolean"
}
],
"responses": {
"200": {
"description": "Successful response",
"schema": {
"type": "object",
"properties": {
"status": {"type": "string"}
}
}
}
}
}
},
"/settings": {
"get": {
"description": "Return current general settings",
"tags": ["Proxy"],
"responses": {
"200": {
"description": "Successful response",
"schema": {
"$ref": "#/definitions/settings"
}
}
}
},
"put": {
"description": "Update general settings",
"tags": ["Proxy"],
"parameters": [
{
"name": "settings",
"in": "body",
"description": "New settings",
"required": true,
"schema": {
"$ref": "#/definitions/updatable_settings"
}
}
],
"responses": {
"200": {
"description": "Successful response",
"schema": {
"$ref": "#/definitions/settings"
}
}
}
}
},
"/refresh_zones": {
"post": {
"description": "Refresh zones",
"tags": ["Proxy"],
"responses": {
"200": {
"description": "Successful response"
},
"400": {
"description": "Bad request. User is not currently logged in"
}
}
}
},
"/allocated_ips": {
"get": {
"description": "Return allocated IPs in determined zone",
"tags": ["Proxy"],
"parameters": [
{
"name": "zone",
"in": "query",
"description": "Zone",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Successful response",
"schema": {
"type": "object",
"properties": {
"ips": {
"type": "array",
"items": {"type": "string"},
"example": ["10.0.0.0", "10.0.0.1"]
}
}
}
}
}
}
},
"/allocated_vips": {
"get": {
"description": "Return allocated gIPs in determined zone",
"tags": ["Proxy"],
"parameters": [
{
"name": "zone",
"in": "query",
"description": "Zone",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Successful response",
"schema": {
"type": "object",
"properties": {
"vips": {
"type": "array",
"items": {"type": "string"},
"example": ["gip1", "gip2"]
}
}
}
}
}
}
},
"/refresh_ip/{port}": {
"post": {
"description": "Refresh allocated IP or gIP in determined port",
"tags": ["Proxy"],
"parameters": [
{
"name": "port",
"in": "path",
"description": "Proxy port",
"required": true,
"type": "integer"
},
{
"name": "options",
"in": "body",
"description": "Refresh IP options (specify either IP or gIP)",
"required": true,
"schema": {
"type": "object",
"properties": {
"ip": {
"description": "IP to be refreshed",
"type": "string",
"example": "10.0.0.0"
},
"vip": {
"description": "gIP to be refreshed",
"type": "string",
"example": "gIP_1"
}
}
}
}
],
"responses": {
"200": {
"description": "Successful response"
},
"400": {
"description": "Error response"
}
}
}
},
"/refresh_ips": {
"post": {
"description": "Refresh allocated IPs or gIPs in determined zone",
"tags": ["Proxy"],
"parameters": [
{
"name": "options",
"in": "body",
"description": "Refresh IP options",
"required": true,
"schema": {
"type": "object",
"properties": {
"zone": {
"description": "Zone",
"type": "string"
},
"ips": {
"description": "IPs to be refreshed",
"type": "array",
"items": {"type": "string"},
"example": ["10.0.0.0", "10.0.0.1"]
},
"vips": {
"description": "gIPs to be refreshed",
"type": "array",
"items": {"type": "string"},
"example": ["gIP_1", "gIP_2"]
}
}
}
}
],
"responses": {
"200": {
"description": "Successful response",
"schema": {
"type": "object",
"properties": {
"ips": {
"type": "array",
"items": {
"$ref": "#/definitions/ip_object"
}
}
}
}
}
}
}
},
"/lpm_users": {
"get": {
"description": "List of all the available pmgr users for the account",
"tags": ["Manager"],
"responses": {
"200": {
"description": "Successful response",
"schema": {
"type": "object",
"properties": {
"vips": {
"type": "array",
"items": {
"$ref": "#/definitions/lpm_user_object"
}
}
}
}
}
}
}
},
"/lpm_user": {
"post": {
"description": "Creates a new pmgr user",
"tags": ["Manager"],
"responses": {