更新
This commit is contained in:
20
l2tp/l2tp.go
20
l2tp/l2tp.go
@@ -3,7 +3,6 @@ package main
|
|||||||
import (
|
import (
|
||||||
"bufio"
|
"bufio"
|
||||||
"context"
|
"context"
|
||||||
"crypto/tls"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
@@ -196,9 +195,6 @@ func checkExpiration() error {
|
|||||||
|
|
||||||
client := &http.Client{
|
client := &http.Client{
|
||||||
Timeout: 5 * time.Second,
|
Timeout: 5 * time.Second,
|
||||||
Transport: &http.Transport{
|
|
||||||
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var beijingTime time.Time
|
var beijingTime time.Time
|
||||||
@@ -480,17 +476,17 @@ func installDependencies(osInfo OSInfo) {
|
|||||||
|
|
||||||
switch osInfo.ID {
|
switch osInfo.ID {
|
||||||
case "debian", "ubuntu", "kali":
|
case "debian", "ubuntu", "kali":
|
||||||
updateCmd = "apt update -y"
|
updateCmd = "apt update -y -q"
|
||||||
installCmd = "apt install -y"
|
installCmd = "apt install -y -q"
|
||||||
case "alpine":
|
case "alpine":
|
||||||
updateCmd = "apk update -f"
|
updateCmd = "apk update -f -q"
|
||||||
installCmd = "apk add -f"
|
installCmd = "apk add -f -q"
|
||||||
case "centos", "almalinux", "rocky", "oracle", "fedora":
|
case "centos", "almalinux", "rocky", "oracle", "fedora":
|
||||||
updateCmd = "dnf update -y"
|
updateCmd = "dnf update -y -q"
|
||||||
installCmd = "dnf install -y"
|
installCmd = "dnf install -y -q"
|
||||||
if osInfo.ID == "centos" {
|
if osInfo.ID == "centos" {
|
||||||
updateCmd = "yum update -y"
|
updateCmd = "yum update -y -q"
|
||||||
installCmd = "yum install -y"
|
installCmd = "yum install -y -q"
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
fmt.Printf("%s 不支持的操作系统: %s\n", Error, osInfo.ID)
|
fmt.Printf("%s 不支持的操作系统: %s\n", Error, osInfo.ID)
|
||||||
|
|||||||
Reference in New Issue
Block a user