Coder Social home page Coder Social logo

moul / gotty-client Goto Github PK

View Code? Open in Web Editor NEW
315.0 17.0 55.0 4.43 MB

:wrench: terminal client for GoTTY

Home Page: https://manfred.life/gotty-client

License: MIT License

Go 91.45% Ruby 4.22% Makefile 0.49% Shell 1.29% Dockerfile 1.72% JavaScript 0.83%
gotty cli gotty-client terminal proxy hack

gotty-client's Introduction

gotty-client

๐Ÿ”ง Terminal client for GoTTY.

Build Status GoDoc FOSSA Status Sourcegraph

                                                              +----------------+
               +--------------+                +---------+--->|   /bin/bash    |
               |              |                |         |    +----------------+
           +-->|   Browser    |--+             |         |
+-------+  |   |              |  |             |         |
|       |  |   +--------------+  |             |         |    +----------------+
|  Bob  |--+                     +-websocket-->|  Gotty  |--->| emacs /var/www |
|       |  |    XXXXXXXXXXXXXX   |             |         |    +----------------+
+-------+  |   X              X  |             |         |
           +-->X gotty-client X--+             |         |
               X              X                |         |    +----------------+
                XXXXXXXXXXXXXX                 +---------+--->|  tmux attach   |
                                                              +----------------+

Example

Server side (GoTTY)

$ gotty -p 9191 sh -c 'while true; do date; sleep 1; done'
2015/08/24 18:54:31 Server is starting with command: sh -c while true; do date; sleep 1; done
2015/08/24 18:54:31 URL: http://[::1]:9191/
2015/08/24 18:54:34 GET /ws
2015/08/24 18:54:34 New client connected: 127.0.0.1:61811
2015/08/24 18:54:34 Command is running for client 127.0.0.1:61811 with PID 64834
2015/08/24 18:54:39 Command exited for: 127.0.0.1:61811
2015/08/24 18:54:39 Connection closed: 127.0.0.1:61811
...

Client side

$ gotty-client http://localhost:9191/
INFO[0000] New title: GoTTY - sh -c while true; do date; sleep 1; done (jean-michel-van-damme.local)
WARN[0000] Unhandled protocol message: json pref: 2{}
Mon Aug 24 18:54:34 CEST 2015
Mon Aug 24 18:54:35 CEST 2015
Mon Aug 24 18:54:36 CEST 2015
Mon Aug 24 18:54:37 CEST 2015
Mon Aug 24 18:54:38 CEST 2015
^C

Usage

$ gotty-client -h
NAME:
   gotty-client - GoTTY client for your terminal

USAGE:
   gotty-client [global options] command [command options] GOTTY_URL

AUTHOR:
   Manfred Touron <https://github.com/moul/gotty-client>

COMMANDS:
     help, h  Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --debug, -D                  Enable debug mode [$GOTTY_CLIENT_DEBUG]
   --skip-tls-verify            Skip TLS verify [$SKIP_TLS_VERIFY]
   --use-proxy-from-env         Use Proxy from environment [$USE_PROXY_FROM_ENV]
   --detach-keys value          Key sequence for detaching gotty-client (default: "ctrl-p,ctrl-q")
   --v2                         For Gotty 2.0 [$GOTTY_CLIENT_GOTTY2]
   --ws-origin value, -w value  WebSocket Origin URL [$GOTTY_CLIENT_WS_ORIGIN]
   --help, -h                   show help
   --version, -v                print the version

Install

Install latest version using Golang (recommended):

git clone https://github.com/moul/gotty-client
cd gotty-client
make install # or `go install ./cmd/gotty-client`

PS: I don't know why, but go get github.com/moul/gotty-client/cmd/gotty-client is not stable everywhere


Install latest version using Homebrew (Mac OS X)

$ brew install https://raw.githubusercontent.com/moul/gotty-client/master/contrib/homebrew/gotty-client.rb --HEAD

or the latest released version

$ brew install https://raw.githubusercontent.com/moul/gotty-client/master/contrib/homebrew/gotty-client.rb

Changelog

See https://github.com/moul/gotty-client/releases

License

MIT

gotty-client's People

Contributors

byung2 avatar davidfetter avatar dependabot[bot] avatar dimtion avatar fossabot avatar gurjeet avatar imgbotapp avatar mickael9 avatar moul avatar moul-bot avatar pomo-mondreganto avatar quentinperez avatar renovate-bot avatar sh4d1 avatar supersandro2000 avatar tamalsaha 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

gotty-client's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

  • chore(deps): update all (alpine, codfish/semantic-release-action, github.com/containerd/console, github.com/gorilla/websocket, github.com/sirupsen/logrus, github.com/smartystreets/goconvey, github.com/urfave/cli, golang)
  • chore(deps): update all (major) (codfish/semantic-release-action, github.com/urfave/cli)

Detected dependencies

circleci
.circleci/config.yml
  • moul 1.16.0
dockerfile
Dockerfile
  • golang 1.16.3-alpine
  • alpine 3.13.5
github-actions
.github/workflows/release.yml
  • codfish/semantic-release-action v1.9.0
gomod
go.mod
  • go 1.14
  • github.com/containerd/console v1.0.3
  • github.com/creack/goselect v0.1.2
  • github.com/gorilla/websocket v1.4.2
  • github.com/sirupsen/logrus v1.8.1
  • github.com/smartystreets/goconvey v1.6.4
  • github.com/urfave/cli v1.22.8

  • Check this box to trigger a request for Renovate to run again on this repository

the question of install

When I installed by goland, it reported an error.
The error was:
fatal: unable to access 'https://github.com/moul/gotty-client/': Received HTTP code 504 from proxy after CONNECT
package github.com/moul/gotty-client/tree/master/cmd/gotty-client: exit status 128

Hope to get your help, thx

Action signature deprecated

"I contact the distributor of this application" ๐Ÿ˜

DEPRECATED Action signature.  Must be `cli.ActionFunc`.  This is an error in the application.  Please contact the distributor of this application if this is not you.  See https://github.com/codegangsta/cli/blob/master/CHANGELOG.md#deprecated-cli-app-action-signature

Execute sequential commands using a script through gotty-client

I want to execute a setup script which contains sql commands like creating a role, assigning privileges to a user etc..
gotty-client does have a command parameter but the documentation is not clear on how we can use it to execute sql scripts on the command line.

gotty-client [global options] command [command options] GOTTY_URL

Is this possible with the current gotty-client, if yes could someone point me to the documentation.

Thanks.

gotty-client hangs on connection

gotty: v2.0.0-alpha.3
gotty-client: v1.6.1

image

I've tried setting GOTTY_CLIENT_GOTTY2=1 but it does not solve this.

Oddly my help documentation does not print the same as what's in the README.md. There is no mention of --v2.

Incorrect Usage.

NAME:
   gotty-client - GoTTY client for your terminal

USAGE:
   gotty-client [global options] command [command options] GOTTY_URL

VERSION:
   1.6.1

AUTHOR(S):
   Manfred Touron <https://github.com/moul/gotty-client>

COMMANDS:
GLOBAL OPTIONS:
   --debug, -D          Enable debug mode [$GOTTY_CLIENT_DEBUG]
   --skip-tls-verify    Skip TLS verify [$SKIP_TLS_VERIFY]
   --use-proxy-from-env Use Proxy from environment [$USE_PROXY_FROM_ENV]
   --help, -h           show help
   --version, -v        print the version

should unscape basic authentication token for request on /ws

I add commit to unescape basic authentication token. (f20d24e)

However, I forgot to unescape basic authentication token for request on /ws.
(https://github.com/moul/gotty-client/blob/master/gotty-client.go#L122)

It is weird there is no 401 error on websocket request.

On gotty side,
wrapBasicAuth should also take care about ws endpoint.

https://github.com/yudai/gotty/blob/master/server/server.go#L208-L209

func (server *Server) setupHandlers(ctx context.Context, cancel context.CancelFunc, pathPrefix string, counter *counter) http.Handler {
	staticFileHandler := http.FileServer(
		&assetfs.AssetFS{Asset: Asset, AssetDir: AssetDir, Prefix: "static"},
	)

	var siteMux = http.NewServeMux()
	siteMux.HandleFunc(pathPrefix, server.handleIndex)
	siteMux.Handle(pathPrefix+"js/", http.StripPrefix(pathPrefix, staticFileHandler))
	siteMux.Handle(pathPrefix+"favicon.png", http.StripPrefix(pathPrefix, staticFileHandler))
	siteMux.Handle(pathPrefix+"css/", http.StripPrefix(pathPrefix, staticFileHandler))

	siteMux.HandleFunc(pathPrefix+"auth_token.js", server.handleAuthToken)
	siteMux.HandleFunc(pathPrefix+"config.js", server.handleConfig)

	siteHandler := http.Handler(siteMux)

	if server.options.EnableBasicAuth {
		log.Printf("Using Basic Authentication")
		siteHandler = server.wrapBasicAuth(siteHandler, server.options.Credential)
	}

	withGz := gziphandler.GzipHandler(server.wrapHeaders(siteHandler))
	siteHandler = server.wrapLogger(withGz)

	wsMux := http.NewServeMux()
	wsMux.Handle("/", siteHandler)
	wsMux.HandleFunc(pathPrefix+"ws", server.generateHandleWS(ctx, cancel, counter))
	siteHandler = http.Handler(wsMux)

	return siteHandler
}

Building from release tarball is a mess

Building from the 1.6 release tarball is a mess. It requires setting up a bunch of symlinks to various things to get the Makefile to build the target and the Makefile lacks an install target.

Terminal output Issues

  • terminal output is cut off (easily reproducible with the top command)
  • terminal output is messed up when the terminal is resized
  • 'inappropriate ioctl for device' warning when resizing terminal

WARN[0000] Unhandled protocol message: 510

Can't connect to server:

$ gotty-client -D https://user:pass@domain:8080
DEBU[0000] Fetching auth token auth-token: "https://domain:8080/auth_token.js" 
DEBU[0000] Auth-token: "user:pass"           
DEBU[0000] Connecting to websocket: "wss://domain:8080/ws" 
DEBU[0000] Sending arguments and auth-token             
DEBU[0000] Sending ping                                 
DEBU[0000] Unhandled protocol message: json pref: /bin/[email protected] 
WARN[0000] Unhandled protocol message: 510              
DEBU[0025] readLoop suicide                             
DEBU[0025] termsizeLoop died                            
DEBU[0025] writeLoop died                               
DEBU[0025] Client.Loop() exiting

$ gotty-client -v
gotty-client version 1.6.1

Trying out old binary version because of #91 and because there is no newer released binaries.

[documentation] Detaching from gotty session

Hi there!
As far as I can see, there is no any info anywhere even about the simple case: detach from remote gotty session (when you're done and want to leave). ๐Ÿ˜€
It is neither documented in README, nor in gotty-client's help, not even on the internets (as far as I googled) ๐Ÿค”

Fix cross-compil on windows

# github.com/scaleway/scaleway-cli/vendor/github.com/moul/gotty-client
../../vendor/github.com/moul/gotty-client/gotty-client.go:246: undefined: syscall.SIGWINCH
../../vendor/github.com/moul/gotty-client/gotty-client.go:247: undefined: syscall.SIGWINCH
../../vendor/github.com/moul/gotty-client/gotty-client.go:251: undefined: syscall.SYS_IOCTL
../../vendor/github.com/moul/gotty-client/gotty-client.go:252: undefined: syscall.TIOCGWINSZ
../../vendor/github.com/moul/gotty-client/gotty-client.go:253: not enough arguments in call to syscall.Syscall
[goxc:xc] 2015/11/18 15:55:43 'go' returned error: Wait error: exit status 2: # github.com/scaleway/scaleway-cli/vendor/github.com/moul/gotty-client
../../vendor/github.com/moul/gotty-client/gotty-client.go:246: undefined: syscall.SIGWINCH
../../vendor/github.com/moul/gotty-client/gotty-client.go:247: undefined: syscall.SIGWINCH
../../vendor/github.com/moul/gotty-client/gotty-client.go:251: undefined: syscall.SYS_IOCTL
../../vendor/github.com/moul/gotty-client/gotty-client.go:252: undefined: syscall.TIOCGWINSZ
../../vendor/github.com/moul/gotty-client/gotty-client.go:253: not enough arguments in call to syscall.Syscall
[goxc:xc] 2015/11/18 15:55:43 Error: Wait error: exit status 2: # github.com/scaleway/scaleway-cli/vendor/github.com/moul/gotty-client
../../vendor/github.com/moul/gotty-client/gotty-client.go:246: undefined: syscall.SIGWINCH
../../vendor/github.com/moul/gotty-client/gotty-client.go:247: undefined: syscall.SIGWINCH
../../vendor/github.com/moul/gotty-client/gotty-client.go:251: undefined: syscall.SYS_IOCTL
../../vendor/github.com/moul/gotty-client/gotty-client.go:252: undefined: syscall.TIOCGWINSZ
../../vendor/github.com/moul/gotty-client/gotty-client.go:253: not enough arguments in call to syscall.Syscall
[goxc:xc] 2015/11/18 15:55:43 Have you run `goxc -t` for this platform (386,windows)???
# github.com/scaleway/scaleway-cli/vendor/github.com/moul/gotty-client
../../vendor/github.com/moul/gotty-client/gotty-client.go:246: undefined: syscall.SIGWINCH
../../vendor/github.com/moul/gotty-client/gotty-client.go:247: undefined: syscall.SIGWINCH
../../vendor/github.com/moul/gotty-client/gotty-client.go:251: undefined: syscall.SYS_IOCTL
../../vendor/github.com/moul/gotty-client/gotty-client.go:252: undefined: syscall.TIOCGWINSZ
../../vendor/github.com/moul/gotty-client/gotty-client.go:253: not enough arguments in call to syscall.Syscall
[goxc:xc] 2015/11/18 15:55:56 'go' returned error: Wait error: exit status 2: # github.com/scaleway/scaleway-cli/vendor/github.com/moul/gotty-client
../../vendor/github.com/moul/gotty-client/gotty-client.go:246: undefined: syscall.SIGWINCH
../../vendor/github.com/moul/gotty-client/gotty-client.go:247: undefined: syscall.SIGWINCH
../../vendor/github.com/moul/gotty-client/gotty-client.go:251: undefined: syscall.SYS_IOCTL
../../vendor/github.com/moul/gotty-client/gotty-client.go:252: undefined: syscall.TIOCGWINSZ
../../vendor/github.com/moul/gotty-client/gotty-client.go:253: not enough arguments in call to syscall.Syscall
[goxc:xc] 2015/11/18 15:55:56 Error: Wait error: exit status 2: # github.com/scaleway/scaleway-cli/vendor/github.com/moul/gotty-client
../../vendor/github.com/moul/gotty-client/gotty-client.go:246: undefined: syscall.SIGWINCH
../../vendor/github.com/moul/gotty-client/gotty-client.go:247: undefined: syscall.SIGWINCH
../../vendor/github.com/moul/gotty-client/gotty-client.go:251: undefined: syscall.SYS_IOCTL
../../vendor/github.com/moul/gotty-client/gotty-client.go:252: undefined: syscall.TIOCGWINSZ
../../vendor/github.com/moul/gotty-client/gotty-client.go:253: not enough arguments in call to syscall.Syscall
[goxc:xc] 2015/11/18 15:55:56 Have you run `goxc -t` for this platform (amd64,windows)???
[goxc:xc] 2015/11/18 15:56:21 Multiple errors (returning first one): [Wait error: exit status 2: # github.com/scaleway/scaleway-cli/vendor/github.com/moul/gotty-client
../../vendor/github.com/moul/gotty-client/gotty-client.go:246: undefined: syscall.SIGWINCH
../../vendor/github.com/moul/gotty-client/gotty-client.go:247: undefined: syscall.SIGWINCH
../../vendor/github.com/moul/gotty-client/gotty-client.go:251: undefined: syscall.SYS_IOCTL
../../vendor/github.com/moul/gotty-client/gotty-client.go:252: undefined: syscall.TIOCGWINSZ
../../vendor/github.com/moul/gotty-client/gotty-client.go:253: not enough arguments in call to syscall.Syscall Wait error: exit status 2: # github.com/scaleway/scaleway-cli/vendor/github.com/moul/gotty-client
../../vendor/github.com/moul/gotty-client/gotty-client.go:246: undefined: syscall.SIGWINCH
../../vendor/github.com/moul/gotty-client/gotty-client.go:247: undefined: syscall.SIGWINCH
../../vendor/github.com/moul/gotty-client/gotty-client.go:251: undefined: syscall.SYS_IOCTL
../../vendor/github.com/moul/gotty-client/gotty-client.go:252: undefined: syscall.TIOCGWINSZ
../../vendor/github.com/moul/gotty-client/gotty-client.go:253: not enough arguments in call to syscall.Syscall]
[goxc:xc] 2015/11/18 15:56:21 Stopping after 'xc' failed with error 'Wait error: exit status 2: # github.com/scaleway/scaleway-cli/vendor/github.com/moul/gotty-client
../../vendor/github.com/moul/gotty-client/gotty-client.go:246: undefined: syscall.SIGWINCH
../../vendor/github.com/moul/gotty-client/gotty-client.go:247: undefined: syscall.SIGWINCH
../../vendor/github.com/moul/gotty-client/gotty-client.go:251: undefined: syscall.SYS_IOCTL
../../vendor/github.com/moul/gotty-client/gotty-client.go:252: undefined: syscall.TIOCGWINSZ
../../vendor/github.com/moul/gotty-client/gotty-client.go:253: not enough arguments in call to syscall.Syscall'
[goxc] 2015/11/18 15:56:21 RunTasks error: Wait error: exit status 2: # github.com/scaleway/scaleway-cli/vendor/github.com/moul/gotty-client
../../vendor/github.com/moul/gotty-client/gotty-client.go:246: undefined: syscall.SIGWINCH
../../vendor/github.com/moul/gotty-client/gotty-client.go:247: undefined: syscall.SIGWINCH
../../vendor/github.com/moul/gotty-client/gotty-client.go:251: undefined: syscall.SYS_IOCTL
../../vendor/github.com/moul/gotty-client/gotty-client.go:252: undefined: syscall.TIOCGWINSZ
../../vendor/github.com/moul/gotty-client/gotty-client.go:253: not enough arguments in call to syscall.Syscall
make: *** [goxc] Error 1

[BUG] Golang Install

Describe the bug
The Golang install with go version go1.14.4 linux/amd64 produces too many errors to install.

To Reproduce
On Ubuntu 18.04 LTS I've done the following to install / setup golang, gotty, and gotty client.

# Download latest from https://golang.org/dl/
wget -c https://golang.org/dl/go1.14.4.linux-amd64.tar.gz

# Check sum
sha256sum go1.14.4.linux-amd64.tar.gz | grep aed845e4185a0b2a3c3d5e1d0a35491702c55889192bb9c30e67a3de6849c067

# Extract to /usr/local
sudo tar -C /usr/local/ -xvzf go1.14.4.linux-amd64.tar.gz

# Set environment variables
export GOPATH="$HOME/go"
export GOBIN="$GOPATH/bin"
export PATH=$PATH:/usr/local/go/bin:$GOBIN

# Install GoTTy (works)
go get github.com/yudai/gotty

# Install GoTTy-client (fails)
go get github.com/moul/gotty-client/cmd/gotty-client

The output I get from trying to install gotty-client is as follows.

(base) cmccarth@luigi:~$ go get github.com/moul/gotty-client/cmd/gotty-client
# github.com/moul/gotty-client/cmd/gotty-client
go/src/github.com/moul/gotty-client/cmd/gotty-client/main.go:21:5: app.Author undefined (type *cli.App has no field or method Author)
go/src/github.com/moul/gotty-client/cmd/gotty-client/main.go:22:5: app.Email undefined (type *cli.App has no field or method Email)
go/src/github.com/moul/gotty-client/cmd/gotty-client/main.go:40:15: cannot use cli.BoolFlag literal (type cli.BoolFlag) as type cli.Flag in slice literal:
        cli.BoolFlag does not implement cli.Flag (Apply method has pointer receiver)
go/src/github.com/moul/gotty-client/cmd/gotty-client/main.go:43:4: unknown field 'EnvVar' in struct literal of type cli.BoolFlag
go/src/github.com/moul/gotty-client/cmd/gotty-client/main.go:45:15: cannot use cli.BoolFlag literal (type cli.BoolFlag) as type cli.Flag in slice literal:
        cli.BoolFlag does not implement cli.Flag (Apply method has pointer receiver)
go/src/github.com/moul/gotty-client/cmd/gotty-client/main.go:48:4: unknown field 'EnvVar' in struct literal of type cli.BoolFlag
go/src/github.com/moul/gotty-client/cmd/gotty-client/main.go:50:15: cannot use cli.BoolFlag literal (type cli.BoolFlag) as type cli.Flag in slice literal:
        cli.BoolFlag does not implement cli.Flag (Apply method has pointer receiver)
go/src/github.com/moul/gotty-client/cmd/gotty-client/main.go:53:4: unknown field 'EnvVar' in struct literal of type cli.BoolFlag
go/src/github.com/moul/gotty-client/cmd/gotty-client/main.go:55:17: cannot use cli.StringFlag literal (type cli.StringFlag) as type cli.Flag in slice literal:
        cli.StringFlag does not implement cli.Flag (Apply method has pointer receiver)
go/src/github.com/moul/gotty-client/cmd/gotty-client/main.go:63:4: unknown field 'EnvVar' in struct literal of type cli.BoolFlag
go/src/github.com/moul/gotty-client/cmd/gotty-client/main.go:63:4: too many errors

I'm not very familiar with Go but I assumed if I had gotty running correctly then I could simply install gotty-client without any additional setup, using the command you have in the README.

Thank you for your help!

[BUG] Should handle EINTR

It keeps disconnected when using go1.14.11 or go1.15.4.
I think since golang/go#38033, golang handles EINTR.

To Reproduce
Steps to reproduce the behavior:

  1. Using Golang >= 1.15
  2. It keeps disconnected.

Expected behavior
Keep connected

Versions (please complete the following information, if relevant):

  • Software version: 1.8.0
  • OS: Ubuntu
  • Golang version: 1.15.4

Additional context
Add any other context about the problem here.

[BUG]

WARN[0000] Unhandled protocol message: 61024

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Error type: undefined. Note: this is a nested preset so please contact the preset author if you are unable to fix it yourself.

make install error

make install

  • cd ./cmd/gotty-client
  • go install .

gotty-client/cmd/gotty-client

./main.go:22:5: app.Author undefined (type *cli.App has no field or method Author)
./main.go:23:5: app.Email undefined (type *cli.App has no field or method Email)
./main.go:41:15: cannot use cli.BoolFlag literal (type cli.BoolFlag) as type cli.Flag in array or slice literal:
cli.BoolFlag does not implement cli.Flag (Apply method has pointer receiver)
./main.go:44:10: unknown field 'EnvVar' in struct literal of type cli.BoolFlag
./main.go:46:15: cannot use cli.BoolFlag literal (type cli.BoolFlag) as type cli.Flag in array or slice literal:
cli.BoolFlag does not implement cli.Flag (Apply method has pointer receiver)
./main.go:49:10: unknown field 'EnvVar' in struct literal of type cli.BoolFlag
./main.go:51:15: cannot use cli.BoolFlag literal (type cli.BoolFlag) as type cli.Flag in array or slice literal:
cli.BoolFlag does not implement cli.Flag (Apply method has pointer receiver)
./main.go:54:10: unknown field 'EnvVar' in struct literal of type cli.BoolFlag
./main.go:56:17: cannot use cli.StringFlag literal (type cli.StringFlag) as type cli.Flag in array or slice literal:
cli.StringFlag does not implement cli.Flag (Apply method has pointer receiver)
./main.go:85:29: error is not a type
./main.go:56:17: too many errors
rules.mk:94: recipe for target 'go.install' failed
make: *** [go.install] Error 2

Terminal disfunction when exiting client

Hey,

When I use the client, each time I quit (Ctrl + Q) my terminal is behaving very weird. Here is how it looks when I try ls:

I'm not sure what is causing it, maybe SIGWINCH..

Tried with and without tmux, bash and zsh

Any ideas?

Add binary releases

Hi,

Is it possible to get binary releases for various platforms (my own interest goes to linux-armv7) like gotty does ?

Thanks,
Arno

Panic when running on old GoTTY server

$ ./gotty-client http://localhost:8081/
500 Internal Server Error

panic: runtime error: index out of range

goroutine 1 [running]:
github.com/moul/gotty-client.(*Client).GetAuthToken(0xc820014e10, 0x0, 0x0, 0x0, 0x0)
    /Users/moul/go/src/github.com/moul/gotty-client/gotty-client.go:116 +0x4f5
github.com/moul/gotty-client.(*Client).Connect(0xc820014e10, 0x0, 0x0)
    /Users/moul/go/src/github.com/moul/gotty-client/gotty-client.go:122 +0x45
github.com/moul/gotty-client.(*Client).Loop(0xc820014e10, 0x0, 0x0)
    /Users/moul/go/src/github.com/moul/gotty-client/gotty-client.go:180 +0x3a
main.Action(0xc8200aa000)
    /Users/moul/go/src/github.com/moul/gotty-client/cmd/gotty-client/main.go:41 +0x3a6
github.com/codegangsta/cli.(*App).Run(0xc8200a8200, 0xc82000a2c0, 0x2, 0x2, 0x0, 0x0)
    /Users/moul/go/src/github.com/codegangsta/cli/app.go:164 +0xc81
main.main()
    /Users/moul/go/src/github.com/moul/gotty-client/cmd/gotty-client/main.go:24 +0x12e

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
    /usr/local/Cellar/go/1.5.1/libexec/src/runtime/asm_amd64.s:1696 +0x1

goroutine 5 [syscall]:
os/signal.loop()
    /usr/local/Cellar/go/1.5.1/libexec/src/os/signal/signal_unix.go:22 +0x18
created by os/signal.init.1
    /usr/local/Cellar/go/1.5.1/libexec/src/os/signal/signal_unix.go:28 +0x37

goroutine 9 [IO wait]:
net.runtime_pollWait(0x1365698, 0x72, 0xc82000e230)
    /usr/local/Cellar/go/1.5.1/libexec/src/runtime/netpoll.go:157 +0x60
net.(*pollDesc).Wait(0xc8200601b0, 0x72, 0x0, 0x0)
    /usr/local/Cellar/go/1.5.1/libexec/src/net/fd_poll_runtime.go:73 +0x3a
net.(*pollDesc).WaitRead(0xc8200601b0, 0x0, 0x0)
    /usr/local/Cellar/go/1.5.1/libexec/src/net/fd_poll_runtime.go:78 +0x36
net.(*netFD).Read(0xc820060150, 0xc820019000, 0x1000, 0x1000, 0x0, 0x1360050, 0xc82000e230)
    /usr/local/Cellar/go/1.5.1/libexec/src/net/fd_unix.go:232 +0x23a
net.(*conn).Read(0xc82002c050, 0xc820019000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
    /usr/local/Cellar/go/1.5.1/libexec/src/net/net.go:172 +0xe4
net/http.noteEOFReader.Read(0x1365758, 0xc82002c050, 0xc820012108, 0xc820019000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
    /usr/local/Cellar/go/1.5.1/libexec/src/net/http/transport.go:1370 +0x67
net/http.(*noteEOFReader).Read(0xc82000aa80, 0xc820019000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
    <autogenerated>:126 +0xd0
bufio.(*Reader).fill(0xc82001a5a0)
    /usr/local/Cellar/go/1.5.1/libexec/src/bufio/bufio.go:97 +0x1e9
bufio.(*Reader).Peek(0xc82001a5a0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0)
    /usr/local/Cellar/go/1.5.1/libexec/src/bufio/bufio.go:132 +0xcc
net/http.(*persistConn).readLoop(0xc8200120b0)
    /usr/local/Cellar/go/1.5.1/libexec/src/net/http/transport.go:876 +0xf7
created by net/http.(*Transport).dialConn
    /usr/local/Cellar/go/1.5.1/libexec/src/net/http/transport.go:685 +0xc78

goroutine 10 [select]:
net/http.(*persistConn).writeLoop(0xc8200120b0)
    /usr/local/Cellar/go/1.5.1/libexec/src/net/http/transport.go:1009 +0x40c
created by net/http.(*Transport).dialConn
    /usr/local/Cellar/go/1.5.1/libexec/src/net/http/transport.go:686 +0xc9d
make: *** [test] Error 2

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.