147 lines
3.6 KiB
YAML
147 lines
3.6 KiB
YAML
basePath: /
|
|
definitions:
|
|
errorx.CodeErrorResponse:
|
|
properties:
|
|
code:
|
|
description: 状态码
|
|
example: 200
|
|
type: integer
|
|
data:
|
|
description: 数据
|
|
msg:
|
|
description: 信息
|
|
example: OK
|
|
type: string
|
|
type: object
|
|
iptables.Info:
|
|
properties:
|
|
chains:
|
|
items:
|
|
type: string
|
|
type: array
|
|
policies:
|
|
items:
|
|
$ref: '#/definitions/iptables.Policy'
|
|
type: array
|
|
rules:
|
|
items:
|
|
$ref: '#/definitions/iptables.Rule'
|
|
type: array
|
|
type: object
|
|
iptables.Policy:
|
|
properties:
|
|
name:
|
|
type: string
|
|
target:
|
|
type: string
|
|
type: object
|
|
iptables.Rule:
|
|
properties:
|
|
chain:
|
|
type: string
|
|
destination:
|
|
description: '-d [dest] example: 192.168.1.1, 192.168.1.0/24'
|
|
type: string
|
|
dstPort:
|
|
description: '--dport example: 80'
|
|
type: string
|
|
dstPorts:
|
|
description: '--dports example: 45000:46000'
|
|
type: string
|
|
excludeDestination:
|
|
description: '! -s [source] example: 192.168.1.1, 192.168.1.0/24'
|
|
type: string
|
|
excludeInputInterface:
|
|
description: '! -i [interface]'
|
|
type: string
|
|
excludeOutputInterface:
|
|
description: '! -o [interface]'
|
|
type: string
|
|
excludeProtocol:
|
|
description: '! -p [proto] example: all, tcp, udp, icmp'
|
|
type: string
|
|
excludeSource:
|
|
description: '! -s [source] example: 192.168.1.1, 192.168.1.0/24'
|
|
type: string
|
|
goto:
|
|
description: -g [chain Chain]
|
|
type: string
|
|
inputInterface:
|
|
description: -i [interface]
|
|
type: string
|
|
jump:
|
|
description: -j [target Chain]
|
|
type: string
|
|
limit:
|
|
description: '--limit example: 3/min'
|
|
type: string
|
|
match:
|
|
description: '-m [match] 用于匹配扩展模块 example: tcp udp icmp'
|
|
type: string
|
|
outputInterface:
|
|
description: -o [interface]
|
|
type: string
|
|
protocol:
|
|
description: '-p [proto] example: all, tcp, udp, icmp'
|
|
type: string
|
|
source:
|
|
description: '-s [source] example: 192.168.1.1, 192.168.1.0/24'
|
|
type: string
|
|
srcPort:
|
|
description: '--sport example: 22 80'
|
|
type: string
|
|
srcPorts:
|
|
description: '--sports example: 20000:40000'
|
|
type: string
|
|
type: object
|
|
resp.Response:
|
|
properties:
|
|
code:
|
|
description: 状态码
|
|
example: 200
|
|
type: integer
|
|
data:
|
|
description: 数据
|
|
msg:
|
|
description: 信息
|
|
example: OK
|
|
type: string
|
|
type: object
|
|
info:
|
|
contact:
|
|
email: 919411476@qq.com
|
|
name: Shikong
|
|
description: iptables-helper 的 swagger
|
|
license:
|
|
name: Apache 2.0
|
|
url: http://www.apache.org/licenses/LICENSE-2.0.html
|
|
termsOfService: http://swagger.io/terms/
|
|
title: iptables-helper API
|
|
version: "1.0"
|
|
paths:
|
|
/info:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: 获取 iptables 规则 信息
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
allOf:
|
|
- $ref: '#/definitions/resp.Response'
|
|
- properties:
|
|
data:
|
|
$ref: '#/definitions/iptables.Info'
|
|
type: object
|
|
default:
|
|
description: ""
|
|
schema:
|
|
$ref: '#/definitions/errorx.CodeErrorResponse'
|
|
summary: 获取 iptables 规则 信息
|
|
tags:
|
|
- Info
|
|
swagger: "2.0"
|