This commit is contained in:
Yuzuki616
2023-07-29 19:27:15 +08:00
parent 78ee16a505
commit ddafdf79b8
56 changed files with 129 additions and 119 deletions

View File

@@ -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"
)

View File

@@ -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
}

View File

@@ -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 {

View File

@@ -1,10 +1,11 @@
package lego
import (
"github.com/Yuzuki616/V2bX/conf"
"log"
"os"
"testing"
"github.com/InazumaV/V2bX/conf"
)
var l *Lego

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -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
}

View File

@@ -4,7 +4,7 @@ import (
"runtime"
"strconv"
"github.com/Yuzuki616/V2bX/api/panel"
"github.com/InazumaV/V2bX/api/panel"
log "github.com/sirupsen/logrus"
)