Skip to content

Commit 5ee787a

Browse files
committed
Add some troubleshooting steps & link telegram
1 parent e5b4073 commit 5ee787a

File tree

1 file changed

+74
-12
lines changed

1 file changed

+74
-12
lines changed

README.md

+74-12
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
[![Github All Releases](https://img.shields.io/github/downloads/anasfanani/Magisk-Tailscaled/total.svg)]()
44
[![GitHub release](https://img.shields.io/github/release/anasfanani/Magisk-Tailscaled?include_prereleases=&sort=semver&color=blue)](https://github.com/anasfanani/Magisk-Tailscaled/releases/)
55
[![issues - Magisk-Tailscaled](https://img.shields.io/github/issues/anasfanani/Magisk-Tailscaled)](https://github.com/anasfanani/Magisk-Tailscaled/issues)
6+
[![Static Badge](https://img.shields.io/badge/Discussion-Telegram-blue?style=flat&logo=telegram&link=t.me%2Fsystembinsh%2F158)](https://t.me/systembinsh/158)
67

78
# Magisk Tailscaled
89

@@ -37,20 +38,28 @@ After installation, the Tailscale daemon (`tailscaled`) will run automatically o
3738

3839
## Limitation
3940

40-
- This module only support for `arm` or `arm64` architecture, you can download manually.
41+
- This module only support for `arm` or `arm64` architecture, you can download manually for other architecture.
4142
- Tailscale binary is designed to run in Linux environment, Some feature might not works properly.
4243
- MagicDNS currently not working.
44+
- Runs in userspace mode, read more at [https://tailscale.com/kb/1112/userspace-networking](https://tailscale.com/kb/1112/userspace-networking)
45+
- Subnet routes is manually routed with socks5-tun, you must define your own ip routes to `tailscaled.tun.up` and `tailscaled.tun.down`
4346

44-
## Usage
47+
## Usage of this module
4548

4649
This module runs `tailscaled` with the following command:
4750

4851
```bash
4952
tailscaled -tun=userspace-networking -statedir=/data/adb/tailscale/tmp/ -state=/data/adb/tailscale/tmp/tailscaled.state -socket=/data/adb/tailscale/tmp/tailscaled.sock -port=41641
5053
```
51-
This command uses a userspace network stack instead of the kernel's network stack, which can be useful on devices where the kernel's network stack is not compatible with Tailscale. The state file for tailscaled is stored at `/data/adb/tailscale/tmp/tailscaled.state`, and the log output is written to `/data/adb/tailscale/run/tailscaled.log`.
54+
The state file for tailscaled is stored at `/data/adb/tailscale/tmp/tailscaled.state`, and the log output is written to `/data/adb/tailscale/run/tailscaled.log`.
5255

56+
## Available command
5357

58+
- `tailscale`: This command is execute tailscale operation.
59+
- `tailscaled`: This command is execute tailscaled daemon operation.
60+
- `tailscaled.service`: This command for manage tailscaled service, you can start,stop,restart daemon and view live logs the tailscaled operation.
61+
- `tailscaled.tun`: This command is for manage hev-socks5-tunnel.
62+
5463
## Example of Using Tailscale
5564

5665
### SSH to Termux
@@ -79,13 +88,13 @@ Enter your password when prompted, for example, `123`.
7988
3. Open the terminal & SSH to your Android IP:
8089

8190
```bash
82-
ssh <random_user>@<tailscale_ip> -p 8022
91+
ssh <root>@<tailscale_ip> -p 8022
8392
```
8493

8594
For example:
8695

8796
```bash
88-
ssh user@100.95.95.95 -p 8022
97+
ssh root@100.95.95.95 -p 8022
8998
```
9099

91100
### SSH access to your Android device
@@ -159,19 +168,69 @@ FLAGS
159168

160169
For more details about CLI commands, check out the [Tailscale CLI documentation](https://tailscale.com/kb/1080/cli#using-the-cli).
161170

162-
## Troubleshooting
171+
## FAQ & Troubleshooting
163172

164-
Tailscale has some known issues. You can check them out [here](https://github.com/tailscale/tailscale/issues?q=no+safe+place+found+to+store+log+state).
173+
Tailscale has manny issues. You can check them out [here](https://github.com/tailscale/tailscale/issues).
165174

166-
In order to execute any Tailscale command on the terminal, you must navigate to the directory `/data/adb/tailscale/tmp/` and then execute the Tailscale command. For example, `cd /data/adb/tailscale/tmp/` then `tailscale login`, or `tailscale status`.
175+
#### Cannot access other tailnet devices
167176

168-
To address this issue, I have created mock versions of `tailscale` and `tailscaled`. Now, you can run `tailscale login` directly without needing to navigate to the `/data/adb/tailscale/tmp/` directory.
177+
This module runs the `tailscaled` binary in userspace-networking mode. To access other devices in the tailnet, you must use a local proxy on port 1099. I've implemented a workaround using `hev-socks5-tunnel` to tunnel local socks5 on port 1099 and bind it to the interface named `tailscale0`.
169178

170-
If you encounter any problems, take a look at the `service.sh` file. You can modify the commands that are not necessary. If you make some modifications to the commands and they work, please open an issue and make a report.
179+
Please note, this `tailscale0` interface is different from the original `tailscale0` interface on Linux. In Linux, `tailscale0` is managed by the `tailscaled` daemon, whereas in this module, `tailscale0` is managed by `hev-socks5-tunnel`. The default gateway is `100.100.100.100`, as defined in the `tailscaled.tun.config.yaml` file.
171180

172-
This module is confirmed to be supported for KernelSU, as [confirmed by the author of KernelSU](https://github.com/anasfanani/Magisk-Tailscaled/issues/2#issue-2055047162). If you encounter any problems, please let me know.
181+
This solution should work on most common devices. However, if you encounter problems accessing other tailnet devices, follow these troubleshooting steps:
182+
183+
1. Verify that `tailscaled.service` is running. If not, restart it with `tailscaled.service restart`.
184+
2. Verify that `tailscaled.tun` is running. If not, restart it with `tailscaled.tun restart`.
185+
3. Check if your device is connected to tailscaled and try a ping connection with `tailscale ping <your_tailnet_ip>`.
186+
4. Verify the port you want to access is accessible. You can do this by accessing it with another tailscale device or using the Tailscale Android App.
187+
5. Check if the local socks5 server is working with curl. Execute the following command:
188+
```
189+
curl 1.1.1.1 -vI -x localhost:1099
190+
```
191+
If it connects, then the local socks5 server is running and working.
192+
6. Check if the local socks5 server can connect to the tailnet network.
193+
```
194+
curl <your_tailnet_ip>:<port> -vI -x localhost:1099
195+
```
196+
If it connects, then the local socks5 server is functioning correctly.
197+
7. Finally, check the connection directly with `curl <your_tailnet_ip>:<port> -vI`.
198+
199+
If the last step fails, the problem likely lies with `socks5-tun`. Verify there is an interface named `tailscale0`. If it exists, the problem may be with the iptables route, either due to a conflict with another rule or some other issue. Feel free to explore your own solutions. If you're unable to resolve the issue, contact me on Telegram and I'll see if I can assist you.
200+
201+
#### My subnet-routes is'nt working
202+
203+
Yes because we need define the routes with `iptables` in file `tailscaled.tun.up` and `tailscaled.tun.down`, you can check this [issue reference](https://github.com/anasfanani/Magisk-Tailscaled/issues/17).
204+
I suppose you're already know the iptables works, if dont, there are chatAI to ask.
205+
You can copy whole `tailscaled.tun.up` script to chatAI and send instruction with please add 192.168.1.1/24 to this route, also dont forget `tailscaled.tun.down`
206+
207+
If you still can't do it by yourself, I'm verry welcome to people who needs help.
208+
209+
#### Exit nodes
210+
211+
You can check this [issue reference](https://github.com/anasfanani/Magisk-Tailscaled/issues/17).
212+
213+
#### ipv6
173214

174-
If you encounter any issues, you can check the logs at `/data/adb/tailscale/tmp/tailscaled.log`.
215+
Unfortunately, I'm verry lazy to learn ipv6.
216+
217+
#### Headscale
218+
219+
Check [this](https://github.com/anasfanani/Magisk-Tailscaled/issues/19#issuecomment-2091579177).
220+
Also explore on the issue first, then you can ask trough telegram.
221+
222+
223+
#### Other Error & Bugs
224+
225+
You can explore to the issue tab, if there not exists, you can open issue, for help me resolve the problem, you can include fresh log.
226+
227+
1. Restart tailscaled with `tailscaled.service restart`
228+
2. Reproduce what are you doing which has problem.
229+
3. Get log at `/data/adb/tailscale/run/tailscaled.log`
230+
231+
## Notes
232+
233+
This module is confirmed to be supported for KernelSU, as [confirmed by the author of KernelSU](https://github.com/anasfanani/Magisk-Tailscaled/issues/2#issue-2055047162). If you encounter any problems, please let me know.
175234

176235
For more information, check out the links below:
177236

@@ -186,10 +245,13 @@ For more information, check out the links below:
186245

187246
- [Tailscale Inc & AUTHORS](https://github.com/tailscale/tailscale). for the static binaries of tailscale & tailscaled
188247
- [John Wu & Authors](https://github.com/topjohnwu/Magisk). for The Magic Mask for Android
248+
- [heiher & Authors](https://github.com/heiher/hev-socks5-tunnel). for the hev-socks5-tunnel
189249

190250
## Disclaimer
191251

252+
This module is provided as-is, I'm not employee at official tailscale, not a verry genius people which can resolve all your problem.
192253
This module is not affiliated with the official Tailscale. It is a third-party implementation and the author is not responsible for any damage to your device that may occur from its use. Use at your own risk.
254+
Any improvements is required, any PR is verry required, not just welcome.
193255

194256
## License
195257

0 commit comments

Comments
 (0)