Proxy Settings
Section titled “Proxy Settings”Container-wide proxy root settings expose the master enable_proxy kill-switch and the default allow/deny policy that applies to any proxy permission that does not specify its own rule. Use these endpoints to inspect the current root configuration and to update it with optimistic-concurrency control via the If-Match ETag.
Base URL for all cURL examples: https://api.hoody.icu
Get container proxy root settings
Section titled “Get container proxy root settings”GET /api/v1/containers/{id}/proxy/settings
Returns the current proxy root settings for the container, including an ETag header value suitable for use as an If-Match precondition on subsequent updates.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | Container ID |
curl -X GET "https://api.hoody.icu/api/v1/containers/cnt_8f3a1b2c4d5e6f70/proxy/settings" \ -H "Authorization: Bearer <token>"import { HoodyClient } from "hoody-sdk";
const client = new HoodyClient({ token: process.env.HOODY_TOKEN });
const settings = await client.api.proxyDiscovery.getContainerProxySettings( "cnt_8f3a1b2c4d5e6f70");
console.log(settings.data.enable_proxy);console.log(settings.data.default);console.log(settings.data.etag);{ "statusCode": 200, "message": "Proxy settings retrieved successfully", "data": { "enable_proxy": true, "default": "deny", "file_version": 3, "etag": "file:v3" }}Update container proxy root settings
Section titled “Update container proxy root settings”PUT /api/v1/containers/{id}/proxy/settings
Updates one or both of enable_proxy and default. The request must include the If-Match: file:v precondition header obtained from a previous GET. The response returns the updated settings and a fresh ETag.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | Container ID |
if-match | header | string | No | file:v ETag precondition |
Request Body
Section titled “Request Body”| Field | Type | Required | Description |
|---|---|---|---|
enable_proxy | boolean | No | Master kill-switch for the container proxy subsystem |
default | string | No | Default policy when no specific permission rule applies. Allowed values: allow, deny |
The body must include at least one of the fields above.
curl -X PUT "https://api.hoody.icu/api/v1/containers/cnt_8f3a1b2c4d5e6f70/proxy/settings" \ -H "Authorization: Bearer <token>" \ -H "Content-Type: application/json" \ -H "If-Match: file:v3" \ -d '{ "enable_proxy": true, "default": "allow" }'import { HoodyClient } from "hoody-sdk";
const client = new HoodyClient({ token: process.env.HOODY_TOKEN });
const updated = await client.api.proxyDiscovery.updateContainerProxySettings( "cnt_8f3a1b2c4d5e6f70", { enable_proxy: true, default: "allow" }, { ifMatch: "file:v3" });
console.log(updated.data.etag);{ "statusCode": 200, "message": "Proxy settings updated successfully", "data": { "enable_proxy": true, "default": "allow", "file_version": 4, "etag": "file:v4" }}