Code Monkey home page Code Monkey logo

Comments (24)

SirSAC avatar SirSAC commented on May 20, 2024 1

Hello again, did you find an workaround for Android on ARM processors?
On the Android with x86 processors i not see any problems.

from go-dispatch-proxy.

extremecoders-re avatar extremecoders-re commented on May 20, 2024

Is there any specific error message when running on Android?

from go-dispatch-proxy.

SirSAC avatar SirSAC commented on May 20, 2024

no, just the syscall.BindToDevice return non nil value (err), i have root on my phone with Magisk and i have busybox and extras, i have Android 9 close to stock rom, my phone support aarch64 (ARM v8-A).

from go-dispatch-proxy.

SirSAC avatar SirSAC commented on May 20, 2024

so, you have any idea how we can try to make compatible with Android?

from go-dispatch-proxy.

extremecoders-re avatar extremecoders-re commented on May 20, 2024

Didn't get a chance to work on this yet. How are you compiling for Android? I think GOOS must be set to android rather than linux.

from go-dispatch-proxy.

SirSAC avatar SirSAC commented on May 20, 2024

yes, i did it as GOOS=android and GOARCH=arm64 because my phone have 64-bit processor (ARM-v8) and is rooted with Magisk but not work on the syscall.BindToDevice as work on computer Linux, on net.DialTCP not work at all on Android, i try with different methods and commands to can be working on Android but at this moment i not have positive results, if i have one i will tell you that.
By the way, i found an issue about on how Linux works on firewall thing that make this program to be stuck on only one network and it can be fixed by running this command sudo sysctl --write net.ipv4.conf.all.rp_filter="0", add it below of setcap command.
Cya later, have a nice day and good luck with Android things, im waiting you about Android issue if you have any results or doubts.

from go-dispatch-proxy.

extremecoders-re avatar extremecoders-re commented on May 20, 2024

Tested go-dispatch-proxy on an Android emulator and it's working fine. It's for x86 though not ARM. Traffic is dispatched across two interfaces.

Command used to compile (Requires Android NDK)

x86

$ CGO_ENABLED=1 CC=~/android-ndk-r21e/toolchains/llvm/prebuilt/linux-x86_64/bin/i686-linux-android28-clang GOOS=android GOARCH=386 go build

ARM64

$ CGO_ENABLED=1 CC=~/android-ndk-r21e/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android28-clang GOOS=android GOARCH=arm64 go build

The ARM64 version hasn't been tested. Binaries attached.

go-dispatch-proxy-android-x86.zip
go-dispatch-proxy-android-arm64.zip

from go-dispatch-proxy.

SirSAC avatar SirSAC commented on May 20, 2024

I will test it now and i will tell you if is working or not.

from go-dispatch-proxy.

SirSAC avatar SirSAC commented on May 20, 2024

Nope, on arm64 or on arm in general not work, the error message is:
[WARN] 23.239.16.110:443 -> 10.24.161.221:0 {dial tcp4 10.24.161.221:0->23.239.16.110:443: connect: software caused connection abort}
[WARN] 23.239.16.110:443 -> 192.168.1.3:0 {dial tcp4 192.168.1.3:0->23.239.16.110:443: connect: software caused connection abort}
and this is repeated for any address.

from go-dispatch-proxy.

extremecoders-re avatar extremecoders-re commented on May 20, 2024

Are you running it with root privileges?

from go-dispatch-proxy.

SirSAC avatar SirSAC commented on May 20, 2024

Yes, with su -c ./go-dispatch-proxy

from go-dispatch-proxy.

SirSAC avatar SirSAC commented on May 20, 2024

I think is the problem is ARM not code, but im not sure.

from go-dispatch-proxy.

SirSAC avatar SirSAC commented on May 20, 2024

I have setcap too by termux and not work too with this.

from go-dispatch-proxy.

extremecoders-re avatar extremecoders-re commented on May 20, 2024

Can you test if it works on an Android emulator?
Here there were no such errors when I tested it on Android Studio emulator.

from go-dispatch-proxy.

SirSAC avatar SirSAC commented on May 20, 2024

btw, golang have builtin android compiler, so, is not necessary to an external compiler.

from go-dispatch-proxy.

SirSAC avatar SirSAC commented on May 20, 2024

I tested on my phone that is android 9 (Pie) AOSP and is rooted with Magisk.

from go-dispatch-proxy.

SirSAC avatar SirSAC commented on May 20, 2024

Can you test if it works on an Android emulator?
Here there were no such errors when I tested it on Android Studio emulator.

My PC is low end and i not think so, my CPU is E8200 and 4 GB of RAM of DDR2.

from go-dispatch-proxy.

SirSAC avatar SirSAC commented on May 20, 2024

You said you not tested for ARM64 but tested the x86 on emulator.

from go-dispatch-proxy.

SirSAC avatar SirSAC commented on May 20, 2024

Can give me the link of website of iso or img for x86 Android?

from go-dispatch-proxy.

extremecoders-re avatar extremecoders-re commented on May 20, 2024

golang have builtin android compiler, so, is not necessary to an external compile

About this. AFAIK Setting GOOS=android does require external compiler. It's mentioned in https://golang.org/misc/android/README

you not tested for ARM64 but tested the x86 on emulator

Yep, Just tested the x86 version

Can give me the link of website of iso or img for x86 Android?

from go-dispatch-proxy.

SirSAC avatar SirSAC commented on May 20, 2024

Thanks, i compiled the other programs for Android on ARM64 and i not have any problems with builtin compiler.

from go-dispatch-proxy.

SirSAC avatar SirSAC commented on May 20, 2024

Do not forget to mention this command for some Linux systems that have an conflict with this program.
Command that can fix this is sudo sysctl --write net.ipv4.conf.all.rp_filter=0

from go-dispatch-proxy.

SirSAC avatar SirSAC commented on May 20, 2024

Ubuntu or Debian based systems have this conflict in general.

from go-dispatch-proxy.

SirSAC avatar SirSAC commented on May 20, 2024

Hello again, i fixed the problem on Android, the real problem was ARM not the system, so ARM thinks different and need to have IP address instead of site or web address. Thanks anticipated for trying to help me.

from go-dispatch-proxy.

Related Issues (20)

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.