new: Extensions v0
This commit is contained in:
5
.gitignore
vendored
5
.gitignore
vendored
@@ -2,8 +2,9 @@
|
||||
!/bin/.gitkeep
|
||||
.build
|
||||
.idea
|
||||
|
||||
cert
|
||||
**/*.log
|
||||
.DS_Store
|
||||
|
||||
**/*.syso
|
||||
**/*.syso
|
||||
node_modules
|
||||
8
Makefile
8
Makefile
@@ -18,11 +18,15 @@ GOBUILDSRV=CGO_ENABLED=1 go build -ldflags "-s -w" -trimpath -tags $(TAGS)
|
||||
|
||||
.PHONY: protos
|
||||
protos:
|
||||
protoc --go_out=config --go-grpc_out=config --proto_path=protos protos/*.proto
|
||||
protoc --go_out=./ --go-grpc_out=./ --proto_path=hiddifyrpc hiddifyrpc/*.proto
|
||||
protoc --js_out=import_style=commonjs,binary:./extension/html/rpc/ --grpc-web_out=import_style=commonjs,mode=grpcwebtext:./extension/html/rpc/ --proto_path=hiddifyrpc hiddifyrpc/*.proto
|
||||
npx browserify extension/html/rpc/extension.js >extension/html/rpc.js
|
||||
|
||||
|
||||
lib_install:
|
||||
go install -v github.com/sagernet/gomobile/cmd/gomobile@v0.1.1
|
||||
go install -v github.com/sagernet/gomobile/cmd/gobind@v0.1.1
|
||||
npm install
|
||||
|
||||
headers:
|
||||
go build -buildmode=c-archive -o $(BINDIR)/$(LIBNAME).h ./custom
|
||||
@@ -93,8 +97,6 @@ macos-universal: macos-amd64 macos-arm64
|
||||
clean:
|
||||
rm $(BINDIR)/*
|
||||
|
||||
build_protobuf:
|
||||
protoc --go_out=. --go-grpc_out=. hiddifyrpc/hiddify.proto
|
||||
|
||||
|
||||
|
||||
|
||||
127
cmd/cmd_extension.go
Normal file
127
cmd/cmd_extension.go
Normal file
@@ -0,0 +1,127 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"log"
|
||||
"net/http"
|
||||
"os"
|
||||
"os/signal"
|
||||
"sync"
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
_ "github.com/hiddify/hiddify-core/extension_repository"
|
||||
"github.com/hiddify/hiddify-core/utils"
|
||||
v2 "github.com/hiddify/hiddify-core/v2"
|
||||
"github.com/improbable-eng/grpc-web/go/grpcweb"
|
||||
"github.com/spf13/cobra"
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
var extension_id string
|
||||
|
||||
var commandExtension = &cobra.Command{
|
||||
Use: "extension",
|
||||
Short: "extension configuration",
|
||||
Args: cobra.MaximumNArgs(2),
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
grpc_server, _ := v2.StartCoreGrpcServer("127.0.0.1:12345")
|
||||
fmt.Printf("Waiting for CTRL+C to stop\n")
|
||||
runWebserver(grpc_server)
|
||||
<-time.After(1 * time.Second)
|
||||
},
|
||||
}
|
||||
|
||||
func init() {
|
||||
// commandWarp.Flags().StringVarP(&warpKey, "key", "k", "", "warp key")
|
||||
mainCommand.AddCommand(commandExtension)
|
||||
}
|
||||
|
||||
func allowCors(resp http.ResponseWriter, req *http.Request) {
|
||||
resp.Header().Set("Access-Control-Allow-Origin", "*")
|
||||
resp.Header().Set("Access-Control-Allow-Methods", "GET, POST, OPTIONS")
|
||||
resp.Header().Set("Access-Control-Allow-Headers", "Content-Type")
|
||||
if req.Method == "OPTIONS" {
|
||||
resp.WriteHeader(http.StatusOK)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
func runWebserver(grpcServer *grpc.Server) {
|
||||
// Context for cancellation
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
|
||||
// Channels to signal termination
|
||||
grpcTerminated := make(chan struct{})
|
||||
grpcWebTerminated := make(chan struct{})
|
||||
|
||||
// Specify the directory to serve static files
|
||||
dir := "./extension/html/"
|
||||
|
||||
// Wrapping gRPC server with grpc-web
|
||||
grpcWeb := grpcweb.WrapServer(grpcServer)
|
||||
|
||||
// HTTP multiplexer
|
||||
mux := http.NewServeMux()
|
||||
mux.HandleFunc("/", func(resp http.ResponseWriter, req *http.Request) {
|
||||
allowCors(resp, req)
|
||||
if grpcWeb.IsGrpcWebRequest(req) || grpcWeb.IsAcceptableGrpcCorsRequest(req) {
|
||||
grpcWeb.ServeHTTP(resp, req)
|
||||
} else {
|
||||
http.DefaultServeMux.ServeHTTP(resp, req)
|
||||
}
|
||||
})
|
||||
|
||||
// File server for static files
|
||||
fs := http.FileServer(http.Dir(dir))
|
||||
http.Handle("/", http.StripPrefix("/", fs))
|
||||
|
||||
// HTTP server for grpc-web
|
||||
rpcWebServer := &http.Server{
|
||||
Handler: mux,
|
||||
Addr: ":12346",
|
||||
}
|
||||
log.Println("Serving grpc-web from https://localhost:12346/")
|
||||
|
||||
// Add a goroutine for the grpc-web server
|
||||
wg := sync.WaitGroup{}
|
||||
wg.Add(1)
|
||||
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
utils.GenerateCertificate("cert/server-cert.pem", "cert/server-key.pem", true, true)
|
||||
if err := rpcWebServer.ListenAndServeTLS("cert/server-cert.pem", "cert/server-key.pem"); err != nil && err != http.ErrServerClosed {
|
||||
// if err := rpcWebServer.ListenAndServe(); err != nil && err != http.ErrServerClosed {
|
||||
fmt.Printf("Web server (gRPC-web) shutdown with error: %s", err)
|
||||
}
|
||||
grpcServer.Stop()
|
||||
close(grpcWebTerminated) // Server terminated
|
||||
}()
|
||||
|
||||
// Signal handling to gracefully shutdown
|
||||
sigChan := make(chan os.Signal, 1)
|
||||
signal.Notify(sigChan, syscall.SIGINT, syscall.SIGTERM)
|
||||
|
||||
select {
|
||||
case <-ctx.Done(): // Context canceled
|
||||
log.Println("Context canceled, shutting down servers...")
|
||||
case sig := <-sigChan: // OS signal received
|
||||
log.Printf("Received signal: %s, shutting down servers...", sig)
|
||||
case <-grpcTerminated: // Unexpected gRPC termination
|
||||
log.Println("gRPC server terminated unexpectedly")
|
||||
case <-grpcWebTerminated: // Unexpected gRPC-web termination
|
||||
log.Println("gRPC-web server terminated unexpectedly")
|
||||
}
|
||||
|
||||
// Graceful shutdown of the servers
|
||||
if err := rpcWebServer.Shutdown(ctx); err != nil {
|
||||
log.Printf("gRPC-web server shutdown with error: %s", err)
|
||||
}
|
||||
<-grpcWebTerminated
|
||||
|
||||
// Ensure all routines finish
|
||||
wg.Wait()
|
||||
log.Println("Server shutdown complete")
|
||||
}
|
||||
@@ -11,11 +11,11 @@ var commandGenerateCertification = &cobra.Command{
|
||||
Use: "gen-cert",
|
||||
Short: "Generate certification for web server",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
err := os.MkdirAll("cert", 0644)
|
||||
err := os.MkdirAll("cert", 0o644)
|
||||
if err != nil {
|
||||
panic("Error: " + err.Error())
|
||||
}
|
||||
utils.GenerateCertificate("cert/server-cert.pem", "cert/server-key.pem", true)
|
||||
utils.GenerateCertificate("cert/client-cert.pem", "cert/client-key.pem", false)
|
||||
utils.GenerateCertificate("cert/server-cert.pem", "cert/server-key.pem", true, true)
|
||||
utils.GenerateCertificate("cert/client-cert.pem", "cert/client-key.pem", false, true)
|
||||
},
|
||||
}
|
||||
|
||||
86
extension/extension.go
Normal file
86
extension/extension.go
Normal file
@@ -0,0 +1,86 @@
|
||||
package extension
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
|
||||
"github.com/hiddify/hiddify-core/extension/ui_elements"
|
||||
pb "github.com/hiddify/hiddify-core/hiddifyrpc"
|
||||
)
|
||||
|
||||
var (
|
||||
extensionsMap = make(map[string]*Extension)
|
||||
extensionStatusMap = make(map[string]bool)
|
||||
)
|
||||
|
||||
type Extension interface {
|
||||
GetTitle() string
|
||||
GetDescription() string
|
||||
GetUI() ui_elements.Form
|
||||
SubmitData(data map[string]string) error
|
||||
Cancel() error
|
||||
Stop() error
|
||||
UpdateUI(form ui_elements.Form) error
|
||||
init(id string)
|
||||
getQueue() chan *pb.ExtensionResponse
|
||||
getId() string
|
||||
}
|
||||
|
||||
type BaseExtension struct {
|
||||
id string
|
||||
// responseStream grpc.ServerStreamingServer[pb.ExtensionResponse]
|
||||
queue chan *pb.ExtensionResponse
|
||||
}
|
||||
|
||||
// func (b *BaseExtension) mustEmbdedBaseExtension() {
|
||||
// }
|
||||
|
||||
func (b *BaseExtension) init(id string) {
|
||||
b.id = id
|
||||
b.queue = make(chan *pb.ExtensionResponse, 1)
|
||||
}
|
||||
|
||||
func (b *BaseExtension) getQueue() chan *pb.ExtensionResponse {
|
||||
return b.queue
|
||||
}
|
||||
|
||||
func (b *BaseExtension) getId() string {
|
||||
return b.id
|
||||
}
|
||||
|
||||
func (p *BaseExtension) UpdateUI(form ui_elements.Form) error {
|
||||
p.queue <- &pb.ExtensionResponse{
|
||||
ExtensionId: p.id,
|
||||
Type: pb.ExtensionResponseType_UPDATE_UI,
|
||||
JsonUi: form.ToJSON(),
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p *BaseExtension) ShowDialog(form ui_elements.Form) error {
|
||||
p.queue <- &pb.ExtensionResponse{
|
||||
ExtensionId: p.id,
|
||||
Type: pb.ExtensionResponseType_SHOW_DIALOG,
|
||||
JsonUi: form.ToJSON(),
|
||||
}
|
||||
// log.Printf("Updated UI for extension %s: %s", err, p.id)
|
||||
return nil
|
||||
}
|
||||
|
||||
func RegisterExtension(id string, extension Extension) error {
|
||||
if _, ok := extensionsMap[id]; ok {
|
||||
err := fmt.Errorf("Extension with ID %s already exists", id)
|
||||
log.Fatal(err)
|
||||
return err
|
||||
}
|
||||
if val, ok := extensionStatusMap[id]; ok && !val {
|
||||
err := fmt.Errorf("Extension with ID %s is not enabled", id)
|
||||
log.Fatal(err)
|
||||
return err
|
||||
}
|
||||
extension.init(id)
|
||||
|
||||
fmt.Printf("Registered extension: %+v\n", extension)
|
||||
extensionsMap[id] = &extension
|
||||
return nil
|
||||
}
|
||||
139
extension/extension_host.go
Normal file
139
extension/extension_host.go
Normal file
@@ -0,0 +1,139 @@
|
||||
package extension
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"log"
|
||||
|
||||
pb "github.com/hiddify/hiddify-core/hiddifyrpc"
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
type ExtensionHostService struct {
|
||||
pb.UnimplementedExtensionHostServiceServer
|
||||
}
|
||||
|
||||
func (ExtensionHostService) ListExtensions(ctx context.Context, empty *pb.Empty) (*pb.ExtensionList, error) {
|
||||
extensionList := &pb.ExtensionList{
|
||||
Extensions: make([]*pb.Extension, 0),
|
||||
}
|
||||
|
||||
for _, extension := range extensionsMap {
|
||||
extensionList.Extensions = append(extensionList.Extensions, &pb.Extension{
|
||||
Id: (*extension).getId(),
|
||||
Title: (*extension).GetTitle(),
|
||||
Description: (*extension).GetDescription(),
|
||||
})
|
||||
}
|
||||
return extensionList, nil
|
||||
}
|
||||
|
||||
func (e ExtensionHostService) Connect(req *pb.ExtensionRequest, stream grpc.ServerStreamingServer[pb.ExtensionResponse]) error {
|
||||
// Get the extension from the map using the Extension ID
|
||||
if extension, ok := extensionsMap[req.GetExtensionId()]; ok {
|
||||
|
||||
log.Printf("Connecting stream for extension %s", req.GetExtensionId())
|
||||
log.Printf("Extension data: %+v", extension)
|
||||
// Handle loading the UI for the extension
|
||||
// Call extension-specific logic to generate UI data
|
||||
// if err := platform.connect(stream); err != nil {
|
||||
// log.Printf("Error connecting stream for extension %s: %v", req.GetExtensionId(), err)
|
||||
// }
|
||||
if err := (*extension).UpdateUI((*extension).GetUI()); err != nil {
|
||||
log.Printf("Error updating UI for extension %s: %v", req.GetExtensionId(), err)
|
||||
}
|
||||
// info := <-platform.queue
|
||||
|
||||
// stream.Send(info)
|
||||
// (*platform.extension).SubmitData(map[string]string{})
|
||||
// log.Printf("Extension info: %+v", info)
|
||||
// // Handle submitting data to the extension
|
||||
// case pb.ExtensionRequestType_SUBMIT_DATA:
|
||||
// // Handle submitting data to the extension
|
||||
// // Process the provided data
|
||||
// err := extension.SubmitData(req.GetData())
|
||||
// if err != nil {
|
||||
// log.Printf("Error submitting data for extension %s: %v", req.GetExtensionId(), err)
|
||||
// // continue
|
||||
// }
|
||||
|
||||
// case hiddifyrpc.ExtensionRequestType_CANCEL:
|
||||
// // Handle canceling the current operation in the extension
|
||||
// extension.Stop()
|
||||
// log.Printf("Operation canceled for extension %s", req.GetExtensionId())
|
||||
|
||||
// default:
|
||||
// log.Printf("Unknown request type: %v", req.GetType())
|
||||
// }
|
||||
|
||||
for {
|
||||
select {
|
||||
case <-stream.Context().Done():
|
||||
return nil
|
||||
case info := <-(*extension).getQueue():
|
||||
stream.Send(info)
|
||||
if info.GetType() == pb.ExtensionResponseType_END {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// break
|
||||
// case <-stopCh:
|
||||
// break
|
||||
// // case info := <-sub:
|
||||
// // stream.Send(&info)
|
||||
// case <-time.After(1000 * time.Millisecond):
|
||||
// }
|
||||
|
||||
// extension := extensionsMap[data.GetExtensionId()]
|
||||
// ui := extension.GetUI(data.Data)
|
||||
|
||||
// return &pb.UI{
|
||||
// ExtensionId: data.GetExtensionId(),
|
||||
// JsonUi: ui.ToJSON(),
|
||||
// }, nil
|
||||
} else {
|
||||
log.Printf("Extension with ID %s not found", req.GetExtensionId())
|
||||
return fmt.Errorf("Extension with ID %s not found", req.GetExtensionId())
|
||||
}
|
||||
}
|
||||
|
||||
func (e ExtensionHostService) SubmitForm(ctx context.Context, req *pb.ExtensionRequest) (*pb.ExtensionActionResult, error) {
|
||||
if extension, ok := extensionsMap[req.GetExtensionId()]; ok {
|
||||
(*extension).SubmitData(req.GetData())
|
||||
|
||||
return &pb.ExtensionActionResult{
|
||||
ExtensionId: req.ExtensionId,
|
||||
Code: pb.ResponseCode_OK,
|
||||
Message: "Success",
|
||||
}, nil
|
||||
}
|
||||
return nil, fmt.Errorf("Extension with ID %s not found", req.GetExtensionId())
|
||||
}
|
||||
|
||||
func (e ExtensionHostService) Cancel(ctx context.Context, req *pb.ExtensionRequest) (*pb.ExtensionActionResult, error) {
|
||||
if extension, ok := extensionsMap[req.GetExtensionId()]; ok {
|
||||
(*extension).Cancel()
|
||||
|
||||
return &pb.ExtensionActionResult{
|
||||
ExtensionId: req.ExtensionId,
|
||||
Code: pb.ResponseCode_OK,
|
||||
Message: "Success",
|
||||
}, nil
|
||||
}
|
||||
return nil, fmt.Errorf("Extension with ID %s not found", req.GetExtensionId())
|
||||
}
|
||||
|
||||
func (e ExtensionHostService) Stop(ctx context.Context, req *pb.ExtensionRequest) (*pb.ExtensionActionResult, error) {
|
||||
if extension, ok := extensionsMap[req.GetExtensionId()]; ok {
|
||||
(*extension).Stop()
|
||||
|
||||
return &pb.ExtensionActionResult{
|
||||
ExtensionId: req.ExtensionId,
|
||||
Code: pb.ResponseCode_OK,
|
||||
Message: "Success",
|
||||
}, nil
|
||||
}
|
||||
return nil, fmt.Errorf("Extension with ID %s not found", req.GetExtensionId())
|
||||
}
|
||||
52
extension/html/index.html
Normal file
52
extension/html/index.html
Normal file
@@ -0,0 +1,52 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Hiddify Extensions</title>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/css/bootstrap.min.css" integrity="sha512-jnSuA4Ss2PkkikSOLtYs8BlYIeeIK1h99ty4YfvRPAlzr377vr3CXDb7sb7eEEBYjDtcYj+AjBH3FLv5uSJuXg==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
||||
|
||||
|
||||
<style>
|
||||
.monospace { font-family: monospace; }
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="container mt-5">
|
||||
<div id="extension-list-container">
|
||||
|
||||
</div>
|
||||
|
||||
<div id="extension-page-container" style="display: none;">
|
||||
|
||||
<div id="extension-page"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal fade" id="extension-dialog" style="display: none;" tabindex="-1" aria-labelledby="modalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="modalLabel">Extension List</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div id="extension-page-containerdialog"></div>
|
||||
</div>
|
||||
<div class="modal-footer" id="modal-footer">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="https://unpkg.com/google-protobuf@3.20.1/dist/google-protobuf.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/protobufjs@7.X.X/dist/protobuf.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/js/bootstrap.bundle.min.js" integrity="sha512-7Pi/otdlbbCR+LnW+F7PwFcSDJOuUJB3OxtEHbg4vSMvzvJjde4Po1v4BR9Gdc9aXNUNFVUY+SK51wWT8WF0Gg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js" integrity="sha512-v2CJ7UaYy4JwqLDIrZUI/4hqeoQieOmAZNXBeQyjo21dadnwR+8ZaIJVT8EE2iyI61OV8e6M8PP2/4hpQINQ/g==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
<script src="rpc.js?1"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
2833
extension/html/rpc.js
Normal file
2833
extension/html/rpc.js
Normal file
File diff suppressed because it is too large
Load Diff
460
extension/html/rpc/base_pb.js
Normal file
460
extension/html/rpc/base_pb.js
Normal file
@@ -0,0 +1,460 @@
|
||||
// source: base.proto
|
||||
/**
|
||||
* @fileoverview
|
||||
* @enhanceable
|
||||
* @suppress {missingRequire} reports error on implicit type usages.
|
||||
* @suppress {messageConventions} JS Compiler reports an error if a variable or
|
||||
* field starts with 'MSG_' and isn't a translatable message.
|
||||
* @public
|
||||
*/
|
||||
// GENERATED CODE -- DO NOT EDIT!
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
var jspb = require('google-protobuf');
|
||||
var goog = jspb;
|
||||
var global =
|
||||
(typeof globalThis !== 'undefined' && globalThis) ||
|
||||
(typeof window !== 'undefined' && window) ||
|
||||
(typeof global !== 'undefined' && global) ||
|
||||
(typeof self !== 'undefined' && self) ||
|
||||
(function () { return this; }).call(null) ||
|
||||
Function('return this')();
|
||||
|
||||
goog.exportSymbol('proto.hiddifyrpc.Empty', null, global);
|
||||
goog.exportSymbol('proto.hiddifyrpc.HelloRequest', null, global);
|
||||
goog.exportSymbol('proto.hiddifyrpc.HelloResponse', null, global);
|
||||
goog.exportSymbol('proto.hiddifyrpc.ResponseCode', null, global);
|
||||
/**
|
||||
* Generated by JsPbCodeGenerator.
|
||||
* @param {Array=} opt_data Optional initial data array, typically from a
|
||||
* server response, or constructed directly in Javascript. The array is used
|
||||
* in place and becomes part of the constructed object. It is not cloned.
|
||||
* If no data is provided, the constructed object will be empty, but still
|
||||
* valid.
|
||||
* @extends {jspb.Message}
|
||||
* @constructor
|
||||
*/
|
||||
proto.hiddifyrpc.HelloRequest = function(opt_data) {
|
||||
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
||||
};
|
||||
goog.inherits(proto.hiddifyrpc.HelloRequest, jspb.Message);
|
||||
if (goog.DEBUG && !COMPILED) {
|
||||
/**
|
||||
* @public
|
||||
* @override
|
||||
*/
|
||||
proto.hiddifyrpc.HelloRequest.displayName = 'proto.hiddifyrpc.HelloRequest';
|
||||
}
|
||||
/**
|
||||
* Generated by JsPbCodeGenerator.
|
||||
* @param {Array=} opt_data Optional initial data array, typically from a
|
||||
* server response, or constructed directly in Javascript. The array is used
|
||||
* in place and becomes part of the constructed object. It is not cloned.
|
||||
* If no data is provided, the constructed object will be empty, but still
|
||||
* valid.
|
||||
* @extends {jspb.Message}
|
||||
* @constructor
|
||||
*/
|
||||
proto.hiddifyrpc.HelloResponse = function(opt_data) {
|
||||
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
||||
};
|
||||
goog.inherits(proto.hiddifyrpc.HelloResponse, jspb.Message);
|
||||
if (goog.DEBUG && !COMPILED) {
|
||||
/**
|
||||
* @public
|
||||
* @override
|
||||
*/
|
||||
proto.hiddifyrpc.HelloResponse.displayName = 'proto.hiddifyrpc.HelloResponse';
|
||||
}
|
||||
/**
|
||||
* Generated by JsPbCodeGenerator.
|
||||
* @param {Array=} opt_data Optional initial data array, typically from a
|
||||
* server response, or constructed directly in Javascript. The array is used
|
||||
* in place and becomes part of the constructed object. It is not cloned.
|
||||
* If no data is provided, the constructed object will be empty, but still
|
||||
* valid.
|
||||
* @extends {jspb.Message}
|
||||
* @constructor
|
||||
*/
|
||||
proto.hiddifyrpc.Empty = function(opt_data) {
|
||||
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
||||
};
|
||||
goog.inherits(proto.hiddifyrpc.Empty, jspb.Message);
|
||||
if (goog.DEBUG && !COMPILED) {
|
||||
/**
|
||||
* @public
|
||||
* @override
|
||||
*/
|
||||
proto.hiddifyrpc.Empty.displayName = 'proto.hiddifyrpc.Empty';
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (jspb.Message.GENERATE_TO_OBJECT) {
|
||||
/**
|
||||
* Creates an object representation of this proto.
|
||||
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
||||
* Optional fields that are not set will be set to undefined.
|
||||
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
||||
* For the list of reserved names please see:
|
||||
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
||||
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
||||
* JSPB instance for transitional soy proto support:
|
||||
* http://goto/soy-param-migration
|
||||
* @return {!Object}
|
||||
*/
|
||||
proto.hiddifyrpc.HelloRequest.prototype.toObject = function(opt_includeInstance) {
|
||||
return proto.hiddifyrpc.HelloRequest.toObject(opt_includeInstance, this);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Static version of the {@see toObject} method.
|
||||
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
||||
* the JSPB instance for transitional soy proto support:
|
||||
* http://goto/soy-param-migration
|
||||
* @param {!proto.hiddifyrpc.HelloRequest} msg The msg instance to transform.
|
||||
* @return {!Object}
|
||||
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||
*/
|
||||
proto.hiddifyrpc.HelloRequest.toObject = function(includeInstance, msg) {
|
||||
var f, obj = {
|
||||
name: jspb.Message.getFieldWithDefault(msg, 1, "")
|
||||
};
|
||||
|
||||
if (includeInstance) {
|
||||
obj.$jspbMessageInstance = msg;
|
||||
}
|
||||
return obj;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Deserializes binary data (in protobuf wire format).
|
||||
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
||||
* @return {!proto.hiddifyrpc.HelloRequest}
|
||||
*/
|
||||
proto.hiddifyrpc.HelloRequest.deserializeBinary = function(bytes) {
|
||||
var reader = new jspb.BinaryReader(bytes);
|
||||
var msg = new proto.hiddifyrpc.HelloRequest;
|
||||
return proto.hiddifyrpc.HelloRequest.deserializeBinaryFromReader(msg, reader);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Deserializes binary data (in protobuf wire format) from the
|
||||
* given reader into the given message object.
|
||||
* @param {!proto.hiddifyrpc.HelloRequest} msg The message object to deserialize into.
|
||||
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
||||
* @return {!proto.hiddifyrpc.HelloRequest}
|
||||
*/
|
||||
proto.hiddifyrpc.HelloRequest.deserializeBinaryFromReader = function(msg, reader) {
|
||||
while (reader.nextField()) {
|
||||
if (reader.isEndGroup()) {
|
||||
break;
|
||||
}
|
||||
var field = reader.getFieldNumber();
|
||||
switch (field) {
|
||||
case 1:
|
||||
var value = /** @type {string} */ (reader.readString());
|
||||
msg.setName(value);
|
||||
break;
|
||||
default:
|
||||
reader.skipField();
|
||||
break;
|
||||
}
|
||||
}
|
||||
return msg;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Serializes the message to binary data (in protobuf wire format).
|
||||
* @return {!Uint8Array}
|
||||
*/
|
||||
proto.hiddifyrpc.HelloRequest.prototype.serializeBinary = function() {
|
||||
var writer = new jspb.BinaryWriter();
|
||||
proto.hiddifyrpc.HelloRequest.serializeBinaryToWriter(this, writer);
|
||||
return writer.getResultBuffer();
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Serializes the given message to binary data (in protobuf wire
|
||||
* format), writing to the given BinaryWriter.
|
||||
* @param {!proto.hiddifyrpc.HelloRequest} message
|
||||
* @param {!jspb.BinaryWriter} writer
|
||||
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||
*/
|
||||
proto.hiddifyrpc.HelloRequest.serializeBinaryToWriter = function(message, writer) {
|
||||
var f = undefined;
|
||||
f = message.getName();
|
||||
if (f.length > 0) {
|
||||
writer.writeString(
|
||||
1,
|
||||
f
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional string name = 1;
|
||||
* @return {string}
|
||||
*/
|
||||
proto.hiddifyrpc.HelloRequest.prototype.getName = function() {
|
||||
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {string} value
|
||||
* @return {!proto.hiddifyrpc.HelloRequest} returns this
|
||||
*/
|
||||
proto.hiddifyrpc.HelloRequest.prototype.setName = function(value) {
|
||||
return jspb.Message.setProto3StringField(this, 1, value);
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (jspb.Message.GENERATE_TO_OBJECT) {
|
||||
/**
|
||||
* Creates an object representation of this proto.
|
||||
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
||||
* Optional fields that are not set will be set to undefined.
|
||||
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
||||
* For the list of reserved names please see:
|
||||
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
||||
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
||||
* JSPB instance for transitional soy proto support:
|
||||
* http://goto/soy-param-migration
|
||||
* @return {!Object}
|
||||
*/
|
||||
proto.hiddifyrpc.HelloResponse.prototype.toObject = function(opt_includeInstance) {
|
||||
return proto.hiddifyrpc.HelloResponse.toObject(opt_includeInstance, this);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Static version of the {@see toObject} method.
|
||||
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
||||
* the JSPB instance for transitional soy proto support:
|
||||
* http://goto/soy-param-migration
|
||||
* @param {!proto.hiddifyrpc.HelloResponse} msg The msg instance to transform.
|
||||
* @return {!Object}
|
||||
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||
*/
|
||||
proto.hiddifyrpc.HelloResponse.toObject = function(includeInstance, msg) {
|
||||
var f, obj = {
|
||||
message: jspb.Message.getFieldWithDefault(msg, 1, "")
|
||||
};
|
||||
|
||||
if (includeInstance) {
|
||||
obj.$jspbMessageInstance = msg;
|
||||
}
|
||||
return obj;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Deserializes binary data (in protobuf wire format).
|
||||
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
||||
* @return {!proto.hiddifyrpc.HelloResponse}
|
||||
*/
|
||||
proto.hiddifyrpc.HelloResponse.deserializeBinary = function(bytes) {
|
||||
var reader = new jspb.BinaryReader(bytes);
|
||||
var msg = new proto.hiddifyrpc.HelloResponse;
|
||||
return proto.hiddifyrpc.HelloResponse.deserializeBinaryFromReader(msg, reader);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Deserializes binary data (in protobuf wire format) from the
|
||||
* given reader into the given message object.
|
||||
* @param {!proto.hiddifyrpc.HelloResponse} msg The message object to deserialize into.
|
||||
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
||||
* @return {!proto.hiddifyrpc.HelloResponse}
|
||||
*/
|
||||
proto.hiddifyrpc.HelloResponse.deserializeBinaryFromReader = function(msg, reader) {
|
||||
while (reader.nextField()) {
|
||||
if (reader.isEndGroup()) {
|
||||
break;
|
||||
}
|
||||
var field = reader.getFieldNumber();
|
||||
switch (field) {
|
||||
case 1:
|
||||
var value = /** @type {string} */ (reader.readString());
|
||||
msg.setMessage(value);
|
||||
break;
|
||||
default:
|
||||
reader.skipField();
|
||||
break;
|
||||
}
|
||||
}
|
||||
return msg;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Serializes the message to binary data (in protobuf wire format).
|
||||
* @return {!Uint8Array}
|
||||
*/
|
||||
proto.hiddifyrpc.HelloResponse.prototype.serializeBinary = function() {
|
||||
var writer = new jspb.BinaryWriter();
|
||||
proto.hiddifyrpc.HelloResponse.serializeBinaryToWriter(this, writer);
|
||||
return writer.getResultBuffer();
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Serializes the given message to binary data (in protobuf wire
|
||||
* format), writing to the given BinaryWriter.
|
||||
* @param {!proto.hiddifyrpc.HelloResponse} message
|
||||
* @param {!jspb.BinaryWriter} writer
|
||||
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||
*/
|
||||
proto.hiddifyrpc.HelloResponse.serializeBinaryToWriter = function(message, writer) {
|
||||
var f = undefined;
|
||||
f = message.getMessage();
|
||||
if (f.length > 0) {
|
||||
writer.writeString(
|
||||
1,
|
||||
f
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional string message = 1;
|
||||
* @return {string}
|
||||
*/
|
||||
proto.hiddifyrpc.HelloResponse.prototype.getMessage = function() {
|
||||
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {string} value
|
||||
* @return {!proto.hiddifyrpc.HelloResponse} returns this
|
||||
*/
|
||||
proto.hiddifyrpc.HelloResponse.prototype.setMessage = function(value) {
|
||||
return jspb.Message.setProto3StringField(this, 1, value);
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (jspb.Message.GENERATE_TO_OBJECT) {
|
||||
/**
|
||||
* Creates an object representation of this proto.
|
||||
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
||||
* Optional fields that are not set will be set to undefined.
|
||||
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
||||
* For the list of reserved names please see:
|
||||
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
||||
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
||||
* JSPB instance for transitional soy proto support:
|
||||
* http://goto/soy-param-migration
|
||||
* @return {!Object}
|
||||
*/
|
||||
proto.hiddifyrpc.Empty.prototype.toObject = function(opt_includeInstance) {
|
||||
return proto.hiddifyrpc.Empty.toObject(opt_includeInstance, this);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Static version of the {@see toObject} method.
|
||||
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
||||
* the JSPB instance for transitional soy proto support:
|
||||
* http://goto/soy-param-migration
|
||||
* @param {!proto.hiddifyrpc.Empty} msg The msg instance to transform.
|
||||
* @return {!Object}
|
||||
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||
*/
|
||||
proto.hiddifyrpc.Empty.toObject = function(includeInstance, msg) {
|
||||
var f, obj = {
|
||||
|
||||
};
|
||||
|
||||
if (includeInstance) {
|
||||
obj.$jspbMessageInstance = msg;
|
||||
}
|
||||
return obj;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Deserializes binary data (in protobuf wire format).
|
||||
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
||||
* @return {!proto.hiddifyrpc.Empty}
|
||||
*/
|
||||
proto.hiddifyrpc.Empty.deserializeBinary = function(bytes) {
|
||||
var reader = new jspb.BinaryReader(bytes);
|
||||
var msg = new proto.hiddifyrpc.Empty;
|
||||
return proto.hiddifyrpc.Empty.deserializeBinaryFromReader(msg, reader);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Deserializes binary data (in protobuf wire format) from the
|
||||
* given reader into the given message object.
|
||||
* @param {!proto.hiddifyrpc.Empty} msg The message object to deserialize into.
|
||||
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
||||
* @return {!proto.hiddifyrpc.Empty}
|
||||
*/
|
||||
proto.hiddifyrpc.Empty.deserializeBinaryFromReader = function(msg, reader) {
|
||||
while (reader.nextField()) {
|
||||
if (reader.isEndGroup()) {
|
||||
break;
|
||||
}
|
||||
var field = reader.getFieldNumber();
|
||||
switch (field) {
|
||||
default:
|
||||
reader.skipField();
|
||||
break;
|
||||
}
|
||||
}
|
||||
return msg;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Serializes the message to binary data (in protobuf wire format).
|
||||
* @return {!Uint8Array}
|
||||
*/
|
||||
proto.hiddifyrpc.Empty.prototype.serializeBinary = function() {
|
||||
var writer = new jspb.BinaryWriter();
|
||||
proto.hiddifyrpc.Empty.serializeBinaryToWriter(this, writer);
|
||||
return writer.getResultBuffer();
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Serializes the given message to binary data (in protobuf wire
|
||||
* format), writing to the given BinaryWriter.
|
||||
* @param {!proto.hiddifyrpc.Empty} message
|
||||
* @param {!jspb.BinaryWriter} writer
|
||||
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||
*/
|
||||
proto.hiddifyrpc.Empty.serializeBinaryToWriter = function(message, writer) {
|
||||
var f = undefined;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @enum {number}
|
||||
*/
|
||||
proto.hiddifyrpc.ResponseCode = {
|
||||
OK: 0,
|
||||
FAILED: 1
|
||||
};
|
||||
|
||||
goog.object.extend(exports, proto.hiddifyrpc);
|
||||
6
extension/html/rpc/client.js
Normal file
6
extension/html/rpc/client.js
Normal file
@@ -0,0 +1,6 @@
|
||||
const extension = require("./extension_grpc_web_pb.js");
|
||||
|
||||
const grpcServerAddress = '/';
|
||||
const client = new extension.ExtensionHostServicePromiseClient(grpcServerAddress, null, null);
|
||||
|
||||
module.exports = { client ,extension};
|
||||
7
extension/html/rpc/extension.js
Normal file
7
extension/html/rpc/extension.js
Normal file
@@ -0,0 +1,7 @@
|
||||
const { listExtensions } = require('./extensionList.js');
|
||||
|
||||
window.onload = () => {
|
||||
listExtensions();
|
||||
};
|
||||
|
||||
|
||||
82
extension/html/rpc/extensionList.js
Normal file
82
extension/html/rpc/extensionList.js
Normal file
@@ -0,0 +1,82 @@
|
||||
|
||||
const { client,extension } = require('./client.js');
|
||||
async function listExtensions() {
|
||||
$("#extension-list-container").show();
|
||||
$("#extension-page-container").hide();
|
||||
|
||||
try {
|
||||
const extensionListContainer = document.getElementById('extension-list-container');
|
||||
extensionListContainer.innerHTML = ''; // Clear previous entries
|
||||
const response = await client.listExtensions(new extension.Empty(), {});
|
||||
const header = document.createElement('h1');
|
||||
header.classList.add('mb-4');
|
||||
header.textContent = "Extension List";
|
||||
extensionListContainer.appendChild(header);
|
||||
|
||||
const extensionList = response.getExtensionsList();
|
||||
extensionList.forEach(ext => {
|
||||
const listItem = createExtensionListItem(ext);
|
||||
extensionListContainer.appendChild(listItem);
|
||||
});
|
||||
} catch (err) {
|
||||
console.error('Error listing extensions:', err);
|
||||
}
|
||||
}
|
||||
|
||||
function createExtensionListItem(ext) {
|
||||
const listItem = document.createElement('li');
|
||||
listItem.className = 'list-group-item d-flex justify-content-between align-items-center';
|
||||
listItem.setAttribute('data-extension-id', ext.getId());
|
||||
|
||||
const contentDiv = document.createElement('div');
|
||||
|
||||
const titleElement = document.createElement('span');
|
||||
titleElement.innerHTML = `<strong>${ext.getTitle()}</strong>`;
|
||||
contentDiv.appendChild(titleElement);
|
||||
|
||||
const descriptionElement = document.createElement('p');
|
||||
descriptionElement.className = 'mb-0';
|
||||
descriptionElement.textContent = ext.getDescription();
|
||||
contentDiv.appendChild(descriptionElement);
|
||||
|
||||
listItem.appendChild(contentDiv);
|
||||
|
||||
const switchDiv = createSwitchElement(ext);
|
||||
listItem.appendChild(switchDiv);
|
||||
const {openExtensionPage} = require('./extensionPage.js');
|
||||
|
||||
listItem.addEventListener('click', () => openExtensionPage(ext.getId()));
|
||||
|
||||
return listItem;
|
||||
}
|
||||
|
||||
function createSwitchElement(ext) {
|
||||
const switchDiv = document.createElement('div');
|
||||
switchDiv.className = 'form-check form-switch';
|
||||
|
||||
const switchButton = document.createElement('input');
|
||||
switchButton.type = 'checkbox';
|
||||
switchButton.className = 'form-check-input';
|
||||
switchButton.checked = ext.getEnable();
|
||||
switchButton.addEventListener('change', () => toggleExtension(ext.getId(), switchButton.checked));
|
||||
|
||||
switchDiv.appendChild(switchButton);
|
||||
return switchDiv;
|
||||
}
|
||||
|
||||
async function toggleExtension(extensionId, enable) {
|
||||
const request = new extension.EditExtensionRequest();
|
||||
request.setExtensionId(extensionId);
|
||||
request.setEnable(enable);
|
||||
|
||||
try {
|
||||
await client.editExtension(request, {});
|
||||
console.log(`Extension ${extensionId} updated to ${enable ? 'enabled' : 'disabled'}`);
|
||||
} catch (err) {
|
||||
console.error('Error updating extension status:', err);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
module.exports = { listExtensions };
|
||||
85
extension/html/rpc/extensionPage.js
Normal file
85
extension/html/rpc/extensionPage.js
Normal file
@@ -0,0 +1,85 @@
|
||||
const { client,extension } = require('./client.js');
|
||||
const { renderForm } = require('./formRenderer.js');
|
||||
const { listExtensions } = require('./extensionList.js');
|
||||
var currentExtensionId=undefined;
|
||||
function openExtensionPage(extensionId) {
|
||||
currentExtensionId=extensionId;
|
||||
$("#extension-list-container").hide();
|
||||
$("#extension-page-container").show();
|
||||
const request = new extension.ExtensionRequest();
|
||||
request.setExtensionId(extensionId);
|
||||
|
||||
const stream = client.connect(request, {});
|
||||
|
||||
stream.on('data', (response) => {
|
||||
|
||||
if (response.getExtensionId() === currentExtensionId) {
|
||||
ui=JSON.parse(response.getJsonUi())
|
||||
if(response.getType()== proto.hiddifyrpc.ExtensionResponseType.SHOW_DIALOG) {
|
||||
renderForm(ui, "dialog",handleSubmitButtonClick,handleCancelButtonClick,undefined);
|
||||
}else{
|
||||
renderForm(ui, "",handleSubmitButtonClick,handleCancelButtonClick,handleStopButtonClick);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
stream.on('error', (err) => {
|
||||
console.error('Error opening extension page:', err);
|
||||
});
|
||||
|
||||
stream.on('end', () => {
|
||||
console.log('Stream ended');
|
||||
});
|
||||
}
|
||||
|
||||
async function handleSubmitButtonClick(event) {
|
||||
event.preventDefault();
|
||||
const formData = new FormData(event.target.closest('form'));
|
||||
const request = new extension.ExtensionRequest();
|
||||
|
||||
formData.forEach((value, key) => {
|
||||
request.getDataMap()[key] = value;
|
||||
});
|
||||
request.setExtensionId(currentExtensionId);
|
||||
|
||||
try {
|
||||
await client.submitForm(request, {});
|
||||
console.log('Form submitted successfully.');
|
||||
} catch (err) {
|
||||
console.error('Error submitting form:', err);
|
||||
}
|
||||
}
|
||||
|
||||
async function handleCancelButtonClick(event) {
|
||||
event.preventDefault();
|
||||
const request = new extension.ExtensionRequest();
|
||||
request.setExtensionId(currentExtensionId);
|
||||
|
||||
try {
|
||||
await client.cancel(request, {});
|
||||
console.log('Extension cancelled successfully.');
|
||||
} catch (err) {
|
||||
console.error('Error cancelling extension:', err);
|
||||
}
|
||||
}
|
||||
|
||||
async function handleStopButtonClick(event) {
|
||||
event.preventDefault();
|
||||
const request = new extension.ExtensionRequest();
|
||||
request.setExtensionId(currentExtensionId);
|
||||
|
||||
try {
|
||||
await client.stop(request, {});
|
||||
console.log('Extension stopped successfully.');
|
||||
currentExtensionId = undefined;
|
||||
listExtensions(); // Return to the extension list
|
||||
} catch (err) {
|
||||
console.error('Error stopping extension:', err);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
module.exports = { openExtensionPage };
|
||||
502
extension/html/rpc/extension_grpc_web_pb.js
Normal file
502
extension/html/rpc/extension_grpc_web_pb.js
Normal file
@@ -0,0 +1,502 @@
|
||||
/**
|
||||
* @fileoverview gRPC-Web generated client stub for hiddifyrpc
|
||||
* @enhanceable
|
||||
* @public
|
||||
*/
|
||||
|
||||
// Code generated by protoc-gen-grpc-web. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-grpc-web v1.5.0
|
||||
// protoc v5.28.0
|
||||
// source: extension.proto
|
||||
|
||||
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
|
||||
|
||||
const grpc = {};
|
||||
grpc.web = require('grpc-web');
|
||||
|
||||
|
||||
var base_pb = require('./base_pb.js')
|
||||
const proto = {};
|
||||
proto.hiddifyrpc = require('./extension_pb.js');
|
||||
|
||||
/**
|
||||
* @param {string} hostname
|
||||
* @param {?Object} credentials
|
||||
* @param {?grpc.web.ClientOptions} options
|
||||
* @constructor
|
||||
* @struct
|
||||
* @final
|
||||
*/
|
||||
proto.hiddifyrpc.ExtensionHostServiceClient =
|
||||
function(hostname, credentials, options) {
|
||||
if (!options) options = {};
|
||||
options.format = 'text';
|
||||
|
||||
/**
|
||||
* @private @const {!grpc.web.GrpcWebClientBase} The client
|
||||
*/
|
||||
this.client_ = new grpc.web.GrpcWebClientBase(options);
|
||||
|
||||
/**
|
||||
* @private @const {string} The hostname
|
||||
*/
|
||||
this.hostname_ = hostname.replace(/\/+$/, '');
|
||||
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {string} hostname
|
||||
* @param {?Object} credentials
|
||||
* @param {?grpc.web.ClientOptions} options
|
||||
* @constructor
|
||||
* @struct
|
||||
* @final
|
||||
*/
|
||||
proto.hiddifyrpc.ExtensionHostServicePromiseClient =
|
||||
function(hostname, credentials, options) {
|
||||
if (!options) options = {};
|
||||
options.format = 'text';
|
||||
|
||||
/**
|
||||
* @private @const {!grpc.web.GrpcWebClientBase} The client
|
||||
*/
|
||||
this.client_ = new grpc.web.GrpcWebClientBase(options);
|
||||
|
||||
/**
|
||||
* @private @const {string} The hostname
|
||||
*/
|
||||
this.hostname_ = hostname.replace(/\/+$/, '');
|
||||
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @const
|
||||
* @type {!grpc.web.MethodDescriptor<
|
||||
* !proto.hiddifyrpc.Empty,
|
||||
* !proto.hiddifyrpc.ExtensionList>}
|
||||
*/
|
||||
const methodDescriptor_ExtensionHostService_ListExtensions = new grpc.web.MethodDescriptor(
|
||||
'/hiddifyrpc.ExtensionHostService/ListExtensions',
|
||||
grpc.web.MethodType.UNARY,
|
||||
base_pb.Empty,
|
||||
proto.hiddifyrpc.ExtensionList,
|
||||
/**
|
||||
* @param {!proto.hiddifyrpc.Empty} request
|
||||
* @return {!Uint8Array}
|
||||
*/
|
||||
function(request) {
|
||||
return request.serializeBinary();
|
||||
},
|
||||
proto.hiddifyrpc.ExtensionList.deserializeBinary
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
* @param {!proto.hiddifyrpc.Empty} request The
|
||||
* request proto
|
||||
* @param {?Object<string, string>} metadata User defined
|
||||
* call metadata
|
||||
* @param {function(?grpc.web.RpcError, ?proto.hiddifyrpc.ExtensionList)}
|
||||
* callback The callback function(error, response)
|
||||
* @return {!grpc.web.ClientReadableStream<!proto.hiddifyrpc.ExtensionList>|undefined}
|
||||
* The XHR Node Readable Stream
|
||||
*/
|
||||
proto.hiddifyrpc.ExtensionHostServiceClient.prototype.listExtensions =
|
||||
function(request, metadata, callback) {
|
||||
return this.client_.rpcCall(this.hostname_ +
|
||||
'/hiddifyrpc.ExtensionHostService/ListExtensions',
|
||||
request,
|
||||
metadata || {},
|
||||
methodDescriptor_ExtensionHostService_ListExtensions,
|
||||
callback);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {!proto.hiddifyrpc.Empty} request The
|
||||
* request proto
|
||||
* @param {?Object<string, string>=} metadata User defined
|
||||
* call metadata
|
||||
* @return {!Promise<!proto.hiddifyrpc.ExtensionList>}
|
||||
* Promise that resolves to the response
|
||||
*/
|
||||
proto.hiddifyrpc.ExtensionHostServicePromiseClient.prototype.listExtensions =
|
||||
function(request, metadata) {
|
||||
return this.client_.unaryCall(this.hostname_ +
|
||||
'/hiddifyrpc.ExtensionHostService/ListExtensions',
|
||||
request,
|
||||
metadata || {},
|
||||
methodDescriptor_ExtensionHostService_ListExtensions);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @const
|
||||
* @type {!grpc.web.MethodDescriptor<
|
||||
* !proto.hiddifyrpc.ExtensionRequest,
|
||||
* !proto.hiddifyrpc.ExtensionResponse>}
|
||||
*/
|
||||
const methodDescriptor_ExtensionHostService_Connect = new grpc.web.MethodDescriptor(
|
||||
'/hiddifyrpc.ExtensionHostService/Connect',
|
||||
grpc.web.MethodType.SERVER_STREAMING,
|
||||
proto.hiddifyrpc.ExtensionRequest,
|
||||
proto.hiddifyrpc.ExtensionResponse,
|
||||
/**
|
||||
* @param {!proto.hiddifyrpc.ExtensionRequest} request
|
||||
* @return {!Uint8Array}
|
||||
*/
|
||||
function(request) {
|
||||
return request.serializeBinary();
|
||||
},
|
||||
proto.hiddifyrpc.ExtensionResponse.deserializeBinary
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
* @param {!proto.hiddifyrpc.ExtensionRequest} request The request proto
|
||||
* @param {?Object<string, string>=} metadata User defined
|
||||
* call metadata
|
||||
* @return {!grpc.web.ClientReadableStream<!proto.hiddifyrpc.ExtensionResponse>}
|
||||
* The XHR Node Readable Stream
|
||||
*/
|
||||
proto.hiddifyrpc.ExtensionHostServiceClient.prototype.connect =
|
||||
function(request, metadata) {
|
||||
return this.client_.serverStreaming(this.hostname_ +
|
||||
'/hiddifyrpc.ExtensionHostService/Connect',
|
||||
request,
|
||||
metadata || {},
|
||||
methodDescriptor_ExtensionHostService_Connect);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {!proto.hiddifyrpc.ExtensionRequest} request The request proto
|
||||
* @param {?Object<string, string>=} metadata User defined
|
||||
* call metadata
|
||||
* @return {!grpc.web.ClientReadableStream<!proto.hiddifyrpc.ExtensionResponse>}
|
||||
* The XHR Node Readable Stream
|
||||
*/
|
||||
proto.hiddifyrpc.ExtensionHostServicePromiseClient.prototype.connect =
|
||||
function(request, metadata) {
|
||||
return this.client_.serverStreaming(this.hostname_ +
|
||||
'/hiddifyrpc.ExtensionHostService/Connect',
|
||||
request,
|
||||
metadata || {},
|
||||
methodDescriptor_ExtensionHostService_Connect);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @const
|
||||
* @type {!grpc.web.MethodDescriptor<
|
||||
* !proto.hiddifyrpc.EditExtensionRequest,
|
||||
* !proto.hiddifyrpc.ExtensionActionResult>}
|
||||
*/
|
||||
const methodDescriptor_ExtensionHostService_EditExtension = new grpc.web.MethodDescriptor(
|
||||
'/hiddifyrpc.ExtensionHostService/EditExtension',
|
||||
grpc.web.MethodType.UNARY,
|
||||
proto.hiddifyrpc.EditExtensionRequest,
|
||||
proto.hiddifyrpc.ExtensionActionResult,
|
||||
/**
|
||||
* @param {!proto.hiddifyrpc.EditExtensionRequest} request
|
||||
* @return {!Uint8Array}
|
||||
*/
|
||||
function(request) {
|
||||
return request.serializeBinary();
|
||||
},
|
||||
proto.hiddifyrpc.ExtensionActionResult.deserializeBinary
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
* @param {!proto.hiddifyrpc.EditExtensionRequest} request The
|
||||
* request proto
|
||||
* @param {?Object<string, string>} metadata User defined
|
||||
* call metadata
|
||||
* @param {function(?grpc.web.RpcError, ?proto.hiddifyrpc.ExtensionActionResult)}
|
||||
* callback The callback function(error, response)
|
||||
* @return {!grpc.web.ClientReadableStream<!proto.hiddifyrpc.ExtensionActionResult>|undefined}
|
||||
* The XHR Node Readable Stream
|
||||
*/
|
||||
proto.hiddifyrpc.ExtensionHostServiceClient.prototype.editExtension =
|
||||
function(request, metadata, callback) {
|
||||
return this.client_.rpcCall(this.hostname_ +
|
||||
'/hiddifyrpc.ExtensionHostService/EditExtension',
|
||||
request,
|
||||
metadata || {},
|
||||
methodDescriptor_ExtensionHostService_EditExtension,
|
||||
callback);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {!proto.hiddifyrpc.EditExtensionRequest} request The
|
||||
* request proto
|
||||
* @param {?Object<string, string>=} metadata User defined
|
||||
* call metadata
|
||||
* @return {!Promise<!proto.hiddifyrpc.ExtensionActionResult>}
|
||||
* Promise that resolves to the response
|
||||
*/
|
||||
proto.hiddifyrpc.ExtensionHostServicePromiseClient.prototype.editExtension =
|
||||
function(request, metadata) {
|
||||
return this.client_.unaryCall(this.hostname_ +
|
||||
'/hiddifyrpc.ExtensionHostService/EditExtension',
|
||||
request,
|
||||
metadata || {},
|
||||
methodDescriptor_ExtensionHostService_EditExtension);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @const
|
||||
* @type {!grpc.web.MethodDescriptor<
|
||||
* !proto.hiddifyrpc.ExtensionRequest,
|
||||
* !proto.hiddifyrpc.ExtensionActionResult>}
|
||||
*/
|
||||
const methodDescriptor_ExtensionHostService_SubmitForm = new grpc.web.MethodDescriptor(
|
||||
'/hiddifyrpc.ExtensionHostService/SubmitForm',
|
||||
grpc.web.MethodType.UNARY,
|
||||
proto.hiddifyrpc.ExtensionRequest,
|
||||
proto.hiddifyrpc.ExtensionActionResult,
|
||||
/**
|
||||
* @param {!proto.hiddifyrpc.ExtensionRequest} request
|
||||
* @return {!Uint8Array}
|
||||
*/
|
||||
function(request) {
|
||||
return request.serializeBinary();
|
||||
},
|
||||
proto.hiddifyrpc.ExtensionActionResult.deserializeBinary
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
* @param {!proto.hiddifyrpc.ExtensionRequest} request The
|
||||
* request proto
|
||||
* @param {?Object<string, string>} metadata User defined
|
||||
* call metadata
|
||||
* @param {function(?grpc.web.RpcError, ?proto.hiddifyrpc.ExtensionActionResult)}
|
||||
* callback The callback function(error, response)
|
||||
* @return {!grpc.web.ClientReadableStream<!proto.hiddifyrpc.ExtensionActionResult>|undefined}
|
||||
* The XHR Node Readable Stream
|
||||
*/
|
||||
proto.hiddifyrpc.ExtensionHostServiceClient.prototype.submitForm =
|
||||
function(request, metadata, callback) {
|
||||
return this.client_.rpcCall(this.hostname_ +
|
||||
'/hiddifyrpc.ExtensionHostService/SubmitForm',
|
||||
request,
|
||||
metadata || {},
|
||||
methodDescriptor_ExtensionHostService_SubmitForm,
|
||||
callback);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {!proto.hiddifyrpc.ExtensionRequest} request The
|
||||
* request proto
|
||||
* @param {?Object<string, string>=} metadata User defined
|
||||
* call metadata
|
||||
* @return {!Promise<!proto.hiddifyrpc.ExtensionActionResult>}
|
||||
* Promise that resolves to the response
|
||||
*/
|
||||
proto.hiddifyrpc.ExtensionHostServicePromiseClient.prototype.submitForm =
|
||||
function(request, metadata) {
|
||||
return this.client_.unaryCall(this.hostname_ +
|
||||
'/hiddifyrpc.ExtensionHostService/SubmitForm',
|
||||
request,
|
||||
metadata || {},
|
||||
methodDescriptor_ExtensionHostService_SubmitForm);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @const
|
||||
* @type {!grpc.web.MethodDescriptor<
|
||||
* !proto.hiddifyrpc.ExtensionRequest,
|
||||
* !proto.hiddifyrpc.ExtensionActionResult>}
|
||||
*/
|
||||
const methodDescriptor_ExtensionHostService_Cancel = new grpc.web.MethodDescriptor(
|
||||
'/hiddifyrpc.ExtensionHostService/Cancel',
|
||||
grpc.web.MethodType.UNARY,
|
||||
proto.hiddifyrpc.ExtensionRequest,
|
||||
proto.hiddifyrpc.ExtensionActionResult,
|
||||
/**
|
||||
* @param {!proto.hiddifyrpc.ExtensionRequest} request
|
||||
* @return {!Uint8Array}
|
||||
*/
|
||||
function(request) {
|
||||
return request.serializeBinary();
|
||||
},
|
||||
proto.hiddifyrpc.ExtensionActionResult.deserializeBinary
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
* @param {!proto.hiddifyrpc.ExtensionRequest} request The
|
||||
* request proto
|
||||
* @param {?Object<string, string>} metadata User defined
|
||||
* call metadata
|
||||
* @param {function(?grpc.web.RpcError, ?proto.hiddifyrpc.ExtensionActionResult)}
|
||||
* callback The callback function(error, response)
|
||||
* @return {!grpc.web.ClientReadableStream<!proto.hiddifyrpc.ExtensionActionResult>|undefined}
|
||||
* The XHR Node Readable Stream
|
||||
*/
|
||||
proto.hiddifyrpc.ExtensionHostServiceClient.prototype.cancel =
|
||||
function(request, metadata, callback) {
|
||||
return this.client_.rpcCall(this.hostname_ +
|
||||
'/hiddifyrpc.ExtensionHostService/Cancel',
|
||||
request,
|
||||
metadata || {},
|
||||
methodDescriptor_ExtensionHostService_Cancel,
|
||||
callback);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {!proto.hiddifyrpc.ExtensionRequest} request The
|
||||
* request proto
|
||||
* @param {?Object<string, string>=} metadata User defined
|
||||
* call metadata
|
||||
* @return {!Promise<!proto.hiddifyrpc.ExtensionActionResult>}
|
||||
* Promise that resolves to the response
|
||||
*/
|
||||
proto.hiddifyrpc.ExtensionHostServicePromiseClient.prototype.cancel =
|
||||
function(request, metadata) {
|
||||
return this.client_.unaryCall(this.hostname_ +
|
||||
'/hiddifyrpc.ExtensionHostService/Cancel',
|
||||
request,
|
||||
metadata || {},
|
||||
methodDescriptor_ExtensionHostService_Cancel);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @const
|
||||
* @type {!grpc.web.MethodDescriptor<
|
||||
* !proto.hiddifyrpc.ExtensionRequest,
|
||||
* !proto.hiddifyrpc.ExtensionActionResult>}
|
||||
*/
|
||||
const methodDescriptor_ExtensionHostService_Stop = new grpc.web.MethodDescriptor(
|
||||
'/hiddifyrpc.ExtensionHostService/Stop',
|
||||
grpc.web.MethodType.UNARY,
|
||||
proto.hiddifyrpc.ExtensionRequest,
|
||||
proto.hiddifyrpc.ExtensionActionResult,
|
||||
/**
|
||||
* @param {!proto.hiddifyrpc.ExtensionRequest} request
|
||||
* @return {!Uint8Array}
|
||||
*/
|
||||
function(request) {
|
||||
return request.serializeBinary();
|
||||
},
|
||||
proto.hiddifyrpc.ExtensionActionResult.deserializeBinary
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
* @param {!proto.hiddifyrpc.ExtensionRequest} request The
|
||||
* request proto
|
||||
* @param {?Object<string, string>} metadata User defined
|
||||
* call metadata
|
||||
* @param {function(?grpc.web.RpcError, ?proto.hiddifyrpc.ExtensionActionResult)}
|
||||
* callback The callback function(error, response)
|
||||
* @return {!grpc.web.ClientReadableStream<!proto.hiddifyrpc.ExtensionActionResult>|undefined}
|
||||
* The XHR Node Readable Stream
|
||||
*/
|
||||
proto.hiddifyrpc.ExtensionHostServiceClient.prototype.stop =
|
||||
function(request, metadata, callback) {
|
||||
return this.client_.rpcCall(this.hostname_ +
|
||||
'/hiddifyrpc.ExtensionHostService/Stop',
|
||||
request,
|
||||
metadata || {},
|
||||
methodDescriptor_ExtensionHostService_Stop,
|
||||
callback);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {!proto.hiddifyrpc.ExtensionRequest} request The
|
||||
* request proto
|
||||
* @param {?Object<string, string>=} metadata User defined
|
||||
* call metadata
|
||||
* @return {!Promise<!proto.hiddifyrpc.ExtensionActionResult>}
|
||||
* Promise that resolves to the response
|
||||
*/
|
||||
proto.hiddifyrpc.ExtensionHostServicePromiseClient.prototype.stop =
|
||||
function(request, metadata) {
|
||||
return this.client_.unaryCall(this.hostname_ +
|
||||
'/hiddifyrpc.ExtensionHostService/Stop',
|
||||
request,
|
||||
metadata || {},
|
||||
methodDescriptor_ExtensionHostService_Stop);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @const
|
||||
* @type {!grpc.web.MethodDescriptor<
|
||||
* !proto.hiddifyrpc.ExtensionRequest,
|
||||
* !proto.hiddifyrpc.ExtensionActionResult>}
|
||||
*/
|
||||
const methodDescriptor_ExtensionHostService_GetUI = new grpc.web.MethodDescriptor(
|
||||
'/hiddifyrpc.ExtensionHostService/GetUI',
|
||||
grpc.web.MethodType.UNARY,
|
||||
proto.hiddifyrpc.ExtensionRequest,
|
||||
proto.hiddifyrpc.ExtensionActionResult,
|
||||
/**
|
||||
* @param {!proto.hiddifyrpc.ExtensionRequest} request
|
||||
* @return {!Uint8Array}
|
||||
*/
|
||||
function(request) {
|
||||
return request.serializeBinary();
|
||||
},
|
||||
proto.hiddifyrpc.ExtensionActionResult.deserializeBinary
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
* @param {!proto.hiddifyrpc.ExtensionRequest} request The
|
||||
* request proto
|
||||
* @param {?Object<string, string>} metadata User defined
|
||||
* call metadata
|
||||
* @param {function(?grpc.web.RpcError, ?proto.hiddifyrpc.ExtensionActionResult)}
|
||||
* callback The callback function(error, response)
|
||||
* @return {!grpc.web.ClientReadableStream<!proto.hiddifyrpc.ExtensionActionResult>|undefined}
|
||||
* The XHR Node Readable Stream
|
||||
*/
|
||||
proto.hiddifyrpc.ExtensionHostServiceClient.prototype.getUI =
|
||||
function(request, metadata, callback) {
|
||||
return this.client_.rpcCall(this.hostname_ +
|
||||
'/hiddifyrpc.ExtensionHostService/GetUI',
|
||||
request,
|
||||
metadata || {},
|
||||
methodDescriptor_ExtensionHostService_GetUI,
|
||||
callback);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {!proto.hiddifyrpc.ExtensionRequest} request The
|
||||
* request proto
|
||||
* @param {?Object<string, string>=} metadata User defined
|
||||
* call metadata
|
||||
* @return {!Promise<!proto.hiddifyrpc.ExtensionActionResult>}
|
||||
* Promise that resolves to the response
|
||||
*/
|
||||
proto.hiddifyrpc.ExtensionHostServicePromiseClient.prototype.getUI =
|
||||
function(request, metadata) {
|
||||
return this.client_.unaryCall(this.hostname_ +
|
||||
'/hiddifyrpc.ExtensionHostService/GetUI',
|
||||
request,
|
||||
metadata || {},
|
||||
methodDescriptor_ExtensionHostService_GetUI);
|
||||
};
|
||||
|
||||
|
||||
module.exports = proto.hiddifyrpc;
|
||||
|
||||
1253
extension/html/rpc/extension_pb.js
Normal file
1253
extension/html/rpc/extension_pb.js
Normal file
File diff suppressed because it is too large
Load Diff
200
extension/html/rpc/formRenderer.js
Normal file
200
extension/html/rpc/formRenderer.js
Normal file
@@ -0,0 +1,200 @@
|
||||
const { client } = require('./client.js');
|
||||
const extension = require("./extension_grpc_web_pb.js");
|
||||
|
||||
function renderForm(json, dialog, submitAction, cancelAction, stopAction) {
|
||||
const container = document.getElementById(`extension-page-container${dialog}`);
|
||||
const formId = `dynamicForm${json.id}${dialog}`;
|
||||
|
||||
const existingForm = document.getElementById(formId);
|
||||
if (existingForm) {
|
||||
existingForm.remove();
|
||||
}
|
||||
const form = document.createElement('form');
|
||||
form.id = formId;
|
||||
|
||||
if (dialog === "dialog") {
|
||||
document.getElementById("modalLabel").textContent = json.title;
|
||||
} else {
|
||||
const titleElement = createTitleElement(json);
|
||||
form.appendChild(titleElement);
|
||||
}
|
||||
addElementsToForm(form, json);
|
||||
const buttonGroup = createButtonGroup(json, submitAction, cancelAction, stopAction);
|
||||
if (dialog === "dialog") {
|
||||
document.getElementById("modal-footer").innerHTML = '';
|
||||
document.getElementById("modal-footer").appendChild(buttonGroup);
|
||||
} else {
|
||||
form.appendChild(buttonGroup);
|
||||
}
|
||||
container.appendChild(form);
|
||||
}
|
||||
|
||||
function addElementsToForm(form, json) {
|
||||
|
||||
|
||||
|
||||
const description = document.createElement('p');
|
||||
description.textContent = json.description;
|
||||
form.appendChild(description);
|
||||
|
||||
json.fields.forEach(field => {
|
||||
const formGroup = createFormGroup(field);
|
||||
form.appendChild(formGroup);
|
||||
});
|
||||
|
||||
|
||||
return form;
|
||||
}
|
||||
|
||||
function createTitleElement(json) {
|
||||
const title = document.createElement('h1');
|
||||
title.textContent = json.title;
|
||||
return title;
|
||||
}
|
||||
|
||||
function createFormGroup(field) {
|
||||
const formGroup = document.createElement('div');
|
||||
formGroup.classList.add('mb-3');
|
||||
|
||||
if (field.label && !field.labelHidden) {
|
||||
const label = document.createElement('label');
|
||||
label.textContent = field.label;
|
||||
label.setAttribute('for', field.key);
|
||||
formGroup.appendChild(label);
|
||||
}
|
||||
|
||||
const input = createInputElement(field);
|
||||
formGroup.appendChild(input);
|
||||
return formGroup;
|
||||
}
|
||||
|
||||
function createInputElement(field) {
|
||||
let input;
|
||||
|
||||
switch (field.type) {
|
||||
case "TextArea":
|
||||
input = document.createElement('textarea');
|
||||
input.rows = field.lines || 3;
|
||||
input.textContent = field.value || '';
|
||||
break;
|
||||
|
||||
case "Checkbox":
|
||||
case "RadioButton":
|
||||
input = createCheckboxOrRadioGroup(field);
|
||||
break;
|
||||
|
||||
case "Switch":
|
||||
input = createSwitchElement(field);
|
||||
break;
|
||||
|
||||
case "Select":
|
||||
input = document.createElement('select');
|
||||
field.items.forEach(item => {
|
||||
const option = document.createElement('option');
|
||||
option.value = item.value;
|
||||
option.text = item.label;
|
||||
input.appendChild(option);
|
||||
});
|
||||
break;
|
||||
|
||||
default:
|
||||
input = document.createElement('input');
|
||||
input.type = field.type.toLowerCase();
|
||||
input.value = field.value;
|
||||
break;
|
||||
}
|
||||
|
||||
input.id = field.key;
|
||||
input.name = field.key;
|
||||
if (field.readOnly) input.readOnly = true;
|
||||
if (field.type == "Checkbox" || field.type == "RadioButton" || field.type == "Switch") {
|
||||
|
||||
} else {
|
||||
if (field.required) input.required = true;
|
||||
input.classList.add('form-control');
|
||||
if (field.placeholder) input.placeholder = field.placeholder;
|
||||
}
|
||||
return input;
|
||||
}
|
||||
|
||||
function createCheckboxOrRadioGroup(field) {
|
||||
const wrapper = document.createDocumentFragment();
|
||||
|
||||
field.items.forEach(item => {
|
||||
const inputWrapper = document.createElement('div');
|
||||
inputWrapper.classList.add('form-check');
|
||||
|
||||
const input = document.createElement('input');
|
||||
input.type = field.type === "Checkbox" ? 'checkbox' : 'radio';
|
||||
input.classList.add('form-check-input');
|
||||
input.id = `${field.key}_${item.value}`;
|
||||
input.name = field.key; // Grouping by name for radio buttons
|
||||
input.value = item.value;
|
||||
input.checked = field.value === item.value;
|
||||
|
||||
const itemLabel = document.createElement('label');
|
||||
itemLabel.classList.add('form-check-label');
|
||||
itemLabel.setAttribute('for', input.id);
|
||||
itemLabel.textContent = item.label;
|
||||
|
||||
inputWrapper.appendChild(input);
|
||||
inputWrapper.appendChild(itemLabel);
|
||||
wrapper.appendChild(inputWrapper);
|
||||
});
|
||||
|
||||
return wrapper;
|
||||
}
|
||||
|
||||
function createSwitchElement(field) {
|
||||
const switchWrapper = document.createElement('div');
|
||||
switchWrapper.classList.add('form-check', 'form-switch');
|
||||
|
||||
const input = document.createElement('input');
|
||||
input.type = 'checkbox';
|
||||
input.classList.add('form-check-input');
|
||||
input.setAttribute('role', 'switch');
|
||||
input.id = field.key;
|
||||
input.checked = field.value === "true";
|
||||
|
||||
const label = document.createElement('label');
|
||||
label.classList.add('form-check-label');
|
||||
label.setAttribute('for', field.key);
|
||||
label.textContent = field.label;
|
||||
|
||||
switchWrapper.appendChild(input);
|
||||
switchWrapper.appendChild(label);
|
||||
|
||||
return switchWrapper;
|
||||
}
|
||||
|
||||
function createButtonGroup(json, submitAction, cancelAction, stopAction) {
|
||||
const buttonGroup = document.createElement('div');
|
||||
buttonGroup.classList.add('btn-group');
|
||||
|
||||
const cancelButton = document.createElement('button');
|
||||
cancelButton.textContent = "Cancel";
|
||||
cancelButton.classList.add('btn', 'btn-secondary');
|
||||
cancelButton.addEventListener('click', cancelAction);
|
||||
buttonGroup.appendChild(cancelButton);
|
||||
if (stopAction != undefined) {
|
||||
const stopButton = document.createElement('button');
|
||||
stopButton.textContent = "Stop";
|
||||
stopButton.classList.add('btn', 'btn-danger');
|
||||
stopButton.addEventListener('click', stopAction);
|
||||
buttonGroup.appendChild(stopButton);
|
||||
}
|
||||
|
||||
if (json.buttonMode === "SubmitCancel") {
|
||||
const submitButton = document.createElement('button');
|
||||
submitButton.textContent = "Submit";
|
||||
submitButton.classList.add('btn', 'btn-primary');
|
||||
submitButton.addEventListener('click', submitAction);
|
||||
buttonGroup.appendChild(submitButton);
|
||||
}
|
||||
|
||||
|
||||
return buttonGroup;
|
||||
}
|
||||
|
||||
|
||||
module.exports = { renderForm };
|
||||
1221
extension/html/rpc/hiddify_grpc_web_pb.js
Normal file
1221
extension/html/rpc/hiddify_grpc_web_pb.js
Normal file
File diff suppressed because it is too large
Load Diff
5393
extension/html/rpc/hiddify_pb.js
Normal file
5393
extension/html/rpc/hiddify_pb.js
Normal file
File diff suppressed because it is too large
Load Diff
42
extension/ui_elements/abstract.go
Normal file
42
extension/ui_elements/abstract.go
Normal file
@@ -0,0 +1,42 @@
|
||||
package ui_elements
|
||||
|
||||
// // Field is an interface that all specific field types implement.
|
||||
// type Field interface {
|
||||
// GetType() string
|
||||
// }
|
||||
|
||||
// // GenericField holds common field properties.
|
||||
// const (
|
||||
// Select string = "Select"
|
||||
// Email string = "Email"
|
||||
// Input string = "Input"
|
||||
// Password string = "Password"
|
||||
// TextArea string = "TextArea"
|
||||
// Switch string = "Switch"
|
||||
// Checkbox string = "Checkbox"
|
||||
// RadioButton string = "RadioButton"
|
||||
// DigitsOnly string = "digitsOnly"
|
||||
// )
|
||||
|
||||
// // FormField extends GenericField with additional common properties.
|
||||
// type FormField struct {
|
||||
// Key string `json:"key"`
|
||||
// Type string `json:"type"`
|
||||
// Label string `json:"label,omitempty"`
|
||||
// LabelHidden bool `json:"labelHidden"`
|
||||
// Required bool `json:"required,omitempty"`
|
||||
// Placeholder string `json:"placeholder,omitempty"`
|
||||
// Readonly bool `json:"readonly,omitempty"`
|
||||
// Value string `json:"value"`
|
||||
// Validator string `json:"validator,omitempty"`
|
||||
// Items []SelectItem `json:"items,omitempty"`
|
||||
// Lines int `json:"lines,omitempty"`
|
||||
// VerticalScroll bool `json:"verticalScroll,omitempty"`
|
||||
// HorizontalScroll bool `json:"horizontalScroll,omitempty"`
|
||||
// Monospace bool `json:"monospace,omitempty"`
|
||||
// }
|
||||
|
||||
// // GetType returns the type of the field.
|
||||
// func (gf FormField) GetType() string {
|
||||
// return gf.Type
|
||||
// }
|
||||
75
extension/ui_elements/all_test.go
Normal file
75
extension/ui_elements/all_test.go
Normal file
@@ -0,0 +1,75 @@
|
||||
package ui_elements
|
||||
|
||||
// import (
|
||||
// "encoding/json"
|
||||
// "testing"
|
||||
// )
|
||||
|
||||
// // Test UnmarshalJSON for different field types
|
||||
// func TestFormUnmarshalJSON(t *testing.T) {
|
||||
// formJSON := `{
|
||||
// "title": "Form Example",
|
||||
// "description": "This is a sample form.",
|
||||
// "fields": [
|
||||
// {
|
||||
// "key": "inputKey",
|
||||
// "type": "Input",
|
||||
// "label": "Hi Group",
|
||||
// "placeholder": "Hi Group flutter",
|
||||
// "required": true,
|
||||
// "value": "D"
|
||||
// },
|
||||
// {
|
||||
// "key": "passwordKey",
|
||||
// "type": "Password",
|
||||
// "label": "Password",
|
||||
// "required": true,
|
||||
// "value": "secret"
|
||||
// },
|
||||
// {
|
||||
// "key": "emailKey",
|
||||
// "type": "Email",
|
||||
// "label": "Email Label",
|
||||
// "placeholder": "Enter your email",
|
||||
// "required": true,
|
||||
// "value": "example@example.com"
|
||||
// }
|
||||
// ]
|
||||
// }`
|
||||
|
||||
// var form Form
|
||||
// err := json.Unmarshal([]byte(formJSON), &form)
|
||||
// if err != nil {
|
||||
// t.Fatalf("Error unmarshaling form JSON: %v", err)
|
||||
// }
|
||||
|
||||
// if form.Title != "Form Example" {
|
||||
// t.Errorf("Expected Title to be 'Form Example', got '%s'", form.Title)
|
||||
// }
|
||||
// if form.Description != "This is a sample form." {
|
||||
// t.Errorf("Expected Description to be 'This is a sample form.', got '%s'", form.Description)
|
||||
// }
|
||||
|
||||
// if len(form.Fields) != 3 {
|
||||
// t.Fatalf("Expected 3 fields, got %d", len(form.Fields))
|
||||
// }
|
||||
|
||||
// for i, field := range form.Fields {
|
||||
// switch f := field.(type) {
|
||||
// case InputField:
|
||||
// if f.Type != "Input" {
|
||||
// t.Errorf("Field %d: Expected Type to be 'Input', got '%s'", i+1, f.Type)
|
||||
// }
|
||||
// case PasswordField:
|
||||
// if f.Type != "Password" {
|
||||
// t.Errorf("Field %d: Expected Type to be 'Password', got '%s'", i+1, f.Type)
|
||||
// }
|
||||
// case EmailField:
|
||||
// if f.Type != "Email" {
|
||||
// t.Errorf("Field %d: Expected Type to be 'Email', got '%s'", i+1, f.Type)
|
||||
// }
|
||||
// default:
|
||||
// t.Errorf("Field %d: Unexpected field type %T", i+1, f)
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
84
extension/ui_elements/base.go
Normal file
84
extension/ui_elements/base.go
Normal file
@@ -0,0 +1,84 @@
|
||||
package ui_elements
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// Field is an interface that all specific field types implement.
|
||||
type Field interface {
|
||||
GetType() string
|
||||
}
|
||||
|
||||
// GenericField holds common field properties.
|
||||
const (
|
||||
FieldSelect string = "Select"
|
||||
FieldEmail string = "Email"
|
||||
FieldInput string = "Input"
|
||||
FieldPassword string = "Password"
|
||||
FieldTextArea string = "TextArea"
|
||||
FieldSwitch string = "Switch"
|
||||
FieldCheckbox string = "Checkbox"
|
||||
FieldRadioButton string = "RadioButton"
|
||||
ValidatorDigitsOnly string = "digitsOnly"
|
||||
Button_SubmitCancel string = "SubmitCancel"
|
||||
Button_Cancel string = "Cancel"
|
||||
)
|
||||
|
||||
// FormField extends GenericField with additional common properties.
|
||||
type FormField struct {
|
||||
Key string `json:"key"`
|
||||
Type string `json:"type"`
|
||||
Label string `json:"label,omitempty"`
|
||||
LabelHidden bool `json:"labelHidden"`
|
||||
Required bool `json:"required,omitempty"`
|
||||
Placeholder string `json:"placeholder,omitempty"`
|
||||
Readonly bool `json:"readonly,omitempty"`
|
||||
Value string `json:"value"`
|
||||
Validator string `json:"validator,omitempty"`
|
||||
Items []SelectItem `json:"items,omitempty"`
|
||||
Lines int `json:"lines,omitempty"`
|
||||
VerticalScroll bool `json:"verticalScroll,omitempty"`
|
||||
HorizontalScroll bool `json:"horizontalScroll,omitempty"`
|
||||
Monospace bool `json:"monospace,omitempty"`
|
||||
}
|
||||
|
||||
// GetType returns the type of the field.
|
||||
func (gf FormField) GetType() string {
|
||||
return gf.Type
|
||||
}
|
||||
|
||||
type InputField struct {
|
||||
FormField
|
||||
Validator string `json:"validator,omitempty"`
|
||||
}
|
||||
|
||||
type SelectItem struct {
|
||||
Label string `json:"label"`
|
||||
Value string `json:"value"`
|
||||
}
|
||||
|
||||
type Form struct {
|
||||
Title string `json:"title"`
|
||||
Description string `json:"description"`
|
||||
Fields []FormField `json:"fields"`
|
||||
ButtonMode string `json:"buttonMode"`
|
||||
}
|
||||
|
||||
func (f *Form) ToJSON() string {
|
||||
formJson, err := json.MarshalIndent(f, "", " ")
|
||||
if err != nil {
|
||||
fmt.Println("Error encoding to JSON:", err)
|
||||
return ""
|
||||
}
|
||||
return (string(formJson))
|
||||
}
|
||||
|
||||
// UnmarshalJSON custom unmarshals JSON data into a Form.
|
||||
func (f *Form) UnmarshalJSON(data []byte) error {
|
||||
if err := json.Unmarshal(data, &f); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
25
extension/ui_elements/content.go
Normal file
25
extension/ui_elements/content.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package ui_elements
|
||||
|
||||
// // ContentField represents a label with additional properties.
|
||||
// type ContentField struct {
|
||||
// GenericField
|
||||
// Lines int `json:"lines,omitempty"`
|
||||
// VerticalScroll bool `json:"verticalScroll,omitempty"`
|
||||
// HorizontalScroll bool `json:"horizontalScroll,omitempty"`
|
||||
// Monospace bool `json:"monospace,omitempty"`
|
||||
// }
|
||||
|
||||
// // NewContentField creates a new ContentField.
|
||||
// func NewContentField(key, label string, lines int, monospace, horizontalScroll, verticalScroll bool) ContentField {
|
||||
// return ContentField{
|
||||
// GenericField: GenericField{
|
||||
// Key: key,
|
||||
// Type: "Content",
|
||||
// Label: label,
|
||||
// },
|
||||
// Lines: lines,
|
||||
// VerticalScroll: verticalScroll,
|
||||
// HorizontalScroll: horizontalScroll,
|
||||
// Monospace: monospace,
|
||||
// }
|
||||
// }
|
||||
244
extension/ui_elements/form.go
Normal file
244
extension/ui_elements/form.go
Normal file
@@ -0,0 +1,244 @@
|
||||
package ui_elements
|
||||
|
||||
// import (
|
||||
// "encoding/json"
|
||||
// "fmt"
|
||||
// )
|
||||
|
||||
// // InputField represents a text input field.
|
||||
// type InputField struct {
|
||||
// FormField
|
||||
// Validator string `json:"validator,omitempty"`
|
||||
|
||||
// }
|
||||
|
||||
// // // NewInputField creates a new InputField.
|
||||
// // func NewInputField(key, label, placeholder string, required bool, value string) InputField {
|
||||
// // return InputField{
|
||||
// // FormField: FormField{
|
||||
// // GenericField: GenericField{
|
||||
// // Key: key,
|
||||
// // Type: "Input",
|
||||
// // Label: label,
|
||||
// // },
|
||||
// // Placeholder: placeholder,
|
||||
// // Required: required,
|
||||
// // Value: value,
|
||||
// // },
|
||||
// // }
|
||||
// // }
|
||||
|
||||
// // // PasswordField represents a password field.
|
||||
// // type PasswordField struct {
|
||||
// // FormField
|
||||
// // }
|
||||
|
||||
// // // NewPasswordField creates a new PasswordField.
|
||||
// // func NewPasswordField(key, label string, required bool, value string) PasswordField {
|
||||
// // return PasswordField{
|
||||
// // FormField: FormField{
|
||||
// // GenericField: GenericField{
|
||||
// // Key: key,
|
||||
// // Type: "Password",
|
||||
// // Label: label,
|
||||
// // },
|
||||
// // Required: required,
|
||||
// // Value: value,
|
||||
// // },
|
||||
// // }
|
||||
// // }
|
||||
|
||||
// // // EmailField represents an email field.
|
||||
// // type EmailField struct {
|
||||
// // FormField
|
||||
// // }
|
||||
|
||||
// // // NewEmailField creates a new EmailField.
|
||||
// // func NewEmailField(key, label, placeholder string, required bool, value string) EmailField {
|
||||
// // return EmailField{
|
||||
// // FormField: FormField{
|
||||
// // GenericField: GenericField{
|
||||
// // Key: key,
|
||||
// // Type: "Email",
|
||||
// // Label: label,
|
||||
// // },
|
||||
// // Placeholder: placeholder,
|
||||
// // Required: required,
|
||||
// // Value: value,
|
||||
// // },
|
||||
// // }
|
||||
// // }
|
||||
|
||||
// // // TextAreaField represents a multi-line text area field.
|
||||
// // type TextAreaField struct {
|
||||
// // FormField
|
||||
// // }
|
||||
|
||||
// // // NewTextAreaField creates a new TextAreaField.
|
||||
// // func NewTextAreaField(key, label, placeholder string, required bool, value string) TextAreaField {
|
||||
// // return TextAreaField{
|
||||
// // FormField: FormField{
|
||||
// // GenericField: GenericField{
|
||||
// // Key: key,
|
||||
// // Type: "TextArea",
|
||||
// // Label: label,
|
||||
// // },
|
||||
// // Placeholder: placeholder,
|
||||
// // Required: required,
|
||||
// // Value: value,
|
||||
// // },
|
||||
// // }
|
||||
// // }
|
||||
|
||||
// // // SelectField represents a dropdown selection field.
|
||||
// // type SelectField struct {
|
||||
// // FormField
|
||||
// // Items []SelectItem `json:"items"`
|
||||
// // }
|
||||
|
||||
// // // SelectItem represents an item in a dropdown.
|
||||
// type SelectItem struct {
|
||||
// Label string `json:"label"`
|
||||
// Value string `json:"value"`
|
||||
// }
|
||||
|
||||
// // // NewSelectField creates a new SelectField.
|
||||
// // func NewSelectField(key, label, value string, items []SelectItem) SelectField {
|
||||
// // return SelectField{
|
||||
// // FormField: FormField{
|
||||
// // GenericField: GenericField{
|
||||
// // Key: key,
|
||||
// // Type: "Select",
|
||||
// // Label: label,
|
||||
// // },
|
||||
// // Value: value,
|
||||
// // },
|
||||
// // Items: items,
|
||||
// // }
|
||||
// // }
|
||||
|
||||
// // Form represents a collection of fields with metadata.
|
||||
// type Form struct {
|
||||
// Title string `json:"title"`
|
||||
// Description string `json:"description"`
|
||||
// Fields []FormField `json:"fields"`
|
||||
// }
|
||||
|
||||
// func (f *Form) ToJSON() string {
|
||||
// formJson, err := json.MarshalIndent(f, "", " ")
|
||||
// if err != nil {
|
||||
// fmt.Println("Error encoding to JSON:", err)
|
||||
// return ""
|
||||
// }
|
||||
// return (string(formJson))
|
||||
// }
|
||||
|
||||
// // UnmarshalJSON custom unmarshals JSON data into a Form.
|
||||
// func (f *Form) UnmarshalJSON(data []byte) error {
|
||||
// if err := json.Unmarshal(data, &f); err != nil {
|
||||
// return err
|
||||
// }
|
||||
|
||||
// // f.Title = raw.Title
|
||||
// // f.Description = raw.Description
|
||||
|
||||
// // for _, fieldData := range raw.Fields {
|
||||
// // var base FormField
|
||||
// // if err := json.Unmarshal(fieldData, &base); err != nil {
|
||||
// // return err
|
||||
// // }
|
||||
|
||||
// // var field Field
|
||||
// // switch base.Type {
|
||||
// // case "Input":
|
||||
// // var inputField InputField
|
||||
// // if err := json.Unmarshal(fieldData, &inputField); err != nil {
|
||||
// // return err
|
||||
// // }
|
||||
// // field = inputField
|
||||
// // case "Password":
|
||||
// // var passwordField PasswordField
|
||||
// // if err := json.Unmarshal(fieldData, &passwordField); err != nil {
|
||||
// // return err
|
||||
// // }
|
||||
// // field = passwordField
|
||||
// // case "Email":
|
||||
// // var emailField EmailField
|
||||
// // if err := json.Unmarshal(fieldData, &emailField); err != nil {
|
||||
// // return err
|
||||
// // }
|
||||
// // field = emailField
|
||||
// // case "TextArea":
|
||||
// // var textAreaField TextAreaField
|
||||
// // if err := json.Unmarshal(fieldData, &textAreaField); err != nil {
|
||||
// // return err
|
||||
// // }
|
||||
// // field = textAreaField
|
||||
// // case "Select":
|
||||
// // var selectField SelectField
|
||||
// // if err := json.Unmarshal(fieldData, &selectField); err != nil {
|
||||
// // return err
|
||||
// // }
|
||||
// // field = selectField
|
||||
// // case "Content":
|
||||
// // var contentField ContentField
|
||||
// // if err := json.Unmarshal(fieldData, &contentField); err != nil {
|
||||
// // return err
|
||||
// // }
|
||||
// // field = contentField
|
||||
// // default:
|
||||
// // return fmt.Errorf("unsupported field type: %s", base.Type)
|
||||
// // }
|
||||
|
||||
// // f.Fields = append(f.Fields, field)
|
||||
// // }
|
||||
|
||||
// return nil
|
||||
// }
|
||||
|
||||
// // func main() {
|
||||
// // // Example form JSON
|
||||
// // formJSON := `{
|
||||
// // "title": "Form Example",
|
||||
// // "description": "",
|
||||
// // "fields": [
|
||||
// // {
|
||||
// // "key": "inputKey",
|
||||
// // "type": "Input",
|
||||
// // "label": "Hi Group",
|
||||
// // "placeholder": "Hi Group flutter",
|
||||
// // "required": true,
|
||||
// // "value": "D"
|
||||
// // },
|
||||
// // {
|
||||
// // "key": "passwordKey",
|
||||
// // "type": "Password",
|
||||
// // "label": "Password",
|
||||
// // "required": true,
|
||||
// // "value": "secret"
|
||||
// // },
|
||||
// // {
|
||||
// // "key": "emailKey",
|
||||
// // "type": "Email",
|
||||
// // "label": "Email Label",
|
||||
// // "placeholder": "Enter your email",
|
||||
// // "required": true,
|
||||
// // "value": "example@example.com"
|
||||
// // }
|
||||
// // ]
|
||||
// // }`
|
||||
|
||||
// // var form Form
|
||||
|
||||
// // // Decode the form JSON
|
||||
// // if err := json.Unmarshal([]byte(formJSON), &form); err != nil {
|
||||
// // fmt.Println("Error decoding form:", err)
|
||||
// // return
|
||||
// // }
|
||||
|
||||
// // // Print decoded form fields
|
||||
// // fmt.Println("Form Title:", form.Title)
|
||||
// // for i, field := range form.Fields {
|
||||
// // fmt.Printf("Field %d: %T\n", i+1, field)
|
||||
// // }
|
||||
// // }
|
||||
279
extension_repository/example.go
Normal file
279
extension_repository/example.go
Normal file
@@ -0,0 +1,279 @@
|
||||
package extension_repository
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
ex "github.com/hiddify/hiddify-core/extension"
|
||||
ui "github.com/hiddify/hiddify-core/extension/ui_elements"
|
||||
)
|
||||
|
||||
// Field name constants
|
||||
const (
|
||||
CountKey = "countKey"
|
||||
InputKey = "inputKey"
|
||||
PasswordKey = "passwordKey"
|
||||
EmailKey = "emailKey"
|
||||
SelectKey = "selectKey"
|
||||
TextAreaKey = "textareaKey"
|
||||
SwitchKey = "switchKey"
|
||||
CheckboxKey = "checkboxKey"
|
||||
RadioboxKey = "radioboxKey"
|
||||
ContentKey = "contentKey"
|
||||
)
|
||||
|
||||
type ExampleExtension struct {
|
||||
ex.BaseExtension
|
||||
cancel context.CancelFunc
|
||||
input string
|
||||
password string
|
||||
email string
|
||||
selected bool
|
||||
textarea string
|
||||
switchVal bool
|
||||
// checkbox string
|
||||
radiobox string
|
||||
content string
|
||||
|
||||
count int
|
||||
}
|
||||
|
||||
func NewExampleExtension() ex.Extension {
|
||||
return &ExampleExtension{
|
||||
input: "default",
|
||||
password: "123456",
|
||||
email: "app@hiddify.com",
|
||||
selected: false,
|
||||
textarea: "area",
|
||||
switchVal: true,
|
||||
// checkbox: "B",
|
||||
radiobox: "A",
|
||||
content: "Welcome to Example Extension",
|
||||
count: 10,
|
||||
}
|
||||
}
|
||||
|
||||
func (e *ExampleExtension) GetId() string {
|
||||
return "example"
|
||||
}
|
||||
|
||||
func (e *ExampleExtension) GetTitle() string {
|
||||
return "Example Extension"
|
||||
}
|
||||
|
||||
func (e *ExampleExtension) GetDescription() string {
|
||||
return "This is a sample extension."
|
||||
}
|
||||
|
||||
func (e *ExampleExtension) GetUI() ui.Form {
|
||||
// e.setFormData(data)
|
||||
return e.buildForm()
|
||||
}
|
||||
|
||||
func (e *ExampleExtension) setFormData(data map[string]string) error {
|
||||
if val, ok := data[CountKey]; ok {
|
||||
if intValue, err := strconv.Atoi(val); err == nil {
|
||||
e.count = intValue
|
||||
} else {
|
||||
return err
|
||||
}
|
||||
}
|
||||
if val, ok := data[InputKey]; ok {
|
||||
e.input = val
|
||||
}
|
||||
if val, ok := data[PasswordKey]; ok {
|
||||
e.password = val
|
||||
}
|
||||
if val, ok := data[EmailKey]; ok {
|
||||
e.email = val
|
||||
}
|
||||
if val, ok := data[SelectKey]; ok {
|
||||
if selectedValue, err := strconv.ParseBool(val); err == nil {
|
||||
e.selected = selectedValue
|
||||
} else {
|
||||
return err
|
||||
}
|
||||
}
|
||||
if val, ok := data[TextAreaKey]; ok {
|
||||
e.textarea = val
|
||||
}
|
||||
if val, ok := data[SwitchKey]; ok {
|
||||
if selectedValue, err := strconv.ParseBool(val); err == nil {
|
||||
e.switchVal = selectedValue
|
||||
} else {
|
||||
return err
|
||||
}
|
||||
}
|
||||
// if val, ok := data[CheckboxKey]; ok {
|
||||
// e.checkbox = val
|
||||
// }
|
||||
if val, ok := data[ContentKey]; ok {
|
||||
e.content = val
|
||||
}
|
||||
if val, ok := data[RadioboxKey]; ok {
|
||||
e.radiobox = val
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *ExampleExtension) buildForm() ui.Form {
|
||||
return ui.Form{
|
||||
Title: "Example Form",
|
||||
Description: "This is a sample form.",
|
||||
ButtonMode: ui.Button_SubmitCancel,
|
||||
Fields: []ui.FormField{
|
||||
{
|
||||
Type: ui.FieldInput,
|
||||
Key: CountKey,
|
||||
Label: "Count",
|
||||
Placeholder: "This will be the count",
|
||||
Required: true,
|
||||
Value: fmt.Sprintf("%d", e.count),
|
||||
Validator: ui.ValidatorDigitsOnly,
|
||||
},
|
||||
{
|
||||
Type: ui.FieldInput,
|
||||
Key: InputKey,
|
||||
Label: "Hi Group",
|
||||
Placeholder: "Hi Group flutter",
|
||||
Required: true,
|
||||
Value: e.input,
|
||||
},
|
||||
{
|
||||
Type: ui.FieldPassword,
|
||||
Key: PasswordKey,
|
||||
Label: "Password",
|
||||
Required: true,
|
||||
Value: e.password,
|
||||
},
|
||||
{
|
||||
Type: ui.FieldEmail,
|
||||
Key: EmailKey,
|
||||
Label: "Email Label",
|
||||
Placeholder: "Enter your email",
|
||||
Required: true,
|
||||
Value: e.email,
|
||||
},
|
||||
{
|
||||
Type: ui.FieldSwitch,
|
||||
Key: SelectKey,
|
||||
Label: "Select Label",
|
||||
Value: strconv.FormatBool(e.selected),
|
||||
},
|
||||
{
|
||||
Type: ui.FieldTextArea,
|
||||
Key: TextAreaKey,
|
||||
Label: "TextArea Label",
|
||||
Placeholder: "Enter your text",
|
||||
Required: true,
|
||||
Value: e.textarea,
|
||||
},
|
||||
{
|
||||
Type: ui.FieldSwitch,
|
||||
Key: SwitchKey,
|
||||
Label: "Switch Label",
|
||||
Value: strconv.FormatBool(e.switchVal),
|
||||
},
|
||||
// {
|
||||
// Type: ui.Checkbox,
|
||||
// Key: CheckboxKey,
|
||||
// Label: "Checkbox Label",
|
||||
// Required: true,
|
||||
// Value: e.checkbox,
|
||||
// Items: []ui.SelectItem{
|
||||
// {
|
||||
// Label: "A",
|
||||
// Value: "A",
|
||||
// },
|
||||
// {
|
||||
// Label: "B",
|
||||
// Value: "B",
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
{
|
||||
Type: ui.FieldRadioButton,
|
||||
Key: RadioboxKey,
|
||||
Label: "Radio Label",
|
||||
Required: true,
|
||||
Value: e.radiobox,
|
||||
Items: []ui.SelectItem{
|
||||
{
|
||||
Label: "A",
|
||||
Value: "A",
|
||||
},
|
||||
{
|
||||
Label: "B",
|
||||
Value: "B",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Type: ui.FieldTextArea,
|
||||
Readonly: true,
|
||||
Key: ContentKey,
|
||||
Label: "Content",
|
||||
Value: e.content,
|
||||
Lines: 10,
|
||||
Monospace: true,
|
||||
HorizontalScroll: true,
|
||||
VerticalScroll: true,
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func (e *ExampleExtension) backgroundTask(ctx context.Context) {
|
||||
i := 1
|
||||
for {
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
e.content = strconv.Itoa(i) + " Background task stop...\n" + e.content
|
||||
e.UpdateUI(e.buildForm())
|
||||
|
||||
fmt.Println("Background task stopped")
|
||||
return
|
||||
case <-time.After(1000 * time.Millisecond):
|
||||
txt := strconv.Itoa(i) + " Background task working..."
|
||||
e.content = txt + "\n" + e.content
|
||||
e.UpdateUI(e.buildForm())
|
||||
fmt.Println(txt)
|
||||
}
|
||||
i++
|
||||
}
|
||||
}
|
||||
|
||||
func (e *ExampleExtension) SubmitData(data map[string]string) error {
|
||||
err := e.setFormData(data)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
e.cancel = cancel
|
||||
|
||||
go e.backgroundTask(ctx)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *ExampleExtension) Cancel() error {
|
||||
if e.cancel != nil {
|
||||
e.cancel()
|
||||
e.cancel = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *ExampleExtension) Stop() error {
|
||||
if e.cancel != nil {
|
||||
e.cancel()
|
||||
e.cancel = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
ex.RegisterExtension("com.example.extension", NewExampleExtension())
|
||||
}
|
||||
11
go.mod
11
go.mod
@@ -6,7 +6,7 @@ toolchain go1.22.3
|
||||
|
||||
require (
|
||||
github.com/bepass-org/warp-plus v0.0.0-00010101000000-000000000000
|
||||
github.com/golang/protobuf v1.5.4
|
||||
github.com/improbable-eng/grpc-web v0.15.0
|
||||
github.com/kardianos/service v1.2.2
|
||||
github.com/sagernet/gomobile v0.1.3
|
||||
github.com/sagernet/sing v0.4.2
|
||||
@@ -20,6 +20,13 @@ require (
|
||||
gopkg.in/yaml.v3 v3.0.1
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/cenkalti/backoff/v4 v4.1.1 // indirect
|
||||
github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect
|
||||
github.com/rs/cors v1.7.0 // indirect
|
||||
nhooyr.io/websocket v1.8.6 // indirect
|
||||
)
|
||||
|
||||
require (
|
||||
berty.tech/go-libtor v1.0.385 // indirect
|
||||
github.com/ajg/form v1.5.1 // indirect
|
||||
@@ -118,7 +125,7 @@ require (
|
||||
lukechampine.com/blake3 v1.3.0 // indirect
|
||||
)
|
||||
|
||||
replace github.com/sagernet/sing-box => github.com/hiddify/hiddify-sing-box v1.8.9-0.20240902030441-17127b0535df
|
||||
replace github.com/sagernet/sing-box => github.com/hiddify/hiddify-sing-box v1.8.9-0.20240908122006-6f1809b87260
|
||||
|
||||
replace github.com/xtls/xray-core => github.com/hiddify/xray-core v0.0.0-20240902024714-0fcb0895bb4b
|
||||
|
||||
|
||||
410
go.sum
410
go.sum
@@ -5,41 +5,96 @@ cloud.google.com/go v0.31.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT
|
||||
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
||||
cloud.google.com/go v0.37.0/go.mod h1:TS1dMSSfndXH133OKGwekG838Om/cQT0BUHV3HcBgoo=
|
||||
dmitri.shuralyov.com/app/changes v0.0.0-20180602232624-0a106ad413e3/go.mod h1:Yl+fi1br7+Rr3LqpNJf1/uxUdtRUV+Tnj0o93V2B9MU=
|
||||
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
|
||||
dmitri.shuralyov.com/html/belt v0.0.0-20180602232347-f7d459c86be0/go.mod h1:JLBrvjyP0v+ecvNYvCpyZgu5/xkfAUhi6wJj28eUfSU=
|
||||
dmitri.shuralyov.com/service/change v0.0.0-20181023043359-a85b471d5412/go.mod h1:a1inKt/atXimZ4Mv927x+r7UpyzRUf4emIoiiSC2TN4=
|
||||
dmitri.shuralyov.com/state v0.0.0-20180228185332-28bcc343414c/go.mod h1:0PRwlb0D6DFvNNtx+9ybjezNCa8XF0xaYcETyp6rHWU=
|
||||
git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg=
|
||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
|
||||
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0=
|
||||
github.com/OmarTariq612/goech v0.0.0-20240405204721-8e2e1dafd3a0 h1:Wo41lDOevRJSGpevP+8Pk5bANX7fJacO2w04aqLiC5I=
|
||||
github.com/OmarTariq612/goech v0.0.0-20240405204721-8e2e1dafd3a0/go.mod h1:FVGavL/QEBQDcBpr3fAojoK17xX5k9bicBphrOpP7uM=
|
||||
github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo=
|
||||
github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI=
|
||||
github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g=
|
||||
github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c=
|
||||
github.com/ajg/form v1.5.1 h1:t9c7v8JUKu/XxOGBU0yjNpaMloxGEJhUkqFRq0ibGeU=
|
||||
github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY=
|
||||
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
|
||||
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
|
||||
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
|
||||
github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
|
||||
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho=
|
||||
github.com/andybalholm/brotli v1.1.0 h1:eLKJA0d02Lf0mVpIDgYnqXcUn0GqVmEFny3VuID1U3M=
|
||||
github.com/andybalholm/brotli v1.1.0/go.mod h1:sms7XGricyQI9K10gOSf56VKKWS4oLer58Q+mhRPtnY=
|
||||
github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c=
|
||||
github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
|
||||
github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
|
||||
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
|
||||
github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=
|
||||
github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
|
||||
github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A=
|
||||
github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU=
|
||||
github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
|
||||
github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g=
|
||||
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
|
||||
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
|
||||
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
|
||||
github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
|
||||
github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBTaaSFSlLx/70C2HPIMNZpVV8+vt/A+FMnYP11g=
|
||||
github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s=
|
||||
github.com/caddyserver/certmagic v0.20.0 h1:bTw7LcEZAh9ucYCRXyCpIrSAGplplI0vGYJ4BpCQ/Fc=
|
||||
github.com/caddyserver/certmagic v0.20.0/go.mod h1:N4sXgpICQUskEWpj7zVzvWD41p3NYacrNoZYiRM2jTg=
|
||||
github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ=
|
||||
github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM=
|
||||
github.com/cenkalti/backoff/v4 v4.1.1 h1:G2HAfAmvm/GcKan2oOQpBXOd2tT2G57ZnZGWa1PxPBQ=
|
||||
github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw=
|
||||
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
||||
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE=
|
||||
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
|
||||
github.com/cloudflare/circl v1.4.0 h1:BV7h5MgrktNzytKmWjpOtdYrf0lkkbF8YMlBGPhJQrY=
|
||||
github.com/cloudflare/circl v1.4.0/go.mod h1:PDRU+oXvdD7KCtgKxW95M5Z8BpSCJXQORiZFnBQS5QU=
|
||||
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
|
||||
github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8=
|
||||
github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI=
|
||||
github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
|
||||
github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
|
||||
github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
|
||||
github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
|
||||
github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
|
||||
github.com/cretz/bine v0.1.0/go.mod h1:6PF6fWAvYtwjRGkAuDEJeWNOv3a2hUouSP/yRYXmvHw=
|
||||
github.com/cretz/bine v0.2.0 h1:8GiDRGlTgz+o8H9DSnsl+5MeBK4HsExxgl6WgzOCuZo=
|
||||
github.com/cretz/bine v0.2.0/go.mod h1:WU4o9QR9wWp8AVKtTM1XD5vUHkEqnf2vVSo6dBqbetI=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I=
|
||||
github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE=
|
||||
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
|
||||
github.com/dgryski/go-metro v0.0.0-20200812162917-85c65e2d0165/go.mod h1:c9O8+fpSOX1DM8cPNSkX/qsBWdkD4yd2dpciOWQjpBw=
|
||||
github.com/dgryski/go-metro v0.0.0-20211217172704-adc40b04c140 h1:y7y0Oa6UawqTFPCDw9JG6pdKt4F9pAhHv0B7FMGaGD0=
|
||||
github.com/dgryski/go-metro v0.0.0-20211217172704-adc40b04c140/go.mod h1:c9O8+fpSOX1DM8cPNSkX/qsBWdkD4yd2dpciOWQjpBw=
|
||||
github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
|
||||
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
|
||||
github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs=
|
||||
github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU=
|
||||
github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I=
|
||||
github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M=
|
||||
github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g=
|
||||
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
|
||||
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
||||
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
|
||||
github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc=
|
||||
github.com/francoispqt/gojay v1.2.13 h1:d2m3sFjloqoIUQU3TsHBgj6qg/BVGlTBeHDUmyJnXKk=
|
||||
github.com/francoispqt/gojay v1.2.13/go.mod h1:ehT5mTG4ua4581f1++1WLG0vPdaA9HaiDsoyrBGkyDY=
|
||||
github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4=
|
||||
github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20=
|
||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||
github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA=
|
||||
github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM=
|
||||
@@ -48,6 +103,10 @@ github.com/gaukas/godicttls v0.0.4/go.mod h1:l6EenT4TLWgTdwslVb4sEMOCf7Bv0JAK67d
|
||||
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
|
||||
github.com/ghodss/yaml v1.0.1-0.20220118164431-d8423dcdf344 h1:Arcl6UOIS/kgO2nW3A65HN+7CMjSDP/gofXL4CZt1V4=
|
||||
github.com/ghodss/yaml v1.0.1-0.20220118164431-d8423dcdf344/go.mod h1:GIjDIg/heH5DOkXY3YJ/wNhfHsQHoXGjl8G8amsYQ1I=
|
||||
github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE=
|
||||
github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=
|
||||
github.com/gin-gonic/gin v1.6.3 h1:ahKqKTFpO5KTPHxWZjEdPScmYaGtLo8Y4DMHoEsnp14=
|
||||
github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M=
|
||||
github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0=
|
||||
github.com/go-chi/chi/v5 v5.0.12 h1:9euLV5sTrTNTRUU9POmDUvfxyj6LAABLUcEWO+JJb4s=
|
||||
github.com/go-chi/chi/v5 v5.0.12/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8=
|
||||
@@ -56,20 +115,45 @@ github.com/go-chi/cors v1.2.1/go.mod h1:sSbTewc+6wYHBBCW7ytsFSn836hqM7JxpglAy2Vz
|
||||
github.com/go-chi/render v1.0.3 h1:AsXqd2a1/INaIfUSKq3G5uA8weYx20FOsM7uSoCyyt4=
|
||||
github.com/go-chi/render v1.0.3/go.mod h1:/gr3hVkmYR0YlEy3LxCuVRFzEu9Ruok+gFqbIofjao0=
|
||||
github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q=
|
||||
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
|
||||
github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
|
||||
github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
|
||||
github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o=
|
||||
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
|
||||
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
|
||||
github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A=
|
||||
github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ=
|
||||
github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
|
||||
github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE=
|
||||
github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78=
|
||||
github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
|
||||
github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q=
|
||||
github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8=
|
||||
github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no=
|
||||
github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA=
|
||||
github.com/go-playground/validator/v10 v10.2.0 h1:KgJ0snyC2R9VXYN2rneOtQcw5aHQB1Vv0sFl1UcHBOY=
|
||||
github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI=
|
||||
github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
|
||||
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
|
||||
github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI=
|
||||
github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8=
|
||||
github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo=
|
||||
github.com/gobwas/httphead v0.1.0 h1:exrUm0f4YX0L7EBwZHuCF4GDp8aJfVeBrlLQrs6NqWU=
|
||||
github.com/gobwas/httphead v0.1.0/go.mod h1:O/RXo79gxV8G+RqlR/otEwx4Q36zl9rqC5u12GKvMCM=
|
||||
github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw=
|
||||
github.com/gobwas/pool v0.2.1 h1:xfeeEhW7pwmX8nuLVlqbzVc7udMDrwetjEv+TZIz1og=
|
||||
github.com/gobwas/pool v0.2.1/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw=
|
||||
github.com/gobwas/ws v1.0.2 h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo=
|
||||
github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM=
|
||||
github.com/gofrs/uuid/v5 v5.2.0 h1:qw1GMx6/y8vhVsx626ImfKMuS5CvJmhIKKtuyvfajMM=
|
||||
github.com/gofrs/uuid/v5 v5.2.0/go.mod h1:CDOjlDMVAtN56jqyRUZh58JT31Tiw7/oQyEXZV+9bD8=
|
||||
github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s=
|
||||
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
||||
github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
||||
github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
|
||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
|
||||
github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/golang/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E=
|
||||
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
||||
github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
||||
@@ -77,31 +161,80 @@ github.com/golang/mock v1.7.0-rc.1 h1:YojYx61/OLFsiv6Rw1Z96LpldJIy31o+UHmwAUMJ6/
|
||||
github.com/golang/mock v1.7.0-rc.1/go.mod h1:s42URUywIqd+OcERslBJvOjepvNymP31m3q8d/GkuRs=
|
||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
|
||||
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
|
||||
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
|
||||
github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk=
|
||||
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
|
||||
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
|
||||
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
|
||||
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.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
|
||||
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
|
||||
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
||||
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||
github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU=
|
||||
github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4=
|
||||
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.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.5.0/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/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ=
|
||||
github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck=
|
||||
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
|
||||
github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
|
||||
github.com/google/pprof v0.0.0-20240528025155-186aa0362fba h1:ql1qNgCyOB7iAEk8JTNM+zJrgIbnyCKX/wdlyPufP5g=
|
||||
github.com/google/pprof v0.0.0-20240528025155-186aa0362fba/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo=
|
||||
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
|
||||
github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/googleapis/gax-go v2.0.0+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY=
|
||||
github.com/googleapis/gax-go/v2 v2.0.3/go.mod h1:LLvjysVCY1JZeum8Z6l8qUty8fiNwE08qbEPm1M08qg=
|
||||
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
|
||||
github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg=
|
||||
github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
|
||||
github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
|
||||
github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
|
||||
github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||
github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg=
|
||||
github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA=
|
||||
github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
|
||||
github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI=
|
||||
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.5.0/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw=
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
|
||||
github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE=
|
||||
github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8=
|
||||
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
|
||||
github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
|
||||
github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
|
||||
github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM=
|
||||
github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=
|
||||
github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU=
|
||||
github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU=
|
||||
github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4=
|
||||
github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
|
||||
github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
|
||||
github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
|
||||
github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90=
|
||||
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||
github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=
|
||||
github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ=
|
||||
github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I=
|
||||
github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc=
|
||||
github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE=
|
||||
github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ=
|
||||
github.com/hiddify/hiddify-sing-box v1.8.9-0.20240902030441-17127b0535df h1:fTJfKrlInpYi8duVSqW8YdxgsGDzgisxYD6OMLtG+Hs=
|
||||
github.com/hiddify/hiddify-sing-box v1.8.9-0.20240902030441-17127b0535df/go.mod h1:6+uKh2mjUECXVS//CnV8FIHOCHm0q/a+ViRDbmeEokI=
|
||||
github.com/hiddify/hiddify-sing-box v1.8.9-0.20240908122006-6f1809b87260 h1:FmoDhBLHNfbRRON1b5ie8GpXksTJxcBJmgpg2ALZ398=
|
||||
github.com/hiddify/hiddify-sing-box v1.8.9-0.20240908122006-6f1809b87260/go.mod h1:6+uKh2mjUECXVS//CnV8FIHOCHm0q/a+ViRDbmeEokI=
|
||||
github.com/hiddify/ray2sing v0.0.0-20240807031953-a9df25615108 h1:LuDOjwO9GwKAnxhMADCnQcjBTnEBp6JdsoPisf192Q4=
|
||||
github.com/hiddify/ray2sing v0.0.0-20240807031953-a9df25615108/go.mod h1:Qp3mFdKsJZ5TwBYLREgWp8n2O6dgmNt3aAoX+xpvnsM=
|
||||
github.com/hiddify/warp-plus v0.0.0-20240717223357-4f3122e0d11d h1:vRGKh9ou+/vQGfVYa8MczhbIVjHxlP52OWwrDWO77RA=
|
||||
@@ -110,32 +243,57 @@ github.com/hiddify/wireguard-go v0.0.0-20240727191222-383c1da14ff1 h1:xdbHlZtzs+
|
||||
github.com/hiddify/wireguard-go v0.0.0-20240727191222-383c1da14ff1/go.mod h1:K4J7/npM+VAMUeUmTa2JaA02JmyheP0GpRBOUvn3ecc=
|
||||
github.com/hiddify/xray-core v0.0.0-20240902024714-0fcb0895bb4b h1:fF9wb8XnL4dk/suRK1cOKPN1x1BG3F5iHN3Aq2mrKaE=
|
||||
github.com/hiddify/xray-core v0.0.0-20240902024714-0fcb0895bb4b/go.mod h1:kYMVgEAXeeoD9I08aS15jLRv4RF88vc1uf8xIjlnskU=
|
||||
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
||||
github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg=
|
||||
github.com/imkira/go-observer/v2 v2.0.0-20230629064422-8e0b61f11f1b h1:1+115FqGoS8p6Iry9AYmrcWDvSveH0F7P2nX1LU00qg=
|
||||
github.com/imkira/go-observer/v2 v2.0.0-20230629064422-8e0b61f11f1b/go.mod h1:XCscqBi1KKh7GcVDDAdkT/Cf6WDjnDAA1XM3nwmA0Ag=
|
||||
github.com/improbable-eng/grpc-web v0.15.0 h1:BN+7z6uNXZ1tQGcNAuaU1YjsLTApzkjt2tzCixLaUPQ=
|
||||
github.com/improbable-eng/grpc-web v0.15.0/go.mod h1:1sy9HKV4Jt9aEs9JSnkWlRJPuPtwNr0l57L4f878wP8=
|
||||
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
|
||||
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
|
||||
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
|
||||
github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo=
|
||||
github.com/insomniacslk/dhcp v0.0.0-20231206064809-8c70d406f6d2 h1:9K06NfxkBh25x56yVhWWlKFE8YpicaSfHwoV8SFbueA=
|
||||
github.com/insomniacslk/dhcp v0.0.0-20231206064809-8c70d406f6d2/go.mod h1:3A9PQ1cunSDF/1rbTq99Ts4pVnycWg+vlPkfeD2NLFI=
|
||||
github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1/go.mod h1:E0B/fFc00Y+Rasa88328GlI/XbtyysCtTHZS8h7IrBU=
|
||||
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
|
||||
github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
|
||||
github.com/josharian/native v1.0.1-0.20221213033349-c1e37c09b531/go.mod h1:7X/raswPFr05uY3HiLlYeyQntB6OO7E/d2Cu7qoaN2w=
|
||||
github.com/josharian/native v1.1.0 h1:uuaP0hAbW7Y4l0ZRQ6C9zfb7Mg1mbFKry/xzDAfmtLA=
|
||||
github.com/josharian/native v1.1.0/go.mod h1:7X/raswPFr05uY3HiLlYeyQntB6OO7E/d2Cu7qoaN2w=
|
||||
github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4=
|
||||
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
|
||||
github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||
github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||
github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||
github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68=
|
||||
github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
|
||||
github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
|
||||
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
|
||||
github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM=
|
||||
github.com/kardianos/service v1.2.2 h1:ZvePhAHfvo0A7Mftk/tEzqEZ7Q4lgnR8sGz4xu1YX60=
|
||||
github.com/kardianos/service v1.2.2/go.mod h1:CIMRFEJVL+0DS1a3Nx06NaMn4Dz63Ng6O7dl0qH0zVM=
|
||||
github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
|
||||
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
||||
github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
|
||||
github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
|
||||
github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU=
|
||||
github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw=
|
||||
github.com/klauspost/cpuid/v2 v2.0.12/go.mod h1:g2LTdtYhdyuGPqyWyv7qRAmj1WBqxuObKfj5c0PQa7c=
|
||||
github.com/klauspost/cpuid/v2 v2.2.7 h1:ZWSB3igEs+d0qvnxR/ZBzXVmxkgt8DdzP6m9pfuVLDM=
|
||||
github.com/klauspost/cpuid/v2 v2.2.7/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
|
||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||
github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y=
|
||||
github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII=
|
||||
github.com/libdns/alidns v1.0.3 h1:LFHuGnbseq5+HCeGa1aW8awyX/4M2psB9962fdD2+yQ=
|
||||
github.com/libdns/alidns v1.0.3/go.mod h1:e18uAG6GanfRhcJj6/tps2rCMzQJaYVcGKT+ELjdjGE=
|
||||
github.com/libdns/cloudflare v0.1.1 h1:FVPfWwP8zZCqj268LZjmkDleXlHPlFU9KC4OJ3yn054=
|
||||
@@ -143,33 +301,87 @@ github.com/libdns/cloudflare v0.1.1/go.mod h1:9VK91idpOjg6v7/WbjkEW49bSCxj00ALes
|
||||
github.com/libdns/libdns v0.2.0/go.mod h1:yQCXzk1lEZmmCPa857bnk4TsOiqYasqpyOEeSObbb40=
|
||||
github.com/libdns/libdns v0.2.2 h1:O6ws7bAfRPaBsgAYt8MDe2HcNBGC29hkZ9MX2eUSX3s=
|
||||
github.com/libdns/libdns v0.2.2/go.mod h1:4Bj9+5CQiNMVGf87wjX4CY3HQJypUHRuLvlsfsZqLWQ=
|
||||
github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM=
|
||||
github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4=
|
||||
github.com/logrusorgru/aurora v2.0.3+incompatible h1:tOpm7WcpBTn4fjmVfgpQq0EfczGlG91VSDkswnjF5A8=
|
||||
github.com/logrusorgru/aurora v2.0.3+incompatible/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4=
|
||||
github.com/lunixbochs/vtclean v1.0.0/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI=
|
||||
github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ=
|
||||
github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
|
||||
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
|
||||
github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
|
||||
github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
|
||||
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
|
||||
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
|
||||
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
|
||||
github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
|
||||
github.com/mholt/acmez v1.2.0 h1:1hhLxSgY5FvH5HCnGUuwbKY2VQVo8IU7rxXKSnZ7F30=
|
||||
github.com/mholt/acmez v1.2.0/go.mod h1:VT9YwH1xgNX1kmYY89gY8xPJC84BFAisjo8Egigt4kE=
|
||||
github.com/microcosm-cc/bluemonday v1.0.1/go.mod h1:hsXNsILzKxV+sX77C5b8FSuKF00vh2OMYv+xgHpAMF4=
|
||||
github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
|
||||
github.com/miekg/dns v1.1.62 h1:cN8OuEF1/x5Rq6Np+h1epln8OiyPWV+lROx9LxcGgIQ=
|
||||
github.com/miekg/dns v1.1.62/go.mod h1:mvDlcItzm+br7MToIKqkglaGhlFMHJ9DTNNWONWXbNQ=
|
||||
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
|
||||
github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
||||
github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=
|
||||
github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg=
|
||||
github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY=
|
||||
github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
||||
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
||||
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
||||
github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI=
|
||||
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
||||
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
|
||||
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU=
|
||||
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
|
||||
github.com/mwitkow/grpc-proxy v0.0.0-20181017164139-0f1106ef9c76/go.mod h1:x5OoJHDHqxHS801UIuhqGl6QdSAEJvtausosHSdazIo=
|
||||
github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg=
|
||||
github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU=
|
||||
github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k=
|
||||
github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w=
|
||||
github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w=
|
||||
github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w=
|
||||
github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c=
|
||||
github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86/go.mod h1:kHJEU3ofeGjhHklVoIGuVj85JJwZ6kWPaJwCIxgnFmo=
|
||||
github.com/neelance/sourcemap v0.0.0-20151028013722-8c68805598ab/go.mod h1:Qr6/a/Q4r9LP1IltGz7tA7iOK1WonHEYhu1HRBA7ZiM=
|
||||
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
|
||||
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
|
||||
github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs=
|
||||
github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA=
|
||||
github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
|
||||
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/ginkgo/v2 v2.19.0 h1:9Cnnf7UHo57Hy3k6/m5k3dRfGTMXGvxhHFvkDTCTpvA=
|
||||
github.com/onsi/ginkgo/v2 v2.19.0/go.mod h1:rlwLi9PilAFJ8jCg9UE1QP6VBpd6/xj3SRC0d6TU0To=
|
||||
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
|
||||
github.com/onsi/gomega v1.33.1 h1:dsYjIxxSR755MDmKVsaFQTE22ChNBcuuTWgkUDSubOk=
|
||||
github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0=
|
||||
github.com/ooni/go-libtor v1.1.8 h1:Wo3V3DVTxl5vZdxtQakqYP+DAHx7pPtAFSl1bnAa08w=
|
||||
github.com/ooni/go-libtor v1.1.8/go.mod h1:q1YyLwRD9GeMyeerVvwc0vJ2YgwDLTp2bdVcrh/JXyI=
|
||||
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk=
|
||||
github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis=
|
||||
github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74=
|
||||
github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
|
||||
github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
|
||||
github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA=
|
||||
github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8=
|
||||
github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw=
|
||||
github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4=
|
||||
github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4=
|
||||
github.com/oschwald/maxminddb-golang v1.12.0 h1:9FnTOD0YOhP7DGxGsq4glzpGy5+w7pq50AS6wALUMYs=
|
||||
github.com/oschwald/maxminddb-golang v1.12.0/go.mod h1:q0Nob5lTCqyQ8WT6FYgS1L7PXKVVbgiymefNwIjPzgY=
|
||||
github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM=
|
||||
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
|
||||
github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k=
|
||||
github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8=
|
||||
github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=
|
||||
github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac=
|
||||
github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc=
|
||||
github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
|
||||
github.com/pierrec/lz4/v4 v4.1.14 h1:+fL8AQEZtz/ijeNnpduH0bROTu0O3NZAlPjQxGn8LwE=
|
||||
github.com/pierrec/lz4/v4 v4.1.14/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4=
|
||||
github.com/pion/dtls/v2 v2.2.7 h1:cSUBsETxepsCSFSxC3mc/aDo14qQLMSL+O6IjG28yV8=
|
||||
@@ -189,25 +401,57 @@ github.com/pion/turn/v3 v3.0.1 h1:wLi7BTQr6/Q20R0vt/lHbjv6y4GChFtC33nkYbasoT8=
|
||||
github.com/pion/turn/v3 v3.0.1/go.mod h1:MrJDKgqryDyWy1/4NT9TWfXWGMC7UHT6pJIv1+gMeNE=
|
||||
github.com/pires/go-proxyproto v0.7.0 h1:IukmRewDQFWC7kfnb66CSomk2q/seBuilHBYFwyq0Hs=
|
||||
github.com/pires/go-proxyproto v0.7.0/go.mod h1:Vz/1JPY/OACxWGQNIRY2BeyDmpoaWmEP40O9LbuiFR4=
|
||||
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
|
||||
github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
|
||||
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
|
||||
github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs=
|
||||
github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
|
||||
github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og=
|
||||
github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M=
|
||||
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
|
||||
github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
|
||||
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||
github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||
github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||
github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=
|
||||
github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
|
||||
github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
|
||||
github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA=
|
||||
github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo=
|
||||
github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s=
|
||||
github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
|
||||
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
|
||||
github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
|
||||
github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
|
||||
github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A=
|
||||
github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
|
||||
github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
|
||||
github.com/quic-go/qpack v0.4.0 h1:Cr9BXA1sQS2SmDUWjSofMPNKmvF6IiIfDRmgU0w1ZCo=
|
||||
github.com/quic-go/qpack v0.4.0/go.mod h1:UZVnYIfi5GRk+zI9UMaCPsmZ2xKJP7XBUvVyT1Knj9A=
|
||||
github.com/quic-go/qtls-go1-20 v0.4.1 h1:D33340mCNDAIKBqXuAvexTNMUByrYmFYVfKfDN5nfFs=
|
||||
github.com/quic-go/qtls-go1-20 v0.4.1/go.mod h1:X9Nh97ZL80Z+bX/gUXMbipO6OxdiDi58b/fMC9mAL+k=
|
||||
github.com/quic-go/quic-go v0.46.0 h1:uuwLClEEyk1DNvchH8uCByQVjo3yKL9opKulExNDs7Y=
|
||||
github.com/quic-go/quic-go v0.46.0/go.mod h1:1dLehS7TIR64+vxGR70GDcatWTOtMX2PUtnKsjbTurI=
|
||||
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
|
||||
github.com/refraction-networking/utls v1.6.7 h1:zVJ7sP1dJx/WtVuITug3qYUq034cDq9B2MR1K67ULZM=
|
||||
github.com/refraction-networking/utls v1.6.7/go.mod h1:BC3O4vQzye5hqpmDTWUqi4P5DDhzJfkV1tdqtawQIH0=
|
||||
github.com/riobard/go-bloom v0.0.0-20200614022211-cdc8013cb5b3 h1:f/FNXud6gA3MNr8meMVVGxhp+QBTqY91tM8HjEuMjGg=
|
||||
github.com/riobard/go-bloom v0.0.0-20200614022211-cdc8013cb5b3/go.mod h1:HgjTstvQsPGkxUsCd2KWxErBblirPizecHcpD3ffK+s=
|
||||
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
|
||||
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
|
||||
github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik=
|
||||
github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU=
|
||||
github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
|
||||
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||
github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
|
||||
github.com/sagernet/bbolt v0.0.0-20231014093535-ea5cb2fe9f0a h1:+NkI2670SQpQWvkkD2QgdTuzQG263YZ+2emfpeyGqW0=
|
||||
github.com/sagernet/bbolt v0.0.0-20231014093535-ea5cb2fe9f0a/go.mod h1:63s7jpZqcDAIpj8oI/1v4Izok+npJOHACFCU6+huCkM=
|
||||
github.com/sagernet/cloudflare-tls v0.0.0-20231208171750-a4483c1b7cd1 h1:YbmpqPQEMdlk9oFSKYWRqVuu9qzNiOayIonKmv1gCXY=
|
||||
@@ -249,6 +493,8 @@ github.com/sagernet/utls v1.5.4 h1:KmsEGbB2dKUtCNC+44NwAdNAqnqQ6GA4pTO0Yik56co=
|
||||
github.com/sagernet/utls v1.5.4/go.mod h1:CTGxPWExIloRipK3XFpYv0OVyhO8kk3XCGW/ieyTh1s=
|
||||
github.com/sagernet/ws v0.0.0-20231204124109-acfe8907c854 h1:6uUiZcDRnZSAegryaUGwPC/Fj13JSHwiTftrXhMmYOc=
|
||||
github.com/sagernet/ws v0.0.0-20231204124109-acfe8907c854/go.mod h1:LtfoSK3+NG57tvnVEHgcuBW9ujgE8enPSgzgwStwCAA=
|
||||
github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E=
|
||||
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=
|
||||
github.com/seiflotfy/cuckoofilter v0.0.0-20240715131351-a2f2c23f1771 h1:emzAzMZ1L9iaKCTxdy3Em8Wv4ChIAGnfiz18Cda70g4=
|
||||
github.com/seiflotfy/cuckoofilter v0.0.0-20240715131351-a2f2c23f1771/go.mod h1:bR6DqgcAl1zTcOX8/pE2Qkj9XO00eCNqmKb7lXP8EAg=
|
||||
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
|
||||
@@ -272,19 +518,35 @@ github.com/shurcooL/notifications v0.0.0-20181007000457-627ab5aea122/go.mod h1:b
|
||||
github.com/shurcooL/octicon v0.0.0-20181028054416-fa4f57f9efb2/go.mod h1:eWdoE5JD4R5UVWDucdOPg1g2fqQRq78IQa9zlOV1vpQ=
|
||||
github.com/shurcooL/reactions v0.0.0-20181006231557-f2e0b4ca5b82/go.mod h1:TCR1lToEk4d2s07G3XGfz2QrgHXg4RJBvjrOozvoWfk=
|
||||
github.com/shurcooL/sanitized_anchor_name v0.0.0-20170918181015-86672fcb3f95/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
|
||||
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
|
||||
github.com/shurcooL/users v0.0.0-20180125191416-49c67e49c537/go.mod h1:QJTqeLYEDaXHZDBsXlPCDqdhQuJkuw4NOtaxYe3xii4=
|
||||
github.com/shurcooL/webdavfs v0.0.0-20170829043945-18c3829fa133/go.mod h1:hKmq5kWdCj2z2KEozexVbfEZIWiTjhE0+UjmZgPqehw=
|
||||
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
|
||||
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
|
||||
github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88=
|
||||
github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
|
||||
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
|
||||
github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
|
||||
github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
|
||||
github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY=
|
||||
github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d/go.mod h1:UdhH50NIW0fCiwBSr0co2m7BnFLdv4fQTgdqdJTHFeE=
|
||||
github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e/go.mod h1:HuIsMU8RRBOtsCgI77wP899iHVBQpCmg4ErYMZB+2IA=
|
||||
github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
|
||||
github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0=
|
||||
github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho=
|
||||
github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
|
||||
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
|
||||
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
||||
github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw=
|
||||
github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw=
|
||||
github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
||||
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
|
||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
||||
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
@@ -294,14 +556,22 @@ github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXl
|
||||
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
|
||||
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
||||
github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA=
|
||||
github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
|
||||
github.com/u-root/uio v0.0.0-20230220225925-ffce2a382923 h1:tHNk7XK9GkmKUR6Gh8gVBKXc2MVSZ4G/NnWLtzw4gNA=
|
||||
github.com/u-root/uio v0.0.0-20230220225925-ffce2a382923/go.mod h1:eLL9Nub3yfAho7qB0MzZizFhTU2QkLeoVsWdHtDW264=
|
||||
github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo=
|
||||
github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw=
|
||||
github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs=
|
||||
github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY=
|
||||
github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
|
||||
github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
|
||||
github.com/v2fly/ss-bloomring v0.0.0-20210312155135-28617310f63e h1:5QefA066A1tF8gHIiADmOVOV5LS43gt3ONnlEl3xkwI=
|
||||
github.com/v2fly/ss-bloomring v0.0.0-20210312155135-28617310f63e/go.mod h1:5t19P9LBIrNamL6AcMQOncg/r10y3Pc01AbHeMhwlpU=
|
||||
github.com/viant/assertly v0.4.8/go.mod h1:aGifi++jvCrUaklKEKT0BU95igDNaqkvz+49uaYMPRU=
|
||||
github.com/viant/toolbox v0.24.0/go.mod h1:OxMCG57V0PXuIP2HNQrtJf2CjqdmbrOx5EkMILuUhzM=
|
||||
github.com/vishvananda/netns v0.0.4 h1:Oeaw1EM2JMxD51g9uhtC0D7erkIjgmj8+JZc26m1YX8=
|
||||
github.com/vishvananda/netns v0.0.4/go.mod h1:SpkAiCQRtJ6TvvxPnOSyH3BMl6unz3xZlaprSwhNNJM=
|
||||
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
|
||||
github.com/xmdhs/clash2singbox v0.0.2 h1:/gxaFm8fmv+UcUZzK508Z0yR01wg1LHrrq872Qibk1I=
|
||||
github.com/xmdhs/clash2singbox v0.0.2/go.mod h1:B5pbJCwIHhJg6YRPCT04EXw6XXNIIOllMfL3XyJ7ob8=
|
||||
github.com/xtls/reality v0.0.0-20240712055506-48f0b2d5ed6d h1:+B97uD9uHLgAAulhigmys4BVwZZypzK7gPN3WtpgRJg=
|
||||
@@ -313,23 +583,42 @@ github.com/zeebo/blake3 v0.2.3 h1:TFoLXsjeXqRNFxSbk35Dk4YtszE/MQQGK10BH4ptoTg=
|
||||
github.com/zeebo/blake3 v0.2.3/go.mod h1:mjJjZpnsyIVtVgTOSpJ9vmRE4wgDeyt2HU3qXvvKCaQ=
|
||||
github.com/zeebo/pcg v1.0.1 h1:lyqfGeWiv4ahac6ttHs+I5hwtH/+1mrhlCtVNQM2kHo=
|
||||
github.com/zeebo/pcg v1.0.1/go.mod h1:09F0S9iiKrwn9rlI5yjLkmrug154/YRW6KnnXVDM/l4=
|
||||
go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
|
||||
go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg=
|
||||
go.opencensus.io v0.18.0/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA=
|
||||
go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk=
|
||||
go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk=
|
||||
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
|
||||
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
||||
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
||||
go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
|
||||
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/mock v0.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU=
|
||||
go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc=
|
||||
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
|
||||
go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4=
|
||||
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
|
||||
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
|
||||
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
|
||||
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
|
||||
go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=
|
||||
go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8=
|
||||
go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E=
|
||||
go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE=
|
||||
go4.org/netipx v0.0.0-20231129151722-fdeea329fbba h1:0b9z3AuHCjxk0x/opv64kcgZLBseWJUpBw5I82+2U4M=
|
||||
go4.org/netipx v0.0.0-20231129151722-fdeea329fbba/go.mod h1:PLyyIXexvUFg3Owu6p/WfdlivPbZJsZdgWZlrGope/Y=
|
||||
golang.org/x/build v0.0.0-20190111050920-041ab4dc3f9d/go.mod h1:OWs+y06UdEOHN4y+MfF/py+xQ/tYqIWW03b70/CG9Rw=
|
||||
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20190313024323-a1f597ede03a/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20190404164418-38d8ce5564a5/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE=
|
||||
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8=
|
||||
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=
|
||||
@@ -337,11 +626,22 @@ golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98y
|
||||
golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw=
|
||||
golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54=
|
||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw=
|
||||
golang.org/x/exp v0.0.0-20240531132922-fd00a4e0eefc h1:O9NuF4s+E/PvMIy+9IUZB9znFwUIXEWSstNjek6VpVg=
|
||||
golang.org/x/exp v0.0.0-20240531132922-fd00a4e0eefc/go.mod h1:XtvwrStGgqGPLc4cjQfWqZHG1YFdYs6swckp8vpsjnc=
|
||||
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
|
||||
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
|
||||
golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
|
||||
golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
||||
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
||||
golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=
|
||||
golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
|
||||
golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
|
||||
golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
|
||||
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.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0=
|
||||
@@ -349,14 +649,27 @@ golang.org/x/mod v0.18.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-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20181029044818-c44066c5c816/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20181106065722-10aee1819953/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/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-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190313220215-9f648a60d977/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
|
||||
golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200421231249-e086a090c8fd/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||
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=
|
||||
@@ -374,20 +687,43 @@ golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJ
|
||||
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/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-20190911185100-cd5d95a43a6e/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.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ=
|
||||
golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/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-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181029174526-d69651ed3497/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/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-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190316082340-a2f829d7f35f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201015000850-e3ed0017c211/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220622161953-175b2fd9d664/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
@@ -410,6 +746,7 @@ golang.org/x/term v0.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU=
|
||||
golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/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.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||
@@ -420,22 +757,37 @@ golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc=
|
||||
golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
|
||||
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
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/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20181030000716-a0a13e073c7b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
|
||||
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
||||
golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
|
||||
golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/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.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||
golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||
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.22.0 h1:gqSGLZqv+AI9lIQzniJ0nZDRG5GBPsSi+DRNHWNz6yA=
|
||||
golang.org/x/tools v0.22.0/go.mod h1:aCwcsjqvq7Yqt6TNyX7QMU2enbQ/Gt0bo6krSeEri+c=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/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-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0=
|
||||
google.golang.org/api v0.0.0-20181030000543-1d582fd0359e/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0=
|
||||
google.golang.org/api v0.1.0/go.mod h1:UGEZY7KEX120AnNLIHFMKIo4obdJhkp2tPbaPlQx13Y=
|
||||
google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk=
|
||||
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
|
||||
google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||
google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||
@@ -445,33 +797,83 @@ google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoA
|
||||
google.golang.org/genproto v0.0.0-20181029155118-b69ba1387ce2/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
|
||||
google.golang.org/genproto v0.0.0-20181202183823-bd91e49a0898/go.mod h1:7Ep/1NZk928CDR8SjdVbjWNpdIf6nzjE3BTgJDr2Atg=
|
||||
google.golang.org/genproto v0.0.0-20190306203927-b5d61aea6440/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||
google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||
google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||
google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s=
|
||||
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
|
||||
google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
|
||||
google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117 h1:1GBuWVLM/KMVUv1t1En5Gs+gFZCNd360GGb4sSxtrhU=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0=
|
||||
google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
|
||||
google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio=
|
||||
google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs=
|
||||
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
|
||||
google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM=
|
||||
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
|
||||
google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
|
||||
google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
|
||||
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
|
||||
google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
|
||||
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
|
||||
google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
|
||||
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
|
||||
google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=
|
||||
google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
|
||||
google.golang.org/grpc v1.66.0 h1:DibZuoBznOxbDQxRINckZcUvnCEvrW9pcWIE2yF9r1c=
|
||||
google.golang.org/grpc v1.66.0/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y=
|
||||
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-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.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
|
||||
google.golang.org/protobuf v1.22.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.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
||||
google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4=
|
||||
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
|
||||
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
|
||||
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
|
||||
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU=
|
||||
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw=
|
||||
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
|
||||
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
|
||||
gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o=
|
||||
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
|
||||
gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
|
||||
gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI=
|
||||
gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
|
||||
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
||||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
grpc.go4.org v0.0.0-20170609214715-11d0a25b4919/go.mod h1:77eQGdRu53HpSqPFJFmuJdjuHRquDANNeA4x7B8WQ9o=
|
||||
honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
|
||||
lukechampine.com/blake3 v1.3.0 h1:sJ3XhFINmHSrYCgl958hscfIa3bw8x4DqMP3u1YvoYE=
|
||||
lukechampine.com/blake3 v1.3.0/go.mod h1:0OFRp7fBtAylGVCO40o87sbupkyIGgbpv1+M1k1LM6k=
|
||||
nhooyr.io/websocket v1.8.6 h1:s+C3xAMLwGmlI31Nyn/eAehUlZPwfYZu2JXM621Q5/k=
|
||||
nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0=
|
||||
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
|
||||
sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU=
|
||||
sourcegraph.com/sourcegraph/go-diff v0.5.0/go.mod h1:kuch7UrkMzY0X+p9CRK03kfuPQ2zzQcaEFbx8wA8rck=
|
||||
sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4/go.mod h1:ketZ/q3QxT9HOBeFhu6RdvsftgpsbFHBF5Cas6cDKZ0=
|
||||
|
||||
307
hiddifyrpc/base.pb.go
Normal file
307
hiddifyrpc/base.pb.go
Normal file
@@ -0,0 +1,307 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.34.2
|
||||
// protoc v5.28.0
|
||||
// source: base.proto
|
||||
|
||||
package hiddifyrpc
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type ResponseCode int32
|
||||
|
||||
const (
|
||||
ResponseCode_OK ResponseCode = 0
|
||||
ResponseCode_FAILED ResponseCode = 1
|
||||
)
|
||||
|
||||
// Enum value maps for ResponseCode.
|
||||
var (
|
||||
ResponseCode_name = map[int32]string{
|
||||
0: "OK",
|
||||
1: "FAILED",
|
||||
}
|
||||
ResponseCode_value = map[string]int32{
|
||||
"OK": 0,
|
||||
"FAILED": 1,
|
||||
}
|
||||
)
|
||||
|
||||
func (x ResponseCode) Enum() *ResponseCode {
|
||||
p := new(ResponseCode)
|
||||
*p = x
|
||||
return p
|
||||
}
|
||||
|
||||
func (x ResponseCode) String() string {
|
||||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||||
}
|
||||
|
||||
func (ResponseCode) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_base_proto_enumTypes[0].Descriptor()
|
||||
}
|
||||
|
||||
func (ResponseCode) Type() protoreflect.EnumType {
|
||||
return &file_base_proto_enumTypes[0]
|
||||
}
|
||||
|
||||
func (x ResponseCode) Number() protoreflect.EnumNumber {
|
||||
return protoreflect.EnumNumber(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ResponseCode.Descriptor instead.
|
||||
func (ResponseCode) EnumDescriptor() ([]byte, []int) {
|
||||
return file_base_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
type HelloRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
}
|
||||
|
||||
func (x *HelloRequest) Reset() {
|
||||
*x = HelloRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_base_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *HelloRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*HelloRequest) ProtoMessage() {}
|
||||
|
||||
func (x *HelloRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_base_proto_msgTypes[0]
|
||||
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 HelloRequest.ProtoReflect.Descriptor instead.
|
||||
func (*HelloRequest) Descriptor() ([]byte, []int) {
|
||||
return file_base_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *HelloRequest) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type HelloResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
|
||||
}
|
||||
|
||||
func (x *HelloResponse) Reset() {
|
||||
*x = HelloResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_base_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *HelloResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*HelloResponse) ProtoMessage() {}
|
||||
|
||||
func (x *HelloResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_base_proto_msgTypes[1]
|
||||
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 HelloResponse.ProtoReflect.Descriptor instead.
|
||||
func (*HelloResponse) Descriptor() ([]byte, []int) {
|
||||
return file_base_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *HelloResponse) GetMessage() string {
|
||||
if x != nil {
|
||||
return x.Message
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type Empty struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (x *Empty) Reset() {
|
||||
*x = Empty{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_base_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *Empty) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Empty) ProtoMessage() {}
|
||||
|
||||
func (x *Empty) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_base_proto_msgTypes[2]
|
||||
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 Empty.ProtoReflect.Descriptor instead.
|
||||
func (*Empty) Descriptor() ([]byte, []int) {
|
||||
return file_base_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
var File_base_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_base_proto_rawDesc = []byte{
|
||||
0x0a, 0x0a, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x68, 0x69,
|
||||
0x64, 0x64, 0x69, 0x66, 0x79, 0x72, 0x70, 0x63, 0x22, 0x22, 0x0a, 0x0c, 0x48, 0x65, 0x6c, 0x6c,
|
||||
0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x29, 0x0a, 0x0d,
|
||||
0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a,
|
||||
0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07,
|
||||
0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x07, 0x0a, 0x05, 0x45, 0x6d, 0x70, 0x74, 0x79,
|
||||
0x2a, 0x22, 0x0a, 0x0c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65,
|
||||
0x12, 0x06, 0x0a, 0x02, 0x4f, 0x4b, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c,
|
||||
0x45, 0x44, 0x10, 0x01, 0x42, 0x0e, 0x5a, 0x0c, 0x2e, 0x2f, 0x68, 0x69, 0x64, 0x64, 0x69, 0x66,
|
||||
0x79, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_base_proto_rawDescOnce sync.Once
|
||||
file_base_proto_rawDescData = file_base_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_base_proto_rawDescGZIP() []byte {
|
||||
file_base_proto_rawDescOnce.Do(func() {
|
||||
file_base_proto_rawDescData = protoimpl.X.CompressGZIP(file_base_proto_rawDescData)
|
||||
})
|
||||
return file_base_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_base_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||
var file_base_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
||||
var file_base_proto_goTypes = []any{
|
||||
(ResponseCode)(0), // 0: hiddifyrpc.ResponseCode
|
||||
(*HelloRequest)(nil), // 1: hiddifyrpc.HelloRequest
|
||||
(*HelloResponse)(nil), // 2: hiddifyrpc.HelloResponse
|
||||
(*Empty)(nil), // 3: hiddifyrpc.Empty
|
||||
}
|
||||
var file_base_proto_depIdxs = []int32{
|
||||
0, // [0:0] is the sub-list for method output_type
|
||||
0, // [0:0] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_base_proto_init() }
|
||||
func file_base_proto_init() {
|
||||
if File_base_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_base_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*HelloRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_base_proto_msgTypes[1].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*HelloResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_base_proto_msgTypes[2].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*Empty); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_base_proto_rawDesc,
|
||||
NumEnums: 1,
|
||||
NumMessages: 3,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_base_proto_goTypes,
|
||||
DependencyIndexes: file_base_proto_depIdxs,
|
||||
EnumInfos: file_base_proto_enumTypes,
|
||||
MessageInfos: file_base_proto_msgTypes,
|
||||
}.Build()
|
||||
File_base_proto = out.File
|
||||
file_base_proto_rawDesc = nil
|
||||
file_base_proto_goTypes = nil
|
||||
file_base_proto_depIdxs = nil
|
||||
}
|
||||
21
hiddifyrpc/base.proto
Normal file
21
hiddifyrpc/base.proto
Normal file
@@ -0,0 +1,21 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package hiddifyrpc;
|
||||
|
||||
option go_package = "./hiddifyrpc";
|
||||
|
||||
message HelloRequest {
|
||||
string name = 1;
|
||||
}
|
||||
|
||||
message HelloResponse {
|
||||
string message = 1;
|
||||
}
|
||||
|
||||
message Empty {
|
||||
}
|
||||
|
||||
enum ResponseCode {
|
||||
OK = 0;
|
||||
FAILED = 1;
|
||||
}
|
||||
674
hiddifyrpc/extension.pb.go
Normal file
674
hiddifyrpc/extension.pb.go
Normal file
@@ -0,0 +1,674 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.34.2
|
||||
// protoc v5.28.0
|
||||
// source: extension.proto
|
||||
|
||||
package hiddifyrpc
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type ExtensionResponseType int32
|
||||
|
||||
const (
|
||||
ExtensionResponseType_NOTHING ExtensionResponseType = 0
|
||||
ExtensionResponseType_UPDATE_UI ExtensionResponseType = 1
|
||||
ExtensionResponseType_SHOW_DIALOG ExtensionResponseType = 2
|
||||
ExtensionResponseType_END ExtensionResponseType = 3
|
||||
)
|
||||
|
||||
// Enum value maps for ExtensionResponseType.
|
||||
var (
|
||||
ExtensionResponseType_name = map[int32]string{
|
||||
0: "NOTHING",
|
||||
1: "UPDATE_UI",
|
||||
2: "SHOW_DIALOG",
|
||||
3: "END",
|
||||
}
|
||||
ExtensionResponseType_value = map[string]int32{
|
||||
"NOTHING": 0,
|
||||
"UPDATE_UI": 1,
|
||||
"SHOW_DIALOG": 2,
|
||||
"END": 3,
|
||||
}
|
||||
)
|
||||
|
||||
func (x ExtensionResponseType) Enum() *ExtensionResponseType {
|
||||
p := new(ExtensionResponseType)
|
||||
*p = x
|
||||
return p
|
||||
}
|
||||
|
||||
func (x ExtensionResponseType) String() string {
|
||||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||||
}
|
||||
|
||||
func (ExtensionResponseType) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_extension_proto_enumTypes[0].Descriptor()
|
||||
}
|
||||
|
||||
func (ExtensionResponseType) Type() protoreflect.EnumType {
|
||||
return &file_extension_proto_enumTypes[0]
|
||||
}
|
||||
|
||||
func (x ExtensionResponseType) Number() protoreflect.EnumNumber {
|
||||
return protoreflect.EnumNumber(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ExtensionResponseType.Descriptor instead.
|
||||
func (ExtensionResponseType) EnumDescriptor() ([]byte, []int) {
|
||||
return file_extension_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
type ExtensionActionResult struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
ExtensionId string `protobuf:"bytes,1,opt,name=extension_id,json=extensionId,proto3" json:"extension_id,omitempty"`
|
||||
Code ResponseCode `protobuf:"varint,2,opt,name=code,proto3,enum=hiddifyrpc.ResponseCode" json:"code,omitempty"`
|
||||
Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ExtensionActionResult) Reset() {
|
||||
*x = ExtensionActionResult{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_extension_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ExtensionActionResult) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ExtensionActionResult) ProtoMessage() {}
|
||||
|
||||
func (x *ExtensionActionResult) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_extension_proto_msgTypes[0]
|
||||
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 ExtensionActionResult.ProtoReflect.Descriptor instead.
|
||||
func (*ExtensionActionResult) Descriptor() ([]byte, []int) {
|
||||
return file_extension_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *ExtensionActionResult) GetExtensionId() string {
|
||||
if x != nil {
|
||||
return x.ExtensionId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ExtensionActionResult) GetCode() ResponseCode {
|
||||
if x != nil {
|
||||
return x.Code
|
||||
}
|
||||
return ResponseCode_OK
|
||||
}
|
||||
|
||||
func (x *ExtensionActionResult) GetMessage() string {
|
||||
if x != nil {
|
||||
return x.Message
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type ExtensionList struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Extensions []*Extension `protobuf:"bytes,1,rep,name=extensions,proto3" json:"extensions,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ExtensionList) Reset() {
|
||||
*x = ExtensionList{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_extension_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ExtensionList) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ExtensionList) ProtoMessage() {}
|
||||
|
||||
func (x *ExtensionList) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_extension_proto_msgTypes[1]
|
||||
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 ExtensionList.ProtoReflect.Descriptor instead.
|
||||
func (*ExtensionList) Descriptor() ([]byte, []int) {
|
||||
return file_extension_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *ExtensionList) GetExtensions() []*Extension {
|
||||
if x != nil {
|
||||
return x.Extensions
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type EditExtensionRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
ExtensionId string `protobuf:"bytes,1,opt,name=extension_id,json=extensionId,proto3" json:"extension_id,omitempty"`
|
||||
Enable bool `protobuf:"varint,2,opt,name=enable,proto3" json:"enable,omitempty"`
|
||||
}
|
||||
|
||||
func (x *EditExtensionRequest) Reset() {
|
||||
*x = EditExtensionRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_extension_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *EditExtensionRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*EditExtensionRequest) ProtoMessage() {}
|
||||
|
||||
func (x *EditExtensionRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_extension_proto_msgTypes[2]
|
||||
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 EditExtensionRequest.ProtoReflect.Descriptor instead.
|
||||
func (*EditExtensionRequest) Descriptor() ([]byte, []int) {
|
||||
return file_extension_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *EditExtensionRequest) GetExtensionId() string {
|
||||
if x != nil {
|
||||
return x.ExtensionId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *EditExtensionRequest) GetEnable() bool {
|
||||
if x != nil {
|
||||
return x.Enable
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
type Extension struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
|
||||
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
|
||||
Enable bool `protobuf:"varint,4,opt,name=enable,proto3" json:"enable,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Extension) Reset() {
|
||||
*x = Extension{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_extension_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *Extension) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Extension) ProtoMessage() {}
|
||||
|
||||
func (x *Extension) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_extension_proto_msgTypes[3]
|
||||
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 Extension.ProtoReflect.Descriptor instead.
|
||||
func (*Extension) Descriptor() ([]byte, []int) {
|
||||
return file_extension_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *Extension) GetId() string {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Extension) GetTitle() string {
|
||||
if x != nil {
|
||||
return x.Title
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Extension) GetDescription() string {
|
||||
if x != nil {
|
||||
return x.Description
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Extension) GetEnable() bool {
|
||||
if x != nil {
|
||||
return x.Enable
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
type ExtensionRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
ExtensionId string `protobuf:"bytes,1,opt,name=extension_id,json=extensionId,proto3" json:"extension_id,omitempty"`
|
||||
Data map[string]string `protobuf:"bytes,2,rep,name=data,proto3" json:"data,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||
}
|
||||
|
||||
func (x *ExtensionRequest) Reset() {
|
||||
*x = ExtensionRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_extension_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ExtensionRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ExtensionRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ExtensionRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_extension_proto_msgTypes[4]
|
||||
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 ExtensionRequest.ProtoReflect.Descriptor instead.
|
||||
func (*ExtensionRequest) Descriptor() ([]byte, []int) {
|
||||
return file_extension_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *ExtensionRequest) GetExtensionId() string {
|
||||
if x != nil {
|
||||
return x.ExtensionId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ExtensionRequest) GetData() map[string]string {
|
||||
if x != nil {
|
||||
return x.Data
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type ExtensionResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Type ExtensionResponseType `protobuf:"varint,1,opt,name=type,proto3,enum=hiddifyrpc.ExtensionResponseType" json:"type,omitempty"`
|
||||
ExtensionId string `protobuf:"bytes,2,opt,name=extension_id,json=extensionId,proto3" json:"extension_id,omitempty"`
|
||||
JsonUi string `protobuf:"bytes,3,opt,name=json_ui,json=jsonUi,proto3" json:"json_ui,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ExtensionResponse) Reset() {
|
||||
*x = ExtensionResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_extension_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ExtensionResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ExtensionResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ExtensionResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_extension_proto_msgTypes[5]
|
||||
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 ExtensionResponse.ProtoReflect.Descriptor instead.
|
||||
func (*ExtensionResponse) Descriptor() ([]byte, []int) {
|
||||
return file_extension_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *ExtensionResponse) GetType() ExtensionResponseType {
|
||||
if x != nil {
|
||||
return x.Type
|
||||
}
|
||||
return ExtensionResponseType_NOTHING
|
||||
}
|
||||
|
||||
func (x *ExtensionResponse) GetExtensionId() string {
|
||||
if x != nil {
|
||||
return x.ExtensionId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ExtensionResponse) GetJsonUi() string {
|
||||
if x != nil {
|
||||
return x.JsonUi
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_extension_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_extension_proto_rawDesc = []byte{
|
||||
0x0a, 0x0f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x12, 0x0a, 0x68, 0x69, 0x64, 0x64, 0x69, 0x66, 0x79, 0x72, 0x70, 0x63, 0x1a, 0x0a, 0x62,
|
||||
0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x82, 0x01, 0x0a, 0x15, 0x45, 0x78,
|
||||
0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73,
|
||||
0x75, 0x6c, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e,
|
||||
0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x65, 0x78, 0x74, 0x65, 0x6e,
|
||||
0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x2c, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x68, 0x69, 0x64, 0x64, 0x69, 0x66, 0x79, 0x72, 0x70,
|
||||
0x63, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04,
|
||||
0x63, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18,
|
||||
0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x46,
|
||||
0x0a, 0x0d, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x12,
|
||||
0x35, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20,
|
||||
0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x68, 0x69, 0x64, 0x64, 0x69, 0x66, 0x79, 0x72, 0x70, 0x63,
|
||||
0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65,
|
||||
0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x51, 0x0a, 0x14, 0x45, 0x64, 0x69, 0x74, 0x45, 0x78,
|
||||
0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21,
|
||||
0x0a, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x49,
|
||||
0x64, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x08, 0x52, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x6b, 0x0a, 0x09, 0x45, 0x78, 0x74,
|
||||
0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b,
|
||||
0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16,
|
||||
0x0a, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06,
|
||||
0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x22, 0xaa, 0x01, 0x0a, 0x10, 0x45, 0x78, 0x74, 0x65, 0x6e,
|
||||
0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x65,
|
||||
0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x0b, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x3a,
|
||||
0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x68,
|
||||
0x69, 0x64, 0x64, 0x69, 0x66, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73,
|
||||
0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x45,
|
||||
0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x37, 0x0a, 0x09, 0x44, 0x61,
|
||||
0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c,
|
||||
0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a,
|
||||
0x02, 0x38, 0x01, 0x22, 0x86, 0x01, 0x0a, 0x11, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f,
|
||||
0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x04, 0x74, 0x79, 0x70,
|
||||
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x68, 0x69, 0x64, 0x64, 0x69, 0x66,
|
||||
0x79, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65,
|
||||
0x12, 0x21, 0x0a, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f,
|
||||
0x6e, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x75, 0x69, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6a, 0x73, 0x6f, 0x6e, 0x55, 0x69, 0x2a, 0x4d, 0x0a, 0x15,
|
||||
0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x4e, 0x4f, 0x54, 0x48, 0x49, 0x4e, 0x47,
|
||||
0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x49, 0x10,
|
||||
0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x53, 0x48, 0x4f, 0x57, 0x5f, 0x44, 0x49, 0x41, 0x4c, 0x4f, 0x47,
|
||||
0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x45, 0x4e, 0x44, 0x10, 0x03, 0x32, 0xb1, 0x04, 0x0a, 0x14,
|
||||
0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x72,
|
||||
0x76, 0x69, 0x63, 0x65, 0x12, 0x40, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x78, 0x74, 0x65,
|
||||
0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x11, 0x2e, 0x68, 0x69, 0x64, 0x64, 0x69, 0x66, 0x79,
|
||||
0x72, 0x70, 0x63, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x19, 0x2e, 0x68, 0x69, 0x64, 0x64,
|
||||
0x69, 0x66, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e,
|
||||
0x4c, 0x69, 0x73, 0x74, 0x22, 0x00, 0x12, 0x4a, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63,
|
||||
0x74, 0x12, 0x1c, 0x2e, 0x68, 0x69, 0x64, 0x64, 0x69, 0x66, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x45,
|
||||
0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
||||
0x1d, 0x2e, 0x68, 0x69, 0x64, 0x64, 0x69, 0x66, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x78, 0x74,
|
||||
0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00,
|
||||
0x30, 0x01, 0x12, 0x56, 0x0a, 0x0d, 0x45, 0x64, 0x69, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73,
|
||||
0x69, 0x6f, 0x6e, 0x12, 0x20, 0x2e, 0x68, 0x69, 0x64, 0x64, 0x69, 0x66, 0x79, 0x72, 0x70, 0x63,
|
||||
0x2e, 0x45, 0x64, 0x69, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x68, 0x69, 0x64, 0x64, 0x69, 0x66, 0x79, 0x72,
|
||||
0x70, 0x63, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x41, 0x63, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x00, 0x12, 0x4f, 0x0a, 0x0a, 0x53, 0x75,
|
||||
0x62, 0x6d, 0x69, 0x74, 0x46, 0x6f, 0x72, 0x6d, 0x12, 0x1c, 0x2e, 0x68, 0x69, 0x64, 0x64, 0x69,
|
||||
0x66, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x68, 0x69, 0x64, 0x64, 0x69, 0x66, 0x79,
|
||||
0x72, 0x70, 0x63, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x41, 0x63, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x00, 0x12, 0x4b, 0x0a, 0x06, 0x43,
|
||||
0x61, 0x6e, 0x63, 0x65, 0x6c, 0x12, 0x1c, 0x2e, 0x68, 0x69, 0x64, 0x64, 0x69, 0x66, 0x79, 0x72,
|
||||
0x70, 0x63, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x68, 0x69, 0x64, 0x64, 0x69, 0x66, 0x79, 0x72, 0x70, 0x63,
|
||||
0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x00, 0x12, 0x49, 0x0a, 0x04, 0x53, 0x74, 0x6f, 0x70,
|
||||
0x12, 0x1c, 0x2e, 0x68, 0x69, 0x64, 0x64, 0x69, 0x66, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x78,
|
||||
0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21,
|
||||
0x2e, 0x68, 0x69, 0x64, 0x64, 0x69, 0x66, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x78, 0x74, 0x65,
|
||||
0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c,
|
||||
0x74, 0x22, 0x00, 0x12, 0x4a, 0x0a, 0x05, 0x47, 0x65, 0x74, 0x55, 0x49, 0x12, 0x1c, 0x2e, 0x68,
|
||||
0x69, 0x64, 0x64, 0x69, 0x66, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73,
|
||||
0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x68, 0x69, 0x64,
|
||||
0x64, 0x69, 0x66, 0x79, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f,
|
||||
0x6e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x00, 0x42,
|
||||
0x0e, 0x5a, 0x0c, 0x2e, 0x2f, 0x68, 0x69, 0x64, 0x64, 0x69, 0x66, 0x79, 0x72, 0x70, 0x63, 0x62,
|
||||
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_extension_proto_rawDescOnce sync.Once
|
||||
file_extension_proto_rawDescData = file_extension_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_extension_proto_rawDescGZIP() []byte {
|
||||
file_extension_proto_rawDescOnce.Do(func() {
|
||||
file_extension_proto_rawDescData = protoimpl.X.CompressGZIP(file_extension_proto_rawDescData)
|
||||
})
|
||||
return file_extension_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_extension_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||
var file_extension_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
|
||||
var file_extension_proto_goTypes = []any{
|
||||
(ExtensionResponseType)(0), // 0: hiddifyrpc.ExtensionResponseType
|
||||
(*ExtensionActionResult)(nil), // 1: hiddifyrpc.ExtensionActionResult
|
||||
(*ExtensionList)(nil), // 2: hiddifyrpc.ExtensionList
|
||||
(*EditExtensionRequest)(nil), // 3: hiddifyrpc.EditExtensionRequest
|
||||
(*Extension)(nil), // 4: hiddifyrpc.Extension
|
||||
(*ExtensionRequest)(nil), // 5: hiddifyrpc.ExtensionRequest
|
||||
(*ExtensionResponse)(nil), // 6: hiddifyrpc.ExtensionResponse
|
||||
nil, // 7: hiddifyrpc.ExtensionRequest.DataEntry
|
||||
(ResponseCode)(0), // 8: hiddifyrpc.ResponseCode
|
||||
(*Empty)(nil), // 9: hiddifyrpc.Empty
|
||||
}
|
||||
var file_extension_proto_depIdxs = []int32{
|
||||
8, // 0: hiddifyrpc.ExtensionActionResult.code:type_name -> hiddifyrpc.ResponseCode
|
||||
4, // 1: hiddifyrpc.ExtensionList.extensions:type_name -> hiddifyrpc.Extension
|
||||
7, // 2: hiddifyrpc.ExtensionRequest.data:type_name -> hiddifyrpc.ExtensionRequest.DataEntry
|
||||
0, // 3: hiddifyrpc.ExtensionResponse.type:type_name -> hiddifyrpc.ExtensionResponseType
|
||||
9, // 4: hiddifyrpc.ExtensionHostService.ListExtensions:input_type -> hiddifyrpc.Empty
|
||||
5, // 5: hiddifyrpc.ExtensionHostService.Connect:input_type -> hiddifyrpc.ExtensionRequest
|
||||
3, // 6: hiddifyrpc.ExtensionHostService.EditExtension:input_type -> hiddifyrpc.EditExtensionRequest
|
||||
5, // 7: hiddifyrpc.ExtensionHostService.SubmitForm:input_type -> hiddifyrpc.ExtensionRequest
|
||||
5, // 8: hiddifyrpc.ExtensionHostService.Cancel:input_type -> hiddifyrpc.ExtensionRequest
|
||||
5, // 9: hiddifyrpc.ExtensionHostService.Stop:input_type -> hiddifyrpc.ExtensionRequest
|
||||
5, // 10: hiddifyrpc.ExtensionHostService.GetUI:input_type -> hiddifyrpc.ExtensionRequest
|
||||
2, // 11: hiddifyrpc.ExtensionHostService.ListExtensions:output_type -> hiddifyrpc.ExtensionList
|
||||
6, // 12: hiddifyrpc.ExtensionHostService.Connect:output_type -> hiddifyrpc.ExtensionResponse
|
||||
1, // 13: hiddifyrpc.ExtensionHostService.EditExtension:output_type -> hiddifyrpc.ExtensionActionResult
|
||||
1, // 14: hiddifyrpc.ExtensionHostService.SubmitForm:output_type -> hiddifyrpc.ExtensionActionResult
|
||||
1, // 15: hiddifyrpc.ExtensionHostService.Cancel:output_type -> hiddifyrpc.ExtensionActionResult
|
||||
1, // 16: hiddifyrpc.ExtensionHostService.Stop:output_type -> hiddifyrpc.ExtensionActionResult
|
||||
1, // 17: hiddifyrpc.ExtensionHostService.GetUI:output_type -> hiddifyrpc.ExtensionActionResult
|
||||
11, // [11:18] is the sub-list for method output_type
|
||||
4, // [4:11] is the sub-list for method input_type
|
||||
4, // [4:4] is the sub-list for extension type_name
|
||||
4, // [4:4] is the sub-list for extension extendee
|
||||
0, // [0:4] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_extension_proto_init() }
|
||||
func file_extension_proto_init() {
|
||||
if File_extension_proto != nil {
|
||||
return
|
||||
}
|
||||
file_base_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_extension_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*ExtensionActionResult); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_extension_proto_msgTypes[1].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*ExtensionList); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_extension_proto_msgTypes[2].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*EditExtensionRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_extension_proto_msgTypes[3].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*Extension); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_extension_proto_msgTypes[4].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*ExtensionRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_extension_proto_msgTypes[5].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*ExtensionResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_extension_proto_rawDesc,
|
||||
NumEnums: 1,
|
||||
NumMessages: 7,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_extension_proto_goTypes,
|
||||
DependencyIndexes: file_extension_proto_depIdxs,
|
||||
EnumInfos: file_extension_proto_enumTypes,
|
||||
MessageInfos: file_extension_proto_msgTypes,
|
||||
}.Build()
|
||||
File_extension_proto = out.File
|
||||
file_extension_proto_rawDesc = nil
|
||||
file_extension_proto_goTypes = nil
|
||||
file_extension_proto_depIdxs = nil
|
||||
}
|
||||
61
hiddifyrpc/extension.proto
Normal file
61
hiddifyrpc/extension.proto
Normal file
@@ -0,0 +1,61 @@
|
||||
syntax = "proto3";
|
||||
|
||||
import "base.proto";
|
||||
|
||||
package hiddifyrpc;
|
||||
|
||||
option go_package = "./hiddifyrpc";
|
||||
|
||||
service ExtensionHostService {
|
||||
rpc ListExtensions (Empty) returns (ExtensionList) {}
|
||||
rpc Connect (ExtensionRequest) returns (stream ExtensionResponse) {}
|
||||
rpc EditExtension (EditExtensionRequest) returns (ExtensionActionResult) {}
|
||||
rpc SubmitForm (ExtensionRequest) returns (ExtensionActionResult) {}
|
||||
rpc Cancel (ExtensionRequest) returns (ExtensionActionResult) {}
|
||||
rpc Stop (ExtensionRequest) returns (ExtensionActionResult) {}
|
||||
|
||||
rpc GetUI (ExtensionRequest) returns (ExtensionActionResult) {}
|
||||
}
|
||||
|
||||
message ExtensionActionResult {
|
||||
string extension_id = 1;
|
||||
ResponseCode code = 2;
|
||||
string message = 3;
|
||||
}
|
||||
|
||||
message ExtensionList {
|
||||
repeated Extension extensions = 1;
|
||||
}
|
||||
|
||||
message EditExtensionRequest {
|
||||
string extension_id = 1;
|
||||
bool enable = 2;
|
||||
}
|
||||
|
||||
message Extension {
|
||||
string id = 1;
|
||||
string title = 2;
|
||||
string description = 3;
|
||||
bool enable = 4;
|
||||
}
|
||||
|
||||
message ExtensionRequest {
|
||||
string extension_id = 1;
|
||||
map<string, string> data = 2;
|
||||
}
|
||||
|
||||
message ExtensionResponse {
|
||||
ExtensionResponseType type = 1;
|
||||
string extension_id = 2;
|
||||
string json_ui = 3;
|
||||
}
|
||||
|
||||
|
||||
enum ExtensionResponseType {
|
||||
NOTHING = 0;
|
||||
UPDATE_UI = 1;
|
||||
SHOW_DIALOG = 2;
|
||||
END=3;
|
||||
}
|
||||
|
||||
|
||||
353
hiddifyrpc/extension_grpc.pb.go
Normal file
353
hiddifyrpc/extension_grpc.pb.go
Normal file
@@ -0,0 +1,353 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc v5.28.0
|
||||
// source: extension.proto
|
||||
|
||||
package hiddifyrpc
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
ExtensionHostService_ListExtensions_FullMethodName = "/hiddifyrpc.ExtensionHostService/ListExtensions"
|
||||
ExtensionHostService_Connect_FullMethodName = "/hiddifyrpc.ExtensionHostService/Connect"
|
||||
ExtensionHostService_EditExtension_FullMethodName = "/hiddifyrpc.ExtensionHostService/EditExtension"
|
||||
ExtensionHostService_SubmitForm_FullMethodName = "/hiddifyrpc.ExtensionHostService/SubmitForm"
|
||||
ExtensionHostService_Cancel_FullMethodName = "/hiddifyrpc.ExtensionHostService/Cancel"
|
||||
ExtensionHostService_Stop_FullMethodName = "/hiddifyrpc.ExtensionHostService/Stop"
|
||||
ExtensionHostService_GetUI_FullMethodName = "/hiddifyrpc.ExtensionHostService/GetUI"
|
||||
)
|
||||
|
||||
// ExtensionHostServiceClient is the client API for ExtensionHostService service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type ExtensionHostServiceClient interface {
|
||||
ListExtensions(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ExtensionList, error)
|
||||
Connect(ctx context.Context, in *ExtensionRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ExtensionResponse], error)
|
||||
EditExtension(ctx context.Context, in *EditExtensionRequest, opts ...grpc.CallOption) (*ExtensionActionResult, error)
|
||||
SubmitForm(ctx context.Context, in *ExtensionRequest, opts ...grpc.CallOption) (*ExtensionActionResult, error)
|
||||
Cancel(ctx context.Context, in *ExtensionRequest, opts ...grpc.CallOption) (*ExtensionActionResult, error)
|
||||
Stop(ctx context.Context, in *ExtensionRequest, opts ...grpc.CallOption) (*ExtensionActionResult, error)
|
||||
GetUI(ctx context.Context, in *ExtensionRequest, opts ...grpc.CallOption) (*ExtensionActionResult, error)
|
||||
}
|
||||
|
||||
type extensionHostServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewExtensionHostServiceClient(cc grpc.ClientConnInterface) ExtensionHostServiceClient {
|
||||
return &extensionHostServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *extensionHostServiceClient) ListExtensions(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ExtensionList, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(ExtensionList)
|
||||
err := c.cc.Invoke(ctx, ExtensionHostService_ListExtensions_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *extensionHostServiceClient) Connect(ctx context.Context, in *ExtensionRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ExtensionResponse], error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
stream, err := c.cc.NewStream(ctx, &ExtensionHostService_ServiceDesc.Streams[0], ExtensionHostService_Connect_FullMethodName, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &grpc.GenericClientStream[ExtensionRequest, ExtensionResponse]{ClientStream: stream}
|
||||
if err := x.ClientStream.SendMsg(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := x.ClientStream.CloseSend(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||
type ExtensionHostService_ConnectClient = grpc.ServerStreamingClient[ExtensionResponse]
|
||||
|
||||
func (c *extensionHostServiceClient) EditExtension(ctx context.Context, in *EditExtensionRequest, opts ...grpc.CallOption) (*ExtensionActionResult, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(ExtensionActionResult)
|
||||
err := c.cc.Invoke(ctx, ExtensionHostService_EditExtension_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *extensionHostServiceClient) SubmitForm(ctx context.Context, in *ExtensionRequest, opts ...grpc.CallOption) (*ExtensionActionResult, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(ExtensionActionResult)
|
||||
err := c.cc.Invoke(ctx, ExtensionHostService_SubmitForm_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *extensionHostServiceClient) Cancel(ctx context.Context, in *ExtensionRequest, opts ...grpc.CallOption) (*ExtensionActionResult, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(ExtensionActionResult)
|
||||
err := c.cc.Invoke(ctx, ExtensionHostService_Cancel_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *extensionHostServiceClient) Stop(ctx context.Context, in *ExtensionRequest, opts ...grpc.CallOption) (*ExtensionActionResult, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(ExtensionActionResult)
|
||||
err := c.cc.Invoke(ctx, ExtensionHostService_Stop_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *extensionHostServiceClient) GetUI(ctx context.Context, in *ExtensionRequest, opts ...grpc.CallOption) (*ExtensionActionResult, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(ExtensionActionResult)
|
||||
err := c.cc.Invoke(ctx, ExtensionHostService_GetUI_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// ExtensionHostServiceServer is the server API for ExtensionHostService service.
|
||||
// All implementations must embed UnimplementedExtensionHostServiceServer
|
||||
// for forward compatibility.
|
||||
type ExtensionHostServiceServer interface {
|
||||
ListExtensions(context.Context, *Empty) (*ExtensionList, error)
|
||||
Connect(*ExtensionRequest, grpc.ServerStreamingServer[ExtensionResponse]) error
|
||||
EditExtension(context.Context, *EditExtensionRequest) (*ExtensionActionResult, error)
|
||||
SubmitForm(context.Context, *ExtensionRequest) (*ExtensionActionResult, error)
|
||||
Cancel(context.Context, *ExtensionRequest) (*ExtensionActionResult, error)
|
||||
Stop(context.Context, *ExtensionRequest) (*ExtensionActionResult, error)
|
||||
GetUI(context.Context, *ExtensionRequest) (*ExtensionActionResult, error)
|
||||
mustEmbedUnimplementedExtensionHostServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedExtensionHostServiceServer must be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedExtensionHostServiceServer struct{}
|
||||
|
||||
func (UnimplementedExtensionHostServiceServer) ListExtensions(context.Context, *Empty) (*ExtensionList, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ListExtensions not implemented")
|
||||
}
|
||||
func (UnimplementedExtensionHostServiceServer) Connect(*ExtensionRequest, grpc.ServerStreamingServer[ExtensionResponse]) error {
|
||||
return status.Errorf(codes.Unimplemented, "method Connect not implemented")
|
||||
}
|
||||
func (UnimplementedExtensionHostServiceServer) EditExtension(context.Context, *EditExtensionRequest) (*ExtensionActionResult, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method EditExtension not implemented")
|
||||
}
|
||||
func (UnimplementedExtensionHostServiceServer) SubmitForm(context.Context, *ExtensionRequest) (*ExtensionActionResult, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method SubmitForm not implemented")
|
||||
}
|
||||
func (UnimplementedExtensionHostServiceServer) Cancel(context.Context, *ExtensionRequest) (*ExtensionActionResult, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Cancel not implemented")
|
||||
}
|
||||
func (UnimplementedExtensionHostServiceServer) Stop(context.Context, *ExtensionRequest) (*ExtensionActionResult, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Stop not implemented")
|
||||
}
|
||||
func (UnimplementedExtensionHostServiceServer) GetUI(context.Context, *ExtensionRequest) (*ExtensionActionResult, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetUI not implemented")
|
||||
}
|
||||
func (UnimplementedExtensionHostServiceServer) mustEmbedUnimplementedExtensionHostServiceServer() {}
|
||||
func (UnimplementedExtensionHostServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeExtensionHostServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to ExtensionHostServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeExtensionHostServiceServer interface {
|
||||
mustEmbedUnimplementedExtensionHostServiceServer()
|
||||
}
|
||||
|
||||
func RegisterExtensionHostServiceServer(s grpc.ServiceRegistrar, srv ExtensionHostServiceServer) {
|
||||
// If the following call pancis, it indicates UnimplementedExtensionHostServiceServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&ExtensionHostService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _ExtensionHostService_ListExtensions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(Empty)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ExtensionHostServiceServer).ListExtensions(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ExtensionHostService_ListExtensions_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ExtensionHostServiceServer).ListExtensions(ctx, req.(*Empty))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ExtensionHostService_Connect_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
m := new(ExtensionRequest)
|
||||
if err := stream.RecvMsg(m); err != nil {
|
||||
return err
|
||||
}
|
||||
return srv.(ExtensionHostServiceServer).Connect(m, &grpc.GenericServerStream[ExtensionRequest, ExtensionResponse]{ServerStream: stream})
|
||||
}
|
||||
|
||||
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||
type ExtensionHostService_ConnectServer = grpc.ServerStreamingServer[ExtensionResponse]
|
||||
|
||||
func _ExtensionHostService_EditExtension_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(EditExtensionRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ExtensionHostServiceServer).EditExtension(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ExtensionHostService_EditExtension_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ExtensionHostServiceServer).EditExtension(ctx, req.(*EditExtensionRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ExtensionHostService_SubmitForm_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ExtensionRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ExtensionHostServiceServer).SubmitForm(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ExtensionHostService_SubmitForm_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ExtensionHostServiceServer).SubmitForm(ctx, req.(*ExtensionRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ExtensionHostService_Cancel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ExtensionRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ExtensionHostServiceServer).Cancel(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ExtensionHostService_Cancel_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ExtensionHostServiceServer).Cancel(ctx, req.(*ExtensionRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ExtensionHostService_Stop_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ExtensionRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ExtensionHostServiceServer).Stop(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ExtensionHostService_Stop_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ExtensionHostServiceServer).Stop(ctx, req.(*ExtensionRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ExtensionHostService_GetUI_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ExtensionRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ExtensionHostServiceServer).GetUI(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ExtensionHostService_GetUI_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ExtensionHostServiceServer).GetUI(ctx, req.(*ExtensionRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// ExtensionHostService_ServiceDesc is the grpc.ServiceDesc for ExtensionHostService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var ExtensionHostService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "hiddifyrpc.ExtensionHostService",
|
||||
HandlerType: (*ExtensionHostServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "ListExtensions",
|
||||
Handler: _ExtensionHostService_ListExtensions_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "EditExtension",
|
||||
Handler: _ExtensionHostService_EditExtension_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "SubmitForm",
|
||||
Handler: _ExtensionHostService_SubmitForm_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Cancel",
|
||||
Handler: _ExtensionHostService_Cancel_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Stop",
|
||||
Handler: _ExtensionHostService_Stop_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetUI",
|
||||
Handler: _ExtensionHostService_GetUI_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{
|
||||
{
|
||||
StreamName: "Connect",
|
||||
Handler: _ExtensionHostService_Connect_Handler,
|
||||
ServerStreams: true,
|
||||
},
|
||||
},
|
||||
Metadata: "extension.proto",
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,13 +1,9 @@
|
||||
syntax = "proto3";
|
||||
|
||||
import "base.proto";
|
||||
package hiddifyrpc;
|
||||
|
||||
option go_package = "./hiddifyrpc";
|
||||
|
||||
enum ResponseCode {
|
||||
OK = 0;
|
||||
FAILED = 1;
|
||||
}
|
||||
|
||||
enum CoreState {
|
||||
STOPPED = 0;
|
||||
@@ -60,17 +56,6 @@ message Response {
|
||||
}
|
||||
|
||||
|
||||
message HelloRequest {
|
||||
string name = 1;
|
||||
}
|
||||
|
||||
message HelloResponse {
|
||||
string message = 1;
|
||||
}
|
||||
|
||||
message Empty {
|
||||
}
|
||||
|
||||
message SystemInfo {
|
||||
int64 memory = 1;
|
||||
int32 goroutines = 2;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc v3.6.1
|
||||
// source: hiddifyrpc/hiddify.proto
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc v5.28.0
|
||||
// source: hiddify.proto
|
||||
|
||||
package hiddifyrpc
|
||||
|
||||
@@ -15,8 +15,8 @@ import (
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.32.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
// Requires gRPC-Go v1.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
Hello_SayHello_FullMethodName = "/hiddifyrpc.Hello/SayHello"
|
||||
@@ -28,7 +28,7 @@ const (
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type HelloClient interface {
|
||||
SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloResponse, error)
|
||||
SayHelloStream(ctx context.Context, opts ...grpc.CallOption) (Hello_SayHelloStreamClient, error)
|
||||
SayHelloStream(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[HelloRequest, HelloResponse], error)
|
||||
}
|
||||
|
||||
type helloClient struct {
|
||||
@@ -40,65 +40,52 @@ func NewHelloClient(cc grpc.ClientConnInterface) HelloClient {
|
||||
}
|
||||
|
||||
func (c *helloClient) SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(HelloResponse)
|
||||
err := c.cc.Invoke(ctx, Hello_SayHello_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Hello_SayHello_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *helloClient) SayHelloStream(ctx context.Context, opts ...grpc.CallOption) (Hello_SayHelloStreamClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &Hello_ServiceDesc.Streams[0], Hello_SayHelloStream_FullMethodName, opts...)
|
||||
func (c *helloClient) SayHelloStream(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[HelloRequest, HelloResponse], error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
stream, err := c.cc.NewStream(ctx, &Hello_ServiceDesc.Streams[0], Hello_SayHelloStream_FullMethodName, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &helloSayHelloStreamClient{stream}
|
||||
x := &grpc.GenericClientStream[HelloRequest, HelloResponse]{ClientStream: stream}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type Hello_SayHelloStreamClient interface {
|
||||
Send(*HelloRequest) error
|
||||
Recv() (*HelloResponse, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type helloSayHelloStreamClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *helloSayHelloStreamClient) Send(m *HelloRequest) error {
|
||||
return x.ClientStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func (x *helloSayHelloStreamClient) Recv() (*HelloResponse, error) {
|
||||
m := new(HelloResponse)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||
type Hello_SayHelloStreamClient = grpc.BidiStreamingClient[HelloRequest, HelloResponse]
|
||||
|
||||
// HelloServer is the server API for Hello service.
|
||||
// All implementations must embed UnimplementedHelloServer
|
||||
// for forward compatibility
|
||||
// for forward compatibility.
|
||||
type HelloServer interface {
|
||||
SayHello(context.Context, *HelloRequest) (*HelloResponse, error)
|
||||
SayHelloStream(Hello_SayHelloStreamServer) error
|
||||
SayHelloStream(grpc.BidiStreamingServer[HelloRequest, HelloResponse]) error
|
||||
mustEmbedUnimplementedHelloServer()
|
||||
}
|
||||
|
||||
// UnimplementedHelloServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedHelloServer struct {
|
||||
}
|
||||
// UnimplementedHelloServer must be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedHelloServer struct{}
|
||||
|
||||
func (UnimplementedHelloServer) SayHello(context.Context, *HelloRequest) (*HelloResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method SayHello not implemented")
|
||||
}
|
||||
func (UnimplementedHelloServer) SayHelloStream(Hello_SayHelloStreamServer) error {
|
||||
func (UnimplementedHelloServer) SayHelloStream(grpc.BidiStreamingServer[HelloRequest, HelloResponse]) error {
|
||||
return status.Errorf(codes.Unimplemented, "method SayHelloStream not implemented")
|
||||
}
|
||||
func (UnimplementedHelloServer) mustEmbedUnimplementedHelloServer() {}
|
||||
func (UnimplementedHelloServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeHelloServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to HelloServer will
|
||||
@@ -108,6 +95,13 @@ type UnsafeHelloServer interface {
|
||||
}
|
||||
|
||||
func RegisterHelloServer(s grpc.ServiceRegistrar, srv HelloServer) {
|
||||
// If the following call pancis, it indicates UnimplementedHelloServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&Hello_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
@@ -130,30 +124,11 @@ func _Hello_SayHello_Handler(srv interface{}, ctx context.Context, dec func(inte
|
||||
}
|
||||
|
||||
func _Hello_SayHelloStream_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
return srv.(HelloServer).SayHelloStream(&helloSayHelloStreamServer{stream})
|
||||
return srv.(HelloServer).SayHelloStream(&grpc.GenericServerStream[HelloRequest, HelloResponse]{ServerStream: stream})
|
||||
}
|
||||
|
||||
type Hello_SayHelloStreamServer interface {
|
||||
Send(*HelloResponse) error
|
||||
Recv() (*HelloRequest, error)
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type helloSayHelloStreamServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *helloSayHelloStreamServer) Send(m *HelloResponse) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func (x *helloSayHelloStreamServer) Recv() (*HelloRequest, error) {
|
||||
m := new(HelloRequest)
|
||||
if err := x.ServerStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||
type Hello_SayHelloStreamServer = grpc.BidiStreamingServer[HelloRequest, HelloResponse]
|
||||
|
||||
// Hello_ServiceDesc is the grpc.ServiceDesc for Hello service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
@@ -175,7 +150,7 @@ var Hello_ServiceDesc = grpc.ServiceDesc{
|
||||
ClientStreams: true,
|
||||
},
|
||||
},
|
||||
Metadata: "hiddifyrpc/hiddify.proto",
|
||||
Metadata: "hiddify.proto",
|
||||
}
|
||||
|
||||
const (
|
||||
@@ -203,10 +178,10 @@ const (
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type CoreClient interface {
|
||||
Start(ctx context.Context, in *StartRequest, opts ...grpc.CallOption) (*CoreInfoResponse, error)
|
||||
CoreInfoListener(ctx context.Context, opts ...grpc.CallOption) (Core_CoreInfoListenerClient, error)
|
||||
OutboundsInfo(ctx context.Context, opts ...grpc.CallOption) (Core_OutboundsInfoClient, error)
|
||||
MainOutboundsInfo(ctx context.Context, opts ...grpc.CallOption) (Core_MainOutboundsInfoClient, error)
|
||||
GetSystemInfo(ctx context.Context, opts ...grpc.CallOption) (Core_GetSystemInfoClient, error)
|
||||
CoreInfoListener(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[StopRequest, CoreInfoResponse], error)
|
||||
OutboundsInfo(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[StopRequest, OutboundGroupList], error)
|
||||
MainOutboundsInfo(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[StopRequest, OutboundGroupList], error)
|
||||
GetSystemInfo(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[StopRequest, SystemInfo], error)
|
||||
Setup(ctx context.Context, in *SetupRequest, opts ...grpc.CallOption) (*Response, error)
|
||||
Parse(ctx context.Context, in *ParseRequest, opts ...grpc.CallOption) (*ParseResponse, error)
|
||||
ChangeConfigOptions(ctx context.Context, in *ChangeConfigOptionsRequest, opts ...grpc.CallOption) (*CoreInfoResponse, error)
|
||||
@@ -219,7 +194,7 @@ type CoreClient interface {
|
||||
GenerateWarpConfig(ctx context.Context, in *GenerateWarpConfigRequest, opts ...grpc.CallOption) (*WarpGenerationResponse, error)
|
||||
GetSystemProxyStatus(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*SystemProxyStatus, error)
|
||||
SetSystemProxyEnabled(ctx context.Context, in *SetSystemProxyEnabledRequest, opts ...grpc.CallOption) (*Response, error)
|
||||
LogListener(ctx context.Context, opts ...grpc.CallOption) (Core_LogListenerClient, error)
|
||||
LogListener(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[StopRequest, LogMessage], error)
|
||||
}
|
||||
|
||||
type coreClient struct {
|
||||
@@ -231,141 +206,71 @@ func NewCoreClient(cc grpc.ClientConnInterface) CoreClient {
|
||||
}
|
||||
|
||||
func (c *coreClient) Start(ctx context.Context, in *StartRequest, opts ...grpc.CallOption) (*CoreInfoResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(CoreInfoResponse)
|
||||
err := c.cc.Invoke(ctx, Core_Start_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Core_Start_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *coreClient) CoreInfoListener(ctx context.Context, opts ...grpc.CallOption) (Core_CoreInfoListenerClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &Core_ServiceDesc.Streams[0], Core_CoreInfoListener_FullMethodName, opts...)
|
||||
func (c *coreClient) CoreInfoListener(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[StopRequest, CoreInfoResponse], error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
stream, err := c.cc.NewStream(ctx, &Core_ServiceDesc.Streams[0], Core_CoreInfoListener_FullMethodName, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &coreCoreInfoListenerClient{stream}
|
||||
x := &grpc.GenericClientStream[StopRequest, CoreInfoResponse]{ClientStream: stream}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type Core_CoreInfoListenerClient interface {
|
||||
Send(*StopRequest) error
|
||||
Recv() (*CoreInfoResponse, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||
type Core_CoreInfoListenerClient = grpc.BidiStreamingClient[StopRequest, CoreInfoResponse]
|
||||
|
||||
type coreCoreInfoListenerClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *coreCoreInfoListenerClient) Send(m *StopRequest) error {
|
||||
return x.ClientStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func (x *coreCoreInfoListenerClient) Recv() (*CoreInfoResponse, error) {
|
||||
m := new(CoreInfoResponse)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func (c *coreClient) OutboundsInfo(ctx context.Context, opts ...grpc.CallOption) (Core_OutboundsInfoClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &Core_ServiceDesc.Streams[1], Core_OutboundsInfo_FullMethodName, opts...)
|
||||
func (c *coreClient) OutboundsInfo(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[StopRequest, OutboundGroupList], error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
stream, err := c.cc.NewStream(ctx, &Core_ServiceDesc.Streams[1], Core_OutboundsInfo_FullMethodName, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &coreOutboundsInfoClient{stream}
|
||||
x := &grpc.GenericClientStream[StopRequest, OutboundGroupList]{ClientStream: stream}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type Core_OutboundsInfoClient interface {
|
||||
Send(*StopRequest) error
|
||||
Recv() (*OutboundGroupList, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||
type Core_OutboundsInfoClient = grpc.BidiStreamingClient[StopRequest, OutboundGroupList]
|
||||
|
||||
type coreOutboundsInfoClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *coreOutboundsInfoClient) Send(m *StopRequest) error {
|
||||
return x.ClientStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func (x *coreOutboundsInfoClient) Recv() (*OutboundGroupList, error) {
|
||||
m := new(OutboundGroupList)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func (c *coreClient) MainOutboundsInfo(ctx context.Context, opts ...grpc.CallOption) (Core_MainOutboundsInfoClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &Core_ServiceDesc.Streams[2], Core_MainOutboundsInfo_FullMethodName, opts...)
|
||||
func (c *coreClient) MainOutboundsInfo(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[StopRequest, OutboundGroupList], error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
stream, err := c.cc.NewStream(ctx, &Core_ServiceDesc.Streams[2], Core_MainOutboundsInfo_FullMethodName, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &coreMainOutboundsInfoClient{stream}
|
||||
x := &grpc.GenericClientStream[StopRequest, OutboundGroupList]{ClientStream: stream}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type Core_MainOutboundsInfoClient interface {
|
||||
Send(*StopRequest) error
|
||||
Recv() (*OutboundGroupList, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||
type Core_MainOutboundsInfoClient = grpc.BidiStreamingClient[StopRequest, OutboundGroupList]
|
||||
|
||||
type coreMainOutboundsInfoClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *coreMainOutboundsInfoClient) Send(m *StopRequest) error {
|
||||
return x.ClientStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func (x *coreMainOutboundsInfoClient) Recv() (*OutboundGroupList, error) {
|
||||
m := new(OutboundGroupList)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func (c *coreClient) GetSystemInfo(ctx context.Context, opts ...grpc.CallOption) (Core_GetSystemInfoClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &Core_ServiceDesc.Streams[3], Core_GetSystemInfo_FullMethodName, opts...)
|
||||
func (c *coreClient) GetSystemInfo(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[StopRequest, SystemInfo], error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
stream, err := c.cc.NewStream(ctx, &Core_ServiceDesc.Streams[3], Core_GetSystemInfo_FullMethodName, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &coreGetSystemInfoClient{stream}
|
||||
x := &grpc.GenericClientStream[StopRequest, SystemInfo]{ClientStream: stream}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type Core_GetSystemInfoClient interface {
|
||||
Send(*StopRequest) error
|
||||
Recv() (*SystemInfo, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type coreGetSystemInfoClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *coreGetSystemInfoClient) Send(m *StopRequest) error {
|
||||
return x.ClientStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func (x *coreGetSystemInfoClient) Recv() (*SystemInfo, error) {
|
||||
m := new(SystemInfo)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||
type Core_GetSystemInfoClient = grpc.BidiStreamingClient[StopRequest, SystemInfo]
|
||||
|
||||
func (c *coreClient) Setup(ctx context.Context, in *SetupRequest, opts ...grpc.CallOption) (*Response, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Response)
|
||||
err := c.cc.Invoke(ctx, Core_Setup_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Core_Setup_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -373,8 +278,9 @@ func (c *coreClient) Setup(ctx context.Context, in *SetupRequest, opts ...grpc.C
|
||||
}
|
||||
|
||||
func (c *coreClient) Parse(ctx context.Context, in *ParseRequest, opts ...grpc.CallOption) (*ParseResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(ParseResponse)
|
||||
err := c.cc.Invoke(ctx, Core_Parse_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Core_Parse_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -382,8 +288,9 @@ func (c *coreClient) Parse(ctx context.Context, in *ParseRequest, opts ...grpc.C
|
||||
}
|
||||
|
||||
func (c *coreClient) ChangeConfigOptions(ctx context.Context, in *ChangeConfigOptionsRequest, opts ...grpc.CallOption) (*CoreInfoResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(CoreInfoResponse)
|
||||
err := c.cc.Invoke(ctx, Core_ChangeConfigOptions_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Core_ChangeConfigOptions_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -391,8 +298,9 @@ func (c *coreClient) ChangeConfigOptions(ctx context.Context, in *ChangeConfigOp
|
||||
}
|
||||
|
||||
func (c *coreClient) StartService(ctx context.Context, in *StartRequest, opts ...grpc.CallOption) (*CoreInfoResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(CoreInfoResponse)
|
||||
err := c.cc.Invoke(ctx, Core_StartService_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Core_StartService_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -400,8 +308,9 @@ func (c *coreClient) StartService(ctx context.Context, in *StartRequest, opts ..
|
||||
}
|
||||
|
||||
func (c *coreClient) Stop(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*CoreInfoResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(CoreInfoResponse)
|
||||
err := c.cc.Invoke(ctx, Core_Stop_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Core_Stop_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -409,8 +318,9 @@ func (c *coreClient) Stop(ctx context.Context, in *Empty, opts ...grpc.CallOptio
|
||||
}
|
||||
|
||||
func (c *coreClient) Restart(ctx context.Context, in *StartRequest, opts ...grpc.CallOption) (*CoreInfoResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(CoreInfoResponse)
|
||||
err := c.cc.Invoke(ctx, Core_Restart_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Core_Restart_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -418,8 +328,9 @@ func (c *coreClient) Restart(ctx context.Context, in *StartRequest, opts ...grpc
|
||||
}
|
||||
|
||||
func (c *coreClient) SelectOutbound(ctx context.Context, in *SelectOutboundRequest, opts ...grpc.CallOption) (*Response, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Response)
|
||||
err := c.cc.Invoke(ctx, Core_SelectOutbound_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Core_SelectOutbound_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -427,8 +338,9 @@ func (c *coreClient) SelectOutbound(ctx context.Context, in *SelectOutboundReque
|
||||
}
|
||||
|
||||
func (c *coreClient) UrlTest(ctx context.Context, in *UrlTestRequest, opts ...grpc.CallOption) (*Response, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Response)
|
||||
err := c.cc.Invoke(ctx, Core_UrlTest_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Core_UrlTest_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -436,8 +348,9 @@ func (c *coreClient) UrlTest(ctx context.Context, in *UrlTestRequest, opts ...gr
|
||||
}
|
||||
|
||||
func (c *coreClient) GenerateWarpConfig(ctx context.Context, in *GenerateWarpConfigRequest, opts ...grpc.CallOption) (*WarpGenerationResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(WarpGenerationResponse)
|
||||
err := c.cc.Invoke(ctx, Core_GenerateWarpConfig_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Core_GenerateWarpConfig_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -445,8 +358,9 @@ func (c *coreClient) GenerateWarpConfig(ctx context.Context, in *GenerateWarpCon
|
||||
}
|
||||
|
||||
func (c *coreClient) GetSystemProxyStatus(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*SystemProxyStatus, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(SystemProxyStatus)
|
||||
err := c.cc.Invoke(ctx, Core_GetSystemProxyStatus_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Core_GetSystemProxyStatus_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -454,54 +368,37 @@ func (c *coreClient) GetSystemProxyStatus(ctx context.Context, in *Empty, opts .
|
||||
}
|
||||
|
||||
func (c *coreClient) SetSystemProxyEnabled(ctx context.Context, in *SetSystemProxyEnabledRequest, opts ...grpc.CallOption) (*Response, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Response)
|
||||
err := c.cc.Invoke(ctx, Core_SetSystemProxyEnabled_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Core_SetSystemProxyEnabled_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *coreClient) LogListener(ctx context.Context, opts ...grpc.CallOption) (Core_LogListenerClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &Core_ServiceDesc.Streams[4], Core_LogListener_FullMethodName, opts...)
|
||||
func (c *coreClient) LogListener(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[StopRequest, LogMessage], error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
stream, err := c.cc.NewStream(ctx, &Core_ServiceDesc.Streams[4], Core_LogListener_FullMethodName, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &coreLogListenerClient{stream}
|
||||
x := &grpc.GenericClientStream[StopRequest, LogMessage]{ClientStream: stream}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type Core_LogListenerClient interface {
|
||||
Send(*StopRequest) error
|
||||
Recv() (*LogMessage, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type coreLogListenerClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *coreLogListenerClient) Send(m *StopRequest) error {
|
||||
return x.ClientStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func (x *coreLogListenerClient) Recv() (*LogMessage, error) {
|
||||
m := new(LogMessage)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||
type Core_LogListenerClient = grpc.BidiStreamingClient[StopRequest, LogMessage]
|
||||
|
||||
// CoreServer is the server API for Core service.
|
||||
// All implementations must embed UnimplementedCoreServer
|
||||
// for forward compatibility
|
||||
// for forward compatibility.
|
||||
type CoreServer interface {
|
||||
Start(context.Context, *StartRequest) (*CoreInfoResponse, error)
|
||||
CoreInfoListener(Core_CoreInfoListenerServer) error
|
||||
OutboundsInfo(Core_OutboundsInfoServer) error
|
||||
MainOutboundsInfo(Core_MainOutboundsInfoServer) error
|
||||
GetSystemInfo(Core_GetSystemInfoServer) error
|
||||
CoreInfoListener(grpc.BidiStreamingServer[StopRequest, CoreInfoResponse]) error
|
||||
OutboundsInfo(grpc.BidiStreamingServer[StopRequest, OutboundGroupList]) error
|
||||
MainOutboundsInfo(grpc.BidiStreamingServer[StopRequest, OutboundGroupList]) error
|
||||
GetSystemInfo(grpc.BidiStreamingServer[StopRequest, SystemInfo]) error
|
||||
Setup(context.Context, *SetupRequest) (*Response, error)
|
||||
Parse(context.Context, *ParseRequest) (*ParseResponse, error)
|
||||
ChangeConfigOptions(context.Context, *ChangeConfigOptionsRequest) (*CoreInfoResponse, error)
|
||||
@@ -514,27 +411,30 @@ type CoreServer interface {
|
||||
GenerateWarpConfig(context.Context, *GenerateWarpConfigRequest) (*WarpGenerationResponse, error)
|
||||
GetSystemProxyStatus(context.Context, *Empty) (*SystemProxyStatus, error)
|
||||
SetSystemProxyEnabled(context.Context, *SetSystemProxyEnabledRequest) (*Response, error)
|
||||
LogListener(Core_LogListenerServer) error
|
||||
LogListener(grpc.BidiStreamingServer[StopRequest, LogMessage]) error
|
||||
mustEmbedUnimplementedCoreServer()
|
||||
}
|
||||
|
||||
// UnimplementedCoreServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedCoreServer struct {
|
||||
}
|
||||
// UnimplementedCoreServer must be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedCoreServer struct{}
|
||||
|
||||
func (UnimplementedCoreServer) Start(context.Context, *StartRequest) (*CoreInfoResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Start not implemented")
|
||||
}
|
||||
func (UnimplementedCoreServer) CoreInfoListener(Core_CoreInfoListenerServer) error {
|
||||
func (UnimplementedCoreServer) CoreInfoListener(grpc.BidiStreamingServer[StopRequest, CoreInfoResponse]) error {
|
||||
return status.Errorf(codes.Unimplemented, "method CoreInfoListener not implemented")
|
||||
}
|
||||
func (UnimplementedCoreServer) OutboundsInfo(Core_OutboundsInfoServer) error {
|
||||
func (UnimplementedCoreServer) OutboundsInfo(grpc.BidiStreamingServer[StopRequest, OutboundGroupList]) error {
|
||||
return status.Errorf(codes.Unimplemented, "method OutboundsInfo not implemented")
|
||||
}
|
||||
func (UnimplementedCoreServer) MainOutboundsInfo(Core_MainOutboundsInfoServer) error {
|
||||
func (UnimplementedCoreServer) MainOutboundsInfo(grpc.BidiStreamingServer[StopRequest, OutboundGroupList]) error {
|
||||
return status.Errorf(codes.Unimplemented, "method MainOutboundsInfo not implemented")
|
||||
}
|
||||
func (UnimplementedCoreServer) GetSystemInfo(Core_GetSystemInfoServer) error {
|
||||
func (UnimplementedCoreServer) GetSystemInfo(grpc.BidiStreamingServer[StopRequest, SystemInfo]) error {
|
||||
return status.Errorf(codes.Unimplemented, "method GetSystemInfo not implemented")
|
||||
}
|
||||
func (UnimplementedCoreServer) Setup(context.Context, *SetupRequest) (*Response, error) {
|
||||
@@ -570,10 +470,11 @@ func (UnimplementedCoreServer) GetSystemProxyStatus(context.Context, *Empty) (*S
|
||||
func (UnimplementedCoreServer) SetSystemProxyEnabled(context.Context, *SetSystemProxyEnabledRequest) (*Response, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method SetSystemProxyEnabled not implemented")
|
||||
}
|
||||
func (UnimplementedCoreServer) LogListener(Core_LogListenerServer) error {
|
||||
func (UnimplementedCoreServer) LogListener(grpc.BidiStreamingServer[StopRequest, LogMessage]) error {
|
||||
return status.Errorf(codes.Unimplemented, "method LogListener not implemented")
|
||||
}
|
||||
func (UnimplementedCoreServer) mustEmbedUnimplementedCoreServer() {}
|
||||
func (UnimplementedCoreServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeCoreServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to CoreServer will
|
||||
@@ -583,6 +484,13 @@ type UnsafeCoreServer interface {
|
||||
}
|
||||
|
||||
func RegisterCoreServer(s grpc.ServiceRegistrar, srv CoreServer) {
|
||||
// If the following call pancis, it indicates UnimplementedCoreServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&Core_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
@@ -605,108 +513,32 @@ func _Core_Start_Handler(srv interface{}, ctx context.Context, dec func(interfac
|
||||
}
|
||||
|
||||
func _Core_CoreInfoListener_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
return srv.(CoreServer).CoreInfoListener(&coreCoreInfoListenerServer{stream})
|
||||
return srv.(CoreServer).CoreInfoListener(&grpc.GenericServerStream[StopRequest, CoreInfoResponse]{ServerStream: stream})
|
||||
}
|
||||
|
||||
type Core_CoreInfoListenerServer interface {
|
||||
Send(*CoreInfoResponse) error
|
||||
Recv() (*StopRequest, error)
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type coreCoreInfoListenerServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *coreCoreInfoListenerServer) Send(m *CoreInfoResponse) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func (x *coreCoreInfoListenerServer) Recv() (*StopRequest, error) {
|
||||
m := new(StopRequest)
|
||||
if err := x.ServerStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||
type Core_CoreInfoListenerServer = grpc.BidiStreamingServer[StopRequest, CoreInfoResponse]
|
||||
|
||||
func _Core_OutboundsInfo_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
return srv.(CoreServer).OutboundsInfo(&coreOutboundsInfoServer{stream})
|
||||
return srv.(CoreServer).OutboundsInfo(&grpc.GenericServerStream[StopRequest, OutboundGroupList]{ServerStream: stream})
|
||||
}
|
||||
|
||||
type Core_OutboundsInfoServer interface {
|
||||
Send(*OutboundGroupList) error
|
||||
Recv() (*StopRequest, error)
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type coreOutboundsInfoServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *coreOutboundsInfoServer) Send(m *OutboundGroupList) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func (x *coreOutboundsInfoServer) Recv() (*StopRequest, error) {
|
||||
m := new(StopRequest)
|
||||
if err := x.ServerStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||
type Core_OutboundsInfoServer = grpc.BidiStreamingServer[StopRequest, OutboundGroupList]
|
||||
|
||||
func _Core_MainOutboundsInfo_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
return srv.(CoreServer).MainOutboundsInfo(&coreMainOutboundsInfoServer{stream})
|
||||
return srv.(CoreServer).MainOutboundsInfo(&grpc.GenericServerStream[StopRequest, OutboundGroupList]{ServerStream: stream})
|
||||
}
|
||||
|
||||
type Core_MainOutboundsInfoServer interface {
|
||||
Send(*OutboundGroupList) error
|
||||
Recv() (*StopRequest, error)
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type coreMainOutboundsInfoServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *coreMainOutboundsInfoServer) Send(m *OutboundGroupList) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func (x *coreMainOutboundsInfoServer) Recv() (*StopRequest, error) {
|
||||
m := new(StopRequest)
|
||||
if err := x.ServerStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||
type Core_MainOutboundsInfoServer = grpc.BidiStreamingServer[StopRequest, OutboundGroupList]
|
||||
|
||||
func _Core_GetSystemInfo_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
return srv.(CoreServer).GetSystemInfo(&coreGetSystemInfoServer{stream})
|
||||
return srv.(CoreServer).GetSystemInfo(&grpc.GenericServerStream[StopRequest, SystemInfo]{ServerStream: stream})
|
||||
}
|
||||
|
||||
type Core_GetSystemInfoServer interface {
|
||||
Send(*SystemInfo) error
|
||||
Recv() (*StopRequest, error)
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type coreGetSystemInfoServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *coreGetSystemInfoServer) Send(m *SystemInfo) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func (x *coreGetSystemInfoServer) Recv() (*StopRequest, error) {
|
||||
m := new(StopRequest)
|
||||
if err := x.ServerStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||
type Core_GetSystemInfoServer = grpc.BidiStreamingServer[StopRequest, SystemInfo]
|
||||
|
||||
func _Core_Setup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(SetupRequest)
|
||||
@@ -907,30 +739,11 @@ func _Core_SetSystemProxyEnabled_Handler(srv interface{}, ctx context.Context, d
|
||||
}
|
||||
|
||||
func _Core_LogListener_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
return srv.(CoreServer).LogListener(&coreLogListenerServer{stream})
|
||||
return srv.(CoreServer).LogListener(&grpc.GenericServerStream[StopRequest, LogMessage]{ServerStream: stream})
|
||||
}
|
||||
|
||||
type Core_LogListenerServer interface {
|
||||
Send(*LogMessage) error
|
||||
Recv() (*StopRequest, error)
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type coreLogListenerServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *coreLogListenerServer) Send(m *LogMessage) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func (x *coreLogListenerServer) Recv() (*StopRequest, error) {
|
||||
m := new(StopRequest)
|
||||
if err := x.ServerStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||
type Core_LogListenerServer = grpc.BidiStreamingServer[StopRequest, LogMessage]
|
||||
|
||||
// Core_ServiceDesc is the grpc.ServiceDesc for Core service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
@@ -1020,7 +833,7 @@ var Core_ServiceDesc = grpc.ServiceDesc{
|
||||
ClientStreams: true,
|
||||
},
|
||||
},
|
||||
Metadata: "hiddifyrpc/hiddify.proto",
|
||||
Metadata: "hiddify.proto",
|
||||
}
|
||||
|
||||
const (
|
||||
@@ -1049,8 +862,9 @@ func NewTunnelServiceClient(cc grpc.ClientConnInterface) TunnelServiceClient {
|
||||
}
|
||||
|
||||
func (c *tunnelServiceClient) Start(ctx context.Context, in *TunnelStartRequest, opts ...grpc.CallOption) (*TunnelResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(TunnelResponse)
|
||||
err := c.cc.Invoke(ctx, TunnelService_Start_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, TunnelService_Start_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -1058,8 +872,9 @@ func (c *tunnelServiceClient) Start(ctx context.Context, in *TunnelStartRequest,
|
||||
}
|
||||
|
||||
func (c *tunnelServiceClient) Stop(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*TunnelResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(TunnelResponse)
|
||||
err := c.cc.Invoke(ctx, TunnelService_Stop_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, TunnelService_Stop_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -1067,8 +882,9 @@ func (c *tunnelServiceClient) Stop(ctx context.Context, in *Empty, opts ...grpc.
|
||||
}
|
||||
|
||||
func (c *tunnelServiceClient) Status(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*TunnelResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(TunnelResponse)
|
||||
err := c.cc.Invoke(ctx, TunnelService_Status_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, TunnelService_Status_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -1076,8 +892,9 @@ func (c *tunnelServiceClient) Status(ctx context.Context, in *Empty, opts ...grp
|
||||
}
|
||||
|
||||
func (c *tunnelServiceClient) Exit(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*TunnelResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(TunnelResponse)
|
||||
err := c.cc.Invoke(ctx, TunnelService_Exit_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, TunnelService_Exit_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -1086,7 +903,7 @@ func (c *tunnelServiceClient) Exit(ctx context.Context, in *Empty, opts ...grpc.
|
||||
|
||||
// TunnelServiceServer is the server API for TunnelService service.
|
||||
// All implementations must embed UnimplementedTunnelServiceServer
|
||||
// for forward compatibility
|
||||
// for forward compatibility.
|
||||
type TunnelServiceServer interface {
|
||||
Start(context.Context, *TunnelStartRequest) (*TunnelResponse, error)
|
||||
Stop(context.Context, *Empty) (*TunnelResponse, error)
|
||||
@@ -1095,9 +912,12 @@ type TunnelServiceServer interface {
|
||||
mustEmbedUnimplementedTunnelServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedTunnelServiceServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedTunnelServiceServer struct {
|
||||
}
|
||||
// UnimplementedTunnelServiceServer must be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedTunnelServiceServer struct{}
|
||||
|
||||
func (UnimplementedTunnelServiceServer) Start(context.Context, *TunnelStartRequest) (*TunnelResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Start not implemented")
|
||||
@@ -1112,6 +932,7 @@ func (UnimplementedTunnelServiceServer) Exit(context.Context, *Empty) (*TunnelRe
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Exit not implemented")
|
||||
}
|
||||
func (UnimplementedTunnelServiceServer) mustEmbedUnimplementedTunnelServiceServer() {}
|
||||
func (UnimplementedTunnelServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeTunnelServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to TunnelServiceServer will
|
||||
@@ -1121,6 +942,13 @@ type UnsafeTunnelServiceServer interface {
|
||||
}
|
||||
|
||||
func RegisterTunnelServiceServer(s grpc.ServiceRegistrar, srv TunnelServiceServer) {
|
||||
// If the following call pancis, it indicates UnimplementedTunnelServiceServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&TunnelService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
@@ -1221,5 +1049,5 @@ var TunnelService_ServiceDesc = grpc.ServiceDesc{
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "hiddifyrpc/hiddify.proto",
|
||||
Metadata: "hiddify.proto",
|
||||
}
|
||||
|
||||
@@ -6,12 +6,13 @@ import (
|
||||
"path/filepath"
|
||||
|
||||
"github.com/hiddify/hiddify-core/config"
|
||||
|
||||
_ "github.com/sagernet/gomobile"
|
||||
"github.com/sagernet/sing-box/option"
|
||||
)
|
||||
|
||||
func Setup() error {
|
||||
// return config.StartGRPCServer(7078)
|
||||
// return v2.Start(17078)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
2656
package-lock.json
generated
Normal file
2656
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
8
package.json
Normal file
8
package.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"browserify": "^17.0.0",
|
||||
"google-protobuf": "^3.21.4",
|
||||
"grpc-web": "^1.5.0",
|
||||
"protobufjs-cli": "^1.1.3"
|
||||
}
|
||||
}
|
||||
@@ -16,7 +16,19 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
func GenerateCertificate(certPath, keyPath string, isServer bool) {
|
||||
func fileExists(path string) bool {
|
||||
_, err := os.Stat(path)
|
||||
return !os.IsNotExist(err) // returns true if the file exists
|
||||
}
|
||||
|
||||
func GenerateCertificate(certPath, keyPath string, isServer bool, skipIfExist bool) {
|
||||
if skipIfExist && fileExists(certPath) && fileExists(keyPath) {
|
||||
return
|
||||
}
|
||||
err := os.MkdirAll("cert", 0o744)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
priv, err := ecdsa.GenerateKey(elliptic.P384(), rand.Reader)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
@@ -56,7 +68,7 @@ func GenerateCertificate(certPath, keyPath string, isServer bool) {
|
||||
panic(err)
|
||||
}
|
||||
defer certFile.Close()
|
||||
certFile.Chmod(0644)
|
||||
certFile.Chmod(0o644)
|
||||
pem.Encode(certFile, &pem.Block{Type: "CERTIFICATE", Bytes: certDER})
|
||||
|
||||
keyFile, err := os.Create(keyPath)
|
||||
@@ -68,16 +80,12 @@ func GenerateCertificate(certPath, keyPath string, isServer bool) {
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
keyFile.Chmod(0644)
|
||||
keyFile.Chmod(0o644)
|
||||
pem.Encode(keyFile, &pem.Block{Type: "EC PRIVATE KEY", Bytes: privBytes})
|
||||
}
|
||||
|
||||
func LoadCertificate(certPath, keyPath string) tls.Certificate {
|
||||
cert, err := tls.LoadX509KeyPair(certPath, keyPath)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return cert
|
||||
func LoadCertificate(certPath, keyPath string) (tls.Certificate, error) {
|
||||
return tls.LoadX509KeyPair(certPath, keyPath)
|
||||
}
|
||||
|
||||
func LoadClientCA(certPath string) *x509.CertPool {
|
||||
|
||||
@@ -8,7 +8,9 @@ import (
|
||||
"log"
|
||||
"net"
|
||||
|
||||
"github.com/hiddify/hiddify-core/extension"
|
||||
pb "github.com/hiddify/hiddify-core/hiddifyrpc"
|
||||
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
@@ -23,16 +25,16 @@ type TunnelService struct {
|
||||
pb.UnimplementedTunnelServiceServer
|
||||
}
|
||||
|
||||
func StartGrpcServer(listenAddressG string, service string) error {
|
||||
|
||||
func StartGrpcServer(listenAddressG string, service string) (*grpc.Server, error) {
|
||||
lis, err := net.Listen("tcp", listenAddressG)
|
||||
if err != nil {
|
||||
log.Printf("failed to listen: %v", err)
|
||||
return err
|
||||
return nil, err
|
||||
}
|
||||
s := grpc.NewServer()
|
||||
if service == "core" {
|
||||
pb.RegisterCoreServer(s, &CoreService{})
|
||||
pb.RegisterExtensionHostServiceServer(s, &extension.ExtensionHostService{})
|
||||
} else if service == "hello" {
|
||||
pb.RegisterHelloServer(s, &HelloService{})
|
||||
} else if service == "tunnel" {
|
||||
@@ -43,17 +45,20 @@ func StartGrpcServer(listenAddressG string, service string) error {
|
||||
if err := s.Serve(lis); err != nil {
|
||||
log.Printf("failed to serve: %v", err)
|
||||
}
|
||||
log.Printf("Server stopped")
|
||||
// cancel()
|
||||
}()
|
||||
return nil
|
||||
return s, nil
|
||||
}
|
||||
func StartCoreGrpcServer(listenAddressG string) error {
|
||||
|
||||
func StartCoreGrpcServer(listenAddressG string) (*grpc.Server, error) {
|
||||
return StartGrpcServer(listenAddressG, "core")
|
||||
}
|
||||
|
||||
func StartHelloGrpcServer(listenAddressG string) error {
|
||||
func StartHelloGrpcServer(listenAddressG string) (*grpc.Server, error) {
|
||||
return StartGrpcServer(listenAddressG, "hello")
|
||||
}
|
||||
|
||||
func StartTunnelGrpcServer(listenAddressG string) error {
|
||||
func StartTunnelGrpcServer(listenAddressG string) (*grpc.Server, error) {
|
||||
return StartGrpcServer(listenAddressG, "tunnel")
|
||||
}
|
||||
|
||||
@@ -16,8 +16,10 @@ type hiddifyNext struct{}
|
||||
var port int = 18020
|
||||
|
||||
func (m *hiddifyNext) Start(s service.Service) error {
|
||||
return StartTunnelGrpcServer(fmt.Sprintf("127.0.0.1:%d", port))
|
||||
_, err := StartTunnelGrpcServer(fmt.Sprintf("127.0.0.1:%d", port))
|
||||
return err
|
||||
}
|
||||
|
||||
func (m *hiddifyNext) Stop(s service.Service) error {
|
||||
_, err := Stop()
|
||||
if err != nil {
|
||||
@@ -39,6 +41,7 @@ func getCurrentExecutableDirectory() string {
|
||||
|
||||
return executableDirectory
|
||||
}
|
||||
|
||||
func StartTunnelService(goArg string) (int, string) {
|
||||
svcConfig := &service.Config{
|
||||
Name: "HiddifyTunnelService",
|
||||
@@ -141,5 +144,4 @@ func control(s service.Service, goArg string) (int, string) {
|
||||
}
|
||||
return 2, out
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user