Skip to content

Commit

Permalink
update Sing and Xray core
Browse files Browse the repository at this point in the history
  • Loading branch information
wyx2685 committed Jan 7, 2024
1 parent 16221d1 commit c4d404d
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 16 deletions.
2 changes: 1 addition & 1 deletion cmd/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ func serverHandle(_ *cobra.Command, _ []string) {
log.WithField("err", err).Error("Restart node failed")
return
}
runtime.GC()
vc, err = vCore.NewCore(c.CoresConfig)
if err != nil {
log.WithField("err", err).Error("New core failed")
Expand All @@ -114,6 +113,7 @@ func serverHandle(_ *cobra.Command, _ []string) {
return
}
log.Info("Nodes restarted")
runtime.GC()
})
if err != nil {
log.WithField("err", err).Error("start watch failed")
Expand Down
8 changes: 3 additions & 5 deletions cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ package cmd

import (
"fmt"
"strings"

vCore "github.com/InazumaV/V2bX/core"
"github.com/spf13/cobra"
)

Expand Down Expand Up @@ -35,8 +33,8 @@ _/ _/ _/ _/ _/ _/
_/ _/_/_/_/ _/_/_/ _/ _/
`)
fmt.Printf("%s %s (%s) \n", codename, version, intro)
fmt.Printf("Supported cores: %s\n", strings.Join(vCore.RegisteredCore(), ", "))
//fmt.Printf("Supported cores: %s\n", strings.Join(vCore.RegisteredCore(), ", "))
// Warning
fmt.Println(Warn("This version need V2board version >= 1.7.0."))
fmt.Println(Warn("The version have many changed for config, please check your config file"))
//fmt.Println(Warn("This version need V2board version >= 1.7.0."))
//fmt.Println(Warn("The version have many changed for config, please check your config file"))
}
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ require (
github.com/goccy/go-json v0.10.2
github.com/hashicorp/go-multierror v1.1.1
github.com/juju/ratelimit v1.0.2
github.com/sagernet/sing v0.3.0-rc.7
github.com/sagernet/sing v0.3.0-rc.7.0.20240105061852-782bc05c5573
github.com/sagernet/sing-box v1.8.0
github.com/sirupsen/logrus v1.9.3
github.com/spf13/cobra v1.8.0
github.com/xtls/xray-core v1.8.7-0.20231229161648-44bb83033f23
github.com/xtls/xray-core v1.8.7-0.20240103005614-2fc4b31fcf5f
golang.org/x/crypto v0.17.0
golang.org/x/sys v0.15.0
google.golang.org/protobuf v1.32.0
Expand Down Expand Up @@ -228,4 +228,4 @@ require (
lukechampine.com/blake3 v1.2.1 // indirect
)

replace github.com/sagernet/sing-box v1.8.0 => github.com/wyx2685/sing-box_mod v0.0.0-20240101150548-e0184ecdfef1
replace github.com/sagernet/sing-box v1.8.0 => github.com/wyx2685/sing-box_mod v0.0.0-20240107155604-00398168e6a9
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -659,8 +659,8 @@ github.com/sagernet/netlink v0.0.0-20220905062125-8043b4a9aa97/go.mod h1:xLnfdiJ
github.com/sagernet/quic-go v0.40.1-beta.2 h1:USRwm36XuAFdcrmv4vDRD+YUOO08DfvLNruXThrVHZU=
github.com/sagernet/quic-go v0.40.1-beta.2/go.mod h1:CcKTpzTAISxrM4PA5M20/wYuz9Tj6Tx4DwGbNl9UQrU=
github.com/sagernet/sing v0.2.18/go.mod h1:OL6k2F0vHmEzXz2KW19qQzu172FDgSbUSODylighuVo=
github.com/sagernet/sing v0.3.0-rc.7 h1:FmnzFRYC6usVgWf112cUxiexwvL+iAurKmCL4Axa9+A=
github.com/sagernet/sing v0.3.0-rc.7/go.mod h1:9pfuAH6mZfgnz/YjP6xu5sxx882rfyjpcrTdUpd6w3g=
github.com/sagernet/sing v0.3.0-rc.7.0.20240105061852-782bc05c5573 h1:aBpX3AIQ6jfIFBj4Gwofd3jZc2s1dC6/ChoyUOglyrc=
github.com/sagernet/sing v0.3.0-rc.7.0.20240105061852-782bc05c5573/go.mod h1:9pfuAH6mZfgnz/YjP6xu5sxx882rfyjpcrTdUpd6w3g=
github.com/sagernet/sing-dns v0.1.12 h1:1HqZ+ln+Rezx/aJMStaS0d7oPeX2EobSV1NT537kyj4=
github.com/sagernet/sing-dns v0.1.12/go.mod h1:rx/DTOisneQpCgNQ4jbFU/JNEtnz0lYcHXenlVzpjEU=
github.com/sagernet/sing-mux v0.1.8-rc.1 h1:5dsZgWmNr9W6JzQj4fb3xX2pMP0OyJH6kVtlqc2kFKA=
Expand Down Expand Up @@ -803,16 +803,16 @@ github.com/vishvananda/netns v0.0.4 h1:Oeaw1EM2JMxD51g9uhtC0D7erkIjgmj8+JZc26m1Y
github.com/vishvananda/netns v0.0.4/go.mod h1:SpkAiCQRtJ6TvvxPnOSyH3BMl6unz3xZlaprSwhNNJM=
github.com/vultr/govultr/v2 v2.17.2 h1:gej/rwr91Puc/tgh+j33p/BLR16UrIPnSr+AIwYWZQs=
github.com/vultr/govultr/v2 v2.17.2/go.mod h1:ZFOKGWmgjytfyjeyAdhQlSWwTjh2ig+X49cAp50dzXI=
github.com/wyx2685/sing-box_mod v0.0.0-20240101150548-e0184ecdfef1 h1:+rK08U/sESAYLa94vgFqXTaYq9zvJGyR5x1hh+4lauI=
github.com/wyx2685/sing-box_mod v0.0.0-20240101150548-e0184ecdfef1/go.mod h1:1UQx4D4JUDYI7O+o/GqqfesmTVKfY8deV7h5qBSlBbw=
github.com/wyx2685/sing-box_mod v0.0.0-20240107155604-00398168e6a9 h1:AClG1Eusots/XjqlOpyQte93Vd7HTRsfgcN9F25LuB0=
github.com/wyx2685/sing-box_mod v0.0.0-20240107155604-00398168e6a9/go.mod h1:8a1axpbonM+X35nb8OmmKao3qiRSvayAXCgbW4ogVJU=
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ=
github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y=
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
github.com/xtls/reality v0.0.0-20231112171332-de1173cf2b19 h1:capMfFYRgH9BCLd6A3Er/cH3A9Nz3CU2KwxwOQZIePI=
github.com/xtls/reality v0.0.0-20231112171332-de1173cf2b19/go.mod h1:dm4y/1QwzjGaK17ofi0Vs6NpKAHegZky8qk6J2JJZAE=
github.com/xtls/xray-core v1.8.7-0.20231229161648-44bb83033f23 h1:M0kpxWlF7KXu4eh+kajlyHASowVJ8lkZa6JqBfxFZXg=
github.com/xtls/xray-core v1.8.7-0.20231229161648-44bb83033f23/go.mod h1:wuFCAmAK3FYhAk7Q1IcJfVzvrPE8kgmU1jr+i2Oy9sY=
github.com/xtls/xray-core v1.8.7-0.20240103005614-2fc4b31fcf5f h1:q/ov+s6FqETjzBw1/0qZKC6/gBbkgyhiuep6qwA0TZo=
github.com/xtls/xray-core v1.8.7-0.20240103005614-2fc4b31fcf5f/go.mod h1:wuFCAmAK3FYhAk7Q1IcJfVzvrPE8kgmU1jr+i2Oy9sY=
github.com/yandex-cloud/go-genproto v0.0.0-20220805142335-27b56ddae16f h1:cG+ehPRJSlqljSufLf1KXeXpUd1dLNjnzA18mZcB/O0=
github.com/yandex-cloud/go-genproto v0.0.0-20220805142335-27b56ddae16f/go.mod h1:HEUYX/p8966tMUHHT+TsS0hF/Ca/NYwqprC5WXSDMfE=
github.com/yandex-cloud/go-sdk v0.0.0-20220805164847-cf028e604997 h1:2wzke3JH7OtN20WsNDZx2VH/TCmsbqtDEbXzjF+i05E=
Expand Down
11 changes: 10 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
package main

import "github.com/InazumaV/V2bX/cmd"
import (
_ "net/http"
_ "net/http/pprof"

"github.com/InazumaV/V2bX/cmd"
)

func main() {
//内存泄漏排查
// go func() {
// http.ListenAndServe("0.0.0.0:6060", nil)
// }()
cmd.Run()
}

0 comments on commit c4d404d

Please sign in to comment.