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

headerAuthorizationBearer <token>

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

Response Body

Successful response

application/json
  1. response
success?boolean
msg?string
obj?array<>
Example Request
curl -X GET 'https://example.com/panel/api/hosts/list'
Example Response200
{  "success": true,  "obj": [    {      "allowInsecure": false,      "alpn": [        ""      ],      "cipherSuites": "",      "echConfigList": "",      "excludeFromSubTypes": [        ""      ],      "finalMask": "",      "fingerprint": "",      "groupId": "",      "hostHeader": "",      "hosts": [        ""      ],      "inboundIds": [        0      ],      "isDisabled": false,      "isHidden": false,      "keepSniBlank": false,      "mihomoIpVersion": "dual",      "mihomoX25519": false,      "muxParams": "",      "nodeGuids": [        ""      ],      "overrideSniFromAddress": false,      "path": "",      "pinnedPeerCertSha256": [        ""      ],      "port": 0,      "randomCount": 1,      "remark": "",      "security": "same",      "serverDescription": "",      "shuffleHost": false,      "sni": "",      "sniSharedRandom": false,      "snis": [        ""      ],      "sockoptParams": "",      "sortOrder": 0,      "tags": [        ""      ],      "verifyPeerCertByName": "",      "vlessRoute": ""    }  ]}
GET
/panel/api/hosts/raw

Authorization

headerAuthorizationBearer <token>

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

Response Body

Successful response

application/json
  1. response
success?boolean
msg?string
obj?array<>
Example Request
curl -X GET 'https://example.com/panel/api/hosts/raw'
Example Response200
{  "success": true,  "obj": [    {      "address": "cdn.example.com",      "allowInsecure": false,      "alpn": [        ""      ],      "cipherSuites": "",      "createdAt": 0,      "echConfigList": "",      "excludeFromSubTypes": [        ""      ],      "finalMask": "",      "fingerprint": "",      "groupId": "",      "hostHeader": "",      "id": 1,      "inboundId": 1,      "isDisabled": false,      "isHidden": false,      "keepSniBlank": false,      "mihomoIpVersion": "dual",      "mihomoX25519": false,      "muxParams": null,      "nodeGuids": [        ""      ],      "overrideSniFromAddress": false,      "path": "",      "pinnedPeerCertSha256": [        ""      ],      "port": 8443,      "randomCount": 1,      "remark": "cdn-front",      "security": "same",      "serverDescription": "",      "shuffleHost": false,      "sni": "",      "sniSharedRandom": false,      "snis": [        ""      ],      "sockoptParams": null,      "sortOrder": 0,      "tags": [        ""      ],      "updatedAt": 0,      "verifyPeerCertByName": "",      "vlessRoute": "443"    }  ]}
GET
/panel/api/hosts/get/{groupId}

Authorization

headerAuthorizationBearer <token>

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

Path Parameters

groupId*string

Host Group ID.

Response Body

Successful response

application/json
  1. response
success?boolean
msg?string
obj?
Example Request
curl -X GET 'https://example.com/panel/api/hosts/get/string'
Example Response200
{  "success": true,  "obj": {    "allowInsecure": false,    "alpn": [      ""    ],    "cipherSuites": "",    "echConfigList": "",    "excludeFromSubTypes": [      ""    ],    "finalMask": "",    "fingerprint": "",    "groupId": "",    "hostHeader": "",    "hosts": [      ""    ],    "inboundIds": [      0    ],    "isDisabled": false,    "isHidden": false,    "keepSniBlank": false,    "mihomoIpVersion": "dual",    "mihomoX25519": false,    "muxParams": "",    "nodeGuids": [      ""    ],    "overrideSniFromAddress": false,    "path": "",    "pinnedPeerCertSha256": [      ""    ],    "port": 0,    "randomCount": 1,    "remark": "",    "security": "same",    "serverDescription": "",    "shuffleHost": false,    "sni": "",    "sniSharedRandom": false,    "snis": [      ""    ],    "sockoptParams": "",    "sortOrder": 0,    "tags": [      ""    ],    "verifyPeerCertByName": "",    "vlessRoute": ""  }}
GET
/panel/api/hosts/byInbound/{inboundId}

Authorization

headerAuthorizationBearer <token>

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

Path Parameters

inboundId*integer

Inbound ID.

Response Body

Successful response

application/json
  1. response
success?boolean
msg?string
obj?array<>
Example Request
curl -X GET 'https://example.com/panel/api/hosts/byInbound/0'
Example Response200
{  "success": true,  "obj": [    {      "allowInsecure": false,      "alpn": [        ""      ],      "cipherSuites": "",      "echConfigList": "",      "excludeFromSubTypes": [        ""      ],      "finalMask": "",      "fingerprint": "",      "groupId": "",      "hostHeader": "",      "hosts": [        ""      ],      "inboundIds": [        0      ],      "isDisabled": false,      "isHidden": false,      "keepSniBlank": false,      "mihomoIpVersion": "dual",      "mihomoX25519": false,      "muxParams": "",      "nodeGuids": [        ""      ],      "overrideSniFromAddress": false,      "path": "",      "pinnedPeerCertSha256": [        ""      ],      "port": 0,      "randomCount": 1,      "remark": "",      "security": "same",      "serverDescription": "",      "shuffleHost": false,      "sni": "",      "sniSharedRandom": false,      "snis": [        ""      ],      "sockoptParams": "",      "sortOrder": 0,      "tags": [        ""      ],      "verifyPeerCertByName": "",      "vlessRoute": ""    }  ]}
GET
/panel/api/hosts/tags

Authorization

headerAuthorizationBearer <token>

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

Response Body

Successful response

application/json
  1. response
success?boolean
msg?string
obj?unknown
Example Request
curl -X GET 'https://example.com/panel/api/hosts/tags'
Example Response200
{  "success": true,  "obj": [    "CDN",    "EU",    "FAST"  ]}
POST
/panel/api/hosts/add

Authorization

headerAuthorizationBearer <token>

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

Request Body

application/json
  1. body

Response Body

Successful response

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

Authorization

headerAuthorizationBearer <token>

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

Path Parameters

groupId*string

Host Group ID.

Request Body

application/json
  1. body

Response Body

Successful response

application/json
  1. response
success?boolean
msg?string
obj?array<>
Example Request
curl -X POST 'https://example.com/panel/api/hosts/update/string' \  -H 'Content-Type: application/json' \  -d '{  "inboundIds": [    1  ],  "remark": "cdn-front",  "hosts": [    "cdn.example.com"  ],  "port": 8443,  "security": "same",  "tags": [    "CDN"  ]}'
Example Response200
{  "success": true,  "obj": [    {      "address": "cdn.example.com",      "allowInsecure": false,      "alpn": [        ""      ],      "cipherSuites": "",      "createdAt": 0,      "echConfigList": "",      "excludeFromSubTypes": [        ""      ],      "finalMask": "",      "fingerprint": "",      "groupId": "",      "hostHeader": "",      "id": 1,      "inboundId": 1,      "isDisabled": false,      "isHidden": false,      "keepSniBlank": false,      "mihomoIpVersion": "dual",      "mihomoX25519": false,      "muxParams": null,      "nodeGuids": [        ""      ],      "overrideSniFromAddress": false,      "path": "",      "pinnedPeerCertSha256": [        ""      ],      "port": 8443,      "randomCount": 1,      "remark": "cdn-front",      "security": "same",      "serverDescription": "",      "shuffleHost": false,      "sni": "",      "sniSharedRandom": false,      "snis": [        ""      ],      "sockoptParams": null,      "sortOrder": 0,      "tags": [        ""      ],      "updatedAt": 0,      "verifyPeerCertByName": "",      "vlessRoute": "443"    }  ]}

Delete a host group.

POST
/panel/api/hosts/del/{groupId}

Authorization

headerAuthorizationBearer <token>

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

Path Parameters

groupId*string

Host Group ID.

Response Body

Successful response

application/json
  1. response
success?boolean
msg?string
obj?unknown
Example Request
curl -X POST 'https://example.com/panel/api/hosts/del/string'
Example Response200
{  "success": true,  "msg": "string",  "obj": null}
POST
/panel/api/hosts/setEnable/{groupId}

Authorization

headerAuthorizationBearer <token>

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

Path Parameters

groupId*string

Host Group ID.

Request Body

application/json
  1. body

Response Body

Successful response

application/json
  1. response
success?boolean
msg?string
obj?unknown
Example Request
curl -X POST 'https://example.com/panel/api/hosts/setEnable/string' \  -H 'Content-Type: application/json' \  -d '{  "enable": true}'
Example Response200
{  "success": true,  "msg": "string",  "obj": null}
POST
/panel/api/hosts/reorder

Authorization

headerAuthorizationBearer <token>

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

Request Body

application/json
  1. body

Response Body

Successful response

application/json
  1. response
success?boolean
msg?string
obj?unknown
Example Request
curl -X POST 'https://example.com/panel/api/hosts/reorder' \  -H 'Content-Type: application/json' \  -d '{  "ids": [    "abc-123",    "def-456"  ]}'
Example Response200
{  "success": true,  "msg": "string",  "obj": null}
POST
/panel/api/hosts/bulk/add

Authorization

headerAuthorizationBearer <token>

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

Request Body

application/json
  1. body

Response Body

Successful response

application/json
  1. response
success?boolean
msg?string
obj?array<>
Example Request
curl -X POST 'https://example.com/panel/api/hosts/bulk/add' \  -H 'Content-Type: application/json' \  -d '{  "inboundIds": [    1,    2  ],  "hosts": [    "cdn.example.com",    "cdn2.example.com:443"  ],  "remark": "Cloudflare CDN",  "port": 0,  "security": "same",  "isDisabled": false}'
Example Response200
{  "success": true,  "obj": [    {      "address": "cdn.example.com",      "allowInsecure": false,      "alpn": [        ""      ],      "cipherSuites": "",      "createdAt": 0,      "echConfigList": "",      "excludeFromSubTypes": [        ""      ],      "finalMask": "",      "fingerprint": "",      "groupId": "",      "hostHeader": "",      "id": 1,      "inboundId": 1,      "isDisabled": false,      "isHidden": false,      "keepSniBlank": false,      "mihomoIpVersion": "dual",      "mihomoX25519": false,      "muxParams": null,      "nodeGuids": [        ""      ],      "overrideSniFromAddress": false,      "path": "",      "pinnedPeerCertSha256": [        ""      ],      "port": 8443,      "randomCount": 1,      "remark": "cdn-front",      "security": "same",      "serverDescription": "",      "shuffleHost": false,      "sni": "",      "sniSharedRandom": false,      "snis": [        ""      ],      "sockoptParams": null,      "sortOrder": 0,      "tags": [        ""      ],      "updatedAt": 0,      "verifyPeerCertByName": "",      "vlessRoute": "443"    }  ]}
POST
/panel/api/hosts/bulk/setEnable

Authorization

headerAuthorizationBearer <token>

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

Request Body

application/json
  1. body

Response Body

Successful response

application/json
  1. response
success?boolean
msg?string
obj?unknown
Example Request
curl -X POST 'https://example.com/panel/api/hosts/bulk/setEnable' \  -H 'Content-Type: application/json' \  -d '{  "ids": [    "abc-123",    "def-456"  ],  "enable": false}'
Example Response200
{  "success": true,  "msg": "string",  "obj": null}
POST
/panel/api/hosts/bulk/del

Authorization

headerAuthorizationBearer <token>

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

Request Body

application/json
  1. body

Response Body

Successful response

application/json
  1. response
success?boolean
msg?string
obj?unknown
Example Request
curl -X POST 'https://example.com/panel/api/hosts/bulk/del' \  -H 'Content-Type: application/json' \  -d '{  "ids": [    "abc-123",    "def-456"  ]}'
Example Response200
{  "success": true,  "msg": "string",  "obj": null}