2024-10-10 15:05:46 +00:00
|
|
|
package x3_client
|
|
|
|
|
|
|
|
type GeneralResponse[T any] struct {
|
|
|
|
Success bool `json:"success"`
|
|
|
|
Message string `json:"msg"`
|
|
|
|
Object T `json:"obj"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type LoginRequest struct {
|
|
|
|
Username string `json:"username"`
|
|
|
|
Password string `json:"password"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type LoginResponse struct {
|
|
|
|
}
|
|
|
|
|
|
|
|
type Inbound struct {
|
|
|
|
Id int `json:"id"`
|
|
|
|
Up int `json:"up"`
|
|
|
|
Down int `json:"down"`
|
|
|
|
Total int `json:"total"`
|
|
|
|
Remark string `json:"remark"`
|
|
|
|
Enable bool `json:"enable"`
|
|
|
|
ExpiryTime int `json:"expiryTime"`
|
|
|
|
ClientStats []ClientStats `json:"clientStats"`
|
|
|
|
Listen string `json:"listen"`
|
|
|
|
Port int `json:"port"`
|
|
|
|
Protocol string `json:"protocol"`
|
|
|
|
Settings string `json:"settings"`
|
|
|
|
StreamSettings string `json:"streamSettings"`
|
|
|
|
Tag string `json:"tag"`
|
|
|
|
Sniffing string `json:"sniffing"`
|
|
|
|
Allocate string `json:"allocate"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type ClientStats struct {
|
|
|
|
Id int `json:"id"`
|
|
|
|
InboundId int `json:"inboundId"`
|
|
|
|
Enable bool `json:"enable"`
|
|
|
|
Email string `json:"email"`
|
|
|
|
Up int `json:"up"`
|
|
|
|
Down int `json:"down"`
|
|
|
|
ExpiryTime int `json:"expiryTime"`
|
|
|
|
Total int `json:"total"`
|
|
|
|
Reset int `json:"reset"`
|
|
|
|
}
|
|
|
|
|
2024-10-10 17:25:05 +00:00
|
|
|
type Client struct {
|
|
|
|
ID string `json:"id"`
|
|
|
|
Flow string `json:"flow"`
|
|
|
|
Email string `json:"email"`
|
|
|
|
LimitIP int64 `json:"limitIp"`
|
|
|
|
TotalGB int64 `json:"totalGB"`
|
|
|
|
ExpiryTime int64 `json:"expiryTime"`
|
|
|
|
Enable bool `json:"enable"`
|
|
|
|
TgID string `json:"tgId"`
|
|
|
|
SubID string `json:"subId"`
|
|
|
|
Reset int64 `json:"reset"`
|
2024-10-10 15:05:46 +00:00
|
|
|
}
|