跳转到内容

创建浏览器

描述

创建浏览器环境,支持配置环境的名称、备注、分组和代理信息。创建成功后返回结果。

请求格式

请求方法:

POST

请求 URL

/api/addBrowser

请求参数

参数名类型必填描述
namestring命名环境,限制 60 字以内
groupstring分组信息
osstring操作系统可选项(Win 7、Win 8、Win 10、Win 11)
chrome_versionstring浏览器版本信息(大版本号)
proxystring
modeint代理设置(0-默认代理;1-系统代理;2-自定义代理)
protocolstring代理类型(HTTP、HTTPS、SOCKS5)
hoststring代理主机
portint代理端口
userstring代理用户名
passstring代理密码
APIstring动态 ip 代理提取 API
cookie.jsonStrjson支持 JSON 格式的 cookie
homepage.modeintmode 为 0 的时候为关闭;1 是开启主页
homepage.valuestring主页链接
ua.modeintUA mode 为 0 是默认 UA,为 1 是自定义 UA
ua.valuestring浏览器 UA,注意得和浏览器版本一致
ua-full-versionstring浏览器完整版本号
sec-ch-uastringsec-ch-ua 参数设置,一般不需要改动
ua-language.modeint2-UA 语言跟随 ip 自动设置;1-UA 语言手动设置(默认跟随 ip)
ua-language.languagestringUA 语言,格式参考各国语言对应的浏览器语言缩写代码
ua-language.valuestring同上
time-zone.modeint2-UA 时区跟随 ip 自动设置;1-UA 时区手动设置(默认跟随 ip)
time-zone.zonestring参考 UTC+8:00
time-zone.utcstring参考 Asia/Hong_Kong
time-zone.localestring参考 UA 语言
time-zone.valuestring8
webrtcint默认 0
location.modeint2-跟随 ip 变化;1-自定义
location.enableint0-询问;1-允许;2-禁止
location.longitudestring经纬度
location.latitudestring经纬度
location.precisionstring偏移量
screen.modeint屏幕分辨率,0-跟随电脑;1-自定义
screen.widthint屏幕宽度
screen.heightint屏幕高度
screen._valuestring2560 x 1440
fonts.modeint0-默认字体;1-随机字体
fonts.valuestring例如:"Sitka Banner", "Gabriola Regular", ...
canvas.modeint0-默认;1-随机
canvas.r/g/b/aint参数范围-10-10
webgl-img.modeint0-默认;1-随机
webgl-img.r/g/b/aint参数范围-10-10
webgl.modeint0-默认;1-随机
webgl.vendorstringGoogle Inc. (Intel) / Google Inc. (NVIDIA) / ...
webgl.renderstring根据 vendor 内容选择
audio-context.modeint0-默认;1-随机
audio-context.channelfloat随机范围 0-0.0000001
audio-context.analyerfloat随机范围 0-0.1
client-rects.modeint0-默认;1-随机
client-rects.widthfloat随机范围-1-1
client-rects.heightfloat随机范围-1-1
speech_voices.modeint0-默认;1-随机
speech_voices.valuestring例如:
ssl.modeint0-默认;1-随机
cpu.valueintCPU
memory.valueint内存
device-name.valuestring例如:DESKTOP-B5339CB6
mac.valuestring例如:3A-03-7D-E9-0C-8F
launchArgs.modeint0-默认;1-自定义
launchArgs.valuestring启动参数,多个参数用\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
  }
}

License BSD