Giter Site home page Giter Site logo

Allow clients to specify commnd about gotty HOT 9 CLOSED

yudai avatar yudai commented on May 1, 2024
Allow clients to specify commnd

from gotty.

Comments (9)

jay2u avatar jay2u commented on May 1, 2024

You could also just run
gotty -w bash --login
of course :-)

Even more dangerous :-O

But I can see the point of having the convenience of specifying the command in the URL.

from gotty.

niko avatar niko commented on May 1, 2024

I think passing multiple commands via the command line would be too much. I would like to see a simple config file, perhaps similar to Foremans Procfile format:

tailaa: tail -f /var/log/apache/access.log
tailae: tail -f /var/log/apache/error.log

And now just the two commands can be executed by accessing /tailaa and /tailae.

from gotty.

haliphax avatar haliphax commented on May 1, 2024

@niko's idea is solid, though that could be just another feature if you're dead set on allowing a full command to be specified, as well.

from gotty.

Arno0x avatar Arno0x commented on May 1, 2024

I found myself this idea interesting enough. So I've written and am about to release a PHP wrapper to GoTTY that allows for this kind of things and more. I'll keep Yudai posted as well as this issue thread.

from gotty.

Arno0x avatar Arno0x commented on May 1, 2024

Out of interest, here is TermGate, a GoTTY wrapper in PHP, which might suit your needs: https://github.com/Arno0x/TermGate

from gotty.

yudai avatar yudai commented on May 1, 2024

Awesome ๐Ÿ‘
Now I feel like I should keep gotty itself as simple as possible. Other tools like @Arno0x 's one can solve the demand.

from gotty.

haliphax avatar haliphax commented on May 1, 2024

Good on ya, @Arno0x !

from gotty.

wapsi avatar wapsi commented on May 1, 2024

Hi, I accidentaly created a duplicated issue about this (#53) although I've suggested delivering client information in addition to program arguments:

It would be nice if it's possible to deliver parameters or information about the client to the command to be executed when client connects to gotty.

Example1:
gotty /opt/cmd
http://hostname:8080/?arg1=foo&arg2=bar => gotty will execute /opt/cmd arg1=foo arg2=bar

In terms of security reasons it would be reasonable if it's possible to limit what arguments should be delivered and what data could be into them (only digits / only A-Z)?

Example2:
gotty /opt/cmd %CLIENT_IP_ADDRESS%
192.168.1.10 connects to http://hostname:8080/ => gotty will execute /opt/cmd 192.168.1.10

from gotty.

moul avatar moul commented on May 1, 2024

#64 is fixing this issue

from gotty.

Related Issues (20)

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.