net-route
net-route copied to clipboard
Setting route `0.0.0.0/1` makes the `bind_device_by_index_v4` of socket2 unusable
When setting 0.0.0.0/1
, almost traffic are routing to tun
, and bind_device_by_index_v4
is used to make the socket binding to the specified network interface such that the traffic of the socket does not pass through the routing table. However, it seems not work when using net-route
, the approach does work when using tproxy-config
.
The error is
called
Result::unwrap()
on anErr
value: Os { code: 51, kind: NetworkUnreachable, message: "Network is unreachable" }