mirror of
https://github.com/wyx2685/V2bX.git
synced 2026-02-04 12:40:11 +00:00
use route group to storage extra config
This commit is contained in:
@@ -1,17 +1,23 @@
|
||||
package hy
|
||||
|
||||
import (
|
||||
"encoding/base64"
|
||||
"github.com/Yuzuki616/V2bX/api/panel"
|
||||
"github.com/Yuzuki616/V2bX/conf"
|
||||
"github.com/Yuzuki616/V2bX/limiter"
|
||||
"github.com/sirupsen/logrus"
|
||||
"log"
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
|
||||
func TestServer(t *testing.T) {
|
||||
logrus.SetLevel(logrus.DebugLevel)
|
||||
s := NewServer("test")
|
||||
limiter.Init()
|
||||
l := limiter.AddLimiter("test", &conf.LimitConfig{}, nil)
|
||||
s := NewServer("test", l)
|
||||
t.Log(s.runServer(&panel.NodeInfo{
|
||||
Port: 11415,
|
||||
Port: 1145,
|
||||
UpMbps: 100,
|
||||
DownMbps: 100,
|
||||
HyObfs: "atresssdaaaadd",
|
||||
@@ -24,5 +30,13 @@ func TestServer(t *testing.T) {
|
||||
},
|
||||
}))
|
||||
s.users.Store("test1111", struct{}{})
|
||||
go func() {
|
||||
for {
|
||||
time.Sleep(10 * time.Second)
|
||||
auth := base64.StdEncoding.EncodeToString([]byte("test1111"))
|
||||
log.Println(auth)
|
||||
log.Println(s.counter.getCounters(auth).UpCounter.Load())
|
||||
}
|
||||
}()
|
||||
select {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user