add auther api
This commit is contained in:
@ -25,6 +25,22 @@ definitions:
|
||||
x-go-name: Username
|
||||
type: object
|
||||
x-go-package: github.com/go-gost/gost/pkg/config
|
||||
AutherConfig:
|
||||
properties:
|
||||
auths:
|
||||
items:
|
||||
$ref: '#/definitions/AuthConfig'
|
||||
type: array
|
||||
x-go-name: Auths
|
||||
name:
|
||||
type: string
|
||||
x-go-name: Name
|
||||
type:
|
||||
description: inline, file, redis, etc.
|
||||
type: string
|
||||
x-go-name: Type
|
||||
type: object
|
||||
x-go-package: github.com/go-gost/gost/pkg/config
|
||||
BypassConfig:
|
||||
properties:
|
||||
matchers:
|
||||
@ -38,6 +54,10 @@ definitions:
|
||||
reverse:
|
||||
type: boolean
|
||||
x-go-name: Reverse
|
||||
type:
|
||||
description: inline, file, etc.
|
||||
type: string
|
||||
x-go-name: Type
|
||||
type: object
|
||||
x-go-package: github.com/go-gost/gost/pkg/config
|
||||
ChainConfig:
|
||||
@ -58,6 +78,11 @@ definitions:
|
||||
properties:
|
||||
api:
|
||||
$ref: '#/definitions/APIConfig'
|
||||
authers:
|
||||
items:
|
||||
$ref: '#/definitions/AutherConfig'
|
||||
type: array
|
||||
x-go-name: Authers
|
||||
bypasses:
|
||||
items:
|
||||
$ref: '#/definitions/BypassConfig'
|
||||
@ -144,11 +169,11 @@ definitions:
|
||||
x-go-package: github.com/go-gost/gost/pkg/config
|
||||
HandlerConfig:
|
||||
properties:
|
||||
auths:
|
||||
items:
|
||||
$ref: '#/definitions/AuthConfig'
|
||||
type: array
|
||||
x-go-name: Auths
|
||||
auth:
|
||||
$ref: '#/definitions/AuthConfig'
|
||||
auther:
|
||||
type: string
|
||||
x-go-name: Auther
|
||||
chain:
|
||||
type: string
|
||||
x-go-name: Chain
|
||||
@ -216,15 +241,19 @@ definitions:
|
||||
name:
|
||||
type: string
|
||||
x-go-name: Name
|
||||
type:
|
||||
description: inline, file, etc.
|
||||
type: string
|
||||
x-go-name: Type
|
||||
type: object
|
||||
x-go-package: github.com/go-gost/gost/pkg/config
|
||||
ListenerConfig:
|
||||
properties:
|
||||
auths:
|
||||
items:
|
||||
$ref: '#/definitions/AuthConfig'
|
||||
type: array
|
||||
x-go-name: Auths
|
||||
auth:
|
||||
$ref: '#/definitions/AuthConfig'
|
||||
auther:
|
||||
type: string
|
||||
x-go-name: Auther
|
||||
chain:
|
||||
type: string
|
||||
x-go-name: Chain
|
||||
@ -319,6 +348,10 @@ definitions:
|
||||
$ref: '#/definitions/NameserverConfig'
|
||||
type: array
|
||||
x-go-name: Nameservers
|
||||
type:
|
||||
description: inline, file, etc.
|
||||
type: string
|
||||
x-go-name: Type
|
||||
type: object
|
||||
x-go-package: github.com/go-gost/gost/pkg/config
|
||||
Response:
|
||||
@ -408,6 +441,56 @@ paths:
|
||||
summary: Get current config.
|
||||
tags:
|
||||
- ConfigManagement
|
||||
/config/authers:
|
||||
post:
|
||||
operationId: createAutherRequest
|
||||
parameters:
|
||||
- in: body
|
||||
name: data
|
||||
schema:
|
||||
$ref: '#/definitions/AutherConfig'
|
||||
x-go-name: Data
|
||||
responses:
|
||||
"200":
|
||||
$ref: '#/responses/createAutherResponse'
|
||||
summary: create a new auther, the name of the auther must be unique in auther
|
||||
list.
|
||||
tags:
|
||||
- ConfigManagement
|
||||
/config/authers/{auther}:
|
||||
delete:
|
||||
operationId: deleteAutherRequest
|
||||
parameters:
|
||||
- in: path
|
||||
name: auther
|
||||
required: true
|
||||
type: string
|
||||
x-go-name: Auther
|
||||
responses:
|
||||
"200":
|
||||
$ref: '#/responses/deleteAutherResponse'
|
||||
summary: delete auther by name.
|
||||
tags:
|
||||
- ConfigManagement
|
||||
put:
|
||||
operationId: updateAutherRequest
|
||||
parameters:
|
||||
- in: path
|
||||
name: auther
|
||||
required: true
|
||||
type: string
|
||||
x-go-name: Auther
|
||||
- in: body
|
||||
name: data
|
||||
schema:
|
||||
$ref: '#/definitions/AutherConfig'
|
||||
x-go-name: Data
|
||||
responses:
|
||||
"200":
|
||||
$ref: '#/responses/updateAutherResponse'
|
||||
summary: update auther by name, the auther must already exist.
|
||||
tags:
|
||||
- ConfigManagement
|
||||
/config/bypasses:
|
||||
post:
|
||||
operationId: createBypassRequest
|
||||
@ -658,6 +741,12 @@ paths:
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
createAutherResponse:
|
||||
description: successful operation.
|
||||
headers:
|
||||
Data: {}
|
||||
schema:
|
||||
$ref: '#/definitions/Response'
|
||||
createBypassResponse:
|
||||
description: successful operation.
|
||||
headers:
|
||||
@ -688,6 +777,12 @@ responses:
|
||||
Data: {}
|
||||
schema:
|
||||
$ref: '#/definitions/Response'
|
||||
deleteAutherResponse:
|
||||
description: successful operation.
|
||||
headers:
|
||||
Data: {}
|
||||
schema:
|
||||
$ref: '#/definitions/Response'
|
||||
deleteBypassResponse:
|
||||
description: successful operation.
|
||||
headers:
|
||||
@ -724,6 +819,12 @@ responses:
|
||||
Config: {}
|
||||
schema:
|
||||
$ref: '#/definitions/Config'
|
||||
updateAutherResponse:
|
||||
description: successful operation.
|
||||
headers:
|
||||
Data: {}
|
||||
schema:
|
||||
$ref: '#/definitions/Response'
|
||||
updateBypassResponse:
|
||||
description: successful operation.
|
||||
headers:
|
||||
@ -755,6 +856,7 @@ responses:
|
||||
schema:
|
||||
$ref: '#/definitions/Response'
|
||||
schemes:
|
||||
- https
|
||||
- http
|
||||
securityDefinitions:
|
||||
api_key: null
|
||||
|
Reference in New Issue
Block a user