POST
/
boxes
/
{boxId}
/
proxy
JavaScript
import GboxSDK from "gbox-sdk";

const gboxSDK = new GboxSDK({
  apiKey: process.env["GBOX_API_KEY"] // This is the default and can be omitted
});

async function main() {
  const box = await gboxSDK.create({ type: "android" });

  await box.proxy.set({
    host: "127.0.0.1",
    port: 8080,
    auth: {
      username: "username",
      password: "password"
    }
  });

  console.log("HTTP proxy set successfully");
}

main();
{
  "auth": {
    "username": "admin",
    "password": "password"
  },
  "excludes": [
    "127.0.0.1",
    "localhost"
  ],
  "host": "127.0.0.1",
  "port": 8080,
  "pacUrl": "http://proxy.company.com/proxy.pac"
}

Authorizations

Authorization
string
header
required

Enter your API Key in the format: Bearer <token>. Get it from https://gbox.ai

Path Parameters

boxId
string
required

Box ID

Example:

"c9bdc193-b54b-4ddb-a035-5ac0c598d32d"

Body

application/json

Box Http Proxy

host
string
required

The host address of the proxy server

Example:

"127.0.0.1"

port
number
required

The port number of the proxy server

Example:

8080

auth
object

Authentication for the proxy Box Proxy Auth

excludes
string[]

List of IP addresses and domains that should bypass the proxy. These addresses will be accessed directly without going through the proxy server. Default is ['127.0.0.1', 'localhost']

Example:
["127.0.0.1", "localhost"]
pacUrl
string

PAC (Proxy Auto-Configuration) URL.

Example:

"http://proxy.company.com/proxy.pac"

Response

200 - application/json

Proxy set

Box Http Proxy

host
string
required

The host address of the proxy server

Example:

"127.0.0.1"

port
number
required

The port number of the proxy server

Example:

8080

auth
object

Authentication for the proxy Box Proxy Auth

excludes
string[]

List of IP addresses and domains that should bypass the proxy. These addresses will be accessed directly without going through the proxy server. Default is ['127.0.0.1', 'localhost']

Example:
["127.0.0.1", "localhost"]
pacUrl
string

PAC (Proxy Auto-Configuration) URL.

Example:

"http://proxy.company.com/proxy.pac"