feat: add summary

This commit is contained in:
Tylone-zx
2024-07-14 14:37:40 +08:00
committed by Vaala Cat
parent 1ef81d9d48
commit e619fbf327
44 changed files with 1851 additions and 374 deletions

View File

@@ -29,7 +29,7 @@ jobs:
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
- name: Install Protoc - name: Install Protoc
uses: arduino/setup-protoc@v2 uses: arduino/setup-protoc@v3
- name: Compile server - name: Compile server
run: bash ./build.sh run: bash ./build.sh
- uses: "marvinpinto/action-automatic-releases@latest" - uses: "marvinpinto/action-automatic-releases@latest"

View File

@@ -30,7 +30,7 @@ jobs:
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
- name: Install Protoc - name: Install Protoc
uses: arduino/setup-protoc@v2 uses: arduino/setup-protoc@v3
- name: Compile server - name: Compile server
run: bash ./build.sh run: bash ./build.sh
- uses: "marvinpinto/action-automatic-releases@latest" - uses: "marvinpinto/action-automatic-releases@latest"

View File

@@ -6,6 +6,7 @@ import (
"github.com/VaalaCat/frp-panel/biz/master/auth" "github.com/VaalaCat/frp-panel/biz/master/auth"
"github.com/VaalaCat/frp-panel/biz/master/client" "github.com/VaalaCat/frp-panel/biz/master/client"
"github.com/VaalaCat/frp-panel/biz/master/platform" "github.com/VaalaCat/frp-panel/biz/master/platform"
"github.com/VaalaCat/frp-panel/biz/master/proxy"
"github.com/VaalaCat/frp-panel/biz/master/server" "github.com/VaalaCat/frp-panel/biz/master/server"
"github.com/VaalaCat/frp-panel/biz/master/user" "github.com/VaalaCat/frp-panel/biz/master/user"
"github.com/VaalaCat/frp-panel/common" "github.com/VaalaCat/frp-panel/common"
@@ -69,5 +70,10 @@ func ConfigureRouter(router *gin.Engine) {
frpsRouter.POST("/update", common.Wrapper(server.UpdateFrpsHander)) frpsRouter.POST("/update", common.Wrapper(server.UpdateFrpsHander))
frpsRouter.POST("/delete", common.Wrapper(server.RemoveFrpsHandler)) frpsRouter.POST("/delete", common.Wrapper(server.RemoveFrpsHandler))
} }
proxyRouter := v1.Group("/proxy", middleware.JWTAuth, middleware.AuthCtx)
{
proxyRouter.POST("/get_by_cid", common.Wrapper(proxy.GetProxyByCID))
proxyRouter.POST("/get_by_sid", common.Wrapper(proxy.GetProxyBySID))
}
} }
} }

View File

@@ -0,0 +1,34 @@
package proxy
import (
"context"
"fmt"
"github.com/VaalaCat/frp-panel/common"
"github.com/VaalaCat/frp-panel/dao"
"github.com/VaalaCat/frp-panel/pb"
"github.com/sirupsen/logrus"
)
// GetProxyByCID get proxy info by client id
func GetProxyByCID(c context.Context, req *pb.GetProxyByCIDRequest) (*pb.GetProxyByCIDResponse, error) {
logrus.Infof("get proxy by client id, req: [%+v]", req)
var (
clientID = req.GetClientId()
userInfo = common.GetUserInfo(c)
)
if len(clientID) == 0 {
return nil, fmt.Errorf("request invalid")
}
proxyList, err := dao.GetProxyByClientID(userInfo, clientID)
if proxyList == nil || err != nil {
logrus.WithError(err).Errorf("cannot get proxy, client id: [%s]", clientID)
return nil, err
}
return &pb.GetProxyByCIDResponse{
Status: &pb.Status{Code: pb.RespCode_RESP_CODE_SUCCESS, Message: "ok"},
ProxyInfos: convertProxyList(proxyList),
}, nil
}

View File

@@ -0,0 +1,34 @@
package proxy
import (
"context"
"fmt"
"github.com/VaalaCat/frp-panel/common"
"github.com/VaalaCat/frp-panel/dao"
"github.com/VaalaCat/frp-panel/pb"
"github.com/sirupsen/logrus"
)
// GetProxyBySID get proxy info by server id
func GetProxyBySID(c context.Context, req *pb.GetProxyBySIDRequest) (*pb.GetProxyBySIDResponse, error) {
logrus.Infof("get proxy by server id, req: [%+v]", req)
var (
serverID = req.GetServerId()
userInfo = common.GetUserInfo(c)
)
if len(serverID) == 0 {
return nil, fmt.Errorf("request invalid")
}
proxyList, err := dao.GetProxyByServerID(userInfo, serverID)
if proxyList == nil || err != nil {
logrus.WithError(err).Errorf("cannot get proxy, server id: [%s]", serverID)
return nil, err
}
return &pb.GetProxyBySIDResponse{
Status: &pb.Status{Code: pb.RespCode_RESP_CODE_SUCCESS, Message: "ok"},
ProxyInfos: convertProxyList(proxyList),
}, nil
}

View File

@@ -0,0 +1,22 @@
package proxy
import (
"github.com/VaalaCat/frp-panel/models"
"github.com/VaalaCat/frp-panel/pb"
"github.com/samber/lo"
)
func convertProxyList(proxyList []*models.ProxyEntity) []*pb.ProxyInfo {
return lo.Map(proxyList, func(item *models.ProxyEntity, index int) *pb.ProxyInfo {
return &pb.ProxyInfo{
Name: lo.ToPtr(item.Name),
Type: lo.ToPtr(item.Type),
ClientId: lo.ToPtr(item.ClientID),
ServerId: lo.ToPtr(item.ServerID),
TodayTrafficIn: lo.ToPtr(item.TodayTrafficIn),
TodayTrafficOut: lo.ToPtr(item.TodayTrafficOut),
HistoryTrafficIn: lo.ToPtr(item.HistoryTrafficIn),
HistoryTrafficOut: lo.ToPtr(item.HistoryTrafficOut),
}
})
}

View File

@@ -0,0 +1,25 @@
package server
import (
"context"
"github.com/VaalaCat/frp-panel/dao"
"github.com/VaalaCat/frp-panel/models"
"github.com/VaalaCat/frp-panel/pb"
)
func PushProxyInfo(ctx context.Context, req *pb.PushProxyInfoReq) (*pb.PushProxyInfoResp, error) {
var srv *models.ServerEntity
var err error
if srv, err = ValidateServerRequest(req.GetBase()); err != nil {
return nil, err
}
if err = dao.AdminUpdateProxy(srv, req.GetProxyInfos()); err != nil {
return nil, err
}
return &pb.PushProxyInfoResp{
Status: &pb.Status{Code: pb.RespCode_RESP_CODE_SUCCESS, Message: "ok"},
}, nil
}

View File

@@ -0,0 +1,64 @@
package server
import (
"context"
"github.com/VaalaCat/frp-panel/pb"
"github.com/VaalaCat/frp-panel/rpc"
"github.com/VaalaCat/frp-panel/tunnel"
v1 "github.com/fatedier/frp/pkg/config/v1"
"github.com/samber/lo"
"github.com/sirupsen/logrus"
)
var proxyTypeList = []v1.ProxyType{
v1.ProxyTypeTCP,
v1.ProxyTypeUDP,
v1.ProxyTypeTCPMUX,
v1.ProxyTypeHTTP,
v1.ProxyTypeHTTPS,
v1.ProxyTypeSTCP,
v1.ProxyTypeXTCP,
v1.ProxyTypeSUDP,
}
func PushProxyInfo(serverID, serverSecret string) error {
proxyInfos := []*pb.ProxyInfo{}
if cli := tunnel.GetServerController().Get(serverID); cli != nil {
for _, proxyType := range proxyTypeList {
proxyStatsList := cli.GetProxyStatsByType(proxyType)
for _, proxyStats := range proxyStatsList {
if proxyStats != nil {
proxyInfos = append(proxyInfos, &pb.ProxyInfo{
Name: lo.ToPtr(proxyStats.Name),
Type: lo.ToPtr(proxyStats.Type),
TodayTrafficIn: lo.ToPtr(proxyStats.TodayTrafficIn),
TodayTrafficOut: lo.ToPtr(proxyStats.TodayTrafficOut),
})
}
}
}
}
if len(proxyInfos) > 0 {
ctx := context.Background()
cli, err := rpc.MasterCli(ctx)
if err != nil {
logrus.WithError(err).Error("cannot get master server")
return err
}
_, err = cli.PushProxyInfo(ctx, &pb.PushProxyInfoReq{
Base: &pb.ServerBase{
ServerId: serverID,
ServerSecret: serverSecret,
},
ProxyInfos: proxyInfos,
})
if err != nil {
logrus.WithError(err).Error("cannot push proxy info")
return err
}
}
return nil
}

View File

@@ -2,6 +2,7 @@ package main
import ( import (
bizclient "github.com/VaalaCat/frp-panel/biz/client" bizclient "github.com/VaalaCat/frp-panel/biz/client"
"github.com/VaalaCat/frp-panel/common"
"github.com/VaalaCat/frp-panel/conf" "github.com/VaalaCat/frp-panel/conf"
"github.com/VaalaCat/frp-panel/pb" "github.com/VaalaCat/frp-panel/pb"
"github.com/VaalaCat/frp-panel/rpc" "github.com/VaalaCat/frp-panel/rpc"
@@ -43,7 +44,8 @@ func runClient() {
r := rpcclient.GetClientRPCSerivce() r := rpcclient.GetClientRPCSerivce()
defer r.Stop() defer r.Stop()
w := watcher.NewClient(bizclient.PullConfig, clientID, clientSecret) w := watcher.NewClient()
w.AddTask(common.PullConfigDuration, bizclient.PullConfig, clientID, clientSecret)
defer w.Stop() defer w.Stop()
initClientOnce(clientID, clientSecret) initClientOnce(clientID, clientSecret)

View File

@@ -7,6 +7,7 @@ import (
"github.com/VaalaCat/frp-panel/biz/master/auth" "github.com/VaalaCat/frp-panel/biz/master/auth"
bizserver "github.com/VaalaCat/frp-panel/biz/server" bizserver "github.com/VaalaCat/frp-panel/biz/server"
"github.com/VaalaCat/frp-panel/cache" "github.com/VaalaCat/frp-panel/cache"
"github.com/VaalaCat/frp-panel/common"
"github.com/VaalaCat/frp-panel/conf" "github.com/VaalaCat/frp-panel/conf"
"github.com/VaalaCat/frp-panel/dao" "github.com/VaalaCat/frp-panel/dao"
"github.com/VaalaCat/frp-panel/models" "github.com/VaalaCat/frp-panel/models"
@@ -111,7 +112,9 @@ func initDefaultInternalServer() (rpcclient.ClientRPCHandler, watcher.Client) {
r := rpcclient.GetClientRPCSerivce() r := rpcclient.GetClientRPCSerivce()
w := watcher.NewClient(bizserver.PullConfig, defaultServer.ServerID, defaultServer.ConnectSecret) w := watcher.NewClient()
w.AddTask(common.PullConfigDuration, bizserver.PullConfig, defaultServer.ServerID, defaultServer.ConnectSecret)
w.AddTask(common.PushProxyInfoDuration, bizserver.PushProxyInfo, defaultServer.ServerID, defaultServer.ConnectSecret)
go initServerOnce(defaultServer.ServerID, defaultServer.ConnectSecret) go initServerOnce(defaultServer.ServerID, defaultServer.ConnectSecret)
return r, w return r, w

View File

@@ -2,6 +2,7 @@ package main
import ( import (
bizserver "github.com/VaalaCat/frp-panel/biz/server" bizserver "github.com/VaalaCat/frp-panel/biz/server"
"github.com/VaalaCat/frp-panel/common"
"github.com/VaalaCat/frp-panel/conf" "github.com/VaalaCat/frp-panel/conf"
"github.com/VaalaCat/frp-panel/pb" "github.com/VaalaCat/frp-panel/pb"
"github.com/VaalaCat/frp-panel/rpc" "github.com/VaalaCat/frp-panel/rpc"
@@ -47,7 +48,9 @@ func runServer() {
r := rpcclient.GetClientRPCSerivce() r := rpcclient.GetClientRPCSerivce()
defer r.Stop() defer r.Stop()
w := watcher.NewClient(bizserver.PullConfig, clientID, clientSecret) w := watcher.NewClient()
w.AddTask(common.PullConfigDuration, bizserver.PullConfig, clientID, clientSecret)
w.AddTask(common.PushProxyInfoDuration, bizserver.PushProxyInfo, clientID, clientSecret)
defer w.Stop() defer w.Stop()
initServerOnce(clientID, clientSecret) initServerOnce(clientID, clientSecret)

View File

@@ -2,6 +2,7 @@ package main
import ( import (
bizclient "github.com/VaalaCat/frp-panel/biz/client" bizclient "github.com/VaalaCat/frp-panel/biz/client"
"github.com/VaalaCat/frp-panel/common"
"github.com/VaalaCat/frp-panel/conf" "github.com/VaalaCat/frp-panel/conf"
"github.com/VaalaCat/frp-panel/pb" "github.com/VaalaCat/frp-panel/pb"
"github.com/VaalaCat/frp-panel/rpc" "github.com/VaalaCat/frp-panel/rpc"
@@ -43,7 +44,8 @@ func runClient() {
r := rpcclient.GetClientRPCSerivce() r := rpcclient.GetClientRPCSerivce()
defer r.Stop() defer r.Stop()
w := watcher.NewClient(bizclient.PullConfig, clientID, clientSecret) w := watcher.NewClient()
w.AddTask(common.PullConfigDuration, bizclient.PullConfig, clientID, clientSecret)
defer w.Stop() defer w.Stop()
initClientOnce(clientID, clientSecret) initClientOnce(clientID, clientSecret)

View File

@@ -56,3 +56,8 @@ const (
DefaultServerID = "default" DefaultServerID = "default"
DefaultAdminUserID = 1 DefaultAdminUserID = 1
) )
const (
PullConfigDuration = 30 * time.Second
PushProxyInfoDuration = 30 * time.Second
)

View File

@@ -21,7 +21,8 @@ type ReqType interface {
pb.GetUserInfoRequest | pb.UpdateUserInfoRequest | pb.GetUserInfoRequest | pb.UpdateUserInfoRequest |
pb.GetPlatformInfoRequest | pb.GetClientsStatusRequest | pb.GetPlatformInfoRequest | pb.GetClientsStatusRequest |
pb.GetClientCertRequest | pb.GetClientCertRequest |
pb.StartFRPCRequest | pb.StopFRPCRequest | pb.StartFRPSRequest | pb.StopFRPSRequest pb.StartFRPCRequest | pb.StopFRPCRequest | pb.StartFRPSRequest | pb.StopFRPSRequest |
pb.GetProxyByCIDRequest | pb.GetProxyBySIDRequest
} }
func GetProtoRequest[T ReqType](c *gin.Context) (r *T, err error) { func GetProtoRequest[T ReqType](c *gin.Context) (r *T, err error) {

View File

@@ -20,7 +20,8 @@ type RespType interface {
pb.GetUserInfoResponse | pb.UpdateUserInfoResponse | pb.GetUserInfoResponse | pb.UpdateUserInfoResponse |
pb.GetPlatformInfoResponse | pb.GetClientsStatusResponse | pb.GetPlatformInfoResponse | pb.GetClientsStatusResponse |
pb.GetClientCertResponse | pb.GetClientCertResponse |
pb.StartFRPCResponse | pb.StopFRPCResponse | pb.StartFRPSResponse | pb.StopFRPSResponse pb.StartFRPCResponse | pb.StopFRPCResponse | pb.StartFRPSResponse | pb.StopFRPSResponse |
pb.GetProxyByCIDResponse | pb.GetProxyBySIDResponse
} }
func OKResp[T RespType](c *gin.Context, origin *T) { func OKResp[T RespType](c *gin.Context, origin *T) {

172
dao/proxy.go Normal file
View File

@@ -0,0 +1,172 @@
package dao
import (
"fmt"
"strings"
"time"
"github.com/VaalaCat/frp-panel/models"
"github.com/VaalaCat/frp-panel/pb"
"github.com/VaalaCat/frp-panel/utils"
"github.com/samber/lo"
"github.com/sourcegraph/conc/pool"
"gorm.io/gorm"
)
func GetProxyByClientID(userInfo models.UserInfo, clientID string) ([]*models.ProxyEntity, error) {
if clientID == "" {
return nil, fmt.Errorf("invalid client id")
}
db := models.GetDBManager().GetDefaultDB()
list := []*models.Proxy{}
err := db.
Where(&models.Proxy{ProxyEntity: &models.ProxyEntity{
UserID: userInfo.GetUserID(),
TenantID: userInfo.GetTenantID(),
ClientID: clientID,
}}).
Find(&list).Error
if err != nil {
return nil, err
}
return lo.Map(list, func(item *models.Proxy, _ int) *models.ProxyEntity {
return item.ProxyEntity
}), nil
}
func GetProxyByServerID(userInfo models.UserInfo, serverID string) ([]*models.ProxyEntity, error) {
if serverID == "" {
return nil, fmt.Errorf("invalid server id")
}
db := models.GetDBManager().GetDefaultDB()
list := []*models.Proxy{}
err := db.
Where(&models.Proxy{ProxyEntity: &models.ProxyEntity{
UserID: userInfo.GetUserID(),
TenantID: userInfo.GetTenantID(),
ServerID: serverID,
}}).
Find(&list).Error
if err != nil {
return nil, err
}
return lo.Map(list, func(item *models.Proxy, _ int) *models.ProxyEntity {
return item.ProxyEntity
}), nil
}
func AdminUpdateProxy(srv *models.ServerEntity, inputs []*pb.ProxyInfo) error {
if srv.ServerID == "" {
return fmt.Errorf("invalid server id")
}
db := models.GetDBManager().GetDefaultDB()
return db.Transaction(func(tx *gorm.DB) error {
queryResults := make([]interface{}, 3)
p := pool.New().WithErrors()
p.Go(
func() error {
user := models.User{}
if err := tx.Where(&models.User{
UserEntity: &models.UserEntity{
UserID: srv.UserID,
},
}).First(&user).Error; err != nil {
return err
}
queryResults[0] = user
return nil
},
)
p.Go(
func() error {
clients := []*models.Client{}
if err := tx.
Where(&models.Client{ClientEntity: &models.ClientEntity{
UserID: srv.UserID,
ServerID: srv.ServerID,
}}).Find(&clients).Error; err != nil {
return err
}
queryResults[1] = clients
return nil
},
)
p.Go(
func() error {
oldProxy := []*models.Proxy{}
if err := tx.
Where(&models.Proxy{ProxyEntity: &models.ProxyEntity{
UserID: srv.UserID,
ServerID: srv.ServerID,
}}).Find(&oldProxy).Error; err != nil {
return err
}
oldProxyMap := lo.SliceToMap(oldProxy, func(p *models.Proxy) (string, *models.Proxy) {
return p.Name, p
})
queryResults[2] = oldProxyMap
return nil
},
)
if err := p.Wait(); err != nil {
return err
}
user := queryResults[0].(models.User)
clients := queryResults[1].([]*models.Client)
oldProxyMap := queryResults[2].(map[string]*models.Proxy)
proxyMap := map[string]*models.ProxyEntity{}
for _, proxyInfo := range inputs {
proxyName := strings.TrimPrefix(proxyInfo.GetName(), user.UserName+".")
proxyMap[proxyName] = &models.ProxyEntity{
ServerID: srv.ServerID,
Name: proxyName,
Type: proxyInfo.GetType(),
UserID: srv.UserID,
TenantID: srv.TenantID,
TodayTrafficIn: proxyInfo.GetTodayTrafficIn(),
TodayTrafficOut: proxyInfo.GetTodayTrafficOut(),
}
}
proxyEntityMap := map[string]*models.ProxyEntity{}
for _, client := range clients {
cliCfg, err := client.GetConfigContent()
if err != nil || cliCfg == nil {
continue
}
for _, cfg := range cliCfg.Proxies {
if proxy, ok := proxyMap[cfg.GetBaseConfig().Name]; ok {
proxy.ClientID = client.ClientID
proxyEntityMap[proxy.Name] = proxy
}
}
}
nowTime := time.Now()
results := lo.Values(lo.MapValues(proxyEntityMap, func(p *models.ProxyEntity, name string) *models.Proxy {
item := &models.Proxy{
ProxyEntity: p,
}
if proxy, ok := oldProxyMap[name]; ok {
item.ProxyID = proxy.ProxyID
if utils.IsSameDay(nowTime, proxy.UpdatedAt) {
item.HistoryTrafficIn = proxy.HistoryTrafficIn
item.HistoryTrafficOut = proxy.HistoryTrafficOut
} else {
item.HistoryTrafficIn = proxy.HistoryTrafficIn + proxy.TodayTrafficIn
item.HistoryTrafficOut = proxy.HistoryTrafficOut + proxy.TodayTrafficOut
}
}
return item
}))
if len(results) > 0 {
return tx.Save(results).Error
}
return nil
})
}

28
go.mod
View File

@@ -19,9 +19,9 @@ require (
github.com/sirupsen/logrus v1.9.3 github.com/sirupsen/logrus v1.9.3
github.com/sourcegraph/conc v0.3.0 github.com/sourcegraph/conc v0.3.0
github.com/spf13/cobra v1.8.0 github.com/spf13/cobra v1.8.0
golang.org/x/crypto v0.22.0 golang.org/x/crypto v0.25.0
google.golang.org/grpc v1.60.1 google.golang.org/grpc v1.65.0
google.golang.org/protobuf v1.33.0 google.golang.org/protobuf v1.34.2
gorm.io/driver/mysql v1.5.2 gorm.io/driver/mysql v1.5.2
gorm.io/driver/postgres v1.5.4 gorm.io/driver/postgres v1.5.4
gorm.io/gorm v1.25.5 gorm.io/gorm v1.25.5
@@ -35,7 +35,7 @@ require (
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 // indirect github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 // indirect
github.com/beorn7/perks v1.0.1 // indirect github.com/beorn7/perks v1.0.1 // indirect
github.com/bytedance/sonic v1.9.1 // indirect github.com/bytedance/sonic v1.9.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect
github.com/cloudflare/circl v1.3.7 // indirect github.com/cloudflare/circl v1.3.7 // indirect
github.com/coreos/go-oidc/v3 v3.10.0 // indirect github.com/coreos/go-oidc/v3 v3.10.0 // indirect
@@ -51,7 +51,6 @@ require (
github.com/go-sql-driver/mysql v1.7.0 // indirect github.com/go-sql-driver/mysql v1.7.0 // indirect
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
github.com/goccy/go-json v0.10.2 // indirect github.com/goccy/go-json v0.10.2 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/golang/snappy v0.0.4 // indirect github.com/golang/snappy v0.0.4 // indirect
github.com/google/pprof v0.0.0-20231229205709-960ae82b1e42 // indirect github.com/google/pprof v0.0.0-20231229205709-960ae82b1e42 // indirect
github.com/gorilla/mux v1.8.1 // indirect github.com/gorilla/mux v1.8.1 // indirect
@@ -99,19 +98,20 @@ require (
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
github.com/ugorji/go/codec v1.2.11 // indirect github.com/ugorji/go/codec v1.2.11 // indirect
github.com/xtaci/kcp-go/v5 v5.6.8 // indirect github.com/xtaci/kcp-go/v5 v5.6.8 // indirect
go.uber.org/atomic v1.7.0 // indirect
go.uber.org/mock v0.4.0 // indirect go.uber.org/mock v0.4.0 // indirect
go.uber.org/multierr v1.9.0 // indirect
golang.org/x/arch v0.3.0 // indirect golang.org/x/arch v0.3.0 // indirect
golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc // indirect golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc // indirect
golang.org/x/mod v0.14.0 // indirect golang.org/x/mod v0.17.0 // indirect
golang.org/x/net v0.24.0 // indirect golang.org/x/net v0.27.0 // indirect
golang.org/x/oauth2 v0.16.0 // indirect golang.org/x/oauth2 v0.20.0 // indirect
golang.org/x/sync v0.6.0 // indirect golang.org/x/sync v0.7.0 // indirect
golang.org/x/sys v0.19.0 // indirect golang.org/x/sys v0.22.0 // indirect
golang.org/x/text v0.14.0 // indirect golang.org/x/text v0.16.0 // indirect
golang.org/x/time v0.5.0 // indirect golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.17.0 // indirect golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect
google.golang.org/appengine v1.6.8 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240711142825-46eb208f015d // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231002182017-d307bd883b97 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect

66
go.sum
View File

@@ -16,8 +16,8 @@ github.com/bytedance/sonic v1.9.1 h1:6iJ6NqdoxCDr6mbY8h18oSO+cShGSMRGCEo7F2h0x8s
github.com/bytedance/sonic v1.9.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U= github.com/bytedance/sonic v1.9.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY= github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY=
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 h1:qSGYFH7+jGhDF8vLC+iwCD4WpbV1EBDSzWkJODFLams= github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 h1:qSGYFH7+jGhDF8vLC+iwCD4WpbV1EBDSzWkJODFLams=
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk= github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk=
@@ -93,17 +93,12 @@ github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrU
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM=
github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
@@ -255,10 +250,14 @@ github.com/xtaci/kcp-go/v5 v5.6.8/go.mod h1:oE9j2NVqAkuKO5o8ByKGch3vgVX3BNf8zqP8
github.com/xtaci/lossyconn v0.0.0-20200209145036-adba10fffc37 h1:EWU6Pktpas0n8lLQwDsRyZfmkPeRbdgPtW609es+/9E= github.com/xtaci/lossyconn v0.0.0-20200209145036-adba10fffc37 h1:EWU6Pktpas0n8lLQwDsRyZfmkPeRbdgPtW609es+/9E=
github.com/xtaci/lossyconn v0.0.0-20200209145036-adba10fffc37/go.mod h1:HpMP7DB2CyokmAh4lp0EQnnWhmycP/TvwBGzvuie+H0= github.com/xtaci/lossyconn v0.0.0-20200209145036-adba10fffc37/go.mod h1:HpMP7DB2CyokmAh4lp0EQnnWhmycP/TvwBGzvuie+H0=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw=
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
go.uber.org/mock v0.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU= go.uber.org/mock v0.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU=
go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc= go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc=
go.uber.org/multierr v1.9.0 h1:7fIwc/ZtS0q++VgcfqFDxSBZVv/Xo49/SYnDFupUwlI=
go.uber.org/multierr v1.9.0/go.mod h1:X2jQV1h+kxSjClGpnseKVIxpmcjrj7MNnI0bnlfKTVQ=
golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
golang.org/x/arch v0.3.0 h1:02VY4/ZcO/gBOH6PUaoiptASxtXU10jazRCP865E97k= golang.org/x/arch v0.3.0 h1:02VY4/ZcO/gBOH6PUaoiptASxtXU10jazRCP865E97k=
golang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
@@ -268,8 +267,8 @@ golang.org/x/crypto v0.0.0-20201012173705-84dcc777aaee/go.mod h1:LzIPMQfyMNhhGPh
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.8.0/go.mod h1:mRqEX+O9/h5TFCrQhkgjo2yKi0yYA+9ecGkdQoHrywE= golang.org/x/crypto v0.8.0/go.mod h1:mRqEX+O9/h5TFCrQhkgjo2yKi0yYA+9ecGkdQoHrywE=
golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw=
golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30=
golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc h1:ao2WRsKSzW6KuUY9IWPwWahcHCgR0s52IfwutMfEbdM= golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc h1:ao2WRsKSzW6KuUY9IWPwWahcHCgR0s52IfwutMfEbdM=
golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI=
@@ -278,8 +277,8 @@ golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvx
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA=
golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -293,18 +292,18 @@ golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns=
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI=
golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys=
golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.16.0 h1:aDkGMBSYxElaoP81NpoUoz2oo2R2wHdZpGToUxfyQrQ= golang.org/x/oauth2 v0.20.0 h1:4mQdhULixXKP1rwYBW0vAijoXnkTG0BLCDRzfe1idMo=
golang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2o= golang.org/x/oauth2 v0.20.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=
golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -320,26 +319,25 @@ golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI=
golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY= golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY=
golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU=
golang.org/x/term v0.19.0 h1:+ThwsDv+tYfnJFhF4L8jITxu1tdTWRTZpdsWgEgjL6Q= golang.org/x/term v0.22.0 h1:BbsgPEJULsl2fV/AT3v15Mjva5yXKQDyKf+TbDz7QJk=
golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk= golang.org/x/term v0.22.0/go.mod h1:F3qCibpT5AMpCRfhfT53vVJwhLtIVHhB9XDjfFvnMI4=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ=
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI=
golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk=
golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
@@ -350,34 +348,30 @@ golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBn
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
golang.org/x/tools v0.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc= golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg=
golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps= golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM=
google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds=
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
google.golang.org/genproto/googleapis/rpc v0.0.0-20231002182017-d307bd883b97 h1:6GQBEOdGkX6MMTLT9V+TjtIRZCw9VPD5Z+yHY9wMgS0= google.golang.org/genproto/googleapis/rpc v0.0.0-20240711142825-46eb208f015d h1:JU0iKnSg02Gmb5ZdV8nYsKEKsP6o/FGVWTrw4i1DA9A=
google.golang.org/genproto/googleapis/rpc v0.0.0-20231002182017-d307bd883b97/go.mod h1:v7nGkzlmW8P3n/bKmWBn2WpBjpOEx8Q6gMueudAmKfY= google.golang.org/genproto/googleapis/rpc v0.0.0-20240711142825-46eb208f015d/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
google.golang.org/grpc v1.60.1 h1:26+wFr+cNqSGFcOXcabYC0lUVJVRa2Sb2ortSK7VrEU= google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc=
google.golang.org/grpc v1.60.1/go.mod h1:OlCHIeLYqSSsLi6i49B5QGdzaMZK9+M7LXN2FKz4eGM= google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=

View File

@@ -76,4 +76,13 @@ message StartFRPCRequest {
message StartFRPCResponse { message StartFRPCResponse {
optional common.Status status = 1; optional common.Status status = 1;
}
message GetProxyByCIDRequest {
optional string client_id = 1;
}
message GetProxyByCIDResponse {
optional common.Status status = 1;
repeated common.ProxyInfo proxy_infos = 2;
} }

View File

@@ -76,4 +76,13 @@ message StartFRPSRequest {
message StartFRPSResponse { message StartFRPSResponse {
optional common.Status status = 1; optional common.Status status = 1;
}
message GetProxyBySIDRequest {
optional string server_id = 1;
}
message GetProxyBySIDResponse {
optional common.Status status = 1;
repeated common.ProxyInfo proxy_infos = 2;
} }

View File

@@ -56,4 +56,15 @@ message User {
optional string Role = 6; optional string Role = 6;
optional string Token = 7; optional string Token = 7;
optional string RawPassword = 8; optional string RawPassword = 8;
}
message ProxyInfo {
optional string name = 1;
optional string type = 2;
optional string client_id = 3;
optional string server_id = 4;
optional int64 today_traffic_in = 5;
optional int64 today_traffic_out = 6;
optional int64 history_traffic_in = 7;
optional int64 history_traffic_out = 8;
} }

View File

@@ -77,9 +77,19 @@ message FRPAuthResponse {
bool ok = 2; bool ok = 2;
} }
message PushProxyInfoReq {
ServerBase base = 255;
repeated common.ProxyInfo proxy_infos = 1;
}
message PushProxyInfoResp {
common.Status status = 1;
}
service Master { service Master {
rpc ServerSend(stream ClientMessage) returns(stream ServerMessage); rpc ServerSend(stream ClientMessage) returns(stream ServerMessage);
rpc PullClientConfig(PullClientConfigReq) returns(PullClientConfigResp); rpc PullClientConfig(PullClientConfigReq) returns(PullClientConfigResp);
rpc PullServerConfig(PullServerConfigReq) returns(PullServerConfigResp); rpc PullServerConfig(PullServerConfigReq) returns(PullServerConfigResp);
rpc FRPCAuth(FRPAuthRequest) returns(FRPAuthResponse); rpc FRPCAuth(FRPAuthRequest) returns(FRPAuthResponse);
rpc PushProxyInfo(PushProxyInfoReq) returns(PushProxyInfoResp);
} }

View File

@@ -32,6 +32,9 @@ func (dbm *dbManagerImpl) Init() {
if err := db.AutoMigrate(&Cert{}); err != nil { if err := db.AutoMigrate(&Cert{}); err != nil {
logrus.WithError(err).Fatalf("cannot init db table [%s]", (&Cert{}).TableName()) logrus.WithError(err).Fatalf("cannot init db table [%s]", (&Cert{}).TableName())
} }
if err := db.AutoMigrate(&Proxy{}); err != nil {
logrus.WithError(err).Fatalf("cannot init db table [%s]", (&Proxy{}).TableName())
}
} }
} }

32
models/proxy.go Normal file
View File

@@ -0,0 +1,32 @@
package models
import (
"time"
"gorm.io/gorm"
)
type Proxy struct {
*ProxyEntity
}
type ProxyEntity struct {
ProxyID int `json:"proxy_id" gorm:"primary_key;auto_increment"`
ServerID string `json:"server_id" gorm:"index"`
ClientID string `json:"client_id"`
Name string `json:"name"`
Type string `json:"type"`
UserID int `json:"user_id"`
TenantID int `json:"tenant_id"`
TodayTrafficIn int64 `json:"today_traffic_in"`
TodayTrafficOut int64 `json:"today_traffic_out"`
HistoryTrafficIn int64 `json:"history_traffic_in"`
HistoryTrafficOut int64 `json:"history_traffic_out"`
CreatedAt time.Time
UpdatedAt time.Time
DeletedAt gorm.DeletedAt `gorm:"index"`
}
func (*Proxy) TableName() string {
return "proxies"
}

View File

@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions: // versions:
// protoc-gen-go v1.33.0 // protoc-gen-go v1.34.2
// protoc v5.26.0 // protoc v5.27.1
// source: api_auth.proto // source: api_auth.proto
package pb package pb
@@ -290,7 +290,7 @@ func file_api_auth_proto_rawDescGZIP() []byte {
} }
var file_api_auth_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_api_auth_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_api_auth_proto_goTypes = []interface{}{ var file_api_auth_proto_goTypes = []any{
(*LoginRequest)(nil), // 0: api_auth.LoginRequest (*LoginRequest)(nil), // 0: api_auth.LoginRequest
(*LoginResponse)(nil), // 1: api_auth.LoginResponse (*LoginResponse)(nil), // 1: api_auth.LoginResponse
(*RegisterRequest)(nil), // 2: api_auth.RegisterRequest (*RegisterRequest)(nil), // 2: api_auth.RegisterRequest
@@ -314,7 +314,7 @@ func file_api_auth_proto_init() {
} }
file_common_proto_init() file_common_proto_init()
if !protoimpl.UnsafeEnabled { if !protoimpl.UnsafeEnabled {
file_api_auth_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { file_api_auth_proto_msgTypes[0].Exporter = func(v any, i int) any {
switch v := v.(*LoginRequest); i { switch v := v.(*LoginRequest); i {
case 0: case 0:
return &v.state return &v.state
@@ -326,7 +326,7 @@ func file_api_auth_proto_init() {
return nil return nil
} }
} }
file_api_auth_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { file_api_auth_proto_msgTypes[1].Exporter = func(v any, i int) any {
switch v := v.(*LoginResponse); i { switch v := v.(*LoginResponse); i {
case 0: case 0:
return &v.state return &v.state
@@ -338,7 +338,7 @@ func file_api_auth_proto_init() {
return nil return nil
} }
} }
file_api_auth_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { file_api_auth_proto_msgTypes[2].Exporter = func(v any, i int) any {
switch v := v.(*RegisterRequest); i { switch v := v.(*RegisterRequest); i {
case 0: case 0:
return &v.state return &v.state
@@ -350,7 +350,7 @@ func file_api_auth_proto_init() {
return nil return nil
} }
} }
file_api_auth_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { file_api_auth_proto_msgTypes[3].Exporter = func(v any, i int) any {
switch v := v.(*RegisterResponse); i { switch v := v.(*RegisterResponse); i {
case 0: case 0:
return &v.state return &v.state
@@ -363,10 +363,10 @@ func file_api_auth_proto_init() {
} }
} }
} }
file_api_auth_proto_msgTypes[0].OneofWrappers = []interface{}{} file_api_auth_proto_msgTypes[0].OneofWrappers = []any{}
file_api_auth_proto_msgTypes[1].OneofWrappers = []interface{}{} file_api_auth_proto_msgTypes[1].OneofWrappers = []any{}
file_api_auth_proto_msgTypes[2].OneofWrappers = []interface{}{} file_api_auth_proto_msgTypes[2].OneofWrappers = []any{}
file_api_auth_proto_msgTypes[3].OneofWrappers = []interface{}{} file_api_auth_proto_msgTypes[3].OneofWrappers = []any{}
type x struct{} type x struct{}
out := protoimpl.TypeBuilder{ out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{ File: protoimpl.DescBuilder{

View File

@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions: // versions:
// protoc-gen-go v1.33.0 // protoc-gen-go v1.34.2
// protoc v5.26.0 // protoc v5.27.1
// source: api_client.proto // source: api_client.proto
package pb package pb
@@ -844,6 +844,108 @@ func (x *StartFRPCResponse) GetStatus() *Status {
return nil return nil
} }
type GetProxyByCIDRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ClientId *string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3,oneof" json:"client_id,omitempty"`
}
func (x *GetProxyByCIDRequest) Reset() {
*x = GetProxyByCIDRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_api_client_proto_msgTypes[16]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetProxyByCIDRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetProxyByCIDRequest) ProtoMessage() {}
func (x *GetProxyByCIDRequest) ProtoReflect() protoreflect.Message {
mi := &file_api_client_proto_msgTypes[16]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetProxyByCIDRequest.ProtoReflect.Descriptor instead.
func (*GetProxyByCIDRequest) Descriptor() ([]byte, []int) {
return file_api_client_proto_rawDescGZIP(), []int{16}
}
func (x *GetProxyByCIDRequest) GetClientId() string {
if x != nil && x.ClientId != nil {
return *x.ClientId
}
return ""
}
type GetProxyByCIDResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Status *Status `protobuf:"bytes,1,opt,name=status,proto3,oneof" json:"status,omitempty"`
ProxyInfos []*ProxyInfo `protobuf:"bytes,2,rep,name=proxy_infos,json=proxyInfos,proto3" json:"proxy_infos,omitempty"`
}
func (x *GetProxyByCIDResponse) Reset() {
*x = GetProxyByCIDResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_api_client_proto_msgTypes[17]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetProxyByCIDResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetProxyByCIDResponse) ProtoMessage() {}
func (x *GetProxyByCIDResponse) ProtoReflect() protoreflect.Message {
mi := &file_api_client_proto_msgTypes[17]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetProxyByCIDResponse.ProtoReflect.Descriptor instead.
func (*GetProxyByCIDResponse) Descriptor() ([]byte, []int) {
return file_api_client_proto_rawDescGZIP(), []int{17}
}
func (x *GetProxyByCIDResponse) GetStatus() *Status {
if x != nil {
return x.Status
}
return nil
}
func (x *GetProxyByCIDResponse) GetProxyInfos() []*ProxyInfo {
if x != nil {
return x.ProxyInfos
}
return nil
}
var File_api_client_proto protoreflect.FileDescriptor var File_api_client_proto protoreflect.FileDescriptor
var file_api_client_proto_rawDesc = []byte{ var file_api_client_proto_rawDesc = []byte{
@@ -947,8 +1049,21 @@ var file_api_client_proto_rawDesc = []byte{
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18,
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x53, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x53,
0x74, 0x61, 0x74, 0x75, 0x73, 0x48, 0x00, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x88, 0x74, 0x61, 0x74, 0x75, 0x73, 0x48, 0x00, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x88,
0x01, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x07, 0x5a, 0x01, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x46, 0x0a,
0x05, 0x2e, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x14, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x42, 0x79, 0x43, 0x49, 0x44, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f,
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x63, 0x6c, 0x69, 0x65,
0x6e, 0x74, 0x49, 0x64, 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x63, 0x6c, 0x69, 0x65,
0x6e, 0x74, 0x5f, 0x69, 0x64, 0x22, 0x83, 0x01, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f,
0x78, 0x79, 0x42, 0x79, 0x43, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
0x2b, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x0e, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x48,
0x00, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x88, 0x01, 0x01, 0x12, 0x32, 0x0a, 0x0b,
0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x11, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79,
0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x73,
0x42, 0x09, 0x0a, 0x07, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x07, 0x5a, 0x05, 0x2e,
0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (
@@ -963,43 +1078,48 @@ func file_api_client_proto_rawDescGZIP() []byte {
return file_api_client_proto_rawDescData return file_api_client_proto_rawDescData
} }
var file_api_client_proto_msgTypes = make([]protoimpl.MessageInfo, 16) var file_api_client_proto_msgTypes = make([]protoimpl.MessageInfo, 18)
var file_api_client_proto_goTypes = []interface{}{ var file_api_client_proto_goTypes = []any{
(*InitClientRequest)(nil), // 0: api_client.InitClientRequest (*InitClientRequest)(nil), // 0: api_client.InitClientRequest
(*InitClientResponse)(nil), // 1: api_client.InitClientResponse (*InitClientResponse)(nil), // 1: api_client.InitClientResponse
(*ListClientsRequest)(nil), // 2: api_client.ListClientsRequest (*ListClientsRequest)(nil), // 2: api_client.ListClientsRequest
(*ListClientsResponse)(nil), // 3: api_client.ListClientsResponse (*ListClientsResponse)(nil), // 3: api_client.ListClientsResponse
(*GetClientRequest)(nil), // 4: api_client.GetClientRequest (*GetClientRequest)(nil), // 4: api_client.GetClientRequest
(*GetClientResponse)(nil), // 5: api_client.GetClientResponse (*GetClientResponse)(nil), // 5: api_client.GetClientResponse
(*DeleteClientRequest)(nil), // 6: api_client.DeleteClientRequest (*DeleteClientRequest)(nil), // 6: api_client.DeleteClientRequest
(*DeleteClientResponse)(nil), // 7: api_client.DeleteClientResponse (*DeleteClientResponse)(nil), // 7: api_client.DeleteClientResponse
(*UpdateFRPCRequest)(nil), // 8: api_client.UpdateFRPCRequest (*UpdateFRPCRequest)(nil), // 8: api_client.UpdateFRPCRequest
(*UpdateFRPCResponse)(nil), // 9: api_client.UpdateFRPCResponse (*UpdateFRPCResponse)(nil), // 9: api_client.UpdateFRPCResponse
(*RemoveFRPCRequest)(nil), // 10: api_client.RemoveFRPCRequest (*RemoveFRPCRequest)(nil), // 10: api_client.RemoveFRPCRequest
(*RemoveFRPCResponse)(nil), // 11: api_client.RemoveFRPCResponse (*RemoveFRPCResponse)(nil), // 11: api_client.RemoveFRPCResponse
(*StopFRPCRequest)(nil), // 12: api_client.StopFRPCRequest (*StopFRPCRequest)(nil), // 12: api_client.StopFRPCRequest
(*StopFRPCResponse)(nil), // 13: api_client.StopFRPCResponse (*StopFRPCResponse)(nil), // 13: api_client.StopFRPCResponse
(*StartFRPCRequest)(nil), // 14: api_client.StartFRPCRequest (*StartFRPCRequest)(nil), // 14: api_client.StartFRPCRequest
(*StartFRPCResponse)(nil), // 15: api_client.StartFRPCResponse (*StartFRPCResponse)(nil), // 15: api_client.StartFRPCResponse
(*Status)(nil), // 16: common.Status (*GetProxyByCIDRequest)(nil), // 16: api_client.GetProxyByCIDRequest
(*Client)(nil), // 17: common.Client (*GetProxyByCIDResponse)(nil), // 17: api_client.GetProxyByCIDResponse
(*Status)(nil), // 18: common.Status
(*Client)(nil), // 19: common.Client
(*ProxyInfo)(nil), // 20: common.ProxyInfo
} }
var file_api_client_proto_depIdxs = []int32{ var file_api_client_proto_depIdxs = []int32{
16, // 0: api_client.InitClientResponse.status:type_name -> common.Status 18, // 0: api_client.InitClientResponse.status:type_name -> common.Status
16, // 1: api_client.ListClientsResponse.status:type_name -> common.Status 18, // 1: api_client.ListClientsResponse.status:type_name -> common.Status
17, // 2: api_client.ListClientsResponse.clients:type_name -> common.Client 19, // 2: api_client.ListClientsResponse.clients:type_name -> common.Client
16, // 3: api_client.GetClientResponse.status:type_name -> common.Status 18, // 3: api_client.GetClientResponse.status:type_name -> common.Status
17, // 4: api_client.GetClientResponse.client:type_name -> common.Client 19, // 4: api_client.GetClientResponse.client:type_name -> common.Client
16, // 5: api_client.DeleteClientResponse.status:type_name -> common.Status 18, // 5: api_client.DeleteClientResponse.status:type_name -> common.Status
16, // 6: api_client.UpdateFRPCResponse.status:type_name -> common.Status 18, // 6: api_client.UpdateFRPCResponse.status:type_name -> common.Status
16, // 7: api_client.RemoveFRPCResponse.status:type_name -> common.Status 18, // 7: api_client.RemoveFRPCResponse.status:type_name -> common.Status
16, // 8: api_client.StopFRPCResponse.status:type_name -> common.Status 18, // 8: api_client.StopFRPCResponse.status:type_name -> common.Status
16, // 9: api_client.StartFRPCResponse.status:type_name -> common.Status 18, // 9: api_client.StartFRPCResponse.status:type_name -> common.Status
10, // [10:10] is the sub-list for method output_type 18, // 10: api_client.GetProxyByCIDResponse.status:type_name -> common.Status
10, // [10:10] is the sub-list for method input_type 20, // 11: api_client.GetProxyByCIDResponse.proxy_infos:type_name -> common.ProxyInfo
10, // [10:10] is the sub-list for extension type_name 12, // [12:12] is the sub-list for method output_type
10, // [10:10] is the sub-list for extension extendee 12, // [12:12] is the sub-list for method input_type
0, // [0:10] is the sub-list for field type_name 12, // [12:12] is the sub-list for extension type_name
12, // [12:12] is the sub-list for extension extendee
0, // [0:12] is the sub-list for field type_name
} }
func init() { file_api_client_proto_init() } func init() { file_api_client_proto_init() }
@@ -1009,7 +1129,7 @@ func file_api_client_proto_init() {
} }
file_common_proto_init() file_common_proto_init()
if !protoimpl.UnsafeEnabled { if !protoimpl.UnsafeEnabled {
file_api_client_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { file_api_client_proto_msgTypes[0].Exporter = func(v any, i int) any {
switch v := v.(*InitClientRequest); i { switch v := v.(*InitClientRequest); i {
case 0: case 0:
return &v.state return &v.state
@@ -1021,7 +1141,7 @@ func file_api_client_proto_init() {
return nil return nil
} }
} }
file_api_client_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { file_api_client_proto_msgTypes[1].Exporter = func(v any, i int) any {
switch v := v.(*InitClientResponse); i { switch v := v.(*InitClientResponse); i {
case 0: case 0:
return &v.state return &v.state
@@ -1033,7 +1153,7 @@ func file_api_client_proto_init() {
return nil return nil
} }
} }
file_api_client_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { file_api_client_proto_msgTypes[2].Exporter = func(v any, i int) any {
switch v := v.(*ListClientsRequest); i { switch v := v.(*ListClientsRequest); i {
case 0: case 0:
return &v.state return &v.state
@@ -1045,7 +1165,7 @@ func file_api_client_proto_init() {
return nil return nil
} }
} }
file_api_client_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { file_api_client_proto_msgTypes[3].Exporter = func(v any, i int) any {
switch v := v.(*ListClientsResponse); i { switch v := v.(*ListClientsResponse); i {
case 0: case 0:
return &v.state return &v.state
@@ -1057,7 +1177,7 @@ func file_api_client_proto_init() {
return nil return nil
} }
} }
file_api_client_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { file_api_client_proto_msgTypes[4].Exporter = func(v any, i int) any {
switch v := v.(*GetClientRequest); i { switch v := v.(*GetClientRequest); i {
case 0: case 0:
return &v.state return &v.state
@@ -1069,7 +1189,7 @@ func file_api_client_proto_init() {
return nil return nil
} }
} }
file_api_client_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { file_api_client_proto_msgTypes[5].Exporter = func(v any, i int) any {
switch v := v.(*GetClientResponse); i { switch v := v.(*GetClientResponse); i {
case 0: case 0:
return &v.state return &v.state
@@ -1081,7 +1201,7 @@ func file_api_client_proto_init() {
return nil return nil
} }
} }
file_api_client_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { file_api_client_proto_msgTypes[6].Exporter = func(v any, i int) any {
switch v := v.(*DeleteClientRequest); i { switch v := v.(*DeleteClientRequest); i {
case 0: case 0:
return &v.state return &v.state
@@ -1093,7 +1213,7 @@ func file_api_client_proto_init() {
return nil return nil
} }
} }
file_api_client_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { file_api_client_proto_msgTypes[7].Exporter = func(v any, i int) any {
switch v := v.(*DeleteClientResponse); i { switch v := v.(*DeleteClientResponse); i {
case 0: case 0:
return &v.state return &v.state
@@ -1105,7 +1225,7 @@ func file_api_client_proto_init() {
return nil return nil
} }
} }
file_api_client_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { file_api_client_proto_msgTypes[8].Exporter = func(v any, i int) any {
switch v := v.(*UpdateFRPCRequest); i { switch v := v.(*UpdateFRPCRequest); i {
case 0: case 0:
return &v.state return &v.state
@@ -1117,7 +1237,7 @@ func file_api_client_proto_init() {
return nil return nil
} }
} }
file_api_client_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { file_api_client_proto_msgTypes[9].Exporter = func(v any, i int) any {
switch v := v.(*UpdateFRPCResponse); i { switch v := v.(*UpdateFRPCResponse); i {
case 0: case 0:
return &v.state return &v.state
@@ -1129,7 +1249,7 @@ func file_api_client_proto_init() {
return nil return nil
} }
} }
file_api_client_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { file_api_client_proto_msgTypes[10].Exporter = func(v any, i int) any {
switch v := v.(*RemoveFRPCRequest); i { switch v := v.(*RemoveFRPCRequest); i {
case 0: case 0:
return &v.state return &v.state
@@ -1141,7 +1261,7 @@ func file_api_client_proto_init() {
return nil return nil
} }
} }
file_api_client_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { file_api_client_proto_msgTypes[11].Exporter = func(v any, i int) any {
switch v := v.(*RemoveFRPCResponse); i { switch v := v.(*RemoveFRPCResponse); i {
case 0: case 0:
return &v.state return &v.state
@@ -1153,7 +1273,7 @@ func file_api_client_proto_init() {
return nil return nil
} }
} }
file_api_client_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { file_api_client_proto_msgTypes[12].Exporter = func(v any, i int) any {
switch v := v.(*StopFRPCRequest); i { switch v := v.(*StopFRPCRequest); i {
case 0: case 0:
return &v.state return &v.state
@@ -1165,7 +1285,7 @@ func file_api_client_proto_init() {
return nil return nil
} }
} }
file_api_client_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { file_api_client_proto_msgTypes[13].Exporter = func(v any, i int) any {
switch v := v.(*StopFRPCResponse); i { switch v := v.(*StopFRPCResponse); i {
case 0: case 0:
return &v.state return &v.state
@@ -1177,7 +1297,7 @@ func file_api_client_proto_init() {
return nil return nil
} }
} }
file_api_client_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { file_api_client_proto_msgTypes[14].Exporter = func(v any, i int) any {
switch v := v.(*StartFRPCRequest); i { switch v := v.(*StartFRPCRequest); i {
case 0: case 0:
return &v.state return &v.state
@@ -1189,7 +1309,7 @@ func file_api_client_proto_init() {
return nil return nil
} }
} }
file_api_client_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { file_api_client_proto_msgTypes[15].Exporter = func(v any, i int) any {
switch v := v.(*StartFRPCResponse); i { switch v := v.(*StartFRPCResponse); i {
case 0: case 0:
return &v.state return &v.state
@@ -1201,30 +1321,56 @@ func file_api_client_proto_init() {
return nil return nil
} }
} }
file_api_client_proto_msgTypes[16].Exporter = func(v any, i int) any {
switch v := v.(*GetProxyByCIDRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_api_client_proto_msgTypes[17].Exporter = func(v any, i int) any {
switch v := v.(*GetProxyByCIDResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
} }
file_api_client_proto_msgTypes[0].OneofWrappers = []interface{}{} file_api_client_proto_msgTypes[0].OneofWrappers = []any{}
file_api_client_proto_msgTypes[1].OneofWrappers = []interface{}{} file_api_client_proto_msgTypes[1].OneofWrappers = []any{}
file_api_client_proto_msgTypes[2].OneofWrappers = []interface{}{} file_api_client_proto_msgTypes[2].OneofWrappers = []any{}
file_api_client_proto_msgTypes[3].OneofWrappers = []interface{}{} file_api_client_proto_msgTypes[3].OneofWrappers = []any{}
file_api_client_proto_msgTypes[4].OneofWrappers = []interface{}{} file_api_client_proto_msgTypes[4].OneofWrappers = []any{}
file_api_client_proto_msgTypes[5].OneofWrappers = []interface{}{} file_api_client_proto_msgTypes[5].OneofWrappers = []any{}
file_api_client_proto_msgTypes[6].OneofWrappers = []interface{}{} file_api_client_proto_msgTypes[6].OneofWrappers = []any{}
file_api_client_proto_msgTypes[7].OneofWrappers = []interface{}{} file_api_client_proto_msgTypes[7].OneofWrappers = []any{}
file_api_client_proto_msgTypes[8].OneofWrappers = []interface{}{} file_api_client_proto_msgTypes[8].OneofWrappers = []any{}
file_api_client_proto_msgTypes[9].OneofWrappers = []interface{}{} file_api_client_proto_msgTypes[9].OneofWrappers = []any{}
file_api_client_proto_msgTypes[10].OneofWrappers = []interface{}{} file_api_client_proto_msgTypes[10].OneofWrappers = []any{}
file_api_client_proto_msgTypes[11].OneofWrappers = []interface{}{} file_api_client_proto_msgTypes[11].OneofWrappers = []any{}
file_api_client_proto_msgTypes[12].OneofWrappers = []interface{}{} file_api_client_proto_msgTypes[12].OneofWrappers = []any{}
file_api_client_proto_msgTypes[13].OneofWrappers = []interface{}{} file_api_client_proto_msgTypes[13].OneofWrappers = []any{}
file_api_client_proto_msgTypes[14].OneofWrappers = []interface{}{} file_api_client_proto_msgTypes[14].OneofWrappers = []any{}
file_api_client_proto_msgTypes[15].OneofWrappers = []interface{}{} file_api_client_proto_msgTypes[15].OneofWrappers = []any{}
file_api_client_proto_msgTypes[16].OneofWrappers = []any{}
file_api_client_proto_msgTypes[17].OneofWrappers = []any{}
type x struct{} type x struct{}
out := protoimpl.TypeBuilder{ out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{ File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_api_client_proto_rawDesc, RawDescriptor: file_api_client_proto_rawDesc,
NumEnums: 0, NumEnums: 0,
NumMessages: 16, NumMessages: 18,
NumExtensions: 0, NumExtensions: 0,
NumServices: 0, NumServices: 0,
}, },

View File

@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions: // versions:
// protoc-gen-go v1.33.0 // protoc-gen-go v1.34.2
// protoc v5.26.0 // protoc v5.27.1
// source: api_master.proto // source: api_master.proto
package pb package pb
@@ -449,7 +449,7 @@ func file_api_master_proto_rawDescGZIP() []byte {
var file_api_master_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_api_master_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_api_master_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_api_master_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_api_master_proto_goTypes = []interface{}{ var file_api_master_proto_goTypes = []any{
(ClientStatus_Status)(0), // 0: api_master.ClientStatus.Status (ClientStatus_Status)(0), // 0: api_master.ClientStatus.Status
(*ClientStatus)(nil), // 1: api_master.ClientStatus (*ClientStatus)(nil), // 1: api_master.ClientStatus
(*GetClientsStatusRequest)(nil), // 2: api_master.GetClientsStatusRequest (*GetClientsStatusRequest)(nil), // 2: api_master.GetClientsStatusRequest
@@ -483,7 +483,7 @@ func file_api_master_proto_init() {
} }
file_common_proto_init() file_common_proto_init()
if !protoimpl.UnsafeEnabled { if !protoimpl.UnsafeEnabled {
file_api_master_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { file_api_master_proto_msgTypes[0].Exporter = func(v any, i int) any {
switch v := v.(*ClientStatus); i { switch v := v.(*ClientStatus); i {
case 0: case 0:
return &v.state return &v.state
@@ -495,7 +495,7 @@ func file_api_master_proto_init() {
return nil return nil
} }
} }
file_api_master_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { file_api_master_proto_msgTypes[1].Exporter = func(v any, i int) any {
switch v := v.(*GetClientsStatusRequest); i { switch v := v.(*GetClientsStatusRequest); i {
case 0: case 0:
return &v.state return &v.state
@@ -507,7 +507,7 @@ func file_api_master_proto_init() {
return nil return nil
} }
} }
file_api_master_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { file_api_master_proto_msgTypes[2].Exporter = func(v any, i int) any {
switch v := v.(*GetClientsStatusResponse); i { switch v := v.(*GetClientsStatusResponse); i {
case 0: case 0:
return &v.state return &v.state
@@ -519,7 +519,7 @@ func file_api_master_proto_init() {
return nil return nil
} }
} }
file_api_master_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { file_api_master_proto_msgTypes[3].Exporter = func(v any, i int) any {
switch v := v.(*GetClientCertRequest); i { switch v := v.(*GetClientCertRequest); i {
case 0: case 0:
return &v.state return &v.state
@@ -531,7 +531,7 @@ func file_api_master_proto_init() {
return nil return nil
} }
} }
file_api_master_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { file_api_master_proto_msgTypes[4].Exporter = func(v any, i int) any {
switch v := v.(*GetClientCertResponse); i { switch v := v.(*GetClientCertResponse); i {
case 0: case 0:
return &v.state return &v.state
@@ -544,8 +544,8 @@ func file_api_master_proto_init() {
} }
} }
} }
file_api_master_proto_msgTypes[2].OneofWrappers = []interface{}{} file_api_master_proto_msgTypes[2].OneofWrappers = []any{}
file_api_master_proto_msgTypes[4].OneofWrappers = []interface{}{} file_api_master_proto_msgTypes[4].OneofWrappers = []any{}
type x struct{} type x struct{}
out := protoimpl.TypeBuilder{ out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{ File: protoimpl.DescBuilder{

View File

@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions: // versions:
// protoc-gen-go v1.33.0 // protoc-gen-go v1.34.2
// protoc v5.26.0 // protoc v5.27.1
// source: api_server.proto // source: api_server.proto
package pb package pb
@@ -852,6 +852,108 @@ func (x *StartFRPSResponse) GetStatus() *Status {
return nil return nil
} }
type GetProxyBySIDRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ServerId *string `protobuf:"bytes,1,opt,name=server_id,json=serverId,proto3,oneof" json:"server_id,omitempty"`
}
func (x *GetProxyBySIDRequest) Reset() {
*x = GetProxyBySIDRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_api_server_proto_msgTypes[16]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetProxyBySIDRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetProxyBySIDRequest) ProtoMessage() {}
func (x *GetProxyBySIDRequest) ProtoReflect() protoreflect.Message {
mi := &file_api_server_proto_msgTypes[16]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetProxyBySIDRequest.ProtoReflect.Descriptor instead.
func (*GetProxyBySIDRequest) Descriptor() ([]byte, []int) {
return file_api_server_proto_rawDescGZIP(), []int{16}
}
func (x *GetProxyBySIDRequest) GetServerId() string {
if x != nil && x.ServerId != nil {
return *x.ServerId
}
return ""
}
type GetProxyBySIDResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Status *Status `protobuf:"bytes,1,opt,name=status,proto3,oneof" json:"status,omitempty"`
ProxyInfos []*ProxyInfo `protobuf:"bytes,2,rep,name=proxy_infos,json=proxyInfos,proto3" json:"proxy_infos,omitempty"`
}
func (x *GetProxyBySIDResponse) Reset() {
*x = GetProxyBySIDResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_api_server_proto_msgTypes[17]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetProxyBySIDResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetProxyBySIDResponse) ProtoMessage() {}
func (x *GetProxyBySIDResponse) ProtoReflect() protoreflect.Message {
mi := &file_api_server_proto_msgTypes[17]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetProxyBySIDResponse.ProtoReflect.Descriptor instead.
func (*GetProxyBySIDResponse) Descriptor() ([]byte, []int) {
return file_api_server_proto_rawDescGZIP(), []int{17}
}
func (x *GetProxyBySIDResponse) GetStatus() *Status {
if x != nil {
return x.Status
}
return nil
}
func (x *GetProxyBySIDResponse) GetProxyInfos() []*ProxyInfo {
if x != nil {
return x.ProxyInfos
}
return nil
}
var File_api_server_proto protoreflect.FileDescriptor var File_api_server_proto protoreflect.FileDescriptor
var file_api_server_proto_rawDesc = []byte{ var file_api_server_proto_rawDesc = []byte{
@@ -958,8 +1060,21 @@ var file_api_server_proto_rawDesc = []byte{
0x65, 0x12, 0x2b, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x65, 0x12, 0x2b, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x0e, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x0b, 0x32, 0x0e, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75,
0x73, 0x48, 0x00, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x88, 0x01, 0x01, 0x42, 0x09, 0x73, 0x48, 0x00, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x88, 0x01, 0x01, 0x42, 0x09,
0x0a, 0x07, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x07, 0x5a, 0x05, 0x2e, 0x2e, 0x2f, 0x0a, 0x07, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x46, 0x0a, 0x14, 0x47, 0x65, 0x74,
0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x42, 0x79, 0x53, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x12, 0x20, 0x0a, 0x09, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64,
0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x69,
0x64, 0x22, 0x83, 0x01, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x42, 0x79,
0x53, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x06, 0x73,
0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x63, 0x6f,
0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x48, 0x00, 0x52, 0x06, 0x73,
0x74, 0x61, 0x74, 0x75, 0x73, 0x88, 0x01, 0x01, 0x12, 0x32, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x78,
0x79, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e,
0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x49, 0x6e, 0x66, 0x6f,
0x52, 0x0a, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x42, 0x09, 0x0a, 0x07,
0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x07, 0x5a, 0x05, 0x2e, 0x2e, 0x2f, 0x70, 0x62,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (
@@ -974,43 +1089,48 @@ func file_api_server_proto_rawDescGZIP() []byte {
return file_api_server_proto_rawDescData return file_api_server_proto_rawDescData
} }
var file_api_server_proto_msgTypes = make([]protoimpl.MessageInfo, 16) var file_api_server_proto_msgTypes = make([]protoimpl.MessageInfo, 18)
var file_api_server_proto_goTypes = []interface{}{ var file_api_server_proto_goTypes = []any{
(*InitServerRequest)(nil), // 0: api_server.InitServerRequest (*InitServerRequest)(nil), // 0: api_server.InitServerRequest
(*InitServerResponse)(nil), // 1: api_server.InitServerResponse (*InitServerResponse)(nil), // 1: api_server.InitServerResponse
(*ListServersRequest)(nil), // 2: api_server.ListServersRequest (*ListServersRequest)(nil), // 2: api_server.ListServersRequest
(*ListServersResponse)(nil), // 3: api_server.ListServersResponse (*ListServersResponse)(nil), // 3: api_server.ListServersResponse
(*GetServerRequest)(nil), // 4: api_server.GetServerRequest (*GetServerRequest)(nil), // 4: api_server.GetServerRequest
(*GetServerResponse)(nil), // 5: api_server.GetServerResponse (*GetServerResponse)(nil), // 5: api_server.GetServerResponse
(*DeleteServerRequest)(nil), // 6: api_server.DeleteServerRequest (*DeleteServerRequest)(nil), // 6: api_server.DeleteServerRequest
(*DeleteServerResponse)(nil), // 7: api_server.DeleteServerResponse (*DeleteServerResponse)(nil), // 7: api_server.DeleteServerResponse
(*UpdateFRPSRequest)(nil), // 8: api_server.UpdateFRPSRequest (*UpdateFRPSRequest)(nil), // 8: api_server.UpdateFRPSRequest
(*UpdateFRPSResponse)(nil), // 9: api_server.UpdateFRPSResponse (*UpdateFRPSResponse)(nil), // 9: api_server.UpdateFRPSResponse
(*RemoveFRPSRequest)(nil), // 10: api_server.RemoveFRPSRequest (*RemoveFRPSRequest)(nil), // 10: api_server.RemoveFRPSRequest
(*RemoveFRPSResponse)(nil), // 11: api_server.RemoveFRPSResponse (*RemoveFRPSResponse)(nil), // 11: api_server.RemoveFRPSResponse
(*StopFRPSRequest)(nil), // 12: api_server.StopFRPSRequest (*StopFRPSRequest)(nil), // 12: api_server.StopFRPSRequest
(*StopFRPSResponse)(nil), // 13: api_server.StopFRPSResponse (*StopFRPSResponse)(nil), // 13: api_server.StopFRPSResponse
(*StartFRPSRequest)(nil), // 14: api_server.StartFRPSRequest (*StartFRPSRequest)(nil), // 14: api_server.StartFRPSRequest
(*StartFRPSResponse)(nil), // 15: api_server.StartFRPSResponse (*StartFRPSResponse)(nil), // 15: api_server.StartFRPSResponse
(*Status)(nil), // 16: common.Status (*GetProxyBySIDRequest)(nil), // 16: api_server.GetProxyBySIDRequest
(*Server)(nil), // 17: common.Server (*GetProxyBySIDResponse)(nil), // 17: api_server.GetProxyBySIDResponse
(*Status)(nil), // 18: common.Status
(*Server)(nil), // 19: common.Server
(*ProxyInfo)(nil), // 20: common.ProxyInfo
} }
var file_api_server_proto_depIdxs = []int32{ var file_api_server_proto_depIdxs = []int32{
16, // 0: api_server.InitServerResponse.status:type_name -> common.Status 18, // 0: api_server.InitServerResponse.status:type_name -> common.Status
16, // 1: api_server.ListServersResponse.status:type_name -> common.Status 18, // 1: api_server.ListServersResponse.status:type_name -> common.Status
17, // 2: api_server.ListServersResponse.servers:type_name -> common.Server 19, // 2: api_server.ListServersResponse.servers:type_name -> common.Server
16, // 3: api_server.GetServerResponse.status:type_name -> common.Status 18, // 3: api_server.GetServerResponse.status:type_name -> common.Status
17, // 4: api_server.GetServerResponse.server:type_name -> common.Server 19, // 4: api_server.GetServerResponse.server:type_name -> common.Server
16, // 5: api_server.DeleteServerResponse.status:type_name -> common.Status 18, // 5: api_server.DeleteServerResponse.status:type_name -> common.Status
16, // 6: api_server.UpdateFRPSResponse.status:type_name -> common.Status 18, // 6: api_server.UpdateFRPSResponse.status:type_name -> common.Status
16, // 7: api_server.RemoveFRPSResponse.status:type_name -> common.Status 18, // 7: api_server.RemoveFRPSResponse.status:type_name -> common.Status
16, // 8: api_server.StopFRPSResponse.status:type_name -> common.Status 18, // 8: api_server.StopFRPSResponse.status:type_name -> common.Status
16, // 9: api_server.StartFRPSResponse.status:type_name -> common.Status 18, // 9: api_server.StartFRPSResponse.status:type_name -> common.Status
10, // [10:10] is the sub-list for method output_type 18, // 10: api_server.GetProxyBySIDResponse.status:type_name -> common.Status
10, // [10:10] is the sub-list for method input_type 20, // 11: api_server.GetProxyBySIDResponse.proxy_infos:type_name -> common.ProxyInfo
10, // [10:10] is the sub-list for extension type_name 12, // [12:12] is the sub-list for method output_type
10, // [10:10] is the sub-list for extension extendee 12, // [12:12] is the sub-list for method input_type
0, // [0:10] is the sub-list for field type_name 12, // [12:12] is the sub-list for extension type_name
12, // [12:12] is the sub-list for extension extendee
0, // [0:12] is the sub-list for field type_name
} }
func init() { file_api_server_proto_init() } func init() { file_api_server_proto_init() }
@@ -1020,7 +1140,7 @@ func file_api_server_proto_init() {
} }
file_common_proto_init() file_common_proto_init()
if !protoimpl.UnsafeEnabled { if !protoimpl.UnsafeEnabled {
file_api_server_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { file_api_server_proto_msgTypes[0].Exporter = func(v any, i int) any {
switch v := v.(*InitServerRequest); i { switch v := v.(*InitServerRequest); i {
case 0: case 0:
return &v.state return &v.state
@@ -1032,7 +1152,7 @@ func file_api_server_proto_init() {
return nil return nil
} }
} }
file_api_server_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { file_api_server_proto_msgTypes[1].Exporter = func(v any, i int) any {
switch v := v.(*InitServerResponse); i { switch v := v.(*InitServerResponse); i {
case 0: case 0:
return &v.state return &v.state
@@ -1044,7 +1164,7 @@ func file_api_server_proto_init() {
return nil return nil
} }
} }
file_api_server_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { file_api_server_proto_msgTypes[2].Exporter = func(v any, i int) any {
switch v := v.(*ListServersRequest); i { switch v := v.(*ListServersRequest); i {
case 0: case 0:
return &v.state return &v.state
@@ -1056,7 +1176,7 @@ func file_api_server_proto_init() {
return nil return nil
} }
} }
file_api_server_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { file_api_server_proto_msgTypes[3].Exporter = func(v any, i int) any {
switch v := v.(*ListServersResponse); i { switch v := v.(*ListServersResponse); i {
case 0: case 0:
return &v.state return &v.state
@@ -1068,7 +1188,7 @@ func file_api_server_proto_init() {
return nil return nil
} }
} }
file_api_server_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { file_api_server_proto_msgTypes[4].Exporter = func(v any, i int) any {
switch v := v.(*GetServerRequest); i { switch v := v.(*GetServerRequest); i {
case 0: case 0:
return &v.state return &v.state
@@ -1080,7 +1200,7 @@ func file_api_server_proto_init() {
return nil return nil
} }
} }
file_api_server_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { file_api_server_proto_msgTypes[5].Exporter = func(v any, i int) any {
switch v := v.(*GetServerResponse); i { switch v := v.(*GetServerResponse); i {
case 0: case 0:
return &v.state return &v.state
@@ -1092,7 +1212,7 @@ func file_api_server_proto_init() {
return nil return nil
} }
} }
file_api_server_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { file_api_server_proto_msgTypes[6].Exporter = func(v any, i int) any {
switch v := v.(*DeleteServerRequest); i { switch v := v.(*DeleteServerRequest); i {
case 0: case 0:
return &v.state return &v.state
@@ -1104,7 +1224,7 @@ func file_api_server_proto_init() {
return nil return nil
} }
} }
file_api_server_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { file_api_server_proto_msgTypes[7].Exporter = func(v any, i int) any {
switch v := v.(*DeleteServerResponse); i { switch v := v.(*DeleteServerResponse); i {
case 0: case 0:
return &v.state return &v.state
@@ -1116,7 +1236,7 @@ func file_api_server_proto_init() {
return nil return nil
} }
} }
file_api_server_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { file_api_server_proto_msgTypes[8].Exporter = func(v any, i int) any {
switch v := v.(*UpdateFRPSRequest); i { switch v := v.(*UpdateFRPSRequest); i {
case 0: case 0:
return &v.state return &v.state
@@ -1128,7 +1248,7 @@ func file_api_server_proto_init() {
return nil return nil
} }
} }
file_api_server_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { file_api_server_proto_msgTypes[9].Exporter = func(v any, i int) any {
switch v := v.(*UpdateFRPSResponse); i { switch v := v.(*UpdateFRPSResponse); i {
case 0: case 0:
return &v.state return &v.state
@@ -1140,7 +1260,7 @@ func file_api_server_proto_init() {
return nil return nil
} }
} }
file_api_server_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { file_api_server_proto_msgTypes[10].Exporter = func(v any, i int) any {
switch v := v.(*RemoveFRPSRequest); i { switch v := v.(*RemoveFRPSRequest); i {
case 0: case 0:
return &v.state return &v.state
@@ -1152,7 +1272,7 @@ func file_api_server_proto_init() {
return nil return nil
} }
} }
file_api_server_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { file_api_server_proto_msgTypes[11].Exporter = func(v any, i int) any {
switch v := v.(*RemoveFRPSResponse); i { switch v := v.(*RemoveFRPSResponse); i {
case 0: case 0:
return &v.state return &v.state
@@ -1164,7 +1284,7 @@ func file_api_server_proto_init() {
return nil return nil
} }
} }
file_api_server_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { file_api_server_proto_msgTypes[12].Exporter = func(v any, i int) any {
switch v := v.(*StopFRPSRequest); i { switch v := v.(*StopFRPSRequest); i {
case 0: case 0:
return &v.state return &v.state
@@ -1176,7 +1296,7 @@ func file_api_server_proto_init() {
return nil return nil
} }
} }
file_api_server_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { file_api_server_proto_msgTypes[13].Exporter = func(v any, i int) any {
switch v := v.(*StopFRPSResponse); i { switch v := v.(*StopFRPSResponse); i {
case 0: case 0:
return &v.state return &v.state
@@ -1188,7 +1308,7 @@ func file_api_server_proto_init() {
return nil return nil
} }
} }
file_api_server_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { file_api_server_proto_msgTypes[14].Exporter = func(v any, i int) any {
switch v := v.(*StartFRPSRequest); i { switch v := v.(*StartFRPSRequest); i {
case 0: case 0:
return &v.state return &v.state
@@ -1200,7 +1320,7 @@ func file_api_server_proto_init() {
return nil return nil
} }
} }
file_api_server_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { file_api_server_proto_msgTypes[15].Exporter = func(v any, i int) any {
switch v := v.(*StartFRPSResponse); i { switch v := v.(*StartFRPSResponse); i {
case 0: case 0:
return &v.state return &v.state
@@ -1212,30 +1332,56 @@ func file_api_server_proto_init() {
return nil return nil
} }
} }
file_api_server_proto_msgTypes[16].Exporter = func(v any, i int) any {
switch v := v.(*GetProxyBySIDRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_api_server_proto_msgTypes[17].Exporter = func(v any, i int) any {
switch v := v.(*GetProxyBySIDResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
} }
file_api_server_proto_msgTypes[0].OneofWrappers = []interface{}{} file_api_server_proto_msgTypes[0].OneofWrappers = []any{}
file_api_server_proto_msgTypes[1].OneofWrappers = []interface{}{} file_api_server_proto_msgTypes[1].OneofWrappers = []any{}
file_api_server_proto_msgTypes[2].OneofWrappers = []interface{}{} file_api_server_proto_msgTypes[2].OneofWrappers = []any{}
file_api_server_proto_msgTypes[3].OneofWrappers = []interface{}{} file_api_server_proto_msgTypes[3].OneofWrappers = []any{}
file_api_server_proto_msgTypes[4].OneofWrappers = []interface{}{} file_api_server_proto_msgTypes[4].OneofWrappers = []any{}
file_api_server_proto_msgTypes[5].OneofWrappers = []interface{}{} file_api_server_proto_msgTypes[5].OneofWrappers = []any{}
file_api_server_proto_msgTypes[6].OneofWrappers = []interface{}{} file_api_server_proto_msgTypes[6].OneofWrappers = []any{}
file_api_server_proto_msgTypes[7].OneofWrappers = []interface{}{} file_api_server_proto_msgTypes[7].OneofWrappers = []any{}
file_api_server_proto_msgTypes[8].OneofWrappers = []interface{}{} file_api_server_proto_msgTypes[8].OneofWrappers = []any{}
file_api_server_proto_msgTypes[9].OneofWrappers = []interface{}{} file_api_server_proto_msgTypes[9].OneofWrappers = []any{}
file_api_server_proto_msgTypes[10].OneofWrappers = []interface{}{} file_api_server_proto_msgTypes[10].OneofWrappers = []any{}
file_api_server_proto_msgTypes[11].OneofWrappers = []interface{}{} file_api_server_proto_msgTypes[11].OneofWrappers = []any{}
file_api_server_proto_msgTypes[12].OneofWrappers = []interface{}{} file_api_server_proto_msgTypes[12].OneofWrappers = []any{}
file_api_server_proto_msgTypes[13].OneofWrappers = []interface{}{} file_api_server_proto_msgTypes[13].OneofWrappers = []any{}
file_api_server_proto_msgTypes[14].OneofWrappers = []interface{}{} file_api_server_proto_msgTypes[14].OneofWrappers = []any{}
file_api_server_proto_msgTypes[15].OneofWrappers = []interface{}{} file_api_server_proto_msgTypes[15].OneofWrappers = []any{}
file_api_server_proto_msgTypes[16].OneofWrappers = []any{}
file_api_server_proto_msgTypes[17].OneofWrappers = []any{}
type x struct{} type x struct{}
out := protoimpl.TypeBuilder{ out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{ File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_api_server_proto_rawDesc, RawDescriptor: file_api_server_proto_rawDesc,
NumEnums: 0, NumEnums: 0,
NumMessages: 16, NumMessages: 18,
NumExtensions: 0, NumExtensions: 0,
NumServices: 0, NumServices: 0,
}, },

View File

@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions: // versions:
// protoc-gen-go v1.33.0 // protoc-gen-go v1.34.2
// protoc v5.26.0 // protoc v5.27.1
// source: api_user.proto // source: api_user.proto
package pb package pb
@@ -463,7 +463,7 @@ func file_api_user_proto_rawDescGZIP() []byte {
} }
var file_api_user_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_api_user_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_api_user_proto_goTypes = []interface{}{ var file_api_user_proto_goTypes = []any{
(*GetUserInfoRequest)(nil), // 0: api_user.GetUserInfoRequest (*GetUserInfoRequest)(nil), // 0: api_user.GetUserInfoRequest
(*GetUserInfoResponse)(nil), // 1: api_user.GetUserInfoResponse (*GetUserInfoResponse)(nil), // 1: api_user.GetUserInfoResponse
(*UpdateUserInfoRequest)(nil), // 2: api_user.UpdateUserInfoRequest (*UpdateUserInfoRequest)(nil), // 2: api_user.UpdateUserInfoRequest
@@ -493,7 +493,7 @@ func file_api_user_proto_init() {
} }
file_common_proto_init() file_common_proto_init()
if !protoimpl.UnsafeEnabled { if !protoimpl.UnsafeEnabled {
file_api_user_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { file_api_user_proto_msgTypes[0].Exporter = func(v any, i int) any {
switch v := v.(*GetUserInfoRequest); i { switch v := v.(*GetUserInfoRequest); i {
case 0: case 0:
return &v.state return &v.state
@@ -505,7 +505,7 @@ func file_api_user_proto_init() {
return nil return nil
} }
} }
file_api_user_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { file_api_user_proto_msgTypes[1].Exporter = func(v any, i int) any {
switch v := v.(*GetUserInfoResponse); i { switch v := v.(*GetUserInfoResponse); i {
case 0: case 0:
return &v.state return &v.state
@@ -517,7 +517,7 @@ func file_api_user_proto_init() {
return nil return nil
} }
} }
file_api_user_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { file_api_user_proto_msgTypes[2].Exporter = func(v any, i int) any {
switch v := v.(*UpdateUserInfoRequest); i { switch v := v.(*UpdateUserInfoRequest); i {
case 0: case 0:
return &v.state return &v.state
@@ -529,7 +529,7 @@ func file_api_user_proto_init() {
return nil return nil
} }
} }
file_api_user_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { file_api_user_proto_msgTypes[3].Exporter = func(v any, i int) any {
switch v := v.(*UpdateUserInfoResponse); i { switch v := v.(*UpdateUserInfoResponse); i {
case 0: case 0:
return &v.state return &v.state
@@ -541,7 +541,7 @@ func file_api_user_proto_init() {
return nil return nil
} }
} }
file_api_user_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { file_api_user_proto_msgTypes[4].Exporter = func(v any, i int) any {
switch v := v.(*GetPlatformInfoRequest); i { switch v := v.(*GetPlatformInfoRequest); i {
case 0: case 0:
return &v.state return &v.state
@@ -553,7 +553,7 @@ func file_api_user_proto_init() {
return nil return nil
} }
} }
file_api_user_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { file_api_user_proto_msgTypes[5].Exporter = func(v any, i int) any {
switch v := v.(*GetPlatformInfoResponse); i { switch v := v.(*GetPlatformInfoResponse); i {
case 0: case 0:
return &v.state return &v.state
@@ -566,10 +566,10 @@ func file_api_user_proto_init() {
} }
} }
} }
file_api_user_proto_msgTypes[1].OneofWrappers = []interface{}{} file_api_user_proto_msgTypes[1].OneofWrappers = []any{}
file_api_user_proto_msgTypes[2].OneofWrappers = []interface{}{} file_api_user_proto_msgTypes[2].OneofWrappers = []any{}
file_api_user_proto_msgTypes[3].OneofWrappers = []interface{}{} file_api_user_proto_msgTypes[3].OneofWrappers = []any{}
file_api_user_proto_msgTypes[5].OneofWrappers = []interface{}{} file_api_user_proto_msgTypes[5].OneofWrappers = []any{}
type x struct{} type x struct{}
out := protoimpl.TypeBuilder{ out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{ File: protoimpl.DescBuilder{

View File

@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions: // versions:
// protoc-gen-go v1.33.0 // protoc-gen-go v1.34.2
// protoc v5.26.0 // protoc v5.27.1
// source: common.proto // source: common.proto
package pb package pb
@@ -539,6 +539,109 @@ func (x *User) GetRawPassword() string {
return "" return ""
} }
type ProxyInfo struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"`
Type *string `protobuf:"bytes,2,opt,name=type,proto3,oneof" json:"type,omitempty"`
ClientId *string `protobuf:"bytes,3,opt,name=client_id,json=clientId,proto3,oneof" json:"client_id,omitempty"`
ServerId *string `protobuf:"bytes,4,opt,name=server_id,json=serverId,proto3,oneof" json:"server_id,omitempty"`
TodayTrafficIn *int64 `protobuf:"varint,5,opt,name=today_traffic_in,json=todayTrafficIn,proto3,oneof" json:"today_traffic_in,omitempty"`
TodayTrafficOut *int64 `protobuf:"varint,6,opt,name=today_traffic_out,json=todayTrafficOut,proto3,oneof" json:"today_traffic_out,omitempty"`
HistoryTrafficIn *int64 `protobuf:"varint,7,opt,name=history_traffic_in,json=historyTrafficIn,proto3,oneof" json:"history_traffic_in,omitempty"`
HistoryTrafficOut *int64 `protobuf:"varint,8,opt,name=history_traffic_out,json=historyTrafficOut,proto3,oneof" json:"history_traffic_out,omitempty"`
}
func (x *ProxyInfo) Reset() {
*x = ProxyInfo{}
if protoimpl.UnsafeEnabled {
mi := &file_common_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ProxyInfo) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ProxyInfo) ProtoMessage() {}
func (x *ProxyInfo) ProtoReflect() protoreflect.Message {
mi := &file_common_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ProxyInfo.ProtoReflect.Descriptor instead.
func (*ProxyInfo) Descriptor() ([]byte, []int) {
return file_common_proto_rawDescGZIP(), []int{6}
}
func (x *ProxyInfo) GetName() string {
if x != nil && x.Name != nil {
return *x.Name
}
return ""
}
func (x *ProxyInfo) GetType() string {
if x != nil && x.Type != nil {
return *x.Type
}
return ""
}
func (x *ProxyInfo) GetClientId() string {
if x != nil && x.ClientId != nil {
return *x.ClientId
}
return ""
}
func (x *ProxyInfo) GetServerId() string {
if x != nil && x.ServerId != nil {
return *x.ServerId
}
return ""
}
func (x *ProxyInfo) GetTodayTrafficIn() int64 {
if x != nil && x.TodayTrafficIn != nil {
return *x.TodayTrafficIn
}
return 0
}
func (x *ProxyInfo) GetTodayTrafficOut() int64 {
if x != nil && x.TodayTrafficOut != nil {
return *x.TodayTrafficOut
}
return 0
}
func (x *ProxyInfo) GetHistoryTrafficIn() int64 {
if x != nil && x.HistoryTrafficIn != nil {
return *x.HistoryTrafficIn
}
return 0
}
func (x *ProxyInfo) GetHistoryTrafficOut() int64 {
if x != nil && x.HistoryTrafficOut != nil {
return *x.HistoryTrafficOut
}
return 0
}
var File_common_proto protoreflect.FileDescriptor var File_common_proto protoreflect.FileDescriptor
var file_common_proto_rawDesc = []byte{ var file_common_proto_rawDesc = []byte{
@@ -602,26 +705,55 @@ var file_common_proto_rawDesc = []byte{
0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x45, 0x6d, 0x61, 0x69, 0x6c,
0x42, 0x09, 0x0a, 0x07, 0x5f, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x07, 0x0a, 0x05, 0x5f,
0x52, 0x6f, 0x6c, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x0e, 0x52, 0x6f, 0x6c, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x0e,
0x0a, 0x0c, 0x5f, 0x52, 0x61, 0x77, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x2a, 0xbc, 0x0a, 0x0c, 0x5f, 0x52, 0x61, 0x77, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0xd1,
0x01, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x19, 0x0a, 0x15, 0x52, 0x03, 0x0a, 0x09, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x17, 0x0a, 0x04,
0x45, 0x53, 0x50, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61,
0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x52, 0x45, 0x53, 0x50, 0x5f, 0x43, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20,
0x4f, 0x44, 0x45, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x12, 0x20,
0x13, 0x52, 0x45, 0x53, 0x50, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x0a, 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28,
0x4f, 0x55, 0x4e, 0x44, 0x10, 0x02, 0x12, 0x1c, 0x0a, 0x18, 0x52, 0x45, 0x53, 0x50, 0x5f, 0x43, 0x09, 0x48, 0x02, 0x52, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x88, 0x01, 0x01,
0x4f, 0x44, 0x45, 0x5f, 0x41, 0x4c, 0x52, 0x45, 0x41, 0x44, 0x59, 0x5f, 0x45, 0x58, 0x49, 0x53, 0x12, 0x20, 0x0a, 0x09, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20,
0x54, 0x53, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x52, 0x45, 0x53, 0x50, 0x5f, 0x43, 0x4f, 0x44, 0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x88,
0x45, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x04, 0x12, 0x14, 0x0a, 0x10, 0x52, 0x01, 0x01, 0x12, 0x2d, 0x0a, 0x10, 0x74, 0x6f, 0x64, 0x61, 0x79, 0x5f, 0x74, 0x72, 0x61, 0x66,
0x45, 0x53, 0x50, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x46, 0x49, 0x4e, 0x49, 0x53, 0x48, 0x10, 0x66, 0x69, 0x63, 0x5f, 0x69, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x48, 0x04, 0x52, 0x0e,
0x05, 0x12, 0x1a, 0x0a, 0x16, 0x52, 0x45, 0x53, 0x50, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x74, 0x6f, 0x64, 0x61, 0x79, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x49, 0x6e, 0x88, 0x01,
0x4e, 0x41, 0x55, 0x54, 0x48, 0x4f, 0x52, 0x49, 0x5a, 0x45, 0x44, 0x10, 0x06, 0x2a, 0x55, 0x0a, 0x01, 0x12, 0x2f, 0x0a, 0x11, 0x74, 0x6f, 0x64, 0x61, 0x79, 0x5f, 0x74, 0x72, 0x61, 0x66, 0x66,
0x0a, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x17, 0x43, 0x69, 0x63, 0x5f, 0x6f, 0x75, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x48, 0x05, 0x52, 0x0f,
0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x74, 0x6f, 0x64, 0x61, 0x79, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x4f, 0x75, 0x74, 0x88,
0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x43, 0x4c, 0x49, 0x45, 0x01, 0x01, 0x12, 0x31, 0x0a, 0x12, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x74, 0x72,
0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x52, 0x50, 0x43, 0x10, 0x01, 0x12, 0x14, 0x61, 0x66, 0x66, 0x69, 0x63, 0x5f, 0x69, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x48, 0x06,
0x0a, 0x10, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x52, 0x52, 0x10, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63,
0x50, 0x53, 0x10, 0x02, 0x42, 0x07, 0x5a, 0x05, 0x2e, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x49, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x33, 0x0a, 0x13, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79,
0x72, 0x6f, 0x74, 0x6f, 0x33, 0x5f, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x5f, 0x6f, 0x75, 0x74, 0x18, 0x08, 0x20, 0x01,
0x28, 0x03, 0x48, 0x07, 0x52, 0x11, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x54, 0x72, 0x61,
0x66, 0x66, 0x69, 0x63, 0x4f, 0x75, 0x74, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e,
0x61, 0x6d, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x0c, 0x0a, 0x0a,
0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x73,
0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x74, 0x6f, 0x64,
0x61, 0x79, 0x5f, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x5f, 0x69, 0x6e, 0x42, 0x14, 0x0a,
0x12, 0x5f, 0x74, 0x6f, 0x64, 0x61, 0x79, 0x5f, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x5f,
0x6f, 0x75, 0x74, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x5f,
0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x5f, 0x69, 0x6e, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x68,
0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x5f, 0x6f,
0x75, 0x74, 0x2a, 0xbc, 0x01, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x12,
0x19, 0x0a, 0x15, 0x52, 0x45, 0x53, 0x50, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x53,
0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x52, 0x45,
0x53, 0x50, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10,
0x01, 0x12, 0x17, 0x0a, 0x13, 0x52, 0x45, 0x53, 0x50, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x4e,
0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x02, 0x12, 0x1c, 0x0a, 0x18, 0x52, 0x45,
0x53, 0x50, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x41, 0x4c, 0x52, 0x45, 0x41, 0x44, 0x59, 0x5f,
0x45, 0x58, 0x49, 0x53, 0x54, 0x53, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x52, 0x45, 0x53, 0x50,
0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x04, 0x12,
0x14, 0x0a, 0x10, 0x52, 0x45, 0x53, 0x50, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x46, 0x49, 0x4e,
0x49, 0x53, 0x48, 0x10, 0x05, 0x12, 0x1a, 0x0a, 0x16, 0x52, 0x45, 0x53, 0x50, 0x5f, 0x43, 0x4f,
0x44, 0x45, 0x5f, 0x55, 0x4e, 0x41, 0x55, 0x54, 0x48, 0x4f, 0x52, 0x49, 0x5a, 0x45, 0x44, 0x10,
0x06, 0x2a, 0x55, 0x0a, 0x0a, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12,
0x1b, 0x0a, 0x17, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55,
0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10,
0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x52, 0x50, 0x43,
0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50,
0x45, 0x5f, 0x46, 0x52, 0x50, 0x53, 0x10, 0x02, 0x42, 0x07, 0x5a, 0x05, 0x2e, 0x2e, 0x2f, 0x70,
0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (
@@ -637,8 +769,8 @@ func file_common_proto_rawDescGZIP() []byte {
} }
var file_common_proto_enumTypes = make([]protoimpl.EnumInfo, 2) var file_common_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
var file_common_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_common_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
var file_common_proto_goTypes = []interface{}{ var file_common_proto_goTypes = []any{
(RespCode)(0), // 0: common.RespCode (RespCode)(0), // 0: common.RespCode
(ClientType)(0), // 1: common.ClientType (ClientType)(0), // 1: common.ClientType
(*Status)(nil), // 2: common.Status (*Status)(nil), // 2: common.Status
@@ -647,6 +779,7 @@ var file_common_proto_goTypes = []interface{}{
(*Client)(nil), // 5: common.Client (*Client)(nil), // 5: common.Client
(*Server)(nil), // 6: common.Server (*Server)(nil), // 6: common.Server
(*User)(nil), // 7: common.User (*User)(nil), // 7: common.User
(*ProxyInfo)(nil), // 8: common.ProxyInfo
} }
var file_common_proto_depIdxs = []int32{ var file_common_proto_depIdxs = []int32{
0, // 0: common.Status.code:type_name -> common.RespCode 0, // 0: common.Status.code:type_name -> common.RespCode
@@ -664,7 +797,7 @@ func file_common_proto_init() {
return return
} }
if !protoimpl.UnsafeEnabled { if !protoimpl.UnsafeEnabled {
file_common_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { file_common_proto_msgTypes[0].Exporter = func(v any, i int) any {
switch v := v.(*Status); i { switch v := v.(*Status); i {
case 0: case 0:
return &v.state return &v.state
@@ -676,7 +809,7 @@ func file_common_proto_init() {
return nil return nil
} }
} }
file_common_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { file_common_proto_msgTypes[1].Exporter = func(v any, i int) any {
switch v := v.(*CommonRequest); i { switch v := v.(*CommonRequest); i {
case 0: case 0:
return &v.state return &v.state
@@ -688,7 +821,7 @@ func file_common_proto_init() {
return nil return nil
} }
} }
file_common_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { file_common_proto_msgTypes[2].Exporter = func(v any, i int) any {
switch v := v.(*CommonResponse); i { switch v := v.(*CommonResponse); i {
case 0: case 0:
return &v.state return &v.state
@@ -700,7 +833,7 @@ func file_common_proto_init() {
return nil return nil
} }
} }
file_common_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { file_common_proto_msgTypes[3].Exporter = func(v any, i int) any {
switch v := v.(*Client); i { switch v := v.(*Client); i {
case 0: case 0:
return &v.state return &v.state
@@ -712,7 +845,7 @@ func file_common_proto_init() {
return nil return nil
} }
} }
file_common_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { file_common_proto_msgTypes[4].Exporter = func(v any, i int) any {
switch v := v.(*Server); i { switch v := v.(*Server); i {
case 0: case 0:
return &v.state return &v.state
@@ -724,7 +857,7 @@ func file_common_proto_init() {
return nil return nil
} }
} }
file_common_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { file_common_proto_msgTypes[5].Exporter = func(v any, i int) any {
switch v := v.(*User); i { switch v := v.(*User); i {
case 0: case 0:
return &v.state return &v.state
@@ -736,18 +869,31 @@ func file_common_proto_init() {
return nil return nil
} }
} }
file_common_proto_msgTypes[6].Exporter = func(v any, i int) any {
switch v := v.(*ProxyInfo); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
} }
file_common_proto_msgTypes[2].OneofWrappers = []interface{}{} file_common_proto_msgTypes[2].OneofWrappers = []any{}
file_common_proto_msgTypes[3].OneofWrappers = []interface{}{} file_common_proto_msgTypes[3].OneofWrappers = []any{}
file_common_proto_msgTypes[4].OneofWrappers = []interface{}{} file_common_proto_msgTypes[4].OneofWrappers = []any{}
file_common_proto_msgTypes[5].OneofWrappers = []interface{}{} file_common_proto_msgTypes[5].OneofWrappers = []any{}
file_common_proto_msgTypes[6].OneofWrappers = []any{}
type x struct{} type x struct{}
out := protoimpl.TypeBuilder{ out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{ File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_common_proto_rawDesc, RawDescriptor: file_common_proto_rawDesc,
NumEnums: 2, NumEnums: 2,
NumMessages: 6, NumMessages: 7,
NumExtensions: 0, NumExtensions: 0,
NumServices: 0, NumServices: 0,
}, },

View File

@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions: // versions:
// protoc-gen-go v1.33.0 // protoc-gen-go v1.34.2
// protoc v5.26.0 // protoc v5.27.1
// source: rpc_master.proto // source: rpc_master.proto
package pb package pb
@@ -687,6 +687,108 @@ func (x *FRPAuthResponse) GetOk() bool {
return false return false
} }
type PushProxyInfoReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Base *ServerBase `protobuf:"bytes,255,opt,name=base,proto3" json:"base,omitempty"`
ProxyInfos []*ProxyInfo `protobuf:"bytes,1,rep,name=proxy_infos,json=proxyInfos,proto3" json:"proxy_infos,omitempty"`
}
func (x *PushProxyInfoReq) Reset() {
*x = PushProxyInfoReq{}
if protoimpl.UnsafeEnabled {
mi := &file_rpc_master_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PushProxyInfoReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PushProxyInfoReq) ProtoMessage() {}
func (x *PushProxyInfoReq) ProtoReflect() protoreflect.Message {
mi := &file_rpc_master_proto_msgTypes[10]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PushProxyInfoReq.ProtoReflect.Descriptor instead.
func (*PushProxyInfoReq) Descriptor() ([]byte, []int) {
return file_rpc_master_proto_rawDescGZIP(), []int{10}
}
func (x *PushProxyInfoReq) GetBase() *ServerBase {
if x != nil {
return x.Base
}
return nil
}
func (x *PushProxyInfoReq) GetProxyInfos() []*ProxyInfo {
if x != nil {
return x.ProxyInfos
}
return nil
}
type PushProxyInfoResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Status *Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
}
func (x *PushProxyInfoResp) Reset() {
*x = PushProxyInfoResp{}
if protoimpl.UnsafeEnabled {
mi := &file_rpc_master_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PushProxyInfoResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PushProxyInfoResp) ProtoMessage() {}
func (x *PushProxyInfoResp) ProtoReflect() protoreflect.Message {
mi := &file_rpc_master_proto_msgTypes[11]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PushProxyInfoResp.ProtoReflect.Descriptor instead.
func (*PushProxyInfoResp) Descriptor() ([]byte, []int) {
return file_rpc_master_proto_rawDescGZIP(), []int{11}
}
func (x *PushProxyInfoResp) GetStatus() *Status {
if x != nil {
return x.Status
}
return nil
}
var File_rpc_master_proto protoreflect.FileDescriptor var File_rpc_master_proto protoreflect.FileDescriptor
var file_rpc_master_proto_rawDesc = []byte{ var file_rpc_master_proto_rawDesc = []byte{
@@ -752,47 +854,63 @@ var file_rpc_master_proto_rawDesc = []byte{
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e,
0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0e,
0x0a, 0x02, 0x6f, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x02, 0x6f, 0x6b, 0x2a, 0xc7, 0x0a, 0x02, 0x6f, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x02, 0x6f, 0x6b, 0x22, 0x6f,
0x02, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x15, 0x0a, 0x11, 0x45, 0x56, 0x45, 0x4e, 0x0a, 0x10, 0x50, 0x75, 0x73, 0x68, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52,
0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x65, 0x71, 0x12, 0x27, 0x0a, 0x04, 0x62, 0x61, 0x73, 0x65, 0x18, 0xff, 0x01, 0x20, 0x01, 0x28,
0x19, 0x0a, 0x15, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, 0x45, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65,
0x52, 0x5f, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x10, 0x01, 0x12, 0x19, 0x0a, 0x15, 0x45, 0x56, 0x72, 0x42, 0x61, 0x73, 0x65, 0x52, 0x04, 0x62, 0x61, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x0b, 0x70,
0x45, 0x4e, 0x54, 0x5f, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x45, 0x52, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
0x56, 0x45, 0x52, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x45, 0x32, 0x11, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x49,
0x52, 0x52, 0x4f, 0x52, 0x10, 0x03, 0x12, 0x0e, 0x0a, 0x0a, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x22,
0x44, 0x41, 0x54, 0x41, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x3b, 0x0a, 0x11, 0x50, 0x75, 0x73, 0x68, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x49, 0x6e, 0x66, 0x6f,
0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x46, 0x52, 0x50, 0x43, 0x10, 0x05, 0x12, 0x15, 0x0a, 0x52, 0x65, 0x73, 0x70, 0x12, 0x26, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01,
0x11, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x52, 0x45, 0x4d, 0x4f, 0x56, 0x45, 0x5f, 0x46, 0x52, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x53, 0x74,
0x50, 0x43, 0x10, 0x06, 0x12, 0x15, 0x0a, 0x11, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x55, 0x50, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2a, 0xc7, 0x02, 0x0a,
0x44, 0x41, 0x54, 0x45, 0x5f, 0x46, 0x52, 0x50, 0x53, 0x10, 0x07, 0x12, 0x15, 0x0a, 0x11, 0x45, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x15, 0x0a, 0x11, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f,
0x56, 0x45, 0x4e, 0x54, 0x5f, 0x52, 0x45, 0x4d, 0x4f, 0x56, 0x45, 0x5f, 0x46, 0x52, 0x50, 0x53, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x19, 0x0a,
0x10, 0x08, 0x12, 0x0e, 0x0a, 0x0a, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x50, 0x49, 0x4e, 0x47, 0x15, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, 0x45, 0x52, 0x5f,
0x10, 0x09, 0x12, 0x0e, 0x0a, 0x0a, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x50, 0x4f, 0x4e, 0x47, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x10, 0x01, 0x12, 0x19, 0x0a, 0x15, 0x45, 0x56, 0x45, 0x4e,
0x10, 0x0a, 0x12, 0x13, 0x0a, 0x0f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x53, 0x54, 0x4f, 0x50, 0x54, 0x5f, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x45,
0x5f, 0x46, 0x52, 0x50, 0x43, 0x10, 0x0b, 0x12, 0x14, 0x0a, 0x10, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x52, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x45, 0x52, 0x52,
0x5f, 0x53, 0x54, 0x41, 0x52, 0x54, 0x5f, 0x46, 0x52, 0x50, 0x43, 0x10, 0x0c, 0x12, 0x13, 0x0a, 0x4f, 0x52, 0x10, 0x03, 0x12, 0x0e, 0x0a, 0x0a, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x44, 0x41,
0x0f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x53, 0x54, 0x4f, 0x50, 0x5f, 0x46, 0x52, 0x50, 0x53, 0x54, 0x41, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x55, 0x50,
0x10, 0x0d, 0x12, 0x14, 0x0a, 0x10, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x52, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x46, 0x52, 0x50, 0x43, 0x10, 0x05, 0x12, 0x15, 0x0a, 0x11, 0x45,
0x54, 0x5f, 0x46, 0x52, 0x50, 0x53, 0x10, 0x0e, 0x32, 0xa3, 0x02, 0x0a, 0x06, 0x4d, 0x61, 0x73, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x52, 0x45, 0x4d, 0x4f, 0x56, 0x45, 0x5f, 0x46, 0x52, 0x50, 0x43,
0x74, 0x65, 0x72, 0x12, 0x3e, 0x0a, 0x0a, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x65, 0x6e, 0x10, 0x06, 0x12, 0x15, 0x0a, 0x11, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x55, 0x50, 0x44, 0x41,
0x64, 0x12, 0x15, 0x2e, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x54, 0x45, 0x5f, 0x46, 0x52, 0x50, 0x53, 0x10, 0x07, 0x12, 0x15, 0x0a, 0x11, 0x45, 0x56, 0x45,
0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x15, 0x2e, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x4e, 0x54, 0x5f, 0x52, 0x45, 0x4d, 0x4f, 0x56, 0x45, 0x5f, 0x46, 0x52, 0x50, 0x53, 0x10, 0x08,
0x72, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x12, 0x0e, 0x0a, 0x0a, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x50, 0x49, 0x4e, 0x47, 0x10, 0x09,
0x01, 0x30, 0x01, 0x12, 0x4d, 0x0a, 0x10, 0x50, 0x75, 0x6c, 0x6c, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x12, 0x0e, 0x0a, 0x0a, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x50, 0x4f, 0x4e, 0x47, 0x10, 0x0a,
0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1b, 0x2e, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x12, 0x13, 0x0a, 0x0f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x53, 0x54, 0x4f, 0x50, 0x5f, 0x46,
0x2e, 0x50, 0x75, 0x6c, 0x6c, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x52, 0x50, 0x43, 0x10, 0x0b, 0x12, 0x14, 0x0a, 0x10, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x53,
0x67, 0x52, 0x65, 0x71, 0x1a, 0x1c, 0x2e, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x50, 0x75, 0x54, 0x41, 0x52, 0x54, 0x5f, 0x46, 0x52, 0x50, 0x43, 0x10, 0x0c, 0x12, 0x13, 0x0a, 0x0f, 0x45,
0x6c, 0x6c, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x53, 0x54, 0x4f, 0x50, 0x5f, 0x46, 0x52, 0x50, 0x53, 0x10, 0x0d,
0x73, 0x70, 0x12, 0x4d, 0x0a, 0x10, 0x50, 0x75, 0x6c, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x10, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x52, 0x54, 0x5f,
0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1b, 0x2e, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x46, 0x52, 0x50, 0x53, 0x10, 0x0e, 0x32, 0xe9, 0x02, 0x0a, 0x06, 0x4d, 0x61, 0x73, 0x74, 0x65,
0x50, 0x75, 0x6c, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x72, 0x12, 0x3e, 0x0a, 0x0a, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x65, 0x6e, 0x64, 0x12,
0x52, 0x65, 0x71, 0x1a, 0x1c, 0x2e, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x50, 0x75, 0x6c, 0x15, 0x2e, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4d,
0x6c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x15, 0x2e, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x2e,
0x70, 0x12, 0x3b, 0x0a, 0x08, 0x46, 0x52, 0x50, 0x43, 0x41, 0x75, 0x74, 0x68, 0x12, 0x16, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x01, 0x30,
0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x46, 0x52, 0x50, 0x41, 0x75, 0x74, 0x68, 0x52, 0x65, 0x01, 0x12, 0x4d, 0x0a, 0x10, 0x50, 0x75, 0x6c, 0x6c, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x46, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1b, 0x2e, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x50,
0x52, 0x50, 0x41, 0x75, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x07, 0x75, 0x6c, 0x6c, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52,
0x5a, 0x05, 0x2e, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x65, 0x71, 0x1a, 0x1c, 0x2e, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x50, 0x75, 0x6c, 0x6c,
0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70,
0x12, 0x4d, 0x0a, 0x10, 0x50, 0x75, 0x6c, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, 0x6f,
0x6e, 0x66, 0x69, 0x67, 0x12, 0x1b, 0x2e, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x50, 0x75,
0x6c, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65,
0x71, 0x1a, 0x1c, 0x2e, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x50, 0x75, 0x6c, 0x6c, 0x53,
0x65, 0x72, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x12,
0x3b, 0x0a, 0x08, 0x46, 0x52, 0x50, 0x43, 0x41, 0x75, 0x74, 0x68, 0x12, 0x16, 0x2e, 0x6d, 0x61,
0x73, 0x74, 0x65, 0x72, 0x2e, 0x46, 0x52, 0x50, 0x41, 0x75, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x46, 0x52, 0x50,
0x41, 0x75, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, 0x0d,
0x50, 0x75, 0x73, 0x68, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x2e,
0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x50, 0x72, 0x6f, 0x78, 0x79,
0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72,
0x2e, 0x50, 0x75, 0x73, 0x68, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65,
0x73, 0x70, 0x42, 0x07, 0x5a, 0x05, 0x2e, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
} }
var ( var (
@@ -808,8 +926,8 @@ func file_rpc_master_proto_rawDescGZIP() []byte {
} }
var file_rpc_master_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_rpc_master_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_rpc_master_proto_msgTypes = make([]protoimpl.MessageInfo, 10) var file_rpc_master_proto_msgTypes = make([]protoimpl.MessageInfo, 12)
var file_rpc_master_proto_goTypes = []interface{}{ var file_rpc_master_proto_goTypes = []any{
(Event)(0), // 0: master.Event (Event)(0), // 0: master.Event
(*ServerBase)(nil), // 1: master.ServerBase (*ServerBase)(nil), // 1: master.ServerBase
(*ClientBase)(nil), // 2: master.ClientBase (*ClientBase)(nil), // 2: master.ClientBase
@@ -821,34 +939,42 @@ var file_rpc_master_proto_goTypes = []interface{}{
(*PullServerConfigResp)(nil), // 8: master.PullServerConfigResp (*PullServerConfigResp)(nil), // 8: master.PullServerConfigResp
(*FRPAuthRequest)(nil), // 9: master.FRPAuthRequest (*FRPAuthRequest)(nil), // 9: master.FRPAuthRequest
(*FRPAuthResponse)(nil), // 10: master.FRPAuthResponse (*FRPAuthResponse)(nil), // 10: master.FRPAuthResponse
(*Status)(nil), // 11: common.Status (*PushProxyInfoReq)(nil), // 11: master.PushProxyInfoReq
(*Client)(nil), // 12: common.Client (*PushProxyInfoResp)(nil), // 12: master.PushProxyInfoResp
(*Server)(nil), // 13: common.Server (*Status)(nil), // 13: common.Status
(*Client)(nil), // 14: common.Client
(*Server)(nil), // 15: common.Server
(*ProxyInfo)(nil), // 16: common.ProxyInfo
} }
var file_rpc_master_proto_depIdxs = []int32{ var file_rpc_master_proto_depIdxs = []int32{
0, // 0: master.ServerMessage.event:type_name -> master.Event 0, // 0: master.ServerMessage.event:type_name -> master.Event
0, // 1: master.ClientMessage.event:type_name -> master.Event 0, // 1: master.ClientMessage.event:type_name -> master.Event
2, // 2: master.PullClientConfigReq.base:type_name -> master.ClientBase 2, // 2: master.PullClientConfigReq.base:type_name -> master.ClientBase
11, // 3: master.PullClientConfigResp.status:type_name -> common.Status 13, // 3: master.PullClientConfigResp.status:type_name -> common.Status
12, // 4: master.PullClientConfigResp.client:type_name -> common.Client 14, // 4: master.PullClientConfigResp.client:type_name -> common.Client
1, // 5: master.PullServerConfigReq.base:type_name -> master.ServerBase 1, // 5: master.PullServerConfigReq.base:type_name -> master.ServerBase
11, // 6: master.PullServerConfigResp.status:type_name -> common.Status 13, // 6: master.PullServerConfigResp.status:type_name -> common.Status
13, // 7: master.PullServerConfigResp.server:type_name -> common.Server 15, // 7: master.PullServerConfigResp.server:type_name -> common.Server
1, // 8: master.FRPAuthRequest.base:type_name -> master.ServerBase 1, // 8: master.FRPAuthRequest.base:type_name -> master.ServerBase
11, // 9: master.FRPAuthResponse.status:type_name -> common.Status 13, // 9: master.FRPAuthResponse.status:type_name -> common.Status
4, // 10: master.Master.ServerSend:input_type -> master.ClientMessage 1, // 10: master.PushProxyInfoReq.base:type_name -> master.ServerBase
5, // 11: master.Master.PullClientConfig:input_type -> master.PullClientConfigReq 16, // 11: master.PushProxyInfoReq.proxy_infos:type_name -> common.ProxyInfo
7, // 12: master.Master.PullServerConfig:input_type -> master.PullServerConfigReq 13, // 12: master.PushProxyInfoResp.status:type_name -> common.Status
9, // 13: master.Master.FRPCAuth:input_type -> master.FRPAuthRequest 4, // 13: master.Master.ServerSend:input_type -> master.ClientMessage
3, // 14: master.Master.ServerSend:output_type -> master.ServerMessage 5, // 14: master.Master.PullClientConfig:input_type -> master.PullClientConfigReq
6, // 15: master.Master.PullClientConfig:output_type -> master.PullClientConfigResp 7, // 15: master.Master.PullServerConfig:input_type -> master.PullServerConfigReq
8, // 16: master.Master.PullServerConfig:output_type -> master.PullServerConfigResp 9, // 16: master.Master.FRPCAuth:input_type -> master.FRPAuthRequest
10, // 17: master.Master.FRPCAuth:output_type -> master.FRPAuthResponse 11, // 17: master.Master.PushProxyInfo:input_type -> master.PushProxyInfoReq
14, // [14:18] is the sub-list for method output_type 3, // 18: master.Master.ServerSend:output_type -> master.ServerMessage
10, // [10:14] is the sub-list for method input_type 6, // 19: master.Master.PullClientConfig:output_type -> master.PullClientConfigResp
10, // [10:10] is the sub-list for extension type_name 8, // 20: master.Master.PullServerConfig:output_type -> master.PullServerConfigResp
10, // [10:10] is the sub-list for extension extendee 10, // 21: master.Master.FRPCAuth:output_type -> master.FRPAuthResponse
0, // [0:10] is the sub-list for field type_name 12, // 22: master.Master.PushProxyInfo:output_type -> master.PushProxyInfoResp
18, // [18:23] is the sub-list for method output_type
13, // [13:18] is the sub-list for method input_type
13, // [13:13] is the sub-list for extension type_name
13, // [13:13] is the sub-list for extension extendee
0, // [0:13] is the sub-list for field type_name
} }
func init() { file_rpc_master_proto_init() } func init() { file_rpc_master_proto_init() }
@@ -858,7 +984,7 @@ func file_rpc_master_proto_init() {
} }
file_common_proto_init() file_common_proto_init()
if !protoimpl.UnsafeEnabled { if !protoimpl.UnsafeEnabled {
file_rpc_master_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { file_rpc_master_proto_msgTypes[0].Exporter = func(v any, i int) any {
switch v := v.(*ServerBase); i { switch v := v.(*ServerBase); i {
case 0: case 0:
return &v.state return &v.state
@@ -870,7 +996,7 @@ func file_rpc_master_proto_init() {
return nil return nil
} }
} }
file_rpc_master_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { file_rpc_master_proto_msgTypes[1].Exporter = func(v any, i int) any {
switch v := v.(*ClientBase); i { switch v := v.(*ClientBase); i {
case 0: case 0:
return &v.state return &v.state
@@ -882,7 +1008,7 @@ func file_rpc_master_proto_init() {
return nil return nil
} }
} }
file_rpc_master_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { file_rpc_master_proto_msgTypes[2].Exporter = func(v any, i int) any {
switch v := v.(*ServerMessage); i { switch v := v.(*ServerMessage); i {
case 0: case 0:
return &v.state return &v.state
@@ -894,7 +1020,7 @@ func file_rpc_master_proto_init() {
return nil return nil
} }
} }
file_rpc_master_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { file_rpc_master_proto_msgTypes[3].Exporter = func(v any, i int) any {
switch v := v.(*ClientMessage); i { switch v := v.(*ClientMessage); i {
case 0: case 0:
return &v.state return &v.state
@@ -906,7 +1032,7 @@ func file_rpc_master_proto_init() {
return nil return nil
} }
} }
file_rpc_master_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { file_rpc_master_proto_msgTypes[4].Exporter = func(v any, i int) any {
switch v := v.(*PullClientConfigReq); i { switch v := v.(*PullClientConfigReq); i {
case 0: case 0:
return &v.state return &v.state
@@ -918,7 +1044,7 @@ func file_rpc_master_proto_init() {
return nil return nil
} }
} }
file_rpc_master_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { file_rpc_master_proto_msgTypes[5].Exporter = func(v any, i int) any {
switch v := v.(*PullClientConfigResp); i { switch v := v.(*PullClientConfigResp); i {
case 0: case 0:
return &v.state return &v.state
@@ -930,7 +1056,7 @@ func file_rpc_master_proto_init() {
return nil return nil
} }
} }
file_rpc_master_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { file_rpc_master_proto_msgTypes[6].Exporter = func(v any, i int) any {
switch v := v.(*PullServerConfigReq); i { switch v := v.(*PullServerConfigReq); i {
case 0: case 0:
return &v.state return &v.state
@@ -942,7 +1068,7 @@ func file_rpc_master_proto_init() {
return nil return nil
} }
} }
file_rpc_master_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { file_rpc_master_proto_msgTypes[7].Exporter = func(v any, i int) any {
switch v := v.(*PullServerConfigResp); i { switch v := v.(*PullServerConfigResp); i {
case 0: case 0:
return &v.state return &v.state
@@ -954,7 +1080,7 @@ func file_rpc_master_proto_init() {
return nil return nil
} }
} }
file_rpc_master_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { file_rpc_master_proto_msgTypes[8].Exporter = func(v any, i int) any {
switch v := v.(*FRPAuthRequest); i { switch v := v.(*FRPAuthRequest); i {
case 0: case 0:
return &v.state return &v.state
@@ -966,7 +1092,7 @@ func file_rpc_master_proto_init() {
return nil return nil
} }
} }
file_rpc_master_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { file_rpc_master_proto_msgTypes[9].Exporter = func(v any, i int) any {
switch v := v.(*FRPAuthResponse); i { switch v := v.(*FRPAuthResponse); i {
case 0: case 0:
return &v.state return &v.state
@@ -978,6 +1104,30 @@ func file_rpc_master_proto_init() {
return nil return nil
} }
} }
file_rpc_master_proto_msgTypes[10].Exporter = func(v any, i int) any {
switch v := v.(*PushProxyInfoReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_rpc_master_proto_msgTypes[11].Exporter = func(v any, i int) any {
switch v := v.(*PushProxyInfoResp); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
} }
type x struct{} type x struct{}
out := protoimpl.TypeBuilder{ out := protoimpl.TypeBuilder{
@@ -985,7 +1135,7 @@ func file_rpc_master_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_rpc_master_proto_rawDesc, RawDescriptor: file_rpc_master_proto_rawDesc,
NumEnums: 1, NumEnums: 1,
NumMessages: 10, NumMessages: 12,
NumExtensions: 0, NumExtensions: 0,
NumServices: 1, NumServices: 1,
}, },

View File

@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions: // versions:
// - protoc-gen-go-grpc v1.3.0 // - protoc-gen-go-grpc v1.4.0
// - protoc v5.26.0 // - protoc v5.27.1
// source: rpc_master.proto // source: rpc_master.proto
package pb package pb
@@ -15,14 +15,15 @@ import (
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against. // is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later. // Requires gRPC-Go v1.62.0 or later.
const _ = grpc.SupportPackageIsVersion7 const _ = grpc.SupportPackageIsVersion8
const ( const (
Master_ServerSend_FullMethodName = "/master.Master/ServerSend" Master_ServerSend_FullMethodName = "/master.Master/ServerSend"
Master_PullClientConfig_FullMethodName = "/master.Master/PullClientConfig" Master_PullClientConfig_FullMethodName = "/master.Master/PullClientConfig"
Master_PullServerConfig_FullMethodName = "/master.Master/PullServerConfig" Master_PullServerConfig_FullMethodName = "/master.Master/PullServerConfig"
Master_FRPCAuth_FullMethodName = "/master.Master/FRPCAuth" Master_FRPCAuth_FullMethodName = "/master.Master/FRPCAuth"
Master_PushProxyInfo_FullMethodName = "/master.Master/PushProxyInfo"
) )
// MasterClient is the client API for Master service. // MasterClient is the client API for Master service.
@@ -33,6 +34,7 @@ type MasterClient interface {
PullClientConfig(ctx context.Context, in *PullClientConfigReq, opts ...grpc.CallOption) (*PullClientConfigResp, error) PullClientConfig(ctx context.Context, in *PullClientConfigReq, opts ...grpc.CallOption) (*PullClientConfigResp, error)
PullServerConfig(ctx context.Context, in *PullServerConfigReq, opts ...grpc.CallOption) (*PullServerConfigResp, error) PullServerConfig(ctx context.Context, in *PullServerConfigReq, opts ...grpc.CallOption) (*PullServerConfigResp, error)
FRPCAuth(ctx context.Context, in *FRPAuthRequest, opts ...grpc.CallOption) (*FRPAuthResponse, error) FRPCAuth(ctx context.Context, in *FRPAuthRequest, opts ...grpc.CallOption) (*FRPAuthResponse, error)
PushProxyInfo(ctx context.Context, in *PushProxyInfoReq, opts ...grpc.CallOption) (*PushProxyInfoResp, error)
} }
type masterClient struct { type masterClient struct {
@@ -44,11 +46,12 @@ func NewMasterClient(cc grpc.ClientConnInterface) MasterClient {
} }
func (c *masterClient) ServerSend(ctx context.Context, opts ...grpc.CallOption) (Master_ServerSendClient, error) { func (c *masterClient) ServerSend(ctx context.Context, opts ...grpc.CallOption) (Master_ServerSendClient, error) {
stream, err := c.cc.NewStream(ctx, &Master_ServiceDesc.Streams[0], Master_ServerSend_FullMethodName, opts...) cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
stream, err := c.cc.NewStream(ctx, &Master_ServiceDesc.Streams[0], Master_ServerSend_FullMethodName, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
x := &masterServerSendClient{stream} x := &masterServerSendClient{ClientStream: stream}
return x, nil return x, nil
} }
@@ -75,8 +78,9 @@ func (x *masterServerSendClient) Recv() (*ServerMessage, error) {
} }
func (c *masterClient) PullClientConfig(ctx context.Context, in *PullClientConfigReq, opts ...grpc.CallOption) (*PullClientConfigResp, error) { func (c *masterClient) PullClientConfig(ctx context.Context, in *PullClientConfigReq, opts ...grpc.CallOption) (*PullClientConfigResp, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(PullClientConfigResp) out := new(PullClientConfigResp)
err := c.cc.Invoke(ctx, Master_PullClientConfig_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, Master_PullClientConfig_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@@ -84,8 +88,9 @@ func (c *masterClient) PullClientConfig(ctx context.Context, in *PullClientConfi
} }
func (c *masterClient) PullServerConfig(ctx context.Context, in *PullServerConfigReq, opts ...grpc.CallOption) (*PullServerConfigResp, error) { func (c *masterClient) PullServerConfig(ctx context.Context, in *PullServerConfigReq, opts ...grpc.CallOption) (*PullServerConfigResp, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(PullServerConfigResp) out := new(PullServerConfigResp)
err := c.cc.Invoke(ctx, Master_PullServerConfig_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, Master_PullServerConfig_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@@ -93,8 +98,19 @@ func (c *masterClient) PullServerConfig(ctx context.Context, in *PullServerConfi
} }
func (c *masterClient) FRPCAuth(ctx context.Context, in *FRPAuthRequest, opts ...grpc.CallOption) (*FRPAuthResponse, error) { func (c *masterClient) FRPCAuth(ctx context.Context, in *FRPAuthRequest, opts ...grpc.CallOption) (*FRPAuthResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(FRPAuthResponse) out := new(FRPAuthResponse)
err := c.cc.Invoke(ctx, Master_FRPCAuth_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, Master_FRPCAuth_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *masterClient) PushProxyInfo(ctx context.Context, in *PushProxyInfoReq, opts ...grpc.CallOption) (*PushProxyInfoResp, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(PushProxyInfoResp)
err := c.cc.Invoke(ctx, Master_PushProxyInfo_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@@ -109,6 +125,7 @@ type MasterServer interface {
PullClientConfig(context.Context, *PullClientConfigReq) (*PullClientConfigResp, error) PullClientConfig(context.Context, *PullClientConfigReq) (*PullClientConfigResp, error)
PullServerConfig(context.Context, *PullServerConfigReq) (*PullServerConfigResp, error) PullServerConfig(context.Context, *PullServerConfigReq) (*PullServerConfigResp, error)
FRPCAuth(context.Context, *FRPAuthRequest) (*FRPAuthResponse, error) FRPCAuth(context.Context, *FRPAuthRequest) (*FRPAuthResponse, error)
PushProxyInfo(context.Context, *PushProxyInfoReq) (*PushProxyInfoResp, error)
mustEmbedUnimplementedMasterServer() mustEmbedUnimplementedMasterServer()
} }
@@ -128,6 +145,9 @@ func (UnimplementedMasterServer) PullServerConfig(context.Context, *PullServerCo
func (UnimplementedMasterServer) FRPCAuth(context.Context, *FRPAuthRequest) (*FRPAuthResponse, error) { func (UnimplementedMasterServer) FRPCAuth(context.Context, *FRPAuthRequest) (*FRPAuthResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method FRPCAuth not implemented") return nil, status.Errorf(codes.Unimplemented, "method FRPCAuth not implemented")
} }
func (UnimplementedMasterServer) PushProxyInfo(context.Context, *PushProxyInfoReq) (*PushProxyInfoResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method PushProxyInfo not implemented")
}
func (UnimplementedMasterServer) mustEmbedUnimplementedMasterServer() {} func (UnimplementedMasterServer) mustEmbedUnimplementedMasterServer() {}
// UnsafeMasterServer may be embedded to opt out of forward compatibility for this service. // UnsafeMasterServer may be embedded to opt out of forward compatibility for this service.
@@ -142,7 +162,7 @@ func RegisterMasterServer(s grpc.ServiceRegistrar, srv MasterServer) {
} }
func _Master_ServerSend_Handler(srv interface{}, stream grpc.ServerStream) error { func _Master_ServerSend_Handler(srv interface{}, stream grpc.ServerStream) error {
return srv.(MasterServer).ServerSend(&masterServerSendServer{stream}) return srv.(MasterServer).ServerSend(&masterServerSendServer{ServerStream: stream})
} }
type Master_ServerSendServer interface { type Master_ServerSendServer interface {
@@ -221,6 +241,24 @@ func _Master_FRPCAuth_Handler(srv interface{}, ctx context.Context, dec func(int
return interceptor(ctx, in, info, handler) return interceptor(ctx, in, info, handler)
} }
func _Master_PushProxyInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(PushProxyInfoReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MasterServer).PushProxyInfo(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Master_PushProxyInfo_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MasterServer).PushProxyInfo(ctx, req.(*PushProxyInfoReq))
}
return interceptor(ctx, in, info, handler)
}
// Master_ServiceDesc is the grpc.ServiceDesc for Master service. // Master_ServiceDesc is the grpc.ServiceDesc for Master service.
// It's only intended for direct use with grpc.RegisterService, // It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy) // and not to be introspected or modified (even as a copy)
@@ -240,6 +278,10 @@ var Master_ServiceDesc = grpc.ServiceDesc{
MethodName: "FRPCAuth", MethodName: "FRPCAuth",
Handler: _Master_FRPCAuth_Handler, Handler: _Master_FRPCAuth_Handler,
}, },
{
MethodName: "PushProxyInfo",
Handler: _Master_PushProxyInfo_Handler,
},
}, },
Streams: []grpc.StreamDesc{ Streams: []grpc.StreamDesc{
{ {

View File

@@ -16,7 +16,7 @@ var (
) )
func newMasterCli() { func newMasterCli() {
conn, err := grpc.Dial(conf.RPCCallAddr(), conn, err := grpc.NewClient(conf.RPCCallAddr(),
grpc.WithTransportCredentials(conf.ClientCred)) grpc.WithTransportCredentials(conf.ClientCred))
if err != nil { if err != nil {
logrus.Fatalf("did not connect: %v", err) logrus.Fatalf("did not connect: %v", err)

View File

@@ -136,3 +136,9 @@ func (s *server) ServerSend(sender pb.Master_ServerSendServer) error {
<-done <-done
return nil return nil
} }
// PushProxyInfo implements pb.MasterServer.
func (s *server) PushProxyInfo(ctx context.Context, req *pb.PushProxyInfoReq) (*pb.PushProxyInfoResp, error) {
logrus.Infof("push proxy info, req: [%+v]", req)
return masterserver.PushProxyInfo(ctx, req)
}

View File

@@ -17,6 +17,7 @@ type ServerHandler interface {
Stop() Stop()
GetCommonCfg() *v1.ServerConfig GetCommonCfg() *v1.ServerConfig
GetMem() *mem.ServerStats GetMem() *mem.ServerStats
GetProxyStatsByType(v1.ProxyType) []*mem.ProxyStats
} }
type Server struct { type Server struct {
@@ -98,3 +99,7 @@ func (s *Server) GetCommonCfg() *v1.ServerConfig {
func (s *Server) GetMem() *mem.ServerStats { func (s *Server) GetMem() *mem.ServerStats {
return mem.StatsCollector.GetServer() return mem.StatsCollector.GetServer()
} }
func (s *Server) GetProxyStatsByType(proxyType v1.ProxyType) []*mem.ProxyStats {
return mem.StatsCollector.GetProxiesByType(string(proxyType))
}

View File

@@ -4,6 +4,7 @@ import (
"sync" "sync"
"github.com/VaalaCat/frp-panel/services/server" "github.com/VaalaCat/frp-panel/services/server"
"github.com/fatedier/frp/pkg/metrics"
) )
type ServerController interface { type ServerController interface {
@@ -25,6 +26,8 @@ var (
) )
func NewServerController() ServerController { func NewServerController() ServerController {
metrics.EnableMem()
metrics.EnablePrometheus()
return &serverController{ return &serverController{
servers: &sync.Map{}, servers: &sync.Map{},
} }

9
utils/misc.go Normal file
View File

@@ -0,0 +1,9 @@
package utils
import (
"time"
)
func IsSameDay(first time.Time, second time.Time) bool {
return first.YearDay() == second.YearDay() && first.Year() == second.Year()
}

View File

@@ -10,30 +10,34 @@ import (
type Client interface { type Client interface {
Run() Run()
Stop() Stop()
AddTask(time.Duration, any, ...any) error
} }
type client struct { type client struct {
s gocron.Scheduler s gocron.Scheduler
} }
func NewClient(f func(clientID, clientSecret string) error, clientID, clientSecret string) Client { func NewClient() Client {
s, err := gocron.NewScheduler() s, err := gocron.NewScheduler()
if err != nil { if err != nil {
logrus.WithError(err).Fatalf("create scheduler error") logrus.WithError(err).Fatalf("create scheduler error")
} }
_, err = s.NewJob(
gocron.DurationJob(time.Second*30),
gocron.NewTask(f, clientID, clientSecret),
)
if err != nil {
logrus.WithError(err).Fatalf("create job error")
}
return &client{ return &client{
s: s, s: s,
} }
} }
func (c *client) AddTask(duration time.Duration, function any, parameters ...any) error {
_, err := c.s.NewJob(
gocron.DurationJob(duration),
gocron.NewTask(function, parameters...),
)
if err != nil {
logrus.WithError(err).Fatalf("create task error")
}
return err
}
func (c *client) Run() { func (c *client) Run() {
logrus.Infof("start to run scheduler, interval: 30s") logrus.Infof("start to run scheduler, interval: 30s")
c.s.Start() c.s.Start()

View File

@@ -1,4 +1,4 @@
// @generated by protobuf-ts 2.9.3 // @generated by protobuf-ts 2.9.4
// @generated from protobuf file "api_auth.proto" (package "api_auth", syntax proto3) // @generated from protobuf file "api_auth.proto" (package "api_auth", syntax proto3)
// tslint:disable // tslint:disable
import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; import type { BinaryWriteOptions } from "@protobuf-ts/runtime";

View File

@@ -1,4 +1,4 @@
// @generated by protobuf-ts 2.9.3 // @generated by protobuf-ts 2.9.4
// @generated from protobuf file "api_client.proto" (package "api_client", syntax proto3) // @generated from protobuf file "api_client.proto" (package "api_client", syntax proto3)
// tslint:disable // tslint:disable
import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
@@ -10,6 +10,7 @@ import { UnknownFieldHandler } from "@protobuf-ts/runtime";
import type { PartialMessage } from "@protobuf-ts/runtime"; import type { PartialMessage } from "@protobuf-ts/runtime";
import { reflectionMergePartial } from "@protobuf-ts/runtime"; import { reflectionMergePartial } from "@protobuf-ts/runtime";
import { MessageType } from "@protobuf-ts/runtime"; import { MessageType } from "@protobuf-ts/runtime";
import { ProxyInfo } from "./common";
import { Client } from "./common"; import { Client } from "./common";
import { Status } from "./common"; import { Status } from "./common";
/** /**
@@ -192,6 +193,28 @@ export interface StartFRPCResponse {
*/ */
status?: Status; status?: Status;
} }
/**
* @generated from protobuf message api_client.GetProxyByCIDRequest
*/
export interface GetProxyByCIDRequest {
/**
* @generated from protobuf field: optional string client_id = 1;
*/
clientId?: string;
}
/**
* @generated from protobuf message api_client.GetProxyByCIDResponse
*/
export interface GetProxyByCIDResponse {
/**
* @generated from protobuf field: optional common.Status status = 1;
*/
status?: Status;
/**
* @generated from protobuf field: repeated common.ProxyInfo proxy_infos = 2;
*/
proxyInfos: ProxyInfo[];
}
// @generated message type with reflection information, may provide speed optimized methods // @generated message type with reflection information, may provide speed optimized methods
class InitClientRequest$Type extends MessageType<InitClientRequest> { class InitClientRequest$Type extends MessageType<InitClientRequest> {
constructor() { constructor() {
@@ -992,3 +1015,103 @@ class StartFRPCResponse$Type extends MessageType<StartFRPCResponse> {
* @generated MessageType for protobuf message api_client.StartFRPCResponse * @generated MessageType for protobuf message api_client.StartFRPCResponse
*/ */
export const StartFRPCResponse = new StartFRPCResponse$Type(); export const StartFRPCResponse = new StartFRPCResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class GetProxyByCIDRequest$Type extends MessageType<GetProxyByCIDRequest> {
constructor() {
super("api_client.GetProxyByCIDRequest", [
{ no: 1, name: "client_id", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }
]);
}
create(value?: PartialMessage<GetProxyByCIDRequest>): GetProxyByCIDRequest {
const message = globalThis.Object.create((this.messagePrototype!));
if (value !== undefined)
reflectionMergePartial<GetProxyByCIDRequest>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetProxyByCIDRequest): GetProxyByCIDRequest {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* optional string client_id */ 1:
message.clientId = reader.string();
break;
default:
let u = options.readUnknownField;
if (u === "throw")
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
let d = reader.skip(wireType);
if (u !== false)
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
}
}
return message;
}
internalBinaryWrite(message: GetProxyByCIDRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* optional string client_id = 1; */
if (message.clientId !== undefined)
writer.tag(1, WireType.LengthDelimited).string(message.clientId);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message api_client.GetProxyByCIDRequest
*/
export const GetProxyByCIDRequest = new GetProxyByCIDRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class GetProxyByCIDResponse$Type extends MessageType<GetProxyByCIDResponse> {
constructor() {
super("api_client.GetProxyByCIDResponse", [
{ no: 1, name: "status", kind: "message", T: () => Status },
{ no: 2, name: "proxy_infos", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => ProxyInfo }
]);
}
create(value?: PartialMessage<GetProxyByCIDResponse>): GetProxyByCIDResponse {
const message = globalThis.Object.create((this.messagePrototype!));
message.proxyInfos = [];
if (value !== undefined)
reflectionMergePartial<GetProxyByCIDResponse>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetProxyByCIDResponse): GetProxyByCIDResponse {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* optional common.Status status */ 1:
message.status = Status.internalBinaryRead(reader, reader.uint32(), options, message.status);
break;
case /* repeated common.ProxyInfo proxy_infos */ 2:
message.proxyInfos.push(ProxyInfo.internalBinaryRead(reader, reader.uint32(), options));
break;
default:
let u = options.readUnknownField;
if (u === "throw")
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
let d = reader.skip(wireType);
if (u !== false)
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
}
}
return message;
}
internalBinaryWrite(message: GetProxyByCIDResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* optional common.Status status = 1; */
if (message.status)
Status.internalBinaryWrite(message.status, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
/* repeated common.ProxyInfo proxy_infos = 2; */
for (let i = 0; i < message.proxyInfos.length; i++)
ProxyInfo.internalBinaryWrite(message.proxyInfos[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message api_client.GetProxyByCIDResponse
*/
export const GetProxyByCIDResponse = new GetProxyByCIDResponse$Type();

View File

@@ -1,4 +1,4 @@
// @generated by protobuf-ts 2.9.3 // @generated by protobuf-ts 2.9.4
// @generated from protobuf file "api_master.proto" (package "api_master", syntax proto3) // @generated from protobuf file "api_master.proto" (package "api_master", syntax proto3)
// tslint:disable // tslint:disable
import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; import type { BinaryWriteOptions } from "@protobuf-ts/runtime";

View File

@@ -1,4 +1,4 @@
// @generated by protobuf-ts 2.9.3 // @generated by protobuf-ts 2.9.4
// @generated from protobuf file "api_server.proto" (package "api_server", syntax proto3) // @generated from protobuf file "api_server.proto" (package "api_server", syntax proto3)
// tslint:disable // tslint:disable
import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
@@ -10,6 +10,7 @@ import { UnknownFieldHandler } from "@protobuf-ts/runtime";
import type { PartialMessage } from "@protobuf-ts/runtime"; import type { PartialMessage } from "@protobuf-ts/runtime";
import { reflectionMergePartial } from "@protobuf-ts/runtime"; import { reflectionMergePartial } from "@protobuf-ts/runtime";
import { MessageType } from "@protobuf-ts/runtime"; import { MessageType } from "@protobuf-ts/runtime";
import { ProxyInfo } from "./common";
import { Server } from "./common"; import { Server } from "./common";
import { Status } from "./common"; import { Status } from "./common";
/** /**
@@ -196,6 +197,28 @@ export interface StartFRPSResponse {
*/ */
status?: Status; status?: Status;
} }
/**
* @generated from protobuf message api_server.GetProxyBySIDRequest
*/
export interface GetProxyBySIDRequest {
/**
* @generated from protobuf field: optional string server_id = 1;
*/
serverId?: string;
}
/**
* @generated from protobuf message api_server.GetProxyBySIDResponse
*/
export interface GetProxyBySIDResponse {
/**
* @generated from protobuf field: optional common.Status status = 1;
*/
status?: Status;
/**
* @generated from protobuf field: repeated common.ProxyInfo proxy_infos = 2;
*/
proxyInfos: ProxyInfo[];
}
// @generated message type with reflection information, may provide speed optimized methods // @generated message type with reflection information, may provide speed optimized methods
class InitServerRequest$Type extends MessageType<InitServerRequest> { class InitServerRequest$Type extends MessageType<InitServerRequest> {
constructor() { constructor() {
@@ -1003,3 +1026,103 @@ class StartFRPSResponse$Type extends MessageType<StartFRPSResponse> {
* @generated MessageType for protobuf message api_server.StartFRPSResponse * @generated MessageType for protobuf message api_server.StartFRPSResponse
*/ */
export const StartFRPSResponse = new StartFRPSResponse$Type(); export const StartFRPSResponse = new StartFRPSResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class GetProxyBySIDRequest$Type extends MessageType<GetProxyBySIDRequest> {
constructor() {
super("api_server.GetProxyBySIDRequest", [
{ no: 1, name: "server_id", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }
]);
}
create(value?: PartialMessage<GetProxyBySIDRequest>): GetProxyBySIDRequest {
const message = globalThis.Object.create((this.messagePrototype!));
if (value !== undefined)
reflectionMergePartial<GetProxyBySIDRequest>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetProxyBySIDRequest): GetProxyBySIDRequest {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* optional string server_id */ 1:
message.serverId = reader.string();
break;
default:
let u = options.readUnknownField;
if (u === "throw")
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
let d = reader.skip(wireType);
if (u !== false)
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
}
}
return message;
}
internalBinaryWrite(message: GetProxyBySIDRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* optional string server_id = 1; */
if (message.serverId !== undefined)
writer.tag(1, WireType.LengthDelimited).string(message.serverId);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message api_server.GetProxyBySIDRequest
*/
export const GetProxyBySIDRequest = new GetProxyBySIDRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class GetProxyBySIDResponse$Type extends MessageType<GetProxyBySIDResponse> {
constructor() {
super("api_server.GetProxyBySIDResponse", [
{ no: 1, name: "status", kind: "message", T: () => Status },
{ no: 2, name: "proxy_infos", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => ProxyInfo }
]);
}
create(value?: PartialMessage<GetProxyBySIDResponse>): GetProxyBySIDResponse {
const message = globalThis.Object.create((this.messagePrototype!));
message.proxyInfos = [];
if (value !== undefined)
reflectionMergePartial<GetProxyBySIDResponse>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetProxyBySIDResponse): GetProxyBySIDResponse {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* optional common.Status status */ 1:
message.status = Status.internalBinaryRead(reader, reader.uint32(), options, message.status);
break;
case /* repeated common.ProxyInfo proxy_infos */ 2:
message.proxyInfos.push(ProxyInfo.internalBinaryRead(reader, reader.uint32(), options));
break;
default:
let u = options.readUnknownField;
if (u === "throw")
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
let d = reader.skip(wireType);
if (u !== false)
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
}
}
return message;
}
internalBinaryWrite(message: GetProxyBySIDResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* optional common.Status status = 1; */
if (message.status)
Status.internalBinaryWrite(message.status, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
/* repeated common.ProxyInfo proxy_infos = 2; */
for (let i = 0; i < message.proxyInfos.length; i++)
ProxyInfo.internalBinaryWrite(message.proxyInfos[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message api_server.GetProxyBySIDResponse
*/
export const GetProxyBySIDResponse = new GetProxyBySIDResponse$Type();

View File

@@ -1,4 +1,4 @@
// @generated by protobuf-ts 2.9.3 // @generated by protobuf-ts 2.9.4
// @generated from protobuf file "api_user.proto" (package "api_user", syntax proto3) // @generated from protobuf file "api_user.proto" (package "api_user", syntax proto3)
// tslint:disable // tslint:disable
import { WireType } from "@protobuf-ts/runtime"; import { WireType } from "@protobuf-ts/runtime";

View File

@@ -1,4 +1,4 @@
// @generated by protobuf-ts 2.9.3 // @generated by protobuf-ts 2.9.4
// @generated from protobuf file "common.proto" (package "common", syntax proto3) // @generated from protobuf file "common.proto" (package "common", syntax proto3)
// tslint:disable // tslint:disable
import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
@@ -128,6 +128,43 @@ export interface User {
*/ */
rawPassword?: string; rawPassword?: string;
} }
/**
* @generated from protobuf message common.ProxyInfo
*/
export interface ProxyInfo {
/**
* @generated from protobuf field: optional string name = 1;
*/
name?: string;
/**
* @generated from protobuf field: optional string type = 2;
*/
type?: string;
/**
* @generated from protobuf field: optional string client_id = 3;
*/
clientId?: string;
/**
* @generated from protobuf field: optional string server_id = 4;
*/
serverId?: string;
/**
* @generated from protobuf field: optional int64 today_traffic_in = 5;
*/
todayTrafficIn?: bigint;
/**
* @generated from protobuf field: optional int64 today_traffic_out = 6;
*/
todayTrafficOut?: bigint;
/**
* @generated from protobuf field: optional int64 history_traffic_in = 7;
*/
historyTrafficIn?: bigint;
/**
* @generated from protobuf field: optional int64 history_traffic_out = 8;
*/
historyTrafficOut?: bigint;
}
/** /**
* @generated from protobuf enum common.RespCode * @generated from protobuf enum common.RespCode
*/ */
@@ -554,3 +591,98 @@ class User$Type extends MessageType<User> {
* @generated MessageType for protobuf message common.User * @generated MessageType for protobuf message common.User
*/ */
export const User = new User$Type(); export const User = new User$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ProxyInfo$Type extends MessageType<ProxyInfo> {
constructor() {
super("common.ProxyInfo", [
{ no: 1, name: "name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 2, name: "type", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 3, name: "client_id", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 4, name: "server_id", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 5, name: "today_traffic_in", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
{ no: 6, name: "today_traffic_out", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
{ no: 7, name: "history_traffic_in", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
{ no: 8, name: "history_traffic_out", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ }
]);
}
create(value?: PartialMessage<ProxyInfo>): ProxyInfo {
const message = globalThis.Object.create((this.messagePrototype!));
if (value !== undefined)
reflectionMergePartial<ProxyInfo>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ProxyInfo): ProxyInfo {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* optional string name */ 1:
message.name = reader.string();
break;
case /* optional string type */ 2:
message.type = reader.string();
break;
case /* optional string client_id */ 3:
message.clientId = reader.string();
break;
case /* optional string server_id */ 4:
message.serverId = reader.string();
break;
case /* optional int64 today_traffic_in */ 5:
message.todayTrafficIn = reader.int64().toBigInt();
break;
case /* optional int64 today_traffic_out */ 6:
message.todayTrafficOut = reader.int64().toBigInt();
break;
case /* optional int64 history_traffic_in */ 7:
message.historyTrafficIn = reader.int64().toBigInt();
break;
case /* optional int64 history_traffic_out */ 8:
message.historyTrafficOut = reader.int64().toBigInt();
break;
default:
let u = options.readUnknownField;
if (u === "throw")
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
let d = reader.skip(wireType);
if (u !== false)
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
}
}
return message;
}
internalBinaryWrite(message: ProxyInfo, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* optional string name = 1; */
if (message.name !== undefined)
writer.tag(1, WireType.LengthDelimited).string(message.name);
/* optional string type = 2; */
if (message.type !== undefined)
writer.tag(2, WireType.LengthDelimited).string(message.type);
/* optional string client_id = 3; */
if (message.clientId !== undefined)
writer.tag(3, WireType.LengthDelimited).string(message.clientId);
/* optional string server_id = 4; */
if (message.serverId !== undefined)
writer.tag(4, WireType.LengthDelimited).string(message.serverId);
/* optional int64 today_traffic_in = 5; */
if (message.todayTrafficIn !== undefined)
writer.tag(5, WireType.Varint).int64(message.todayTrafficIn);
/* optional int64 today_traffic_out = 6; */
if (message.todayTrafficOut !== undefined)
writer.tag(6, WireType.Varint).int64(message.todayTrafficOut);
/* optional int64 history_traffic_in = 7; */
if (message.historyTrafficIn !== undefined)
writer.tag(7, WireType.Varint).int64(message.historyTrafficIn);
/* optional int64 history_traffic_out = 8; */
if (message.historyTrafficOut !== undefined)
writer.tag(8, WireType.Varint).int64(message.historyTrafficOut);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message common.ProxyInfo
*/
export const ProxyInfo = new ProxyInfo$Type();