mirror of
https://github.com/go-gost/gost.git
synced 2026-10-10 04:55:46 +00:00
add auther api
This commit is contained in:
@@ -19,6 +19,9 @@ type bypassRegistry struct {
|
||||
}
|
||||
|
||||
func (r *bypassRegistry) Register(name string, bypass bypass.Bypass) error {
|
||||
if name == "" || bypass == nil {
|
||||
return nil
|
||||
}
|
||||
if _, loaded := r.m.LoadOrStore(name, bypass); loaded {
|
||||
return ErrDup
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user