mirror of
https://github.com/wyx2685/V2bX.git
synced 2026-02-04 12:40:11 +00:00
fix hy tls bug
fix task
This commit is contained in:
@@ -63,7 +63,7 @@ func (c *Controller) Start() error {
|
||||
return fmt.Errorf("update rule error: %s", err)
|
||||
}
|
||||
}
|
||||
if c.nodeInfo.Tls {
|
||||
if c.nodeInfo.Tls || c.nodeInfo.Type == "hysteria" {
|
||||
err = c.requestCert()
|
||||
if err != nil {
|
||||
return fmt.Errorf("request cert error: %s", err)
|
||||
|
||||
@@ -16,7 +16,8 @@ type Lego struct {
|
||||
}
|
||||
|
||||
func New(config *conf.CertConfig) (*Lego, error) {
|
||||
user, err := NewUser(path.Join("/etc/V2bX/cert/user/",
|
||||
user, err := NewUser(path.Join(path.Dir(config.CertFile),
|
||||
"user",
|
||||
fmt.Sprintf("user-%s.json", config.Email)),
|
||||
config.Email)
|
||||
if err != nil {
|
||||
|
||||
@@ -67,7 +67,7 @@ func (c *Controller) nodeInfoMonitor() (err error) {
|
||||
log.Print(err)
|
||||
return nil
|
||||
}
|
||||
if newNodeInfo.Tls {
|
||||
if c.nodeInfo.Tls || c.nodeInfo.Type == "hysteria" {
|
||||
err = c.requestCert()
|
||||
if err != nil {
|
||||
return fmt.Errorf("request cert error: %s", err)
|
||||
|
||||
Reference in New Issue
Block a user