From cd8fd7c3f5f23ba0f1d7524ddfb7907095c0fafd Mon Sep 17 00:00:00 2001 From: DVKunion Date: Wed, 17 Apr 2024 15:24:34 +0800 Subject: [PATCH] fix: compile error --- cmd/server/server.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/server/server.go b/cmd/server/server.go index dd01291..39b4d7e 100644 --- a/cmd/server/server.go +++ b/cmd/server/server.go @@ -5,10 +5,10 @@ import ( "os" "strings" - net "github.com/DVKunion/SeaMoon/pkg/network" + "github.com/DVKunion/SeaMoon/pkg/network/basic" + "github.com/DVKunion/SeaMoon/pkg/network/tunnel/service" "github.com/DVKunion/SeaMoon/pkg/system/errors" "github.com/DVKunion/SeaMoon/pkg/system/xlog" - "github.com/DVKunion/SeaMoon/pkg/tunnel/service" ) type Server struct { @@ -40,13 +40,13 @@ func New(opts ...Option) (*Server, error) { func (s *Server) Serve(ctx context.Context) error { network := "tcp" - if net.IsIPv4(s.opts.host) { + if basic.IsIPv4(s.opts.host) { network = "tcp4" } serverAddr := strings.Join(append([]string{s.opts.host, s.opts.port}), ":") - lc := net.ListenConfig{} + lc := basic.ListenConfig{} if s.opts.mtcp { lc.SetMultipathTCP(true) }