mirror of
https://github.com/m1k1o/neko.git
synced 2025-08-03 08:50:13 +02:00
move proxy option to server.
This commit is contained in:
parent
3c4d7b9d60
commit
683b750189
5 changed files with 11 additions and 19 deletions
|
@ -10,7 +10,6 @@ import (
|
|||
type WebSocket struct {
|
||||
Password string
|
||||
AdminPassword string
|
||||
Proxy bool
|
||||
Locks []string
|
||||
|
||||
ControlProtection bool
|
||||
|
@ -30,11 +29,6 @@ func (WebSocket) Init(cmd *cobra.Command) error {
|
|||
return err
|
||||
}
|
||||
|
||||
cmd.PersistentFlags().Bool("proxy", false, "enable reverse proxy mode")
|
||||
if err := viper.BindPFlag("proxy", cmd.PersistentFlags().Lookup("proxy")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
cmd.PersistentFlags().StringSlice("locks", []string{}, "resources, that will be locked when starting (control, login)")
|
||||
if err := viper.BindPFlag("locks", cmd.PersistentFlags().Lookup("locks")); err != nil {
|
||||
return err
|
||||
|
@ -63,7 +57,6 @@ func (WebSocket) Init(cmd *cobra.Command) error {
|
|||
func (s *WebSocket) Set() {
|
||||
s.Password = viper.GetString("password")
|
||||
s.AdminPassword = viper.GetString("password_admin")
|
||||
s.Proxy = viper.GetBool("proxy")
|
||||
s.Locks = viper.GetStringSlice("locks")
|
||||
|
||||
s.ControlProtection = viper.GetBool("control_protection")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue