Giter VIP home page Giter VIP logo

azssh's People

Contributors

noelbundick avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

azssh's Issues

Use my own clientId

The REST APIs are undocumented and are restricted to specific clientId's (ex: VS Code extension can use them, but azure-cli can't)

I'd like to use my own instead of stealing VS Code's, but that's blocked until those issues are resolved

Better login experience

Launch a local webserver on port N, let the redirect flow send you back to localhost to get the token instead of copy/pasting codes

Handle timeouts

It hangs if you leave it open for a while - ctrl+c doesn't work since I'm intercepting SIGINT

Maybe two things:

  • handle timeouts to exit the app
  • hotkey to exit (like ssh has ~.) - or something unlikely to be used ctrl+q, ctrl+c or whatever

typing "exit" from within azssh gives errors before exiting

% ./azssh
Requesting a Cloud Shell.
Connecting terminal...
stephane@Azure:~$ exit
exit
panic: repeated read on failed websocket connection

goroutine 31 [running]:
github.com/gorilla/websocket.(*Conn).NextReader(0xc0003d8f20, 0x0, 0xc000078000, 0x0, 0x0, 0x0)
        /home/stephane/go/src/github.com/gorilla/websocket/conn.go:968 +0x356
github.com/gorilla/websocket.(*Conn).ReadMessage(0xc0003d8f20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
        /home/stephane/go/src/github.com/gorilla/websocket/conn.go:1029 +0x2f
github.com/noelbundick/azssh/pkg/azssh.pumpOutput(0xc0003d8f20, 0xa5bc40, 0xc00000c018)
        /home/stephane/go/src/github.com/noelbundick/azssh/pkg/azssh/terminal.go:26 +0x6c
created by github.com/noelbundick/azssh/pkg/azssh.ConnectToWebsocket
        /home/stephane/go/src/github.com/noelbundick/azssh/pkg/azssh/terminal.go:79 +0x1c2

Handle token expiration

When tokens + refresh tokens are expired, azssh blows up with a terrible wrong error message:

Requesting a Cloud Shell.
map[error:map[code:AuthenticationFailed message:Authentication failed.]]panic: interface conversion: interface {} is nil, not map[string]interface {}

goroutine 1 [running]:
github.com/noelbundick/azssh/pkg/azssh.createConsole(0xc42031c000, 0x2d54, 0xc420299bf8, 0x83cd18)
        /mnt/c/code/go/src/github.com/noelbundick/azssh/pkg/azssh/cloudshell.go:43 +0x1ef
github.com/noelbundick/azssh/pkg/azssh.ProvisionCloudShell(0xc42031c000, 0x2d54, 0x9c3975, 0x4, 0x78, 0x84, 0xc4200d41e0, 0x870b80, 0xc4202c9c88)
        /mnt/c/code/go/src/github.com/noelbundick/azssh/pkg/azssh/cloudshell.go:65 +0x4d
github.com/noelbundick/azssh/cmd.glob..func1(0xcf3000, 0xd1bc48, 0x0, 0x0)
        /mnt/c/code/go/src/github.com/noelbundick/azssh/cmd/root.go:20 +0xae
github.com/spf13/cobra.(*Command).execute(0xcf3000, 0xc42001e1b0, 0x0, 0x0, 0xcf3000, 0xc42001e1b0)
        /mnt/c/code/go/src/github.com/spf13/cobra/command.go:766 +0x2c1
github.com/spf13/cobra.(*Command).ExecuteC(0xcf3000, 0x9edc70, 0xc4202c9f40, 0xc4202c9f30)
        /mnt/c/code/go/src/github.com/spf13/cobra/command.go:850 +0x306
github.com/spf13/cobra.(*Command).Execute(0xcf3000, 0xc4200ea0f0, 0xc4202c9f40)
        /mnt/c/code/go/src/github.com/spf13/cobra/command.go:800 +0x2b
github.com/noelbundick/azssh/cmd.Execute()
        /mnt/c/code/go/src/github.com/noelbundick/azssh/cmd/root.go:32 +0x2d
main.main()
        /mnt/c/code/go/src/github.com/noelbundick/azssh/main.go:14 +0x4b
exit status 2

Handle ctrl+c

I want ctrl+c to be passed to cloud shell, and then have some other keystroke to exit azssh

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.