mirror of
https://github.com/wyx2685/V2bX.git
synced 2026-02-04 12:40:11 +00:00
update
This commit is contained in:
@@ -3,8 +3,8 @@ package node
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/Yuzuki616/V2bX/common/file"
|
||||
"github.com/Yuzuki616/V2bX/node/lego"
|
||||
"github.com/InazumaV/V2bX/common/file"
|
||||
"github.com/InazumaV/V2bX/node/lego"
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
|
||||
@@ -4,12 +4,12 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/Yuzuki616/V2bX/api/iprecoder"
|
||||
"github.com/Yuzuki616/V2bX/api/panel"
|
||||
"github.com/Yuzuki616/V2bX/common/task"
|
||||
"github.com/Yuzuki616/V2bX/conf"
|
||||
vCore "github.com/Yuzuki616/V2bX/core"
|
||||
"github.com/Yuzuki616/V2bX/limiter"
|
||||
"github.com/InazumaV/V2bX/api/iprecoder"
|
||||
"github.com/InazumaV/V2bX/api/panel"
|
||||
"github.com/InazumaV/V2bX/common/task"
|
||||
"github.com/InazumaV/V2bX/conf"
|
||||
vCore "github.com/InazumaV/V2bX/core"
|
||||
"github.com/InazumaV/V2bX/limiter"
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
@@ -88,7 +88,6 @@ func (c *Controller) Start() error {
|
||||
log.WithField("tag", c.tag).Infof("Added %d new users", added)
|
||||
c.info = node
|
||||
c.startTasks(node)
|
||||
c.info = node
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -2,12 +2,13 @@ package lego
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/Yuzuki616/V2bX/common/file"
|
||||
"github.com/Yuzuki616/V2bX/conf"
|
||||
"github.com/go-acme/lego/v4/certcrypto"
|
||||
"github.com/go-acme/lego/v4/lego"
|
||||
"os"
|
||||
"path"
|
||||
|
||||
"github.com/InazumaV/V2bX/common/file"
|
||||
"github.com/InazumaV/V2bX/conf"
|
||||
"github.com/go-acme/lego/v4/certcrypto"
|
||||
"github.com/go-acme/lego/v4/lego"
|
||||
)
|
||||
|
||||
type Lego struct {
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
package lego
|
||||
|
||||
import (
|
||||
"github.com/Yuzuki616/V2bX/conf"
|
||||
"log"
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/InazumaV/V2bX/conf"
|
||||
)
|
||||
|
||||
var l *Lego
|
||||
|
||||
@@ -8,11 +8,12 @@ import (
|
||||
"crypto/x509"
|
||||
"encoding/pem"
|
||||
"fmt"
|
||||
"github.com/Yuzuki616/V2bX/common/file"
|
||||
"os"
|
||||
|
||||
"github.com/InazumaV/V2bX/common/file"
|
||||
"github.com/go-acme/lego/v4/lego"
|
||||
"github.com/go-acme/lego/v4/registration"
|
||||
"github.com/goccy/go-json"
|
||||
"os"
|
||||
)
|
||||
|
||||
type User struct {
|
||||
|
||||
@@ -3,9 +3,9 @@ package node
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/Yuzuki616/V2bX/api/panel"
|
||||
"github.com/Yuzuki616/V2bX/conf"
|
||||
vCore "github.com/Yuzuki616/V2bX/core"
|
||||
"github.com/InazumaV/V2bX/api/panel"
|
||||
"github.com/InazumaV/V2bX/conf"
|
||||
vCore "github.com/InazumaV/V2bX/core"
|
||||
)
|
||||
|
||||
type Node struct {
|
||||
|
||||
10
node/task.go
10
node/task.go
@@ -3,10 +3,10 @@ package node
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/Yuzuki616/V2bX/api/panel"
|
||||
"github.com/Yuzuki616/V2bX/common/task"
|
||||
vCore "github.com/Yuzuki616/V2bX/core"
|
||||
"github.com/Yuzuki616/V2bX/limiter"
|
||||
"github.com/InazumaV/V2bX/api/panel"
|
||||
"github.com/InazumaV/V2bX/common/task"
|
||||
vCore "github.com/InazumaV/V2bX/core"
|
||||
"github.com/InazumaV/V2bX/limiter"
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
@@ -68,6 +68,7 @@ func (c *Controller) nodeInfoMonitor() (err error) {
|
||||
return nil
|
||||
}
|
||||
if newNodeInfo != nil {
|
||||
c.info = newNodeInfo
|
||||
// nodeInfo changed
|
||||
if newUserInfo != nil {
|
||||
c.userList = newUserInfo
|
||||
@@ -144,7 +145,6 @@ func (c *Controller) nodeInfoMonitor() (err error) {
|
||||
_ = c.userReportPeriodic.Start(false)
|
||||
}
|
||||
log.WithField("tag", c.tag).Infof("Added %d new users", len(c.userList))
|
||||
c.info = newNodeInfo
|
||||
// exit
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"runtime"
|
||||
"strconv"
|
||||
|
||||
"github.com/Yuzuki616/V2bX/api/panel"
|
||||
"github.com/InazumaV/V2bX/api/panel"
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user