Skip to content

Commit

Permalink
fix: compile error
Browse files Browse the repository at this point in the history
  • Loading branch information
DVKunion committed Apr 17, 2024
1 parent e933b3f commit cd8fd7c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmd/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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)
}
Expand Down

0 comments on commit cd8fd7c

Please sign in to comment.