neko/README.md

101 lines
4.4 KiB
Markdown
Raw Normal View History

2020-01-14 00:28:14 +13:00
<div align="center">
<img src="https://github.com/nurdism/neko/raw/master/.github/logo.png" width="650" height="auto"/>
</div>
2020-01-14 22:39:47 +13:00
<div align="center">
2020-01-24 06:29:20 +13:00
<img src="https://i.imgur.com/ZSzbQr7.gif" width="650" height="auto"/>
2020-01-14 22:39:47 +13:00
</div>
2020-01-19 12:30:09 +13:00
# **n**.eko
2020-01-29 14:28:27 +13:00
This app uses Web RTC to stream a desktop inside of a docker container, I made this because [rabb.it](https://en.wikipedia.org/wiki/Rabb.it) went under and my internet can't handle streaming and discord keeps crashing when my friend attempts to. I just want to watch anime with my friends ლ(ಠ益ಠლ) so I started digging throughout the internet and found a few *kinda* clones, but none of them had the virtual browser, then I found [Turtus](https://github.com/Khauri/Turtus) and I was able to figure out the rest. This is by no means a fully featured clone of rabbit, it hs only *one* room. It's stateless, so no saved user names or passwords.
2020-01-13 21:05:38 +13:00
2020-01-29 23:25:54 +13:00
### Features
2020-01-31 12:57:38 +13:00
* Text Chat (With basic markdown support, discord flavor)
2020-01-29 23:25:54 +13:00
* Admin users (Kick, Ban & Force Give/Release Controls)
2020-02-03 11:48:39 +13:00
* Clipboard synchronization (on [supported browsers](https://developer.mozilla.org/en-US/docs/Web/API/Clipboard/readText))
2020-01-29 23:25:54 +13:00
* Emote overlay
* Ignore user (chat and emotes)
* Settings are saved to local storage
2020-01-29 14:28:27 +13:00
### Why **n**.eko?
I like cats 🐱 (`Neko` is the Japanese word for cat), I'm a weeb/nerd
2020-01-29 02:41:55 +13:00
2020-01-29 14:28:27 +13:00
***But why the cat butt?*** Because cats are *assholes*, but you love them anyways.
### Super easy mode setup
2020-01-29 14:28:27 +13:00
1. Deploy a server or VPS
2020-01-19 12:30:09 +13:00
2020-01-29 14:28:27 +13:00
*Recommended Specs:*
2020-01-19 12:57:49 +13:00
2020-01-21 03:36:35 +13:00
| Resolution | Cores | Ram | Recommendation |
|------------|-------|-------|------------------|
| **576p** | 2 | 2gb | Not Recommended |
| **720p** | 4 | 4gb | Good Performance |
| **720p** | 6 | 4-6gb | Recommended |
| **720p+** | 8 | 8gb+ | Best Performance |
2020-01-29 14:28:27 +13:00
***Why are the specs so high?*** : If you think about it, you have to run a full desktop, a browser (a resource hog on its own) *and* encode/transmit the desktop, there's a lot going on and so it demands some power.
2020-01-21 03:36:35 +13:00
2020-01-29 14:28:27 +13:00
2. [Login via SSH](https://www.digitalocean.com/docs/droplets/how-to/connect-with-ssh/)
2020-01-19 12:30:09 +13:00
3. Install Docker
```
curl -sSL https://get.docker.com/ | CHANNEL=stable bash
```
4. Run these commands:
```
2020-01-29 23:25:54 +13:00
sudo ufw allow 80/tcp // if you have ufw installed/enabled
sudo ufw allow 59000:59100/udp
wget https://raw.githubusercontent.com/nurdism/neko/master/docker-compose.yaml
2020-01-29 23:25:54 +13:00
sudo docker-compose up -d
```
2020-02-03 11:48:39 +13:00
5. Visit the IP address server in your browser and login, the default password is `neko`
2020-01-29 14:28:27 +13:00
> 💡 **Protip**: Run `nano docker-compose.yaml` to edit the settings, then press *ctrl+x* to exit and save the file.
2020-01-30 20:19:57 +13:00
### Running:
#### Chromium container:
2020-01-14 00:28:14 +13:00
```
2020-01-31 12:57:38 +13:00
sudo docker run -p 80:8080 -p 59000-59100:59000-59100/udp -e NEKO_PASSWORD='secret' -e NEKO_ADMIN='secret' --cap-add SYS_ADMIN nurdism/neko:chromium
2020-01-14 00:28:14 +13:00
```
2020-01-30 20:19:57 +13:00
*Note:* `--cap-add SYS_ADMIN` is required for chromium to run properly
----
#### Firefox container:
```
sudo docker run -p 8080:8080 -p 59000-59100:59000-59100/udp -e NEKO_PASSWORD='secret' -e NEKO_ADMIN='secret' --shm-size=1gb nurdism/neko:firefox
```
*Note:* `--shm-size=1gb` is required for firefox, tabs will crash otherwise
2020-01-14 00:28:14 +13:00
2020-01-13 21:05:38 +13:00
2020-01-29 14:28:27 +13:00
### Docker Basic Configuration
2020-01-13 21:05:38 +13:00
```
2020-01-28 20:07:35 +13:00
SCREEN_WIDTH=1280 // Display width
SCREEN_HEIGHT=720 // Display height
SCREEN_DEPTH=24 // Display bit depth
DISPLAY=:99.0 // Display number
2020-01-14 00:28:14 +13:00
NEKO_PASSWORD=neko // Password
2020-01-25 04:47:37 +13:00
NEKO_ADMIN=neko // Admin Password
2020-01-14 00:28:14 +13:00
NEKO_BIND=0.0.0.0:8080 // Bind
2020-01-28 20:07:35 +13:00
NEKO_KEY= // (SSL)Key, needed for clipboard sync
NEKO_CERT= // (SSL)Cert, needed for clipboard sync
2020-01-13 21:05:38 +13:00
```
2020-01-29 14:28:27 +13:00
for full documentation on configuring the server [go here](./server/README.md)
2020-01-13 21:05:38 +13:00
### Development
2020-01-29 14:28:27 +13:00
*Highly* recommend you use a [dev container](https://code.visualstudio.com/docs/remote/containers) for [vscode](https://code.visualstudio.com/), I've included the `.devcontainer` I've used to develop this app. To build **n**.eko docker container run:
```
2020-01-31 12:57:38 +13:00
cd .docker && ./build docker
2020-01-29 14:28:27 +13:00
```
2020-01-31 12:57:38 +13:00
the `.docker` folder also contains `./test <browser>` bash script which will launch a desktop with a browser for testing out any changes with the server.
2020-01-29 14:28:27 +13:00
To run the client with hot loading (for development of new client features)
```
cd ./client && npm run serve
```
2020-01-24 06:29:20 +13:00
### Non Goals
2020-01-29 14:28:27 +13:00
* Turning n.eko into a service that serves multiple rooms and browsers/desktops.
* Supporting multiple platforms
* Voice chat, use [Discord](https://discordapp.com/)