Giter VIP home page Giter VIP logo

rtty's Introduction

rtty(中文)

license PRs Welcome Issue Welcome Release Version Build Status

It is composed of a client and a server. The client is written in pure C. The server is written in go language and the front-end interface is written in iview & Vue.

You can access your terminals from anywhere via the web. Differentiate your different terminals by device ID(If the ID is not set, the MAC address of your device is used).

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

Features

  • Simple to deployment and easy to use
  • Access different devices based on device ID
  • Provide a dashboard to visualize online devices
  • Fully-featured terminal based on Xterm.js
  • Support transfer file
  • SSL support: openssl, mbedtls, CyaSSl(wolfssl)
  • Support Execute a command remote
  • The client is very small, suitable for embedded Linux: rtty(20.1K) + libev(48.5K) + libuwsc(24.4K) + libwolfssl(595.9K) = 688.9K

Dependencies of the Client side

Deploying the server side

How to install and run the Client - rtty

For Linux distribution: Ubuntu, Debian, ArchLinux, Centos

Install

wget -qO- https://raw.githubusercontent.com/zhaojh329/rtty/master/tools/install.sh | sudo bash

Command-line Options

Usage: rtty [option]
  -i ifname    # Network interface name - Using the MAC address of
                      the interface as the device ID
  -I id        # Set an ID for the device(Maximum 63 bytes, valid character:letters
                      and numbers and underlines and short lines) - If set,
                      it will cover the MAC address(if you have specify the ifname)
  -h host      # Server host
  -p port      # Server port
  -a           # Auto reconnect to the server
  -v           # verbose
  -d           # Adding a description to the device(Maximum 126 bytes)
  -s           # SSL on
  -k keepalive # keep alive in seconds for this client. Defaults to 5
  -V           # Show version
  -D           # Run in the background

Run RTTY(Replace the following parameters with your own parameters)

sudo rtty -I 'My-device-ID' -h 'your-server' -p 5912 -a -v -s -d 'My Device Description'

For OpenWRT

For Other Embedded Linux Platform

Usage

Use your web browser to access your server: https://your-server-host:5912, then click the connection button

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

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

Transfer file

Transfer file from local to remote device

rtty -R

Transfer file from remote device to the local

rtty -S test.txt

Execute a command remote

Shell

curl -k https://your-server:5912/cmd -d '{"devid":"test","username":"test","password":"123456","cmd":"ls","params":["/"],"env":{}}'

{"Err":0,"msg":"","code":0,"stdout":"bin\ndev\netc\nlib\nmnt\noverlay\nproc\nrom\nroot\nsbin\nsys\ntmp\nusr\nvar\nwww\n","stderr":""}

Jquery

var data = {devid: 'test', username: 'test', password: '123456', cmd: 'ls', params: ['/'], env: {}};
$.post('https://your-server:5912/cmd', JSON.stringify(data), function(r) {console.log(r)});

Axios

var data = {devid: 'test', username: 'test', password: '123456', cmd: 'ls', params: ['/'], env: {}};
axios.post('https://your-server:5912/cmd', JSON.stringify(data)).then(function (response) {
    console.log(response.data);
}).catch(function (error) {
    console.log(error);
});

Donate

Contributing

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

QQ group: 153530783

If the project is helpful to you, please do not hesitate to star. Thank you!

rtty's People

Contributors

axlrose avatar leenzhu avatar zjh809 avatar

Watchers

 avatar  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.