-
Notifications
You must be signed in to change notification settings - Fork 357
Description
Prerequisites
- I have read CONTRIBUTING.md
What problem does this feature solve or what does it enhance?
(this is more like an RFC right now and not planned work)
Our current experience of obtaining a shell is somewhat inconsistent across devices, and the quality varies:
- telnet without working prompt (orbic-network... and sometimes zte?)
- telnet without working stderr capture (zte Add support for ZTE MF920V #872)
- adb-only (uz801)
- or multiple options
This is mainly because the shell we give users is using whatever on-device tools are available, and is often just a very thin wrapper around them.
I think this hurts rayhunter's extensibility. People want to add random extensions like tailscale, messing with the wifi card or adding some type of notification bridge. There is no clean extension point to this, so one of two things happens:
- it's documented as something to run through the shell (in our FAQ) -- but how to get a shell is left as an exercise to the reader, and so the extension is only available to power users.
- the entire project is forked, these extensions are added and the fork eventually is abandoned (although vibecoding is a part of the reason this happens)
Ideally the people who write those features would be able to maintain them outside of rayhunter, write their own user-friendly installers, and those installers should not have to consider device differences at all just to get a shell on an existing rayhunter device.
Proposed Solution
There are two solutions i can see:
- We preinstall dropbear or our own telnetd on the device by default.
rayhunter-daemoncomes with its own telnet-like shell server.
I think the latter might be significantly easier to do and does not require many changes to the installer to have it guaranteed available on all devices.
If we go with the latter approach, we should be sure that rayhunter-daemon starts in a number of situations where it currently shuts down:
- sdcard not mounted (tplink)
- filesystem read-only or full
/dev/diagis not available
When these things happen today, one can open a shell (somehow) to diagnose the issue. When rayhunter-daemon is the shell and it doesn't start up then, we take away the user's/dev's tools when they need them most.
Alternatives Considered
We refactor the installer internally (and impose more structure on the code) so that shell and file transfer support becomes more consistent that way. I think that will have to happen anyway for the GUI.