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.
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": "" } ]}API token from Settings → Security → API Token. Send as Authorization: Bearer <token>.
In: header
Path Parameters
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": "" }}API token from Settings → Security → API Token. Send as Authorization: Bearer <token>.
In: header
Path Parameters
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": "" } ]}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" ]}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": "" }}Replace a host’s content. The inbound and sort order are immutable here (use /reorder for ordering).
API token from Settings → Security → API Token. Send as Authorization: Bearer <token>.
In: header
Path Parameters
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": "" }}API token from Settings → Security → API Token. Send as Authorization: Bearer <token>.
In: header
Path Parameters
Host ID.
Response Body
application/json
curl -X POST "https://example.com/panel/api/hosts/del/0"{ "success": true, "msg": "string", "obj": null}API token from Settings → Security → API Token. Send as Authorization: Bearer <token>.
In: header
Path Parameters
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}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}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}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}
3x-ui