Files
NTrace-core/trace/icmp_source_device.go
T
tsosunchia 49b0144cca Fix deploy listener race and ICMP source-device gating
- let deploy mode bind the listener before printing the Web UI address and report the actual bound endpoint when :0 is used
- switch Unix and Windows regression deploy checks to parse the real base URL from deploy logs instead of preallocating a port in the script
- add Unix deploy cleanup traps and make runner scripts temporary/self-cleaning
- gate ICMP source-device propagation to Linux and macOS so unsupported Unix targets keep --dev as source-address selection only
- add server and trace regression tests for the new listener and source-device behavior
2026-04-08 21:59:21 +08:00

11 lines
318 B
Go

package trace
import "github.com/nxtrace/NTrace-core/trace/internal"
func applyICMPSourceDevice(spec *internal.ICMPSpec, osType int, sourceDevice string) {
if spec == nil || sourceDevice == "" || osType == osTypeWindows || !supportsSourceDeviceBinding(currentGOOS) {
return
}
spec.SourceDevice = sourceDevice
}