# Thiết lập proxy điện thoại đám mây

Thiết lập cấu hình proxy cho một hoặc nhiều điện thoại đám mây. Hỗ trợ liên kết trực tiếp proxyId, hoặc thêm/sửa đổi các tham số proxy chi tiết. Định dạng payload yêu cầu giống hệt với cấu hình proxy của trình duyệt và các thiết lập được áp dụng ngay lập tức.

Endpoint: POST /api/cloudphone/setProxy
Version: 1.0.0

## Request fields (application/json):

  - `ids` (array)
    List of cloud phone environment IDs
    Example: [1558968155668507]

  - `uniqueIds` (array)
    List of display sequence IDs of cloud phone environments (used as reference mapping if envIds are not provided)
    Example: [1001]

  - `proxy` (object)

  - `proxy.proxyId` (integer)
    Proxy Configuration ID (If this value is greater than 0, it means reusing an existing proxy configuration; if empty or <=0, it represents using the subsequent detailed parameters to create/update proxy details)
    Example: 10002

  - `proxy.proxyIp` (string, required)
    Proxy server IP address
    Example: 192.168.1.100

  - `proxy.proxyPort` (integer, required)
    Proxy server port
    Example: 8080

  - `proxy.proxyName` (string)
    Proxy configuration name/description
    Example: test_proxy_01

  - `proxy.proxyProvider` (integer, required)
    Proxy provider 0:http, 1:https, 2:socks5
    Example: 2

  - `proxy.username` (string)
    Proxy authentication username
    Example: admin

  - `proxy.password` (string)
    Proxy authentication password
    Example: pwd123

  - `proxy.refreshUrl` (string)
    API URL to refresh dynamic proxy IP
    Example: http://api.proxy.com/refresh

  - `proxy.country` (string)
    Country code of the proxy location (e.g. CN, US)
    Example: US

  - `proxy.state` (string)
    State/Province of the proxy location
    Example: California

  - `proxy.city` (string)
    City of the proxy location
    Example: Los Angeles

## Response 200 fields (application/json):

  - `code` (integer)
    Response code: 0 = success, >0 = error

  - `data` (object)
    Empty response data
    Example: {}

  - `msg` (string)
    Message; populated if code > 0

