mirror of
https://github.com/wyx2685/V2bX.git
synced 2026-02-04 04:30:08 +00:00
fix some bugs
support ip limit for hy
This commit is contained in:
14
node/cert.go
14
node/cert.go
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user