Comments (10)
Do you mind expanding a little bit. This is android to socket you define where the socket leads.
from android-vpn-to-socket.
from android-vpn-to-socket.
Problem is on Proxy.java class where you read data from the server! It waits to read data from server for long time but it doesn't success and it throws SocketReadTimeoutException.
from android-vpn-to-socket.
Your code is great and understandable 👏👏👏 .Is it possible that you have a problem with ip headers you didnt set cheksum and change the length of the data in ipheaders Or you think these fields are not important? I have no so much info about ip packets!!
from android-vpn-to-socket.
It would surprise me if the issue pertained to any of the headers, however its possible. I would guess still that its somewhere in the proxy.java.
Would you be willing to post the error log?
from android-vpn-to-socket.
When you route only one ip address .addRoute("194.163.43.216",32) and remove .addRoute("0.0.0.0",0) it works perfectly. So I think problem is service.protect(server) in first thread it protect the server but in second and in the other thread server connection it cannot protect new server connections so problem begins here it waits for long time to connect server and then it throws SocketReadTimeOutException !!!
from android-vpn-to-socket.
Maybe we need to protect after the connect on Proxy.java?
from android-vpn-to-socket.
That or it may be an issue with bad passing of the intent?
from android-vpn-to-socket.
Try to protect serverSocket in the below part not the server in multiple thread!!! I will try it tomorrow!
Socket socket;
ServerSocket serverSocket = new ServerSocket(port);
port = (short) (serverSocket.getLocalPort() & 0xFFFF);
Log.e("info", "VPNtoSocket VPN started on port: "+serverSocket.getLocalPort());
from android-vpn-to-socket.
İ made some modification on Proxy.java and VPNService.java and NatSession.java and a little bit more on the remaining code and now it works perfectly !!! Project links is https://github.com/ubeyid/Android-VpnSocket-VpnProxy
from android-vpn-to-socket.
Related Issues (3)
- Will not build for me HOT 2
- License request HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android-vpn-to-socket.