Browse Source

frps add '-t' to set token

pull/781/head
fatedier 7 years ago
parent
commit
e1918f6396
  1. 2
      cmd/frps/root.go
  2. 2
      models/config/proxy.go

2
cmd/frps/root.go

@ -81,7 +81,7 @@ func init() {
rootCmd.PersistentFlags().StringVarP(&logWay, "log_way", "", "console", "log way")
rootCmd.PersistentFlags().StringVarP(&logLevel, "log_level", "", "info", "log level")
rootCmd.PersistentFlags().Int64VarP(&logMaxDays, "log_max_days", "", 3, "log_max_days")
rootCmd.PersistentFlags().StringVarP(&token, "token", "", "", "auth token")
rootCmd.PersistentFlags().StringVarP(&token, "token", "t", "", "auth token")
rootCmd.PersistentFlags().Int64VarP(&authTimeout, "auth_timeout", "", 900, "auth timeout")
rootCmd.PersistentFlags().StringVarP(&subDomainHost, "subdomain_host", "", "", "subdomain host")
rootCmd.PersistentFlags().Int64VarP(&maxPortsPerClient, "max_ports_per_client", "", 0, "max ports per client")

2
models/config/proxy.go

@ -262,7 +262,7 @@ func (cfg *DomainConf) checkForSvr() (err error) {
if cfg.SubDomain != "" {
if subDomainHost == "" {
return fmt.Errorf("subdomain is not supported because this feature is not enabled by frps")
return fmt.Errorf("subdomain is not supported because this feature is not enabled in remote frps")
}
if strings.Contains(cfg.SubDomain, ".") || strings.Contains(cfg.SubDomain, "*") {
return fmt.Errorf("'.' and '*' is not supported in subdomain")

Loading…
Cancel
Save