mirror of
https://github.com/ZeroDream-CN/SakuraFrp
synced 2024-11-21 06:49:10 +00:00
Fix: Proxy name replace
This commit is contained in:
parent
0cb42c9bd8
commit
9971563dc8
@ -268,9 +268,11 @@ func NewProxyManager() *ProxyManager {
|
||||
func (pm *ProxyManager) Add(name string, pxy Proxy) error {
|
||||
pm.mu.Lock()
|
||||
defer pm.mu.Unlock()
|
||||
if _, ok := pm.pxys[name]; ok {
|
||||
|
||||
// 这里的判断没什么必要了,因为前面已经经过鉴权,如果出现两个相同名字的代理就用新的代替旧的
|
||||
/*if _, ok := pm.pxys[name]; ok {
|
||||
return fmt.Errorf("proxy name [%s] is already in use", name)
|
||||
}
|
||||
}*/
|
||||
|
||||
pm.pxys[name] = pxy
|
||||
return nil
|
||||
|
Loading…
Reference in New Issue
Block a user