screenshare

command module
v0.0.0-...-fbe5ae5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 25, 2020 License: MIT Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

screenshare

what

screenshare images to a web browser.

why

ttyd isn't always enough.

implementations

two identical implementations are maintained:

how

install and run screenshare on your laptop:

>> go build

>> ./screenshare -h
Usage of ./screenshare:
  -a string
        auth: http://localhost:8080?auth=AUTH
  -d int
        display number (default 1)
  -m int
        millis per frame (default 30)
  -p int
        port (default 8080)

on ec2 or any server with a public ip and dns pointing at it, run a reverse proxy to terminate ssl and cache all but a single request to your laptop per millis interval:

>> cat Caddyfile
{
    order http_cache before reverse_proxy
}

screenshare.example.com  {

    reverse_proxy {
        to localhost:8080
    }

    http_cache {
        cache_type in_memory
        match_path /
        default_max_age 30ms
    }
}

>> go get -u github.com/caddyserver/xcaddy/cmd/xcaddy

>> xcaddy build v2.2.1 --with github.com/sillygod/cdp-cache

>> sudo ./caddy run

forward 8080 to that server:

>> ssh $user@server 'echo "GatewayPorts yes" | sudo tee -a /etc/ssh/sshd_config && sudo systemctl restart sshd'

>> ssh -R 8080:0.0.0.0:8080 $user@$server

send people the link:

https://screenshare.example.com?auth=LOTS_OF_RANDOM_CHARACTERS

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址