mirror of
https://github.com/wyx2685/V2bX.git
synced 2026-02-05 13:10:11 +00:00
update sing-box support
This commit is contained in:
@@ -9,7 +9,7 @@ import (
|
||||
"github.com/Yuzuki616/V2bX/limiter"
|
||||
)
|
||||
|
||||
func (h *Hy) AddNode(tag string, info *panel.NodeInfo, c *conf.ControllerConfig) error {
|
||||
func (h *Hy) AddNode(tag string, info *panel.NodeInfo, c *conf.Options) error {
|
||||
if info.Type != "hysteria" {
|
||||
return errors.New("the core not support " + info.Type)
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ func NewServer(tag string, l *limiter.Limiter) *Server {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *Server) runServer(node *panel.NodeInfo, c *conf.ControllerConfig) error {
|
||||
func (s *Server) runServer(node *panel.NodeInfo, c *conf.Options) error {
|
||||
/*if c.HyOptions == nil {
|
||||
return errors.New("hy options is not vail")
|
||||
}*/
|
||||
|
||||
@@ -22,7 +22,7 @@ func TestServer(t *testing.T) {
|
||||
UpMbps: 100,
|
||||
DownMbps: 100,
|
||||
HyObfs: "atresssdaaaadd",
|
||||
}, &conf.ControllerConfig{
|
||||
}, &conf.Options{
|
||||
ListenIP: "127.0.0.1",
|
||||
HyOptions: conf.HyOptions{},
|
||||
CertConfig: &conf.CertConfig{
|
||||
@@ -36,7 +36,7 @@ func TestServer(t *testing.T) {
|
||||
time.Sleep(10 * time.Second)
|
||||
auth := base64.StdEncoding.EncodeToString([]byte("test1111"))
|
||||
log.Println(auth)
|
||||
log.Println(s.counter.getCounters(auth).UpCounter.Load())
|
||||
log.Println(s.counter.GetUpCount(auth))
|
||||
}
|
||||
}()
|
||||
select {}
|
||||
|
||||
Reference in New Issue
Block a user