https://github.com/oneclickvirt/backtrace
回程路由线路测试模块
https://github.com/oneclickvirt/backtrace
4837 9929 backtrace cmi cmin2 cn2 cn2gia cn2gt ctgnet goecs ipv4 trace traceroute
Last synced: 3 months ago
JSON representation
回程路由线路测试模块
- Host: GitHub
- URL: https://github.com/oneclickvirt/backtrace
- Owner: oneclickvirt
- License: apache-2.0
- Created: 2024-05-01T08:04:59.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-29T02:48:29.000Z (3 months ago)
- Last Synced: 2025-06-29T03:43:03.549Z (3 months ago)
- Topics: 4837, 9929, backtrace, cmi, cmin2, cn2, cn2gia, cn2gt, ctgnet, goecs, ipv4, trace, traceroute
- Language: Go
- Homepage: https://github.com/oneclickvirt/ecs
- Size: 165 KB
- Stars: 195
- Watchers: 3
- Forks: 13
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# backtrace
[](https://hits.spiritlhl.net)
[](https://github.com/oneclickvirt/backtrace/actions/workflows/main.yaml)
三网回程路由线路测试
路由的线路判断最终还是得人工判断的才准确,本项目测试结果仅供参考
## 功能
- [x] 检测回程显示IPV4/IPV6地址时的线路(使用1500字节的包),不显示IP地址时显示ASN检测不到
- [x] 支持对```9929```、```4837```和```163```线路的判断
- [x] 支持对```CTGNET```、```CN2GIA```和```CN2GT```线路的判断
- [x] 支持对```CMIN2```和```CMI```线路的判断
- [x] 支持对整个回程路由进行线路分析,一个目标IP可能会分析出多种线路
- [x] 增加对全平台的编译支持,原版[backtrace](https://github.com/zhanghanyun/backtrace)仅支持linux平台的amd64和arm64架构
- [x] 兼容额外的ICMP地址获取,若当前目标IP无法查询路由尝试额外的IP地址## TODO
- [ ] 自动检测汇聚层,裁剪结果不输出汇聚层后的线路(区分境内外段)
- [ ] 添加对主流ISP的POP点检测,区分国际互联能力## 使用
下载、安装、更新
```shell
curl https://raw.githubusercontent.com/oneclickvirt/backtrace/main/backtrace_install.sh -sSf | bash
```或
```
curl https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/backtrace/main/backtrace_install.sh -sSf | bash
```使用
```
backtrace
```或
```
./backtrace
```进行测试
无环境依赖,理论上适配所有系统和主流架构,更多架构请查看 https://github.com/oneclickvirt/backtrace/releases/tag/output
```
Usage: backtrace [options]
-h Show help information
-ipv6
Enable ipv6 testing
-log
Enable logging
-s Disabe show ip info (default true)
-v Show version
```## 卸载
```
rm -rf /root/backtrace
rm -rf /usr/bin/backtrace
```## 在Golang中使用
```
go get github.com/oneclickvirt/backtrace@v0.0.5-20250629024536
```## 概览图



## Thanks
部分代码基于 https://github.com/zhanghanyun/backtrace 的重构和优化,与原版存在很大不同
IPV4/IPV6可ICMP进行ping测试的 https://github.com/spiritLHLS/icmp_targets 收集仓库