Top Related Projects
Quick Overview
rtty is a remote access tool for embedded Linux devices. It allows users to access their devices remotely through a web browser, providing terminal access and file management capabilities. The project aims to simplify remote management of IoT devices and embedded systems.
Pros
- Secure communication using SSL/TLS encryption
- Web-based interface for easy access without additional client software
- Supports both terminal access and file management
- Cross-platform compatibility (Linux, macOS, Windows)
Cons
- Requires setup and configuration on both server and client sides
- May have performance limitations on very low-resource devices
- Documentation could be more comprehensive for advanced use cases
- Limited community support compared to some larger remote access tools
Code Examples
// Initialize rtty with default options
struct rtty *rtty = rtty_new(NULL);
// Set custom options for rtty
struct rtty_options opts = {
.device = "MyDevice",
.token = "SecretToken123",
.host = "example.com",
.port = 5912
};
struct rtty *rtty = rtty_new(&opts);
// Start rtty session
int ret = rtty_start(rtty);
if (ret < 0) {
fprintf(stderr, "Failed to start rtty: %s\n", strerror(-ret));
return -1;
}
Getting Started
-
Install rtty on your embedded device:
opkg update opkg install rtty
-
Configure rtty by editing
/etc/config/rtty
:config rtty option interface 'lan' option host 'your-server.com' option port '5912' option token 'your-secret-token'
-
Start rtty service:
/etc/init.d/rtty start
-
Access your device through the web interface at
https://your-server.com:5912
Competitor Comparisons
Share your terminal over the web
Pros of ttyd
- More active development with frequent updates and contributions
- Supports multiple authentication methods (Basic Auth, SSL/TLS)
- Offers a wider range of customization options and command-line flags
Cons of ttyd
- Larger codebase, potentially more complex to maintain
- Higher system requirements due to additional features
Code Comparison
ttyd:
static void check_origin(struct lws *wsi) {
int origin_len = lws_hdr_total_length(wsi, WSI_TOKEN_ORIGIN);
char buf[origin_len + 1];
memset(buf, 0, sizeof(buf));
int len = lws_hdr_copy(wsi, buf, sizeof(buf), WSI_TOKEN_ORIGIN);
if (len > 0) {
// Origin validation logic
}
}
rtty:
static void on_ws_receive(struct pty_session *session, void *data, size_t len)
{
if (session->state == STATE_NORMAL) {
write(session->pty, data, len);
} else if (session->state == STATE_WAIT_PASSWD) {
// Password handling logic
}
}
Both projects aim to provide web-based terminal access, but ttyd offers more features and customization options at the cost of increased complexity. rtty focuses on simplicity and ease of use, making it potentially more suitable for resource-constrained environments or simpler use cases. The code snippets demonstrate different approaches to handling WebSocket connections and data processing, reflecting the projects' distinct design philosophies.
Share your terminal as a web application
Pros of GoTTY
- Web-based terminal access without additional client software
- Supports custom command execution and URL parameters
- Easy to set up and use with minimal configuration
Cons of GoTTY
- Less focus on security features compared to RTTY
- Limited to terminal access, while RTTY offers file transfer capabilities
- May have higher resource usage due to web-based nature
Code Comparison
RTTY (C):
static void on_ws_handshake_done(struct mg_connection *nc)
{
struct session *s = (struct session *)nc->user_data;
s->ws_handshake_done = true;
ev_timer_stop(s->loop, &s->tmr);
}
GoTTY (Go):
func (server *Server) handleWS(w http.ResponseWriter, r *http.Request) {
conn, err := server.upgrader.Upgrade(w, r, nil)
if err != nil {
log.Print("Failed to upgrade connection: " + err.Error())
return
}
defer conn.Close()
}
Both projects aim to provide remote terminal access, but RTTY focuses on embedded systems and offers more security features, while GoTTY provides a simpler web-based solution. RTTY is written in C, making it more suitable for resource-constrained environments, while GoTTY is written in Go, offering easier deployment and cross-platform compatibility.
A fast TCP/UDP tunnel over HTTP
Pros of Chisel
- More versatile, supporting various protocols (HTTP, SOCKS5, TCP) and tunneling options
- Cross-platform support (Windows, macOS, Linux) with easy installation
- Active development and larger community support
Cons of Chisel
- More complex setup and configuration compared to RTTY
- Requires both client and server components to be installed and configured
- May have higher resource usage due to its broader feature set
Code Comparison
RTTY (server-side):
int rtty_start(struct rtty *rtty)
{
ev_io_init(&rtty->ior, rtty_read_cb, rtty->sock.fd, EV_READ);
ev_io_start(rtty->loop, &rtty->ior);
return 0;
}
Chisel (server-side):
func (s *Server) Start() error {
if s.listener != nil {
return errors.New("server already running")
}
l, err := net.Listen("tcp", s.config.Host)
if err != nil {
return err
}
s.listener = l
return s.run()
}
Both projects aim to provide remote access solutions, but Chisel offers a more comprehensive set of features for tunneling and proxying, while RTTY focuses primarily on remote terminal access. Chisel's flexibility comes at the cost of increased complexity, while RTTY provides a simpler, more focused solution for its specific use case.
Unified ingress for developers
Pros of ngrok
- More widely adopted and battle-tested in production environments
- Offers a user-friendly web interface for managing tunnels and inspecting traffic
- Provides additional features like custom subdomains and TLS encryption
Cons of ngrok
- Closed-source software with limited customization options
- Requires a paid subscription for advanced features and higher usage limits
- May have potential privacy concerns due to traffic routing through third-party servers
Code Comparison
rtty:
int rtty_start(struct rtty *rtty)
{
ev_io_init(&rtty->ior, rtty_read_cb, rtty->sock.fd, EV_READ);
ev_io_start(rtty->loop, &rtty->ior);
return 0;
}
ngrok:
func (c *Tunnel) Start() error {
c.Lock()
defer c.Unlock()
return c.start()
}
Summary
rtty is an open-source, lightweight remote terminal solution, while ngrok is a more feature-rich, closed-source tunneling service. rtty offers greater flexibility and customization but may require more setup and technical expertise. ngrok provides a more user-friendly experience with additional features but comes with potential privacy concerns and usage limitations. The choice between the two depends on specific project requirements, technical expertise, and privacy considerations.
The easiest, and most secure way to access and protect all of your infrastructure.
Pros of Teleport
- More comprehensive security features, including SSO, RBAC, and audit logging
- Supports multiple protocols (SSH, Kubernetes, databases, web apps)
- Scalable for enterprise environments
Cons of Teleport
- More complex setup and configuration
- Higher resource requirements
- Steeper learning curve for users and administrators
Code Comparison
Teleport (Go):
func (s *Server) Start() error {
s.Lock()
defer s.Unlock()
if s.started {
return trace.AlreadyExists("server is already started")
}
s.started = true
go s.serve()
return nil
}
RTTY (C):
static void on_client_close(struct lws *wsi)
{
struct tty_client *client = lws_wsi_user(wsi);
if (client) {
LIST_REMOVE(client, list);
free(client);
}
}
Key Differences
- Teleport is written in Go, while RTTY is written in C
- Teleport offers a more feature-rich solution for secure access management
- RTTY focuses specifically on remote terminal access over the web
- Teleport has a larger codebase and community, with more frequent updates
- RTTY is lighter-weight and easier to set up for simple remote terminal needs
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
rtty (䏿) - Access your device's terminal from anywhere via the web
Official Website: https://rttys.net/
This project is officially supported by GL.iNet.
Architecture
flowchart TB
s[rttys with public IP address]
u1["User (Web Browser)"] --> s
u2["User (Web Browser)"] --> s
u3["User (Web Browser)"] --> s
s --> c1["rtty (Linux Device)"]
s --> c2["rtty (Linux Device)"]
s --> c3["rtty (Linux Device)"]
Overview
rtty is a powerful remote terminal solution composed of a client and a server. The client is written in pure C for optimal performance and minimal footprint. The server is implemented in Go with a modern frontend built using Vue.
Access your device's terminal from anywhere via a web browser. Distinguish between different devices using unique device IDs.
rtty is exceptionally well-suited for remote maintenance of thousands of Linux devices deployed worldwide, making it an ideal choice for organizations managing distributed infrastructure.
Key Features
ð Lightweight & Efficient
- Minimal footprint: Client written in pure C, perfect for embedded Linux
- Without SSL: rtty (32KB) + libev (56KB)
- With SSL: + libmbedtls (88KB) + libmbedcrypto (241KB) + libmbedx509 (48KB)
ð Security
- Multiple SSL backends: OpenSSL, mbedtls(polarssl), CyaSSl(wolfssl)
- mTLS support for mutual authentication
ð Advanced Remote Management
- Batch command execution across multiple devices remotely
- Device identification based on unique device IDs
- HTTP Proxy support for accessing device web interfaces
ð File Management
- Seamless file transfer: Convenient upload and download capabilities
- Web-based interface for intuitive file operations
ð» Modern Terminal Experience
- Full-featured terminal powered by Xterm.js
- Browser-based access from anywhere
â¡ Deployment & Usability
- Simple deployment process
- Easy to use interface
- Cross-platform compatibility
Production Users
Trusted by leading technology companies:
- GL.iNet
- Yunlianxin Technology
- One IOT World
- bitswrt Communication Technology
- Guangzhou Lingpai Technology
- ...and many more
Client Dependencies
Required
- libev - High-performance event loop library
Optional (for SSL support)
Choose one of the following SSL libraries:
- mbedtls(polarssl) - Lightweight SSL/TLS library
- CyaSSl(wolfssl) - Embedded SSL/TLS library
- openssl - Full-featured SSL/TLS toolkit
â Star History
ð¤ Contributing
Help us make rtty even better!
See the CONTRIBUTING.md file for detailed guidelines on how to contribute to this project.
Top Related Projects
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot