修复运行边界条件问题

This commit is contained in:
2026-04-22 17:11:55 +08:00
parent 6e14ea65d0
commit d26106eb00
3 changed files with 11 additions and 2 deletions

View File

@@ -32,7 +32,7 @@ func (s *channelBaiyinProvider) CreateChannels(source netip.Addr, resourceId int
batch := ID.GenReadable("bat")
// 检查并获取套餐与白名单
resource, whitelists, err := ensure(now, source, resourceId, count)
resource, whitelists, err := ensure(now, source, resourceId, authWhitelist, count)
if err != nil {
return nil, err
}
@@ -240,6 +240,9 @@ func (s *channelBaiyinProvider) CreateChannels(source netip.Addr, resourceId int
// 提交配置
secret := strings.Split(u.Z(proxy.Secret), ":")
if len(secret) != 2 {
return nil, core.NewServErr(fmt.Sprintf("代理 %s 密钥格式错误", proxy.IP.String()), nil)
}
gateway := g.NewGateway(proxy.IP.String(), secret[0], secret[1])
if env.RunMode == env.RunModeProd {