Security Update #6
|
@ -16,6 +16,7 @@ Usage:
|
|||
mini-chat client [flags]
|
||||
|
||||
Flags:
|
||||
-a, --ascii Render UI in pure ASCII, might help with rendering issues
|
||||
-h, --help help for client
|
||||
--insecure [UNSAFE] Do not use TLS encryption
|
||||
-i, --ip string Server IP to connect to
|
||||
|
|
|
@ -37,6 +37,7 @@ func init() {
|
|||
clientCmd.PersistentFlags().StringP("ip", "i", "", "Server IP to connect to")
|
||||
clientCmd.PersistentFlags().StringP("port", "p", "1302", "Server port to connect to")
|
||||
clientCmd.Flags().Bool("insecure", false, "[UNSAFE] Do not use TLS encryption")
|
||||
clientCmd.Flags().BoolP("ascii", "a", false, "Render UI in pure ASCII, might help with rendering issues")
|
||||
}
|
||||
|
||||
func setClientParameters(cmd *cobra.Command) error {
|
||||
|
@ -63,5 +64,9 @@ func setClientParameters(cmd *cobra.Command) error {
|
|||
clientInsecure = true
|
||||
}
|
||||
|
||||
ascii, err := cmd.Flags().GetBool("ascii")
|
||||
if ascii == true {
|
||||
useASCII = true
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -41,6 +41,7 @@ var (
|
|||
serverIP string
|
||||
data Message
|
||||
clientInsecure bool
|
||||
useASCII bool
|
||||
)
|
||||
|
||||
func startSecureConnection() (net.Conn, error) {
|
||||
|
@ -185,6 +186,9 @@ func GUI() {
|
|||
g.SetManagerFunc(layout)
|
||||
g.Mouse = true
|
||||
g.Cursor = true
|
||||
if useASCII == true {
|
||||
g.ASCII = true
|
||||
}
|
||||
initKeybindings(g)
|
||||
|
||||
go listenMessages(g)
|
||||
|
|
Loading…
Reference in New Issue