Code Monkey home page Code Monkey logo

webterm's Introduction

webterm

web terminal based on xterm.js in rust

Screenshot

Is it any good?

Yes.

How does it work?

There is a rust backend based Actix, consisting of two actors:

  • Websocket implements a websocket that speaks the Terminado protocol
  • Terminal handles communication to a child spawned on a PTY using tokio-pty-process.

The frontend is a static HTML page served by actix-web providing an xterm.js UI.

Local development

cargo build
cargo run

Then head to http://localhost:8080/ to see it in action!

Should I run this on the internet?

Probably not. It lets anyone who can access the webpage control your system.

webterm's People

Contributors

dependabot-preview[bot] avatar dependabot-support avatar fabianfreyer avatar jackson-sandland avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

webterm's Issues

What is the license?

Hi there,

Thanks for putting up this project on GitHub, I would like to ask what is the license for the project's code?

Can you post the code that made the example screenshot?

I'm not familiar with actix and I'm having trouble figuring out how to create an actix::Addr to instantiate a Terminal struct. A complete and working example would be great. You can add it in an "examples" folder in the root to have Cargo automatically create a one-file crate that depends on your library.

What port is this running on?

I run: cargo run.

Then my actual terminal shows the server is running:

   Compiling webterm v0.2.0 (/Users/jacksonsandland/Development/webterm)
   Finished dev [unoptimized + debuginfo] target(s) in 2.89s
   Running `target/debug/webterm-server`

But I'm not sure where.
What port is the server running on?

Cannot compile

$ cargo --version
cargo 1.74.0 (ecb9851af 2023-10-18)

rror[E0512]: cannot transmute between types of different sizes, or dependently-sized types
--> /home/dan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/socket2-0.3.9/src/sockaddr.rs:153:9
|
153 | mem::transmute::<SocketAddrV4, sockaddr_in>(v4);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: source type: SocketAddrV4 (48 bits)
= note: target type: sockaddr_in (128 bits)

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.