GithubHelp home page GithubHelp logo

petercxy / socksdroid Goto Github PK

View Code? Open in Web Editor NEW
246.0 17.0 180.0 3.44 MB

License: GNU General Public License v3.0

Java 0.01% Makefile 0.10% CMake 0.52% C 92.55% Groff 0.59% C++ 0.63% PHP 0.95% Shell 0.71% Yacc 0.59% Lex 0.07% HTML 2.57% Perl 0.32% Groovy 0.38%

socksdroid's Introduction

SocksDroid

SOCKS5 client for Android 5.0+ making use of the VpnService API and tun2socks so that it works without root permission (unlike ProxyDroid).

Most of the JNI code are imported from shadowsocks-android project because they have already done most of the work.

THIS IS NOT A SHADOWSOCKS CLIENT! SOCKS5 IS NOT SHADOWSOCKS!

UDP Forwarding

As tun2socks does not support UDP associate but has its own implementation of UDP forwarding badvpn-udpgw, so it is needed that the udpgw daemon run on remote server to use UDP forwarding.

On remote server

badvpn-udpgw --listen-addr 127.0.0.1:7300

And set UDP Gateway in this app to 127.0.0.1:7300

DNS

If the server does not run udpgw, DNS lookups can also be processed in this app.

It makes use of the TCP DNS feature of pdnsd. You just set a DNS server that supports TCP DNS in this app, and all DNS requests will be transformed into TCP queries.

Routing

The app has an embedded list of non-Chinese IPs. Chinese users can make use of it for best experience in bypassing GFW.

GFW

Note that SOCKS5 is currently blocked by the GFW, which means Chinese users cannot connect to any SOCKS5 servers outside China.

But there are still solutions. For example, use stunnel to wrap the SOCKS5 connection with SSL. See my project stunnel-android for usage on Android.

License

This project is licensed under GNU General Public License Version 3 or later.

socksdroid's People

Contributors

harry-chen avatar petercxy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

socksdroid's Issues

Why we need lock self app ?

Why we must anyway block self-app routing? In another way, the whole app does not traffic during VPN.

b.addDisallowedApplication("net.typeblog.socks");

How we can enable routing for whole device ? For self app and others ?

Hey

Jnihelper: connect() failed: no such file por directory

Interested in developing into a plugin mode?

The plugin provides a 127.0.0.1 socks5 service SocksDroid to connect to the local socks5 service. The plugin's socks5 service is implemented without care. It can be shadowsocks protocol, other custom protocols, etc., to avoid GFW blocking. The plugin is best implemented with golang, simple and convenient. At present, all tools need to modify the app to change the protocol.

How to use the SocksDroid App?

I run the SocksDroid App,
filled the config to App:
1.Socks5 Server IP to App's Server IP,
2.Socks5 Server Port to App's Server Port,
3.Socks5 Server Username to App's Username
4.Socks5 Server Password to App's Password
I'm sure the SocksVpnService was started, and running,
but I can't access https://google.com using the explorer of Android system default.
I can't access http://google.com even I checked the Per-app Proxy button.
Could you show me how to use or config the app?

App exclusion list not working

I've tried to exclude some of my apps ( wrote the package name from settings\apps and each in a separate line ) but it's not working

findLibrary returned null at net.typeblog.socks.System.<clinit>(System.java:6)

I got a crush, when I run SocksDroid app:
Process: net.typeblog.socks, PID: 10543
java.lang.UnsatisfiedLinkError: Couldn't load system from loader dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/net.typeblog.socks-1.apk"],nativeLibraryDirectories=[/data/app-lib/net.typeblog.socks-1, /vendor/lib, /system/lib]]]: findLibrary returned null
at java.lang.Runtime.loadLibrary(Runtime.java:358)
at java.lang.System.loadLibrary(System.java:526)
at net.typeblog.socks.System.(System.java:6)
at java.lang.Class.getDeclaredConstructors(Native Method)
at java.lang.Class.getDeclaredConstructors(Class.java:574)
at org.codehaus.groovy.reflection.CachedClass$2$1.run(CachedClass.java:71)
at java.security.AccessController.doPrivileged(AccessController.java:45)
at org.codehaus.groovy.reflection.CachedClass$2.initValue(CachedClass.java:68)
at org.codehaus.groovy.reflection.CachedClass$2.initValue(CachedClass.java:66)
at org.codehaus.groovy.util.LazyReference.getLocked(LazyReference.java:46)
at org.codehaus.groovy.util.LazyReference.get(LazyReference.java:33)
at org.codehaus.groovy.reflection.CachedClass.getConstructors(CachedClass.java:265)
at groovy.lang.MetaClassImpl.(MetaClassImpl.java:215)
at groovy.lang.MetaClassImpl.(MetaClassImpl.java:225)
at groovy.lang.MetaClassRegistry$MetaClassCreationHandle.createNormalMetaClass(MetaClassRegistry.java:168)
at groovy.lang.MetaClassRegistry$MetaClassCreationHandle.createWithCustomLookup(MetaClassRegistry.java:158)
at groovy.lang.MetaClassRegistry$MetaClassCreationHandle.create(MetaClassRegistry.java:141)
at org.codehaus.groovy.reflection.ClassInfo.getMetaClassUnderLock(ClassInfo.java:250)
at org.codehaus.groovy.reflection.ClassInfo.getMetaClass(ClassInfo.java:282)
at org.codehaus.groovy.runtime.callsite.ClassMetaClassGetPropertySite.(ClassMetaClassGetPropertySite.java:35)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.createClassMetaClassGetPropertySite(AbstractCallSite.java:370)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.createGetPropertySite(AbstractCallSite.java:322)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.acceptGetProperty(AbstractCallSite.java:309)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:293)
at net.typeblog.socks.util.Utility.extractFile(Utility.groovy:51)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite$StaticMetaMethodSiteNoUnwrapNoCoerce.invoke(StaticMetaMethodSite.java:148)
at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite.call(StaticMetaMethodSite.java:88)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:110)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:122)
at net.typeblog.socks.MainActivity.onCreate(MainActivity.groovy:16)
at android.app.Activity.performCreate(Activity.java:5249)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2165)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2250)
at android.app.ActivityThread.access$900(ActivityThread.java:141)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1213)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5072)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:609)
at dalvik.system.NativeStart.main(Native Method)
10-23 11:25:29.017 1469-1479/? W/ActivityManager: Force finishing activity net.typeblog.socks/.MainActivity

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.