Coder Social home page Coder Social logo

axlrose / rtty Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zhaojh329/rtty

0.0 0.0 0.0 2.18 MB

Access your terminal over the web browser. The 'r' in the name refers to the 'Reverse Proxy' or 'Remote'. It is composed of the client and the server.

License: GNU General Public License v3.0

CMake 16.00% C 84.00%

rtty's Introduction

rtty(中文)

license PRs Welcome Issue Welcome Release Version Build Status

A reverse proxy WebTTY. It is composed of the client and the server. The server is written in go language and uses the vue+iview. You can access any of your terminals through a web browser based on the device ID you set.

rtty is very suitable for remote maintenance your or your company's thousands of Linux devices deployed around the world.

Keep Watching for More Actions on This Space

Features

  • Simple to deployment and easy to use
  • Reverse Proxy
  • Connect your device according to the ID you set up
  • Fully-featured terminal based on Xterm.js
  • SSL support: openssl, mbedtls, CyaSSl(wolfssl)
  • Support upload file to device
  • Support download file from devices
  • Cross platform: macOS, Linux, FreeBSD/OpenBSD, OpenWrt/LEDE

Dependencies for Client side

Deploying the server side

Install the GO language environment (if you haven't installed it)

sudo apt-get install golang     # For Ubuntu

sudo yum install golang         # For Centos

Set GOPATH environment variable(if you haven't set it)(since Go 1.8, default is $HOME/go)

export GOPATH=$HOME/go

Install rtty server

go get -u github.com/zhaojh329/rttys

Manual run

$GOPATH/bin/rttys -port 5912

Install the automatic boot script(debian/ubuntu)

cd $GOPATH/src/github.com/zhaojh329/rttys
sudo ./install.sh
sudo /etc/init.d/rttys start

How to build and install the Client - rtty

For Linux distribution, such as Ubuntu and Centos

Install build tools

sudo apt install gcc cmake git      # For Ubuntu

yum install gcc cmake git           # For Centos

Install dependent packages

sudo apt install libjson-c-dev      # For Ubuntu

sudo apt install json-c-devel       # For Centos

git clone https://git.openwrt.org/project/libubox.git
cd libubox && cmake -DBUILD_LUA=OFF . && sudo make install

git clone https://github.com/zhaojh329/libuwsc.git
cd libuwsc && cmake -DUWSC_SSL_SUPPORT=OFF . && sudo make install

Install RTTY

git clone https://github.com/zhaojh329/rtty.git
cd rtty && cmake . && sudo make install

Run RTTY Replace the following parameters with your own parameters

sudo rtty -I 'My-device-ID' -h 'jianhuizhao.f3322.net' -p 5912 -a -v -d 'My Device Description'

Query online devices

curl http://jianhuizhao.f3322.net:5912/list
[{"id":"My-device-ID","description":"My device"}]

For Embedded Linux Platform

You need to cross compiling by yourself

For OpenWRT

Install

opkg update
opkg list | grep rtty
opkg install rtty-nossl

If the install command fails, you can compile it yourself.

Configuring the server parameter

uci add rtty rtty   # If it's the first configuration
uci set rtty.@rtty[0].host='your server host'
uci set rtty.@rtty[0].port='your server port'

You can customize an ID for your device. If the ID is not configured, RTTY will use the MAC address of the specified network interface as the ID. The format of the MAC address as the ID is: 1A2A3A4A5A6A

uci set rtty.@rtty[0].id='your-device-id'

You can add a description to your device

uci set rtty.@rtty[0].description='My device'

Save configuration and apply

uci commit
/etc/init.d/rtty restart

Usage

Query online devices: http://your-server-host:5912/list

Use your web browser to access your server: http://your-server-host:5912, then enter the id of the terminal you want to access, and then click the connection button

You can easily embed RTTY into your existing platform: http://your-server-host:5912?id=your-id

Automatic login: http://your-server:5912/?id=device-id&username=device-username&password=device-password

Contributing

If you would like to help making rtty better, see the CONTRIBUTING.md file.

rtty's People

Contributors

axlrose avatar zjh809 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.