diff --git a/database/model/model.go b/database/model/model.go index 6225df52..82b9f331 100644 --- a/database/model/model.go +++ b/database/model/model.go @@ -45,6 +45,10 @@ type Inbound struct { LastTrafficResetTime int64 `json:"lastTrafficResetTime" form:"lastTrafficResetTime" gorm:"default:0"` // Last traffic reset timestamp ClientStats []xray.ClientTraffic `gorm:"foreignKey:InboundId;references:Id" json:"clientStats" form:"clientStats"` // Client traffic statistics + // Speed limit fields (KB/s, 0 = unlimited) + SpeedLimitDown int64 `json:"speedLimitDown" form:"speedLimitDown" gorm:"default:0"` // Download speed limit in KB/s + SpeedLimitUp int64 `json:"speedLimitUp" form:"speedLimitUp" gorm:"default:0"` // Upload speed limit in KB/s + // Xray configuration fields Listen string `json:"listen" form:"listen"` Port int `json:"port" form:"port"` diff --git a/web/assets/js/model/dbinbound.js b/web/assets/js/model/dbinbound.js index befc618e..97583a7b 100644 --- a/web/assets/js/model/dbinbound.js +++ b/web/assets/js/model/dbinbound.js @@ -12,6 +12,8 @@ class DBInbound { this.expiryTime = 0; this.trafficReset = "never"; this.lastTrafficResetTime = 0; + this.speedLimitDown = 0; + this.speedLimitUp = 0; this.listen = ""; this.port = 0; diff --git a/web/html/form/inbound.html b/web/html/form/inbound.html index 8b59dc28..f27d7e59 100644 --- a/web/html/form/inbound.html +++ b/web/html/form/inbound.html @@ -49,6 +49,34 @@ :min="0"> + + + + + + + + + +