general: optimized codes

This commit is contained in:
nadoo committed 2018-07-06 11:30:42 +08:00
1 parent 049c5b1458
commit 621e8ed018
5 files changed
+13 -28

No files matched your search

+2 -5
View File
@@ -38,11 +38,8 @@ func NewSS(s string, dialer proxy.Dialer) (*SS, error) {
}
addr := u.Host
var method, pass string
if u.User != nil {
method = u.User.Username()
pass, _ = u.User.Password()
}
method := u.User.Username()
pass, _ := u.User.Password()
ciph, err := core.PickCipher(method, nil, pass)
if err != nil {