mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2026-10-25 16:01:00 +00:00
Replace database rule synchronization with native rule operations and file-based backup, import, and recovery. Update firewall management views, descriptions, whitelist handling, and translations. Include terminal reconnect fixes and xpack build tags for Darwin build targets. Remove temporary regression test files before committing.
44 lines
1.3 KiB
Go
44 lines
1.3 KiB
Go
package dto
|
|
|
|
type ForwardRuleSearch struct {
|
|
PageInfo
|
|
All bool `json:"all,omitempty"`
|
|
Info string `json:"info"`
|
|
Status string `json:"status"`
|
|
Strategy string `json:"strategy"`
|
|
}
|
|
|
|
type ForwardRule struct {
|
|
ID uint `json:"id"`
|
|
Chain string `json:"chain"`
|
|
Family string `json:"family"`
|
|
Address string `json:"address"`
|
|
Port string `json:"port"`
|
|
Protocol string `json:"protocol"`
|
|
Strategy string `json:"strategy"`
|
|
|
|
Num string `json:"num"`
|
|
TargetIP string `json:"targetIP"`
|
|
TargetPort string `json:"targetPort"`
|
|
Interface string `json:"interface"`
|
|
|
|
UsedStatus string `json:"usedStatus"`
|
|
Description string `json:"description"`
|
|
}
|
|
|
|
type ForwardRuleOperate struct {
|
|
Import bool `json:"import"`
|
|
Rules []ForwardRuleOperation `json:"rules" validate:"required,min=1,dive"`
|
|
}
|
|
|
|
type ForwardRuleOperation struct {
|
|
Operation string `json:"operation" validate:"required,oneof=add remove"`
|
|
Num string `json:"num"`
|
|
Family string `json:"family" validate:"omitempty,oneof=ipv4 ipv6"`
|
|
Protocol string `json:"protocol" validate:"required,oneof=tcp udp tcp/udp"`
|
|
Interface string `json:"interface"`
|
|
Port string `json:"port" validate:"required"`
|
|
TargetIP string `json:"targetIP"`
|
|
TargetPort string `json:"targetPort" validate:"required"`
|
|
}
|