LocalVPN
LocalVPN copied to clipboard
Any user space app blocks
First this is really a piece of code! It is really powerful but difficult to read. I am missing some doc to be sure how to use it. Does it exist?
For my issue: LocalvpnService processes packets coming from the internet like: I/RESULTS: count: 0 sip: /216.58.201.234 sport: 443 dip: /192.168.1.27 dport: 43898 I/RESULTS: count: 1 sip: /172.217.19.226 sport: 443 dip: /192.168.1.27 dport: 42040 I/RESULTS: count: 2 sip: /77.238.180.11 sport: 443 dip: /192.168.1.27 dport: 60925 etc... I've added some logs. All modules LocalvpnSerice, TCPinput, TCPoutput, etc... starts well.
But any apps which access the network like chrome accessing google.com blocks and I don't see the packet coming through the vpn,
Is there something well known?
I tried to include an http request in the code but it generates an error: java.net.ConnectException: failed to connect to /192.168.1.1 (port 80) after 6000ms: isConnected failed: ECONNREFUSED (Connection refused)
class ScanAsync extends AsyncTask<String, Integer, Void> { VpnService vpn = new VpnService(); @Override protected Void doInBackground(String... params) { URL url = null;
try {
url = new URL("http://192.168.1.1");
} catch (MalformedURLException e) {
e.printStackTrace();
}
HttpURLConnection conn = null;
try {
if (url != null) {
conn = (HttpURLConnection) url.openConnection();
}
if (conn != null) {
conn.setRequestMethod("GET");
}
} catch (IOException e) {
e.printStackTrace();
}
if (conn != null) {
conn.setConnectTimeout(6000);
}
try {
if (conn != null) {
conn.connect();
}
} catch (IOException e) {
e.printStackTrace();
}
return null;
}
}
the author seems forgot this project :(