mirror of
https://github.com/shazow/ssh-chat.git
synced 2025-04-12 15:17:16 +03:00
Update README and cmd descriptions.
This commit is contained in:
parent
410691566b
commit
d4da1ac1cc
12
README.md
12
README.md
@ -24,12 +24,16 @@ Usage:
|
||||
ssh-chat [OPTIONS]
|
||||
|
||||
Application Options:
|
||||
-v, --verbose Show verbose logging.
|
||||
-b, --bind= Host and port to listen on. (0.0.0.0:22)
|
||||
-i, --identity= Private key to identify server with. (~/.ssh/id_rsa)
|
||||
-v, --verbose Show verbose logging.
|
||||
-i, --identity= Private key to identify server with. (~/.ssh/id_rsa)
|
||||
--bind= Host and port to listen on. (0.0.0.0:22)
|
||||
--admin= Fingerprint of pubkey to mark as admin.
|
||||
--whitelist= Optional file of pubkey fingerprints that are allowed to connect
|
||||
--motd= Message of the Day file (optional)
|
||||
--pprof= enable http server for pprof
|
||||
|
||||
Help Options:
|
||||
-h, --help Show this help message
|
||||
-h, --help Show this help message
|
||||
```
|
||||
|
||||
After doing `go get github.com/shazow/ssh-chat` on this repo, you should be able
|
||||
|
10
cmd.go
10
cmd.go
@ -4,11 +4,11 @@ import (
|
||||
"bufio"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"os"
|
||||
"os/signal"
|
||||
"os/user"
|
||||
"strings"
|
||||
"net/http"
|
||||
|
||||
"github.com/alexcesaro/log"
|
||||
"github.com/alexcesaro/log/golog"
|
||||
@ -22,9 +22,9 @@ type Options struct {
|
||||
Identity string `short:"i" long:"identity" description:"Private key to identify server with." default:"~/.ssh/id_rsa"`
|
||||
Bind string `long:"bind" description:"Host and port to listen on." default:"0.0.0.0:22"`
|
||||
Admin []string `long:"admin" description:"Fingerprint of pubkey to mark as admin."`
|
||||
Whitelist string `long:"whitelist" description:"Optional file of pubkey fingerprints that are allowed to connect"`
|
||||
Motd string `long:"motd" description:"Message of the Day file (optional)"`
|
||||
Pprof int `long:"pprof" description:"enable http server for pprof"`
|
||||
Whitelist string `long:"whitelist" description:"Optional file of pubkey fingerprints who are allowed to connect."`
|
||||
Motd string `long:"motd" description:"Optional Message of the Day file."`
|
||||
Pprof int `long:"pprof" description:"Enable pprof http server for profiling."`
|
||||
}
|
||||
|
||||
var logLevels = []log.Level{
|
||||
@ -45,7 +45,7 @@ func main() {
|
||||
}
|
||||
|
||||
if options.Pprof != 0 {
|
||||
go func(){
|
||||
go func() {
|
||||
fmt.Println(http.ListenAndServe(fmt.Sprintf("localhost:%d", options.Pprof), nil))
|
||||
}()
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user