Closed evgenybozhko2 closed 4 months ago
Why doesn't this work?
https://github.com/heiher/hev-socks5-tunnel/blob/master/src/hev-socks5-tunnel.c#L550-L553
Restart failed?
Why doesn't this work?
https://github.com/heiher/hev-socks5-tunnel/blob/master/src/hev-socks5-tunnel.c#L550-L553
Restart failed?
Not sure exactly. But restart success, and after the second and next iteration then coming new stats. It looks like hev_socks5_tunnel_init called after getting the successful connection. And important note, it happens only on Xiaomi devices.
To clarify, hev_socks5_tunnel_stats
is not precise, as there is no strict synchronization in place. The startup of hev-socks5-tunnel
is also asynchronous. Without strict synchronization, it is impossible to determine whether it has been started, as it is cleared to 0 only when the process is completed. This also does not account for corner cases caused by weak memory ordering.
I will move the zeroing process to when the service is stopped, as this involves explicit synchronization.
To clarify,
hev_socks5_tunnel_stats
is not precise, as there is no strict synchronization in place. The startup ofhev-socks5-tunnel
is also asynchronous. Without strict synchronization, it is impossible to determine whether it has been started, as it is cleared to 0 only when the process is completed. This also does not account for corner cases caused by weak memory ordering.I will move the zeroing process to when the service is stopped, as this involves explicit synchronization.
Thanks a lot.
Hello dear. Many thanks, for collecting the traffic stats feature. Now I was faced with the issue on exactly Xiaomi Android devices. After restarting the tunnel, the older stats were returned for the first time. So I suggest adding a clean stats feature into tunnel stop.
`void hev_socks5_tunnel_stop (void) { int val;
}`
From hev-socks5-tunnel.c implementation. Maybe someone will faced with this in the future. Thanks