Closed Biswa96 closed 6 years ago
I'm trying to create your project in C++ just for learning.
😃
Is there any similar library in C/C++?
In pure C, I think you can't avoid a platform dependent implementation (poll/epoll on Linux, iocp on Windows, kqueue on BSD/MacOS...).
In C++, there is Boost.Asio.
Why is that asynchronous I/O feature needed? Can't I just open and close sockets to pass those network packets? I've recently seen libpcap/Winpcap driver to manipulate raw packets (into osi layer2). Can't just use that?
Can't I just open and close sockets to pass those network packets?
You need to relay several connections at once, so you typically have several sockets open to different addresses on the Internet. If you use synchronous I/O (i.e. blocking calls) instead of asynchronous I/O, you'll need two threads per socket (for reading and writing).
I've recently seen libpcap/Winpcap driver to manipulate raw packets (into osi layer2). Can't just use that?
To manipulate raw packets, you need to be root (the main purpose of gnirehtet is to provide reverse tethering without root access). See https://github.com/vvviperrr/SimpleRT or https://github.com/google/vpn-reverse-tether.
The readme file of Google VPN said this
This method leverages VpnService API and does not require root access.
As I'm new to this field I'll go with your provided repo. I want to start with a simple one then I'll caome back to your project. Thanks for help... 😉 Closing....
But one issue is common between those and your project. They can't allow Google Play Store to install apps, though one can surf Google Play Store to see apps. Did you find any cause for this issue? I see many user posted this issue in this repo.
Did you find any cause for this issue?
A priori, it's a PlayStore bug. https://github.com/Genymobile/gnirehtet/issues/37#issuecomment-327212487
@rom1v Is it possible to use gnirehtet's VPN -- to capture packets like Packet Capture or to change DNS like DNS Switch without root. The later two apps also use VPN.
@Biswa96 gnirehtet (internally) does capture packets (and forward them to the relay server), and also configure a custom DNS (with the -d
option).
But its purpose is not to capture/display packet content or change DNS on the device.
Is there any future plan with GUI?
I'm trying to create your project in C++ just for learning. Ive some basic idea about socket and networking. I'm not so familiar with Java or Rust now. In the developer file, you've mentioned some library i.e. Java NIO and Rust mio. Is there any similar library in C/C++?