Code Monkey home page Code Monkey logo

termbacktime's Introduction

Go Report Card Discord

Terminal recording and playback, written in Go. All terminal recordings are currently saved as secret Gist postings.

Playback Example

TermBackTime - Playback

Install / Update

Note: If Go is already installed, will use the currently installed version to install termbacktime. There is now an install script for Linux, Darwin, and Windows 10 using WSL. This will attempt to install the latest version of Go, defaulting back to 1.14. For other distributions please see the releases page. Go will be installed in $HOME/.goroot as $GOROOT and $GOPATH is set to $HOME/go.

curl -s -L https://termbackti.me/install.sh | bash

To install a different version of Go:

 wget https://termbackti.me/install.sh
 ./install.sh <version>

For example, 1.19.0 would be ./install.sh 1.19.0

If you already have Go installed, you can manually install:

go get -u louist.dev/termbacktime
cd $GOPATH/src/louist.dev/termbacktime
make install

Authorization

In order to submit recordings to Gist you must first authorize TermBackTime with GitHub. We request access to the read:user and gist scopes. For more information, please see available scopes. You can request an auth token from ~/auth or by running the following terminal command:

termbacktime auth
  • GitHub authorization is NOT required for live terminal sharing.

Recording

After authorizing TermBackTime with GitHub simply run termbacktime record to start recording! Please see termbacktime --help for more options.

Live terminal sharing (BETA)

To start sharing your terminal over the web via WebRTC, simply run termbacktime live and give the provided link to someone. Please see termbacktime live --help for more options.

STUN options

For now TermBackTime uses Google's STUN servers unless changed at compile time.

STUNServerOne = "stun:stun1.l.google.com:19302"
STUNServerTwo = "stun:stun2.l.google.com:19302"

A STUN server is used to detect network addresses. Please see https://en.wikipedia.org/wiki/STUN for more information.

TURN options
  • Use an official TURN server provided by TermBackTime:
    • termbacktime live
  • Provide your own TURN server credentials:
    • termbacktime live --turn <username>:<password>@<server>[:<port>]
    • termbacktime live --user <username> --password <password> --addr <server>[:<port>]
  • Attempt to share without any TURN server:
    • termbacktime live --no-turn

A TURN server is used to relay WebRTC data between clients. Please see https://webrtc.org/getting-started/turn-server for more information.

Contributing

Please feel free to open a PR or an issue on GitHub. Convention for this repository is to fork it, create a branch feature/<feature name> in your fork based on master branch, and commit changes there. Once your changes are ready to merge back into this repository, squash your feature branch into one commit and open a PR from your repository's feature branch into the dev branch of this repository. Please make sure your master branch is up to date with master in this repo, and rebase your feature onto the tip of master.

Reporting Issues

Please do not report security related issues, vulnerabilities or bugs to the issue tracker, or elsewhere in public. Instead report sensitive bugs by email to [email protected].

  • Open an Issue with a clear and descriptive title.
    • Until we can discover whether it is a bug or not, we ask that you label it with possible-bug.
  • Explain the behavior you would expect and the actual behavior.
  • Please provide as much context as possible and describe the reproduction steps that someone else can follow to recreate the issue on their own.
    • Describe the current behavior and explain which behavior you expected to see instead and why.
    • Any availble stack traces or screenshots.
    • OS, platform and version. (Windows, Linux, macOS, x86, ARM)
    • If possible, please provide the termbacktime --version string.
      • If manually compiling please provide go version, termbacktime version located in the VERSION file, and the revision with git rev-parse --short HEAD.

Development

You can build your own development builds via make build-dev or make build-crosscompile-dev. I provide development server endpoints for playback + live terminal, login, and WebRTC signaling at:

Please note that these endpoints are under active development and may change or be unavailable at any time.

termbacktime's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar louist avatar louist-cf 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

gitter-badger

termbacktime's Issues

Upgrade to pion/webrtc@v3

Hey @LouisT Really great project. I just had a blast playing with it, such a great tool for teaching :)

Would you be open to a PR updating to v3? It will require one change to disable Trickle ICE. If you are up for changing the frontend to enable Trickle ICE you may see faster startup times.

More people need to know about this project also! You should make a Show HN post, would also love to drop a tweet on twitter.com/_pion

thanks!

Live terminal sharing.

Need to get live terminal sharing working.

Missing:

  • WebRTC or streaming server backend.
  • Live page on termbackti.me

simple live test does not work

Describe the bug
simple live test does not work ( from main git)
./termbacktime live not work as expected

Loaded config: /home/xxx/.termbacktime.json

A new version of termbacktime is available: v1.0.0-rc.8 (current 0.0.0)

Access granted: [turn:turn.termbackti.me:5349]
Username: 1644943633-2405a3b0-64ff-4cdf-8fdc-293b37089bc8
Password: Q3e4D225CwQ41NX5OTvlaqq4HaU=

Live playback: https://xterm.live/tbt:f728062c-68ff-490a-b3ef-a7b0dba8a5f5
Waiting for connection; timeout in 106 seconds... Connected.

To Reproduce
./termbacktime live not work as expected

Loaded config: /home/xxx/.termbacktime.json

A new version of termbacktime is available: v1.0.0-rc.8 (current 0.0.0)

Access granted: [turn:turn.termbackti.me:5349]
Username: 1644943633-2405a3b0-64ff-4cdf-8fdc-293b37089bc8
Password: Q3e4D225CwQ41NX5OTvlaqq4HaU=

Live playback: https://xterm.live/tbt:f728062c-68ff-490a-b3ef-a7b0dba8a5f5
Waiting for connection; timeout in 106 seconds... Connected.

then connect from firefox on https://xterm.live/tbt:f728062c-68ff-490a-b3ef-a7b0dba8a5f5

=>
Error: unexpected EOF

panic: close of closed channel

goroutine 97 [running]:
louist.dev/termbacktime/cmd.glob..func4.7()
/tmp/termbacktime/cmd/live.go:229 +0x6ce
created by louist.dev/termbacktime/cmd.glob..func4
/tmp/termbacktime/cmd/live.go:223 +0x1fa5

***$ ./termbacktime -v
termbacktime - https://termbackti.me/ - version=0.0.0 revision=0000000 (go1.17)
uname -a
Linux localhost.localdomain 5.15.7-200.fc35.x86_64 #1 SMP Wed Dec 8 19:00:47 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

trying but fail

Hello,
i'm trying a live termbacktime without success
1 - test on same machine
Access granted: [turn:turn.termbackti.me:5349]
Username: 1644836944-5a0b3944-a19b-437b-997c-3f1f95d7a283
Password: lHKsaLUBvpPzqzfo+7ML4+EW2mw=

Live playback: https://xterm.live/tbt:79328449-1977-42ed-8712-dbe6ca8c276c
Waiting for connection; timeout in 90 seconds... Connected.

Error: websocket: close 1005 (no status)

panic: close of closed channel

goroutine 104 [running]:
louist.dev/termbacktime/cmd.glob..func4.7()
/tmp/tmp.nomJ4tPTFP/cmd/live.go:229 +0x6ce
created by louist.dev/termbacktime/cmd.glob..func4
/tmp/tmp.nomJ4tPTFP/cmd/live.go:223 +0x1fa5

2 - trying with 2 differents machine, with two internet connection

Access granted: [turn:turn.termbackti.me:5349]
Username: 1644837120-e6f0bcfa-406a-4626-872c-773921d0f636
Password: f8ljc+tNnOh66qnnd1qhleI7zPY=

Live playback: https://xterm.live/tbt:ee857939-ef8a-4fdd-8ad4-aa9a57b74a4f
Waiting for connection; timeout in 89 seconds... Connected.

Error: unexpected EOF

panic: close of closed channel

goroutine 117 [running]:
louist.dev/termbacktime/cmd.glob..func4.7()
/tmp/tmp.nomJ4tPTFP/cmd/live.go:229 +0x6ce
created by louist.dev/termbacktime/cmd.glob..func4
/tmp/tmp.nomJ4tPTFP/cmd/live.go:223 +0x1fa5

Dependabot can't resolve your Go dependency files

Dependabot can't resolve your Go dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

dmitri.shuralyov.com/gpu/[email protected]: unrecognized import path "dmitri.shuralyov.com/gpu/mtl" (https fetch: Get https://dmitri.shuralyov.com/gpu/mtl?go-get=1: EOF)

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

View the update logs.

Install Instructions

Update the README to include installation instructions. Or an INSTALL file. Up to you ;)

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.