PUT /api/proxies/{PORT}
路径参数
string
必填
现有代理服务器的端口号
PUT body
User Object
显示 properties
显示 properties
integer
HTTP 代理的端口
string
设置为
persist 以将代理保存至配置文件。integer
将端口定义复用给定次数
boolean
array
user [string] 的列表。此项必须与
multiply_users 一起使用boolean
启用 SSL 分析
string
选择 SSL 库
| 值 | 描述 |
|---|---|
open_ssl | 打开 SSL 库 |
flex_tls | Flex TLS 库 |
string
所要监听的接口或 IP
string
客户名称
string
区域名称
string
区域密码
string
超级代理的主机名或 IP
integer
超级代理端口
string
确定代理管理器和超级代理之间将使用哪种连接
http | |
https | |
socks |
integer
超级代理出现故障时自动重试
boolean
对不安全的主机启用 SSL 连接/分析
string
国家/地区
string
州
string
城市
string
ASN
string
数据中心 IP
integer
gIP
array
来自外部供应商的代理列表。 格式:
[username:password@]ip[:port]proxy[字符串]
string
外部供应商 IP 的默认用户名
string
外部供应商 IP 的默认密码
integer
外部供应商 IP 的默认端口
string
DNS 解析
local | |
remote |
boolean
通过 DNS 进行反向查询
string
通过文件进行反向查询
array
通过值进行反向查询
string
所有代理请求的会话
boolean
使用每个请求主机的会话维护每个主机的 IP
integer
boolean
会话池大小
integer
限制超过给定数量的请求
array
代理请求规则
string
出错时阻止或允许通过超级代理自动发送请求
array
string
string
对等 IP 的操作系统
array
请求标头
- name[字符串]
- 值[字符串]
string
请求调试信息
full | |
none |
string
x-lpm-authorization headerboolean
integer
boolean
boolean
integer
string
boolean
解锁器移动 UA
string
浏览器使用的时区 ID
string
浏览器屏幕尺寸
string
浏览器中的 WebRTC 插件行为
object
带宽限制参数
- days [整数]
- bytes [整数]
- renewable [布尔值] - 更新每个周期的字节限制或者使用单个周期,并在达到周期的最后一天时停止使用。 默认值为 “true”
{
"port":24000,
"zone":"ZONE",
"proxy_type":"persist",
"customer":"CUSTOMER",
"password":"password",
"whitelist_ips":[]
}
curl -X PUT "http://127.0.0.1:22999/api/proxies/{PORT}" -H "Content-Type: application/json" -d '{"proxy":{"port":24000,"zone":"ZONE","proxy_type":"persist","customer":"CUSTOMER","password":"password","whitelist_ips":[]}}'
#!/usr/bin/env node
require('request-promise')({
method: 'PUT',
url: 'http://127.0.0.1:22999/api/proxies/{PORT}',
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); });
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.Put("http://127.0.0.1:22999/api/proxies/{PORT}"))
.bodyString(body, ContentType.APPLICATION_JSON))
.returnContent().asString();
System.out.println(res)
}
}
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.Put,
RequestUri = new Uri("http://127.0.0.1:22999/api/proxies/{PORT}"),
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);
}
}
#!/usr/bin/env python
import requests
data = {'proxy':{'port':24000,'zone': 'ZONE','proxy_type':'persist','customer':'CUSTOMER','password':'password','whitelist_ips':[]}}
r = requests.put('http://127.0.0.1:22999/api/proxies/{PORT}', data=json.dumps(data))
print(r.content)