Commit Graph
7 Commits
Author SHA1 Message Date
tsosunchia 2cab379924 test(bench): 建立 geo mtr websocket 性能与输出基线 2026-09-04 11:43:21 +08:00
tsosunchia efb437fbac fix: improve error handling and logging across multiple packages
- Enhanced error handling in `mtr_ui.go` to log warnings when raw mode cannot be enabled.
- Updated `geofeed.go` to return a more informative error instead of panicking when geofeed data cannot be loaded.
- Refined error handling in `ptr.go` to return an error if `ptrPath` is not configured.
- Improved error handling in `fast_trace.go` for network interface address retrieval.
- Added error checks in `chunzhen.go` and `ipapicom.go` for HTTP request creation and response reading.
- Enhanced error handling in `ipdbone.go` to return descriptive errors for authentication failures.
- Updated `ipfilter.go` to ensure proper IP parsing before filtering.
- Improved error handling in `ipinfoLocal.go` for database access and record parsing.
- Enhanced error handling in `ipsb.go` for HTTP request creation and response reading.
- Added checks for closed channels in `leo.go` to prevent panics.
- Improved panic recovery in `ws_handler.go` to log errors in the write loop.
- Added read deadline to WebSocket connections in `ws_handler.go` to prevent blocking.
- Enhanced configuration checks in `globalping.go` to avoid nil pointer dereferences.
- Improved error logging in `icmp_ipv4.go` and `icmp_ipv6.go` for send errors.
- Enhanced error handling in `icmp_darwin.go`, `icmp_unix.go`, and `icmp_windows.go` for checksum setting.
- Improved error handling in TCP and UDP implementations across various platforms for checksum settings.
- Enhanced error handling in `tracemap.go` for proxy configuration.
- Improved type assertions in `util.go` for DNS cache lookups.
2026-03-02 00:14:49 +08:00
tsosunchia 3528c2de6c 移除无效的单元测试 2025-10-29 14:33:58 +08:00
tsosunchia aa3df62875 Add tests for DN42 and PTR record functionalities
- Added focused unit tests for listener parsing helpers so buildListenInfo and isDigitsOnly are now validated without invoking the full CLI stack (cmd/listen_info_test.go:10-32).
  - Replaced placeholder DN42 tests with deterministic coverage for geofeed parsing and PTR matching, using temp CSV fixtures to check both positive and negative paths (dn42/geofeed_test.go:13-57, dn42/ptr_test.go:13-56).
  - Rebuilt the ipgeo tests to assert provider lookup mappings, DN42 integration (including PTR fallback and “unknown” defaults), and the disableGeoIP shim (ipgeo/ipgeo_test.go:12-53, ipgeo/dn42_test.go:14-78).
  - Introduced environment helper tests that exercise trimming, boolean, default, and integer reads without touching external DNS (util/env_test.go:9-46).
  - Removed legacy network-dependent tests that only printed output, ensuring the suite is deterministic.
2025-10-29 13:27:37 +08:00
tsosunchia 1580c6111f add mpls func 2023-10-06 21:03:38 +08:00
Leo 79c39b655a clean mod && delete useless files 2023-06-26 14:51:19 +08:00
Leo ba133e3c73 feat: add DN42 Mode 2023-02-16 21:16:47 +08:00