mirror of
https://github.com/oneclickvirt/backtrace.git
synced 2026-11-24 23:39:41 +08:00
feat: 结构化IPV4和IPV6的代码
This commit is contained in:
1 parent
a832d354da
commit
aad93e51f8
3 files changed
+5
-6
No files matched your search
+2
-2
@@ -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
|
||||
|
||||
@@ -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]))
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user