Show outbound traffic in outbounds table (#1711)

* store outbound traffic in database

* show outbound traffic in outbounds table

* add refresh button
This commit is contained in:
Saeid
2024-01-30 00:07:20 +03:30
committed by GitHub
parent 9fbaede59f
commit 6c0775b120
9 changed files with 172 additions and 15 deletions

View File

@@ -44,6 +44,15 @@ type Inbound struct {
Tag string `json:"tag" form:"tag" gorm:"unique"`
Sniffing string `json:"sniffing" form:"sniffing"`
}
type OutboundTraffics struct {
Id int `json:"id" form:"id" gorm:"primaryKey;autoIncrement"`
Tag string `json:"tag" form:"tag" gorm:"unique"`
Up int64 `json:"up" form:"up" gorm:"default:0"`
Down int64 `json:"down" form:"down" gorm:"default:0"`
Total int64 `json:"total" form:"total" gorm:"default:0"`
}
type InboundClientIps struct {
Id int `json:"id" gorm:"primaryKey;autoIncrement"`
ClientEmail string `json:"clientEmail" form:"clientEmail" gorm:"unique"`