EFForg / EFForg/rayhunter

Unified, vendored shell server

Open
#895 8 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Rust
Stars
5.8k
Forks
490
Avg merge
3d 10h
Merged PRs (30d)
23

Description

### Prerequisites

- [x] I have read [CONTRIBUTING.md](https://github.com/EFForg/rayhunter/blob/main/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 #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-daemon` comes 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/diag` is 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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.