在没有 ping 的情况下使用 TTL

Using TTL without ping

是否有任何方法可以通过 tcp 或 webrequest 使用生存时间值?在某些网络中,icmp 和 echo 数据包是不允许的。我需要一种方法来限制具有特定 TTL 值的请求。

您可以使用System.Net.Sockets.Socket.Ttl to set the TTL if you are creating the socket yourself. I suppose you could do this if you want to make a web request over it: