SOCKS-5 proxy server on android device without root -
is there way create socks-5 proxy server on unrooted android device? why require root? can make own android application create server on device , use server proxy on compluter, without rooting device?
update: came using this library try create proxy server. downloaded files, added main .jar file project dependencies in androidstudio. there trying start server runnable in service. here service code:
public class proxyservice extends service { private static boolean running = false; @override public int onstartcommand(intent intent, int flags, int startid) { serverauthenticatornone auth = new serverauthenticatornone(); proxyserver server = new proxyserver(auth); run(server); //runnable needed because if start service //this thread throws network on main thread exception return start_sticky; } private void run(proxyserver server) { if (running) return; final proxyserver serverfinal = server; running = true; new thread(new runnable() { @override public void run() { while (true) { log.i("debug", "tick " + running); serverfinal.start(1080); log.i("debug", "proxyserver started @ port 1080"); running = true; try { timeunit.seconds.sleep(5); } catch (interruptedexception e) { e.printstacktrace(); running = false; } } } }).start(); } @nullable @override public ibinder onbind(intent intent) { return null; } }
when run code on xiaomi redmi note 2 unrooted device, following logs:
07-26 16:48:18.097: i/debug(19766): tick true 07-26 16:48:18.099: i/xiaomifirewall(1211): firewall pkgname:com.socks.server, result:0
and when check proxy using this website nothing.
i think should have configured server somehow, done using external .properties file outside of .jar , not know how link them in androidstudio project.
i suspect these actions require superuser(root) prevent xiaomi firewall refusing me in starting server.
any advice?
Comments
Post a Comment