创建浏览器
描述
创建浏览器环境,支持配置环境的名称、备注、分组和代理信息。创建成功后返回结果。
请求格式
请求方法:
POST
请求 URL
/api/addBrowser
请求参数
参数名 | 类型 | 必填 | 描述 |
---|---|---|---|
name | string | 否 | 命名环境,限制 60 字以内 |
group | string | 否 | 分组信息 |
os | string | 否 | 操作系统可选项(Win 7、Win 8、Win 10、Win 11) |
chrome_version | string | 否 | 浏览器版本信息(大版本号) |
proxy | string | 否 | |
mode | int | 否 | 代理设置(0-默认代理;1-系统代理;2-自定义代理) |
protocol | string | 否 | 代理类型(HTTP、HTTPS、SOCKS5) |
host | string | 否 | 代理主机 |
port | int | 否 | 代理端口 |
user | string | 否 | 代理用户名 |
pass | string | 否 | 代理密码 |
API | string | 否 | 动态 ip 代理提取 API |
cookie.jsonStr | json | 否 | 支持 JSON 格式的 cookie |
homepage.mode | int | 否 | mode 为 0 的时候为关闭;1 是开启主页 |
homepage.value | string | 否 | 主页链接 |
ua.mode | int | 否 | UA mode 为 0 是默认 UA,为 1 是自定义 UA |
ua.value | string | 否 | 浏览器 UA,注意得和浏览器版本一致 |
ua-full-version | string | 否 | 浏览器完整版本号 |
sec-ch-ua | string | 否 | sec-ch-ua 参数设置,一般不需要改动 |
ua-language.mode | int | 否 | 2-UA 语言跟随 ip 自动设置;1-UA 语言手动设置(默认跟随 ip) |
ua-language.language | string | 否 | UA 语言,格式参考各国语言对应的浏览器语言缩写代码 |
ua-language.value | string | 否 | 同上 |
time-zone.mode | int | 否 | 2-UA 时区跟随 ip 自动设置;1-UA 时区手动设置(默认跟随 ip) |
time-zone.zone | string | 否 | 参考 UTC+8:00 |
time-zone.utc | string | 否 | 参考 Asia/Hong_Kong |
time-zone.locale | string | 否 | 参考 UA 语言 |
time-zone.value | string | 否 | 8 |
webrtc | int | 否 | 默认 0 |
location.mode | int | 否 | 2-跟随 ip 变化;1-自定义 |
location.enable | int | 否 | 0-询问;1-允许;2-禁止 |
location.longitude | string | 否 | 经纬度 |
location.latitude | string | 否 | 经纬度 |
location.precision | string | 否 | 偏移量 |
screen.mode | int | 否 | 屏幕分辨率,0-跟随电脑;1-自定义 |
screen.width | int | 否 | 屏幕宽度 |
screen.height | int | 否 | 屏幕高度 |
screen._value | string | 否 | 2560 x 1440 |
fonts.mode | int | 否 | 0-默认字体;1-随机字体 |
fonts.value | string | 否 | 例如:"Sitka Banner", "Gabriola Regular", ... |
canvas.mode | int | 否 | 0-默认;1-随机 |
canvas.r/g/b/a | int | 否 | 参数范围-10-10 |
webgl-img.mode | int | 否 | 0-默认;1-随机 |
webgl-img.r/g/b/a | int | 否 | 参数范围-10-10 |
webgl.mode | int | 否 | 0-默认;1-随机 |
webgl.vendor | string | 否 | Google Inc. (Intel) / Google Inc. (NVIDIA) / ... |
webgl.render | string | 否 | 根据 vendor 内容选择 |
audio-context.mode | int | 否 | 0-默认;1-随机 |
audio-context.channel | float | 否 | 随机范围 0-0.0000001 |
audio-context.analyer | float | 否 | 随机范围 0-0.1 |
client-rects.mode | int | 否 | 0-默认;1-随机 |
client-rects.width | float | 否 | 随机范围-1-1 |
client-rects.height | float | 否 | 随机范围-1-1 |
speech_voices.mode | int | 否 | 0-默认;1-随机 |
speech_voices.value | string | 否 | 例如: |
ssl.mode | int | 否 | 0-默认;1-随机 |
cpu.value | int | 否 | CPU |
memory.value | int | 否 | 内存 |
device-name.value | string | 否 | 例如:DESKTOP-B5339CB6 |
mac.value | string | 否 | 例如:3A-03-7D-E9-0C-8F |
launchArgs.mode | int | 否 | 0-默认;1-自定义 |
launchArgs.value | string | 否 | 启动参数,多个参数用\n 隔开 |
请求参数示例
json
{
"name": " XXX",
"group": "默认分组",
"os": "Win 11",
"chrome_version": 124,
"proxy": {
"mode": 0,
"value": "",
"protocol": "HTTP",
"host": "",
"port": "",
"user": "",
"pass": "",
"API": ""
},
"cookie": {
"mode": 0,
"value": "",
"jsonStr": "[]"
},
"homepage": {
"mode": 0,
"value": ""
},
"ua": {
"mode": 0,
"value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36"
},
"ua-full-version": {
"mode": 1,
"value": "124.0.6367.118"
},
"sec-ch-ua": {
"mode": 0,
"value": [
{
"brand": "Chromium",
"version": 124
},
{
"brand": "Not=A?Brand",
"version": "99"
}
]
},
"ua-language": {
"mode": 2,
"language": "en-US",
"value": "en-US,en"
},
"time-zone": {
"mode": 2,
"zone": "UTC+8:00",
"utc": "Asia/Hong_Kong",
"locale": "en-US",
"name": "(UTC+08:00) Beijing, Chongqing, Hong Kong, Urumqi",
"value": 8
},
"webrtc": {
"mode": 0
},
"location": {
"mode": 2,
"enable": 1,
"longitude": "-118.24550",
"latitude": "34.05361",
"precision": 10
},
"screen": {
"mode": 0,
"width": 2560,
"height": 1440,
"_value": "2560 x 1440"
},
"fonts": {
"mode": 1,
"value": [
"Sitka Banner",
"Gabriola Regular",
"Nirmala UI",
"MS Serif",
"Sylfaen Regular",
"Franklin Gothic Medium",
"STSong",
"Segoe UI Light"
]
},
"canvas": {
"mode": 1,
"r": -9,
"g": -8,
"b": -3,
"a": 6
},
"webgl-img": {
"mode": 1,
"r": -10,
"g": -2,
"b": -2,
"a": 8
},
"webgl": {
"mode": 1,
"vendor": "Google Inc. (Intel)",
"render": "ANGLE (Intel, Intel(R) HD Graphics 530 Direct3D11 vs_5_0 ps_5_0, D3D11-27.20.100.9466)"
},
"audio-context": {
"mode": 1,
"channel": 0.00000009028343283423738,
"analyer": 0.027565168142388477
},
"media": {
"mode": 1
},
"client-rects": {
"mode": 1,
"width": 0.08938674139943492,
"height": 0.7349674887484725
},
"speech_voices": {
"mode": 1,
"value": [
{
"default": false,
"lang": "es-ES",
"localService": false,
"name": "Google español",
"voiceURI": "Google español"
},
{
"default": false,
"lang": "zh-CN",
"localService": false,
"name": "Google 普通话(中国大陆)",
"voiceURI": "Google 普通话(中国大陆)"
},
{
"default": false,
"lang": "en-GB",
"localService": false,
"name": "Google UK English Male",
"voiceURI": "Google UK English Male"
},
{
"default": false,
"lang": "hi-IN",
"localService": false,
"name": "Google हिन्दी",
"voiceURI": "Google हिन्दी"
},
{
"default": false,
"lang": "pt-BR",
"localService": false,
"name": "Google português do Brasil",
"voiceURI": "Google português do Brasil"
}
]
},
"ssl": {
"mode": 0,
"value": []
},
"cpu": {
"mode": 1,
"value": 4
},
"memory": {
"mode": 1,
"value": 64
},
"device-name": {
"mode": 1,
"value": "DESKTOP-B5339CB6"
},
"mac": {
"mode": 1,
"value": "3A-03-7D-E9-0C-8F"
},
"dnt": {
"mode": 1,
"value": 0
},
"port-scan": {
"mode": 1,
"value": []
},
"gpu": {
"mode": 1,
"value": 1
},
"launchArgs": {
"mode": 1,
"value": "--no-sandbox\n--start-maximized"
}
}
响应示例
json
{
"success": true,
"data": {
"id": 1
}
}