This commit is contained in:
user123
2025-12-19 13:15:48 +08:00
parent 18eadd19b1
commit 21c9c72d59
2 changed files with 8 additions and 12 deletions

BIN
l2tp/l2tp

Binary file not shown.

View File

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