feat: 结构化IPV4和IPV6的代码

This commit is contained in:
spiritlhl committed 2025-04-11 13:41:09 +00:00
1 parent a832d354da
commit aad93e51f8
3 files changed
+5 -6

No files matched your search

+2 -2
View File
@@ -7,8 +7,8 @@ import (
"github.com/oneclickvirt/backtrace/model"
)
func BackTrace(test bool) {
if test {
func BackTrace(enableIpv6 bool) {
if enableIpv6 {
ipv4Count := len(model.Ipv4s)
ipv6Count := len(model.Ipv6s)
totalCount := ipv4Count + ipv6Count
-1
View File
@@ -155,7 +155,6 @@ func traceIPv6(ch chan Result, i int, offset int) {
}
if tempText == (fmt.Sprintf("%v ", model.Ipv6Names[i]) + fmt.Sprintf("%-40s ", model.Ipv6s[i])) {
tempText += fmt.Sprintf("%v", Red("检测不到已知线路的ASN"))
if model.EnableLoger {
Logger.Warn(fmt.Sprintf("%s (%s) 检测不到已知线路的ASN", model.Ipv6Names[i], model.Ipv6s[i]))
}