3x-ui3x-ui

Hosts

Per-inbound override endpoints. Each enabled host renders one extra subscription link/proxy with its own address/port/TLS, superseding the legacy externalProxy array. All endpoints under /panel/api/hosts.

GET
/panel/api/hosts/list

Authorization

AuthorizationBearer <token>

API token from Settings → Security → API Token. Send as Authorization: Bearer <token>.

In: header

Response Body

application/json

curl -X GET "https://example.com/panel/api/hosts/list"
{  "success": true,  "obj": [    {      "address": "cdn.example.com",      "allowInsecure": false,      "alpn": [        ""      ],      "createdAt": 0,      "echConfigList": "",      "excludeFromSubTypes": [        ""      ],      "finalMask": "",      "fingerprint": "",      "hostHeader": "",      "id": 1,      "inboundId": 1,      "isDisabled": false,      "isHidden": false,      "keepSniBlank": false,      "mihomoIpVersion": "dual",      "mihomoX25519": false,      "muxParams": null,      "nodeGuids": [        ""      ],      "overrideSniFromAddress": false,      "path": "",      "pinnedPeerCertSha256": [        ""      ],      "port": 8443,      "remark": "cdn-front",      "security": "same",      "serverDescription": "",      "shuffleHost": false,      "sni": "",      "sockoptParams": null,      "sortOrder": 0,      "tags": [        ""      ],      "updatedAt": 0,      "verifyPeerCertByName": "",      "vlessRoute": ""    }  ]}
GET
/panel/api/hosts/get/{id}

Authorization

AuthorizationBearer <token>

API token from Settings → Security → API Token. Send as Authorization: Bearer <token>.

In: header

Path Parameters

id*integer

Host ID.

Response Body

application/json

curl -X GET "https://example.com/panel/api/hosts/get/0"
{  "success": true,  "obj": {    "address": "cdn.example.com",    "allowInsecure": false,    "alpn": [      ""    ],    "createdAt": 0,    "echConfigList": "",    "excludeFromSubTypes": [      ""    ],    "finalMask": "",    "fingerprint": "",    "hostHeader": "",    "id": 1,    "inboundId": 1,    "isDisabled": false,    "isHidden": false,    "keepSniBlank": false,    "mihomoIpVersion": "dual",    "mihomoX25519": false,    "muxParams": null,    "nodeGuids": [      ""    ],    "overrideSniFromAddress": false,    "path": "",    "pinnedPeerCertSha256": [      ""    ],    "port": 8443,    "remark": "cdn-front",    "security": "same",    "serverDescription": "",    "shuffleHost": false,    "sni": "",    "sockoptParams": null,    "sortOrder": 0,    "tags": [      ""    ],    "updatedAt": 0,    "verifyPeerCertByName": "",    "vlessRoute": ""  }}
GET
/panel/api/hosts/byInbound/{inboundId}

Authorization

AuthorizationBearer <token>

API token from Settings → Security → API Token. Send as Authorization: Bearer <token>.

In: header

Path Parameters

inboundId*integer

Inbound ID.

Response Body

application/json

curl -X GET "https://example.com/panel/api/hosts/byInbound/0"
{  "success": true,  "obj": [    {      "address": "cdn.example.com",      "allowInsecure": false,      "alpn": [        ""      ],      "createdAt": 0,      "echConfigList": "",      "excludeFromSubTypes": [        ""      ],      "finalMask": "",      "fingerprint": "",      "hostHeader": "",      "id": 1,      "inboundId": 1,      "isDisabled": false,      "isHidden": false,      "keepSniBlank": false,      "mihomoIpVersion": "dual",      "mihomoX25519": false,      "muxParams": null,      "nodeGuids": [        ""      ],      "overrideSniFromAddress": false,      "path": "",      "pinnedPeerCertSha256": [        ""      ],      "port": 8443,      "remark": "cdn-front",      "security": "same",      "serverDescription": "",      "shuffleHost": false,      "sni": "",      "sockoptParams": null,      "sortOrder": 0,      "tags": [        ""      ],      "updatedAt": 0,      "verifyPeerCertByName": "",      "vlessRoute": ""    }  ]}
GET
/panel/api/hosts/tags

Authorization

AuthorizationBearer <token>

API token from Settings → Security → API Token. Send as Authorization: Bearer <token>.

In: header

Response Body

application/json

curl -X GET "https://example.com/panel/api/hosts/tags"
{  "success": true,  "obj": [    "CDN",    "EU",    "FAST"  ]}
POST
/panel/api/hosts/add

Authorization

AuthorizationBearer <token>

API token from Settings → Security → API Token. Send as Authorization: Bearer <token>.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/panel/api/hosts/add" \  -H "Content-Type: application/json" \  -d '{    "inboundId": 1,    "remark": "cdn-front",    "address": "cdn.example.com",    "port": 8443,    "security": "same",    "sni": "",    "tags": [      "CDN"    ]  }'
{  "success": true,  "obj": {    "address": "cdn.example.com",    "allowInsecure": false,    "alpn": [      ""    ],    "createdAt": 0,    "echConfigList": "",    "excludeFromSubTypes": [      ""    ],    "finalMask": "",    "fingerprint": "",    "hostHeader": "",    "id": 1,    "inboundId": 1,    "isDisabled": false,    "isHidden": false,    "keepSniBlank": false,    "mihomoIpVersion": "dual",    "mihomoX25519": false,    "muxParams": null,    "nodeGuids": [      ""    ],    "overrideSniFromAddress": false,    "path": "",    "pinnedPeerCertSha256": [      ""    ],    "port": 8443,    "remark": "cdn-front",    "security": "same",    "serverDescription": "",    "shuffleHost": false,    "sni": "",    "sockoptParams": null,    "sortOrder": 0,    "tags": [      ""    ],    "updatedAt": 0,    "verifyPeerCertByName": "",    "vlessRoute": ""  }}
POST
/panel/api/hosts/update/{id}

Authorization

AuthorizationBearer <token>

API token from Settings → Security → API Token. Send as Authorization: Bearer <token>.

In: header

Path Parameters

id*integer

Host ID.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/panel/api/hosts/update/0" \  -H "Content-Type: application/json" \  -d '{    "inboundId": 1,    "remark": "cdn-front",    "address": "cdn.example.com",    "port": 8443,    "security": "same",    "sni": "",    "tags": [      "CDN"    ]  }'
{  "success": true,  "obj": {    "address": "cdn.example.com",    "allowInsecure": false,    "alpn": [      ""    ],    "createdAt": 0,    "echConfigList": "",    "excludeFromSubTypes": [      ""    ],    "finalMask": "",    "fingerprint": "",    "hostHeader": "",    "id": 1,    "inboundId": 1,    "isDisabled": false,    "isHidden": false,    "keepSniBlank": false,    "mihomoIpVersion": "dual",    "mihomoX25519": false,    "muxParams": null,    "nodeGuids": [      ""    ],    "overrideSniFromAddress": false,    "path": "",    "pinnedPeerCertSha256": [      ""    ],    "port": 8443,    "remark": "cdn-front",    "security": "same",    "serverDescription": "",    "shuffleHost": false,    "sni": "",    "sockoptParams": null,    "sortOrder": 0,    "tags": [      ""    ],    "updatedAt": 0,    "verifyPeerCertByName": "",    "vlessRoute": ""  }}
POST
/panel/api/hosts/del/{id}

Authorization

AuthorizationBearer <token>

API token from Settings → Security → API Token. Send as Authorization: Bearer <token>.

In: header

Path Parameters

id*integer

Host ID.

Response Body

application/json

curl -X POST "https://example.com/panel/api/hosts/del/0"
{  "success": true,  "msg": "string",  "obj": null}
POST
/panel/api/hosts/setEnable/{id}

Authorization

AuthorizationBearer <token>

API token from Settings → Security → API Token. Send as Authorization: Bearer <token>.

In: header

Path Parameters

id*integer

Host ID.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/panel/api/hosts/setEnable/0" \  -H "Content-Type: application/json" \  -d '{    "enable": true  }'
{  "success": true,  "msg": "string",  "obj": null}
POST
/panel/api/hosts/reorder

Authorization

AuthorizationBearer <token>

API token from Settings → Security → API Token. Send as Authorization: Bearer <token>.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/panel/api/hosts/reorder" \  -H "Content-Type: application/json" \  -d '{    "ids": [      3,      1,      2    ]  }'
{  "success": true,  "msg": "string",  "obj": null}
POST
/panel/api/hosts/bulk/setEnable

Authorization

AuthorizationBearer <token>

API token from Settings → Security → API Token. Send as Authorization: Bearer <token>.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/panel/api/hosts/bulk/setEnable" \  -H "Content-Type: application/json" \  -d '{    "ids": [      1,      2,      3    ],    "enable": false  }'
{  "success": true,  "msg": "string",  "obj": null}
POST
/panel/api/hosts/bulk/del

Authorization

AuthorizationBearer <token>

API token from Settings → Security → API Token. Send as Authorization: Bearer <token>.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/panel/api/hosts/bulk/del" \  -H "Content-Type: application/json" \  -d '{    "ids": [      1,      2,      3    ]  }'
{  "success": true,  "msg": "string",  "obj": null}