Categorygithub.com/tuzig/webexec
modulepackage
1.5.1
Repository: https://github.com/tuzig/webexec.git
Documentation: pkg.go.dev

# README

webexec

Test

webexec is a terminal server running over WebRTC with support for signaling over SSH or HTTP. Webexec listens for connection requests, executes commands over pseudo ttys and pipes their I/O over WebRTC data channels.

webexec is currently single session - each client that authenticates has access to the same payload. In the case of Terminal7, our first client, it contains the layout of the panes.

webexec exposes TCP port 7777 by default, to support signalling. There's a single endpoint /connect: The client exchanges tokens with the server and then initiates a WebRTC connection.

Install

This repo inscludes a one-line installer for installing on Mac & Linux. To use to install the latest version it run bash -c "$(curl -sL https://get.webexec.sh)".

From Source

$ go install ./...

Ports Used

webexec has a signlaing server that listen for connection request on ports 7777. By default it listens only for localhost. To open webexec to the world set the http_server under [net] in the config file to 0.0.0.0:7777.

Once communication is established, WebRTC uses UDP ports with a default range of 60000-61000. If you prefer another range you can set the udp_port_min and udp_port_max in the [net] section of the conf file and webexec restart.

When running on cloud providers you'll need to set the firewall rules to allow traffic from any address to tcp port 7777 and UDP range 60000-61000 (same as mosh).

Contributing

We welcome bug reports, ideas for new features and pull requests.

If you are new to open source, DON'T PANIC. Just follow these simple steps:

  1. Join the discussion at our discord server
  2. Fork it and clone it git clone <your-fork-url>
  3. Create your feature branch git checkout -b my-new-feature
  4. Write tests for your new feature. We have both unit tests and integration tests under aatp. use go test -v to run unit tests and ./aatp/test to test integration
  5. Commit the failed tests git commit -am 'Testing ... '
  6. Write the code that psses the tests and commit
  7. Push to the branch git push --set-upstream origin my-new-feature
  8. Create a new Pull Request

# Packages

No description provided by the author
This file holds the struct and code to communicate with remote peers over webrtc data channels.
Package pidfile provides structure and helper functions to create and remove PID file.

# Functions

ConfPath returns the full path of a configuration file.
No description provided by the author
No description provided by the author
No description provided by the author
GetSockFP returns the path to the socket file.
No description provided by the author
InitAgentLogger intializes an agent logger and sets the global Logger.
InitDevLogger starts a logger for development.
loadConf load the conf file.
LogPath returns the full path of a run file: socket & pid.
NewClient is used generate a new client return the client, it's fingerprint and an error.
No description provided by the author
No description provided by the author
No description provided by the author
PIDFIlePath return the path of the PID file.
RunPath returns the full path of a run file: socket & pid.
No description provided by the author
No description provided by the author
No description provided by the author

# Constants

No description provided by the author

# Variables

No description provided by the author
Conf hold the configuration variables.
ErrAgentNotRunning is returned by commands that require a running agent.
Logger is our global logger.
No description provided by the author

# Structs

FileAuth is an authentication backend that checks tokens against a file of authorized tokens.
No description provided by the author
No description provided by the author
KeyType is the type used to cache webexec's certificates.
No description provided by the author
outChan is used to send messages to peerbook.
No description provided by the author
StatusMessage is a struct that holds the response to the status request.