Merge branch 'old' into main
Build docker and publish / build (20.15.1) (push) Has been cancelled

This commit is contained in:
2025-12-28 17:27:43 -08:00
128 changed files with 3389 additions and 340 deletions
+160 -25
View File
@@ -118,6 +118,7 @@ type ApplicationVersion struct {
type AuthConfig struct {
Mobile MobileAuthenticateConfig `json:"mobile"`
Email EmailAuthticateConfig `json:"email"`
Device DeviceAuthticateConfig `json:"device"`
Register PubilcRegisterConfig `json:"register"`
}
@@ -238,6 +239,11 @@ type CommissionLog struct {
Timestamp int64 `json:"timestamp"`
}
type CommissionWithdrawRequest struct {
Amount int64 `json:"amount"`
Content string `json:"content"`
}
type Coupon struct {
Id int64 `json:"id"`
Name string `json:"name"`
@@ -518,6 +524,20 @@ type DeleteUserSubscribeRequest struct {
UserSubscribeId int64 `json:"user_subscribe_id"`
}
type DeviceAuthticateConfig struct {
Enable bool `json:"enable"`
ShowAds bool `json:"show_ads"`
EnableSecurity bool `json:"enable_security"`
OnlyRealDevice bool `json:"only_real_device"`
}
type DeviceLoginRequest struct {
Identifier string `json:"identifier" validate:"required"`
IP string `header:"X-Original-Forwarded-For"`
UserAgent string `json:"user_agent" validate:"required"`
CfToken string `json:"cf_token,optional"`
}
type Document struct {
Id int64 `json:"id"`
Title string `json:"title"`
@@ -803,6 +823,11 @@ type GetDetailRequest struct {
Id int64 `form:"id" validate:"required"`
}
type GetDeviceListResponse struct {
List []UserDevice `json:"list"`
Total int64 `json:"total"`
}
type GetDocumentDetailRequest struct {
Id int64 `json:"id" validate:"required"`
}
@@ -929,7 +954,7 @@ type GetStatResponse struct {
Node int64 `json:"node"`
Country int64 `json:"country"`
Protocol []string `json:"protocol"`
OnlineDevice int64 `json:"online_device"`
OnlineDevice int64 `json:"online_devices"`
}
type GetSubscribeApplicationListRequest struct {
@@ -1142,6 +1167,12 @@ type HasMigrateSeverNodeResponse struct {
HasMigrate bool `json:"has_migrate"`
}
type HeartbeatResponse struct {
Status bool `json:"status"`
Message string `json:"message,omitempty"`
Timestamp int64 `json:"timestamp,omitempty"`
}
type Hysteria2 struct {
Port int `json:"port" validate:"required"`
HopPorts string `json:"hop_ports" validate:"required"`
@@ -1151,10 +1182,9 @@ type Hysteria2 struct {
}
type InviteConfig struct {
ForcedInvite bool `json:"forced_invite"`
FirstPurchasePercentage int64 `json:"first_purchase_percentage"`
FirstYearlyPurchasePercentage int64 `json:"first_yearly_purchase_percentage"`
NonFirstPurchasePercentage int64 `json:"non_first_purchase_percentage"`
ForcedInvite bool `json:"forced_invite"`
ReferralPercentage int64 `json:"referral_percentage"`
OnlyFirstPurchase bool `json:"only_first_purchase"`
}
type KickOfflineRequest struct {
@@ -1206,6 +1236,12 @@ type MobileAuthenticateConfig struct {
Whitelist []string `json:"whitelist"`
}
type ModuleConfig struct {
Secret string `json:"secret"` // 通讯密钥
ServiceName string `json:"service_name"` // 服务名称
ServiceVersion string `json:"service_version"` // 服务版本
}
type Node struct {
Id int64 `json:"id"`
Name string `json:"name"`
@@ -1525,7 +1561,7 @@ type PurchaseOrderResponse struct {
type QueryAnnouncementRequest struct {
Page int `form:"page"`
Size int `form:"size"`
Size int `form:"size,default=15"`
Pinned *bool `form:"pinned"`
Popup *bool `form:"popup"`
}
@@ -1544,6 +1580,16 @@ type QueryDocumentListResponse struct {
List []Document `json:"list"`
}
type QueryIPLocationRequest struct {
IP string `form:"ip" validate:"required"`
}
type QueryIPLocationResponse struct {
Country string `json:"country"`
Region string `json:"region,omitempty"`
City string `json:"city"`
}
type QueryNodeTagResponse struct {
Tags []string `json:"tags"`
}
@@ -1687,6 +1733,20 @@ type QueryUserSubscribeListResponse struct {
Total int64 `json:"total"`
}
type QueryUserSubscribeNodeListResponse struct {
List []UserSubscribeInfo `json:"list"`
}
type QueryWithdrawalLogListRequest struct {
Page int `form:"page"`
Size int `form:"size"`
}
type QueryWithdrawalLogListResponse struct {
List []WithdrawalLog `json:"list"`
Total int64 `json:"total"`
}
type QuotaTask struct {
Id int64 `json:"id"`
Subscribers []int64 `json:"subscribers"`
@@ -1746,13 +1806,19 @@ type RenewalOrderResponse struct {
OrderNo string `json:"order_no"`
}
type ResetAllSubscribeTokenResponse struct {
Success bool `json:"success"`
}
type ResetPasswordRequest struct {
Email string `json:"email" validate:"required"`
Password string `json:"password" validate:"required"`
Code string `json:"code,optional"`
IP string `header:"X-Original-Forwarded-For"`
UserAgent string `header:"User-Agent"`
CfToken string `json:"cf_token,optional"`
Identifier string `json:"identifier"`
Email string `json:"email" validate:"required"`
Password string `json:"password" validate:"required"`
Code string `json:"code,optional"`
IP string `header:"X-Original-Forwarded-For"`
UserAgent string `header:"User-Agent"`
LoginType string `header:"Login-Type"`
CfToken string `json:"cf_token,optional"`
}
type ResetSortRequest struct {
@@ -2003,8 +2069,8 @@ type Subscribe struct {
Quota int64 `json:"quota"`
Nodes []int64 `json:"nodes"`
NodeTags []string `json:"node_tags"`
ServerGroup string `json:"server_group"`
ServerCount int64 `json:"server_count"`
Server []int64 `json:"server"`
Show bool `json:"show"`
Sell bool `json:"sell"`
Sort int64 `json:"sort"`
@@ -2102,16 +2168,19 @@ type TelephoneCheckUserResponse struct {
}
type TelephoneLoginRequest struct {
Identifier string `json:"identifier"`
Telephone string `json:"telephone" validate:"required"`
TelephoneCode string `json:"telephone_code"`
TelephoneAreaCode string `json:"telephone_area_code" validate:"required"`
Password string `json:"password"`
IP string `header:"X-Original-Forwarded-For"`
UserAgent string `header:"User-Agent"`
LoginType string `header:"Login-Type"`
CfToken string `json:"cf_token,optional"`
}
type TelephoneRegisterRequest struct {
Identifier string `json:"identifier"`
Telephone string `json:"telephone" validate:"required"`
TelephoneAreaCode string `json:"telephone_area_code" validate:"required"`
Password string `json:"password" validate:"required"`
@@ -2119,16 +2188,19 @@ type TelephoneRegisterRequest struct {
Code string `json:"code,optional"`
IP string `header:"X-Original-Forwarded-For"`
UserAgent string `header:"User-Agent"`
LoginType string `header:"Login-Type,optional"`
CfToken string `json:"cf_token,optional"`
}
type TelephoneResetPasswordRequest struct {
Identifier string `json:"identifier"`
Telephone string `json:"telephone" validate:"required"`
TelephoneAreaCode string `json:"telephone_area_code" validate:"required"`
Password string `json:"password" validate:"required"`
Code string `json:"code,optional"`
IP string `header:"X-Original-Forwarded-For"`
UserAgent string `header:"User-Agent"`
LoginType string `header:"Login-Type,optional"`
CfToken string `json:"cf_token,optional"`
}
@@ -2224,6 +2296,10 @@ type Tuic struct {
SecurityConfig SecurityConfig `json:"security_config"`
}
type UnbindDeviceRequest struct {
Id int64 `json:"id" validate:"required"`
}
type UnbindOAuthRequest struct {
Method string `json:"method"`
}
@@ -2430,6 +2506,15 @@ type UpdateUserPasswordRequest struct {
Password string `json:"password" validate:"required"`
}
type UpdateUserRulesRequest struct {
Rules []string `json:"rules" validate:"required"`
}
type UpdateUserSubscribeNoteRequest struct {
UserSubscribeId int64 `json:"user_subscribe_id" validate:"required"`
Note string `json:"note" validate:"max=500"`
}
type UpdateUserSubscribeRequest struct {
UserSubscribeId int64 `json:"user_subscribe_id"`
SubscribeId int64 `json:"subscribe_id"`
@@ -2464,6 +2549,7 @@ type User struct {
EnableTradeNotify bool `json:"enable_trade_notify"`
AuthMethods []UserAuthMethod `json:"auth_methods"`
UserDevices []UserDevice `json:"user_devices"`
Rules []string `json:"rules"`
CreatedAt int64 `json:"created_at"`
UpdatedAt int64 `json:"updated_at"`
DeletedAt int64 `json:"deleted_at,omitempty"`
@@ -2504,21 +2590,25 @@ type UserLoginLog struct {
}
type UserLoginRequest struct {
Email string `json:"email" validate:"required"`
Password string `json:"password" validate:"required"`
IP string `header:"X-Original-Forwarded-For"`
UserAgent string `header:"User-Agent"`
CfToken string `json:"cf_token,optional"`
Identifier string `json:"identifier"`
Email string `json:"email" validate:"required"`
Password string `json:"password" validate:"required"`
IP string `header:"X-Original-Forwarded-For"`
UserAgent string `header:"User-Agent"`
LoginType string `header:"Login-Type"`
CfToken string `json:"cf_token,optional"`
}
type UserRegisterRequest struct {
Email string `json:"email" validate:"required"`
Password string `json:"password" validate:"required"`
Invite string `json:"invite,optional"`
Code string `json:"code,optional"`
IP string `header:"X-Original-Forwarded-For"`
UserAgent string `header:"User-Agent"`
CfToken string `json:"cf_token,optional"`
Identifier string `json:"identifier"`
Email string `json:"email" validate:"required"`
Password string `json:"password" validate:"required"`
Invite string `json:"invite,optional"`
Code string `json:"code,optional"`
IP string `header:"X-Original-Forwarded-For"`
UserAgent string `header:"User-Agent"`
LoginType string `header:"Login-Type"`
CfToken string `json:"cf_token,optional"`
}
type UserStatistics struct {
@@ -2550,6 +2640,7 @@ type UserSubscribe struct {
Upload int64 `json:"upload"`
Token string `json:"token"`
Status uint8 `json:"status"`
Short string `json:"short"`
CreatedAt int64 `json:"created_at"`
UpdatedAt int64 `json:"updated_at"`
}
@@ -2573,6 +2664,26 @@ type UserSubscribeDetail struct {
UpdatedAt int64 `json:"updated_at"`
}
type UserSubscribeInfo struct {
Id int64 `json:"id"`
UserId int64 `json:"user_id"`
OrderId int64 `json:"order_id"`
SubscribeId int64 `json:"subscribe_id"`
StartTime int64 `json:"start_time"`
ExpireTime int64 `json:"expire_time"`
FinishedAt int64 `json:"finished_at"`
ResetTime int64 `json:"reset_time"`
Traffic int64 `json:"traffic"`
Download int64 `json:"download"`
Upload int64 `json:"upload"`
Token string `json:"token"`
Status uint8 `json:"status"`
CreatedAt int64 `json:"created_at"`
UpdatedAt int64 `json:"updated_at"`
IsTryOut bool `json:"is_try_out"`
Nodes []*UserSubscribeNodeInfo `json:"nodes"`
}
type UserSubscribeLog struct {
Id int64 `json:"id"`
UserId int64 `json:"user_id"`
@@ -2583,6 +2694,19 @@ type UserSubscribeLog struct {
Timestamp int64 `json:"timestamp"`
}
type UserSubscribeNodeInfo struct {
Id int64 `json:"id"`
Name string `json:"name"`
Uuid string `json:"uuid"`
Protocol string `json:"protocol"`
Port uint16 `json:"port"`
Address string `json:"address"`
Tags []string `json:"tags"`
Country string `json:"country"`
City string `json:"city"`
CreatedAt int64 `json:"created_at"`
}
type UserSubscribeTrafficLog struct {
SubscribeId int64 `json:"subscribe_id"` // Subscribe ID
UserId int64 `json:"user_id"` // User ID
@@ -2670,3 +2794,14 @@ type VmessProtocol struct {
Network string `json:"network"`
Transport string `json:"transport"`
}
type WithdrawalLog struct {
Id int64 `json:"id"`
UserId int64 `json:"user_id"`
Amount int64 `json:"amount"`
Content string `json:"content"`
Status uint8 `json:"status"`
Reason string `json:"reason,omitempty"`
CreatedAt int64 `json:"created_at"`
UpdatedAt int64 `json:"updated_at"`
}