Repository navigation
Expand file tree
/
Copy pathnode_save.yaml
More file actions
95 lines (95 loc) · 3.22 KB
/
Copy pathnode_save.yaml
File metadata and controls
95 lines (95 loc) · 3.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# POST /admin/api/nodes/save — create (id absent/0) or update a node and its inbounds.
post:
operationId: nodeSave
summary: Create or update a node
security:
- adminSession: []
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [name, vpnHost, panelBaseURL, panelBasePath, inbounds]
properties:
id:
type: integer
format: int64
description: 0/absent = create; >0 = update.
name:
type: string
vpnHost:
type: string
panelBaseURL:
type: string
panelBasePath:
type: string
token:
type: string
description: API token; empty on update keeps the stored one.
inbounds:
type: array
items:
type: object
required: [name, port]
properties:
id:
type: integer
format: int64
description: 0 = new inbound; >0 = existing node_inbounds.id.
name:
type: string
port:
type: integer
kind:
type: string
enum: [vless, hysteria2]
default: vless
description: >
Inbound kind. "vless" (default) is panel-managed (a real 3x-ui inbound).
"hysteria2" is rendered straight from the creds below — Xray has no
hysteria2, so it has no 3x-ui inbound and is not provisioned on a panel.
hysteria2:
type: object
description: Creds for a hysteria2 inbound (used only when kind=hysteria2).
properties:
password:
type: string
obfs:
type: string
description: e.g. "salamander"; empty = no obfuscation.
obfsPassword:
type: string
sni:
type: string
description: TLS SNI; empty defaults to the node's VPN host.
up:
type: string
description: Brutal up-bandwidth hint, e.g. "50 Mbps".
down:
type: string
responses:
'200':
description: saved
content:
application/json:
schema:
$ref: './common.yaml#/components/schemas/MessageResponse'
'400':
description: invalid input
content:
application/json:
schema:
$ref: './common.yaml#/components/schemas/ErrorResponse'
'401':
description: unauthorized
content:
application/json:
schema:
$ref: './common.yaml#/components/schemas/ErrorResponse'
'409':
description: node name / inbound conflict
content:
application/json:
schema:
$ref: './common.yaml#/components/schemas/ErrorResponse'