Compare commits

...

8 Commits

Author SHA1 Message Date
github-actions[bot]
c7ab896812 chore: 更新多个 ASN 的 IPv6 前缀
Some checks failed
创建IPv6检测的前缀 / fetch-ipv6-prefixes (push) Has been cancelled
2025-04-27 01:16:15 +00:00
github-actions[bot]
e2bddf57d7 chore: 更新多个 ASN 的 IPv6 前缀
Some checks failed
创建IPv6检测的前缀 / fetch-ipv6-prefixes (push) Has been cancelled
2025-04-20 01:16:09 +00:00
github-actions
c1bb9b848c Update README.md with new tag v0.0.5-20250413040820
Some checks failed
创建IPv6检测的前缀 / fetch-ipv6-prefixes (push) Has been cancelled
2025-04-13 04:08:21 +00:00
spiritlhl
d975fe6906 fix: 修复目标地址 2025-04-13 03:47:38 +00:00
spiritlhl
c550861ce5
fix: 修复json解析 2025-04-13 11:24:58 +08:00
github-actions[bot]
2d03ca1281 chore: 更新多个 ASN 的 IPv6 前缀 2025-04-13 02:38:26 +00:00
github-actions
d58a45dc56 Update README.md with new tag v0.0.5-20250411152044
Some checks failed
创建IPv6检测的前缀 / fetch-ipv6-prefixes (push) Has been cancelled
2025-04-11 15:20:45 +00:00
spiritlhl
3995e1a1bd
fix: 修复说明的tag自动修改 2025-04-11 23:19:39 +08:00
8 changed files with 38 additions and 18 deletions

View File

@ -7,25 +7,45 @@ jobs:
test:
strategy:
matrix:
go: [ '1.22.x' ]
os: [ ubuntu-latest ]
go: ['1.22.x']
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- name: Test
run: go test ./... -coverprofile=coverage.txt
- name: Create Tag
if: success() # 仅在测试成功时运行
if: success()
run: |
git config --global user.name 'github-actions'
git config --global user.email 'github-actions@github.com'
TAG="v0.0.5-$(date +'%Y%m%d%H%M%S')"
git tag $TAG
git push origin $TAG
echo "TAG=$TAG" >> $GITHUB_ENV
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Update README.md
if: success()
run: |
sed -i "s|go get github.com/oneclickvirt/backtrace@.*|go get github.com/oneclickvirt/backtrace@${TAG}|" README.md
env:
TAG: ${{ env.TAG }}
- name: Commit and Push README.md
if: success()
run: |
git add README.md
git commit -m "Update README.md with new tag ${TAG}"
git push origin main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -74,7 +74,7 @@ rm -rf /usr/bin/backtrace
## 在Golang中使用
```
go get github.com/oneclickvirt/backtrace@latest
go get github.com/oneclickvirt/backtrace@v0.0.5-20250413040820
```
## 概览图

View File

@ -17,7 +17,6 @@
2a04:f581:110b
2a04:f581:a123
2a04:f581:a125
2a0f:7806:fffc
2c0f:f7a8:1
2c0f:f7a8:29
2c0f:f7a8:37

View File

@ -1,5 +1,3 @@
2400:8800:1f0e:5f
2400:8800:1f11:13
2401:cf80:620f:1
2402:4f00
2402:4f00:3000

View File

@ -32,6 +32,7 @@
2409:8004:3820
2409:8004:3821
2409:8004:3822
2409:8004:3841
2409:8004:38c0
2409:8004:801
2409:8004:807
@ -58,6 +59,7 @@
2409:800b:2905
2409:800b:2906
2409:800b:2908
2409:800b:290e
2409:800b:290f
2409:800b:2b03
2409:800b:2b05
@ -250,6 +252,7 @@
2409:8043:2905
2409:8043:2907
2409:8043:2908
2409:8043:290b
2409:8043:290c
2409:8043:2b01
2409:8043:2b02
@ -703,6 +706,8 @@
2409:8087:8015
2409:8087:8016
2409:8087:8017
2409:8087:8018
2409:8087:8019
2409:8087:8106
2409:8089:1020
2409:815c
@ -755,6 +760,8 @@
2409:875c:ff01
2409:875c:ff02
2409:875e
2409:875e:a031
2409:875e:a032
2409:875f
2409:8760
2409:8760:ea00
@ -974,6 +981,8 @@
2409:8962:fcdd
2409:8963
2409:896a
2409:896a:1d4e
2409:896a:1d7e
2409:896a:fffd
2409:896a:fffe
2409:896b
@ -1151,6 +1160,7 @@
2409:8c85:1
2409:8c85:1000
2409:8c85:1001
2409:8c85:1e00
2409:8c85:2
2409:8c85:200
2409:8c85:2028

View File

@ -1,8 +1,6 @@
2408:8120
2408:8120:1
2408:8120:2
2408:8256:226d
2408:8256:228b
2408:8610:3bff
2408:8614:1f0
2408:861c:1fff
@ -14,6 +12,7 @@
2408:8649:2a00
2408:8656:a52
2408:8660:100
2408:8660:ab00
2408:8678:1400
2408:8756:3efd
2408:8a00

View File

@ -70,17 +70,11 @@ func getData(endpoint string) string {
// parseIcmpTargets 解析ICMP目标数据
func parseIcmpTargets(jsonData string) []model.IcmpTarget {
// 确保JSON数据格式正确如果返回的是数组需要添加[和]
if !strings.HasPrefix(jsonData, "[") {
jsonData = "[" + jsonData + "]"
}
// 如果JSON数据中的对象没有正确用逗号分隔修复它
jsonData = strings.ReplaceAll(jsonData, "}{", "},{")
var targets []model.IcmpTarget
err := json.Unmarshal([]byte(jsonData), &targets)
if err != nil {
if model.EnableLoger {
Logger.Error(fmt.Sprintf("Failed to parse ICMP targets: %v", err))
Logger.Info(fmt.Sprintf("解析ICMP目标失败: %s", err.Error()))
}
return nil
}

View File

@ -15,7 +15,7 @@ type IcmpTarget struct {
}
var (
IcmpTargets = "https://raw.githubusercontent.com/spiritLHLS/icmp_targets/refs/heads/main/nodes.json"
IcmpTargets = "https://raw.githubusercontent.com/spiritLHLS/icmp_targets/main/nodes.json"
CdnList = []string{
"http://cdn1.spiritlhl.net/",
"http://cdn2.spiritlhl.net/",