I’m experimenting with Android VpnService.
Any outgoing socket connection needs to be protected by calling a Java method with the socket fd passed in before connecting, but our TcpStream
immediately connects to the server.
Is there any way to achieve this?
Running code on the RawFd before connecting a TcpStream?
htdocscat
#1
vitalyd
#2
net2’s TcpBuilder can probably help: https://doc.rust-lang.org/net2-rs/net2/struct.TcpBuilder.html
vitalyd
#4
You can create a tokio tcpstream from a std::net one: https://tokio-rs.github.io/tokio-core/tokio_core/net/struct.TcpStream.html#method.connect_stream.