hosts_update
Modify host configuration parameters in a VPN panel by updating UUID, address, port, security settings, and operational status.
Instructions
Update an existing host
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uuid | Yes | Host UUID to update | |
| remark | No | New remark/name | |
| address | No | New address | |
| port | No | New port | |
| path | No | New URL path | |
| sni | No | New SNI | |
| host | No | New host header | |
| alpn | No | New ALPN | |
| fingerprint | No | New fingerprint | |
| isDisabled | No | Enable/disable host | |
| securityLayer | No | New security layer | |
| tag | No | New tag | |
| serverDescription | No | New server description |
Implementation Reference
- src/tools/hosts.ts:126-177 (handler)Tool registration and handler implementation for 'hosts_update' in src/tools/hosts.ts. It validates input parameters using Zod and calls `client.updateHost(params)`.
server.tool( 'hosts_update', 'Update an existing host', { uuid: z.string().describe('Host UUID to update'), remark: z.string().optional().describe('New remark/name'), address: z.string().optional().describe('New address'), port: z.number().optional().describe('New port'), path: z.string().optional().describe('New URL path'), sni: z.string().optional().describe('New SNI'), host: z.string().optional().describe('New host header'), alpn: z .enum(['h3', 'h2', 'http/1.1', 'h2,http/1.1', 'h3,h2,http/1.1', 'h3,h2']) .optional() .describe('New ALPN'), fingerprint: z .enum([ 'chrome', 'firefox', 'safari', 'ios', 'android', 'edge', 'qq', 'random', 'randomized', ]) .optional() .describe('New fingerprint'), isDisabled: z .boolean() .optional() .describe('Enable/disable host'), securityLayer: z .enum(['DEFAULT', 'TLS', 'NONE']) .optional() .describe('New security layer'), tag: z.string().optional().describe('New tag'), serverDescription: z .string() .optional() .describe('New server description'), }, async (params) => { try { const result = await client.updateHost(params); return toolResult(result); } catch (e) { return toolError(e); } }, );