fix some bugs

support ip limit for hy
This commit is contained in:
yuzuki999
2023-06-16 10:04:39 +08:00
parent 28acdc7087
commit fee53a8384
10 changed files with 236 additions and 165 deletions

View File

@@ -4,8 +4,22 @@ import (
"fmt"
"github.com/Yuzuki616/V2bX/common/file"
"github.com/Yuzuki616/V2bX/node/lego"
"log"
)
func (c *Controller) renewCertTask() {
l, err := lego.New(c.CertConfig)
if err != nil {
log.Print("new lego error: ", err)
return
}
err = l.RenewCert()
if err != nil {
log.Print("renew cert error: ", err)
return
}
}
func (c *Controller) requestCert() error {
if c.CertConfig.CertFile == "" || c.CertConfig.KeyFile == "" {
return fmt.Errorf("cert file path or key file path not exist")