anasfanani / Magisk-Tailscaled

Magisk/KernelSU module for running Tailscale on rooted Android devices. The easiest, most secure way to use WireGuard and 2FA.
https://t.me/systembinsh/158
Other
220 stars 25 forks source link

some advice #1

Closed 1orz closed 10 months ago

1orz commented 11 months ago

Maybe userspace-networking is not necessary on Android devices?

https://github.com/anasfanani/Magisk-Tailscaled/blob/d1c86707fababa6c32922d1ea73ad2352f07e081/service.sh#L21

I just edit it to

cd /data/local/tmp/ && tailscaled -statedir=/data/local/tmp/  >> /data/local/tmp/tailscaled.log 2>&1

whithout tun=userspace-networking and -state=/data/local/tmp/tailscaled.state --port=41641

it can still work properly.

Besides, in this case : when I use sudo tailscale status and other tailscals's commands ,tailscale cannot find tailtailscaled.sock in default situtation because current work dir is not at state /data/local/tmp/. and tailscaled.sock file is here.

any other solution can resolve this problem?

anasfanani commented 11 months ago

Hi, I run with -tun=userspace-networking because I'm run with proxy tool https://github.com/taamarin/box_for_magisk Because you mentioned

whithout tun=userspace-networking and -state=/data/local/tmp/tailscaled.state --port=41641 it can still work properly.

Maybe i can separate this options into different zip file.

I run with cd /data/local/tmp/ && tailscaled -statedir=/data/local/tmp/ because of this Issue

If want to check tailscale status you must go to /data/local/tmp/ directory then type tailscale status or with this command cd /data/local/tmp/ && tailscale status

1orz commented 11 months ago

According to the test results. This module can also be used on KernelSU on my device. So it can also be used as KernelSU modules.

1orz commented 11 months ago

maybe you can modify workflow steps to distribute difference archtecture release and regular release file name

modules-tailscale-[ARCH]-[VERSION].zip it looks like followings:

eg:

modules-tailscale-arm64-v1.56.1.zip modules-tailscale-arm-v1.56.1.zip

it can shrink package size and easily & fast to download instead of current state(Keep all together.)

My mother tongue is Chinese .English may not be very good at for me :( I am currently in the final exam stage. So there is no working time to submit pr.

anasfanani commented 11 months ago

According to the test results. This module can also be used on KernelSU on my device. So it can also be used as KernelSU modules.

Thankyou brother for your info. I will update the README docs.

maybe you can modify workflow steps to distribute difference archtecture release and regular release file name

Great suggestion, I will do this later, currently I'm still learning git and Github, I apologize also my english is not good because my main language is not english, sometimes using translate and github copilot to revision my english 😁 , Hope your exam sucessfull brother.

Also apologize me for bad coding style, I'm learn programming only from this entire internet.

1orz commented 11 months ago

As for what you mentioned in the readme:

https://github.com/anasfanani/Magisk-Tailscaled/blob/08d837ce383407823df411d1ea21b5e561f1a258/README.md?plain=1#L34

by default, when Tailscale runs in the Android environment, it does not meet any logical conditions, leading to falling back to the last 'return tailscale.sock.' This results in a situation where I cannot locate the socket file, thus preventing communication with Tailscaled. The solution may involve submitting a pull request to the official Tailscale repository, provided that an appropriate location for placing the sock file in the Android system can be identified.

https://github.com/tailscale/tailscale/blob/38b4eb941955dc88967f9deda2cc5cac7eff88cf/paths/paths.go#L48

here ↑

anasfanani commented 10 months ago

This should fixed, thankyou for the feedback.

https://github.com/anasfanani/Magisk-Tailscaled/releases/tag/v1.56.1.2