drbrad / jtun2socks Goto Github PK
View Code? Open in Web Editor NEWThis works similar to network layer socks client, written completely in java.
License: MIT License
This works similar to network layer socks client, written completely in java.
License: MIT License
Thanks for your efforts.
Now I want to support forwarding UDP.
What time will you support UDP?
If you don't have time to support UDP soon, please guide me(documents or any relate technical) to support forwarding UDP.
Thank you for this code. It's short so it's readable.
First, in NatSession, I would recommend to rename remoteAddress to remoteIP for consistency.
Secondly, this line is not "very good":
https://github.com/DrBrad/JTun2Socks/blob/master/app/src/main/java/jtun2socks/shadowrouter/org/jtun2socks/VPN/Proxy.java#L90
I think that it would be better to use session.remoteAddress. I have a C-implementation of proxy.java and I initially did getsockname for java "socket.getInetAddress().getAddress()" but it was giving me 10.8.0.2. I had to use getpeername.
To continue my point, remoteAddress is not used in proxy.java because you are putting the IP address into the source IP header. So you are duplicating information and remoteAddress is not used. Not a bug but it was confusing a little bit.
Now, as I'm doing a C-implementation of proxy.java, it's very difficult to go back from JNI to JAVA to get the NatSessionManager.getSession((short) socket.getPort()) because the class is started by a service (I could explain this more but that's not the point of the issue). My point is that if remotePort was hidden somewhere else in the socket, it could be retrieved from C without JAVA and without even the NATSession.
So, how could I hide the remotePort to retrieve it without java? Couldn't it be put where the port key is put?
Hello, does this app support username and password for server socks
Proxy server socks5 IPv4 work fine. But when I added a proxy server socks5 IPv6, then Internet access is lost for all content. Error message in Chrome browser ERR_SSL_PROTOCOL_ERROR.
Hey,
you did a amazing job created android socks5 client in java!
i want to use it but i get this error while building in android studio:
/home/paya/AndroidStudioProjects/JTun2Socks/app/src/main/java/jtun2socks/shadowrouter/org/jtun2socks/VPN/Proxy.java:55: error: cannot find symbol
clientIn = socket.getInputStream();
^
symbol: variable clientIn
location: class Proxy.Tunnel
i wasn't able to fix it(did build but doesn't connect)
so if u could fix it and push update it would be really helpful
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.