add auther config

This commit is contained in:
ginuerzh
2022-02-12 00:33:20 +08:00
parent c1bf501734
commit a8a6bbc3a3
37 changed files with 261 additions and 183 deletions

View File

@ -41,9 +41,9 @@ func (c *ssConnector) Init(md md.Metadata) (err error) {
return
}
if c.options.User != nil {
method := c.options.User.Username()
password, _ := c.options.User.Password()
if c.options.Auth != nil {
method := c.options.Auth.Username()
password, _ := c.options.Auth.Password()
c.cipher, err = ss.ShadowCipher(method, password, c.md.key)
}

View File

@ -40,9 +40,9 @@ func (c *ssuConnector) Init(md md.Metadata) (err error) {
return
}
if c.options.User != nil {
method := c.options.User.Username()
password, _ := c.options.User.Password()
if c.options.Auth != nil {
method := c.options.Auth.Username()
password, _ := c.options.Auth.Password()
c.cipher, err = ss.ShadowCipher(method, password, c.md.key)
}