minimal docker image aprox 3mb

This commit is contained in:
olebedev
2018-04-15 23:08:32 +05:00
parent 8bb8cf279b
commit 38c14c1d8e
653 changed files with 163739 additions and 167 deletions
+17
View File
@@ -0,0 +1,17 @@
package socks5
// CredentialStore is used to support user/pass authentication
type CredentialStore interface {
Valid(user, password string) bool
}
// StaticCredentials enables using a map directly as a credential store
type StaticCredentials map[string]string
func (s StaticCredentials) Valid(user, password string) bool {
pass, ok := s[user]
if !ok {
return false
}
return password == pass
}