change name of core to hiddify-core

This commit is contained in:
hiddify
2024-03-22 16:25:56 +00:00
parent 4193b22a09
commit 3d3b4e4625
28 changed files with 37 additions and 38 deletions

View File

@@ -3,7 +3,7 @@ package main
import ( import (
"os" "os"
"github.com/hiddify/libcore/cmd" "github.com/hiddify/hiddify-core/cmd"
) )
func main() { func main() {

View File

@@ -6,7 +6,7 @@ import (
"os" "os"
"path/filepath" "path/filepath"
"github.com/hiddify/libcore/config" "github.com/hiddify/hiddify-core/config"
"github.com/sagernet/sing-box/experimental/libbox" "github.com/sagernet/sing-box/experimental/libbox"
"github.com/sagernet/sing-box/log" "github.com/sagernet/sing-box/log"
"github.com/sagernet/sing-box/option" "github.com/sagernet/sing-box/option"

View File

@@ -3,7 +3,7 @@ package cmd
import ( import (
"os" "os"
"github.com/hiddify/libcore/utils" "github.com/hiddify/hiddify-core/utils"
"github.com/spf13/cobra" "github.com/spf13/cobra"
) )

View File

@@ -5,7 +5,7 @@ import (
"os" "os"
"path/filepath" "path/filepath"
"github.com/hiddify/libcore/config" "github.com/hiddify/hiddify-core/config"
"github.com/sagernet/sing-box/log" "github.com/sagernet/sing-box/log"
"github.com/spf13/cobra" "github.com/spf13/cobra"
) )

View File

@@ -1,7 +1,7 @@
package cmd package cmd
import ( import (
v2 "github.com/hiddify/libcore/v2" v2 "github.com/hiddify/hiddify-core/v2"
"github.com/spf13/cobra" "github.com/spf13/cobra"
) )

View File

@@ -4,8 +4,8 @@ import (
"fmt" "fmt"
"time" "time"
"github.com/hiddify/libcore/config" "github.com/hiddify/hiddify-core/config"
v2 "github.com/hiddify/libcore/v2" v2 "github.com/hiddify/hiddify-core/v2"
"github.com/spf13/cobra" "github.com/spf13/cobra"
) )

View File

@@ -7,7 +7,7 @@ import (
"path/filepath" "path/filepath"
"strings" "strings"
"github.com/hiddify/libcore/cmd/internal/build_shared" "github.com/hiddify/hiddify-core/cmd/internal/build_shared"
_ "github.com/sagernet/gomobile" _ "github.com/sagernet/gomobile"
"github.com/sagernet/sing-box/log" "github.com/sagernet/sing-box/log"
"github.com/sagernet/sing/common/rw" "github.com/sagernet/sing/common/rw"

View File

@@ -10,7 +10,7 @@ import (
"runtime" "runtime"
"time" "time"
pb "github.com/hiddify/libcore/hiddifyrpc" pb "github.com/hiddify/hiddify-core/hiddifyrpc"
"github.com/sagernet/sing-box/option" "github.com/sagernet/sing-box/option"
dns "github.com/sagernet/sing-dns" dns "github.com/sagernet/sing-dns"
grpc "google.golang.org/grpc" grpc "google.golang.org/grpc"

View File

@@ -7,7 +7,7 @@ import "C"
import ( import (
"unsafe" "unsafe"
"github.com/hiddify/libcore/cmd" "github.com/hiddify/hiddify-core/cmd"
) )
//export parseCli //export parseCli

View File

@@ -10,10 +10,10 @@ import (
"os" "os"
"unsafe" "unsafe"
"github.com/hiddify/libcore/bridge" "github.com/hiddify/hiddify-core/bridge"
"github.com/hiddify/libcore/config" "github.com/hiddify/hiddify-core/config"
pb "github.com/hiddify/libcore/hiddifyrpc" pb "github.com/hiddify/hiddify-core/hiddifyrpc"
v2 "github.com/hiddify/libcore/v2" v2 "github.com/hiddify/hiddify-core/v2"
"github.com/sagernet/sing-box/log" "github.com/sagernet/sing-box/log"
) )

View File

@@ -1,7 +1,7 @@
package main package main
import "C" import "C"
import v2 "github.com/hiddify/libcore/v2" import v2 "github.com/hiddify/hiddify-core/v2"
//export StartCoreGrpcServer //export StartCoreGrpcServer
func StartCoreGrpcServer(listenAddress *C.char) (CErr *C.char) { func StartCoreGrpcServer(listenAddress *C.char) (CErr *C.char) {

View File

@@ -5,7 +5,7 @@ import (
"os" "os"
"path/filepath" "path/filepath"
"github.com/hiddify/libcore/config" "github.com/hiddify/hiddify-core/config"
_ "github.com/sagernet/gomobile" _ "github.com/sagernet/gomobile"
"github.com/sagernet/sing-box/option" "github.com/sagernet/sing-box/option"
) )

View File

@@ -1,7 +1,7 @@
package v2 package v2
import ( import (
pb "github.com/hiddify/libcore/hiddifyrpc" pb "github.com/hiddify/hiddify-core/hiddifyrpc"
"github.com/sagernet/sing-box/experimental/libbox" "github.com/sagernet/sing-box/experimental/libbox"
"github.com/sagernet/sing-box/log" "github.com/sagernet/sing-box/log"
) )

View File

@@ -4,7 +4,7 @@ import (
"context" "context"
"time" "time"
pb "github.com/hiddify/libcore/hiddifyrpc" pb "github.com/hiddify/hiddify-core/hiddifyrpc"
"github.com/sagernet/sing-box/experimental/libbox" "github.com/sagernet/sing-box/experimental/libbox"
) )

View File

@@ -5,8 +5,8 @@ import (
"fmt" "fmt"
"time" "time"
"github.com/hiddify/libcore/bridge" "github.com/hiddify/hiddify-core/bridge"
pb "github.com/hiddify/libcore/hiddifyrpc" pb "github.com/hiddify/hiddify-core/hiddifyrpc"
) )
var coreInfoObserver = NewObserver[pb.CoreInfoResponse](10) var coreInfoObserver = NewObserver[pb.CoreInfoResponse](10)

View File

@@ -8,9 +8,9 @@ import (
"path/filepath" "path/filepath"
"time" "time"
"github.com/hiddify/libcore/bridge" "github.com/hiddify/hiddify-core/bridge"
"github.com/hiddify/libcore/config" "github.com/hiddify/hiddify-core/config"
pb "github.com/hiddify/libcore/hiddifyrpc" pb "github.com/hiddify/hiddify-core/hiddifyrpc"
"github.com/sagernet/sing-box/experimental/libbox" "github.com/sagernet/sing-box/experimental/libbox"
"github.com/sagernet/sing-box/log" "github.com/sagernet/sing-box/log"
) )

View File

@@ -5,7 +5,7 @@ import (
"log" "log"
"time" "time"
pb "github.com/hiddify/libcore/hiddifyrpc" pb "github.com/hiddify/hiddify-core/hiddifyrpc"
"google.golang.org/grpc" "google.golang.org/grpc"
) )

View File

@@ -5,7 +5,7 @@ import (
"os/signal" "os/signal"
"syscall" "syscall"
v2 "github.com/hiddify/libcore/v2" v2 "github.com/hiddify/hiddify-core/v2"
) )
func main() { func main() {

View File

@@ -4,12 +4,11 @@ package v2
#include "stdint.h" #include "stdint.h"
*/ */
import "C"
import ( import (
"log" "log"
"net" "net"
pb "github.com/hiddify/libcore/hiddifyrpc" pb "github.com/hiddify/hiddify-core/hiddifyrpc"
"google.golang.org/grpc" "google.golang.org/grpc"
) )

View File

@@ -5,7 +5,7 @@ import (
"log" "log"
"time" "time"
pb "github.com/hiddify/libcore/hiddifyrpc" pb "github.com/hiddify/hiddify-core/hiddifyrpc"
) )
func (s *HelloService) SayHello(ctx context.Context, in *pb.HelloRequest) (*pb.HelloResponse, error) { func (s *HelloService) SayHello(ctx context.Context, in *pb.HelloRequest) (*pb.HelloResponse, error) {

View File

@@ -4,7 +4,7 @@ import (
"fmt" "fmt"
"time" "time"
pb "github.com/hiddify/libcore/hiddifyrpc" pb "github.com/hiddify/hiddify-core/hiddifyrpc"
"github.com/sagernet/sing/common/observable" "github.com/sagernet/sing/common/observable"
) )

View File

@@ -4,7 +4,7 @@ import (
"encoding/json" "encoding/json"
"fmt" "fmt"
"github.com/hiddify/libcore/bridge" "github.com/hiddify/hiddify-core/bridge"
"github.com/sagernet/sing-box/experimental/libbox" "github.com/sagernet/sing-box/experimental/libbox"
"github.com/sagernet/sing-box/log" "github.com/sagernet/sing-box/log"
) )

View File

@@ -1,7 +1,7 @@
package v2 package v2
import ( import (
pb "github.com/hiddify/libcore/hiddifyrpc" pb "github.com/hiddify/hiddify-core/hiddifyrpc"
"github.com/sagernet/sing-box/experimental/libbox" "github.com/sagernet/sing-box/experimental/libbox"
"github.com/sagernet/sing-box/log" "github.com/sagernet/sing-box/log"

View File

@@ -1,6 +1,6 @@
package v2 package v2
import pb "github.com/hiddify/libcore/hiddifyrpc" import pb "github.com/hiddify/hiddify-core/hiddifyrpc"
const ( const (
Stopped = "Stopped" Stopped = "Stopped"

View File

@@ -13,8 +13,8 @@ import (
"syscall" "syscall"
"time" "time"
"github.com/hiddify/libcore/config" "github.com/hiddify/hiddify-core/config"
pb "github.com/hiddify/libcore/hiddifyrpc" pb "github.com/hiddify/hiddify-core/hiddifyrpc"
"github.com/sagernet/sing-box/option" "github.com/sagernet/sing-box/option"
) )

View File

@@ -3,7 +3,7 @@ package v2
import ( import (
"context" "context"
pb "github.com/hiddify/libcore/hiddifyrpc" pb "github.com/hiddify/hiddify-core/hiddifyrpc"
"github.com/sagernet/sing-box/experimental/libbox" "github.com/sagernet/sing-box/experimental/libbox"
) )

View File

@@ -6,7 +6,7 @@ import (
"log" "log"
"os" "os"
pb "github.com/hiddify/libcore/hiddifyrpc" pb "github.com/hiddify/hiddify-core/hiddifyrpc"
) )
func (s *TunnelService) Start(ctx context.Context, in *pb.TunnelStartRequest) (*pb.TunnelResponse, error) { func (s *TunnelService) Start(ctx context.Context, in *pb.TunnelStartRequest) (*pb.TunnelResponse, error) {

View File

@@ -3,8 +3,8 @@ package v2
import ( import (
"context" "context"
"github.com/hiddify/libcore/config" "github.com/hiddify/hiddify-core/config"
pb "github.com/hiddify/libcore/hiddifyrpc" pb "github.com/hiddify/hiddify-core/hiddifyrpc"
) )
func (s *CoreService) GenerateWarpConfig(ctx context.Context, in *pb.GenerateWarpConfigRequest) (*pb.WarpGenerationResponse, error) { func (s *CoreService) GenerateWarpConfig(ctx context.Context, in *pb.GenerateWarpConfigRequest) (*pb.WarpGenerationResponse, error) {