重构提取逻辑,新增 area 表

This commit is contained in:
2026-06-10 14:32:45 +08:00
parent dd482dd6b0
commit ebac8042ea
26 changed files with 7939 additions and 666 deletions

View File

@@ -161,6 +161,17 @@ func (s *proxyService) Update(update *UpdateProxy) error {
return nil
}
func (s *proxyService) SyncPool(id int32) error {
proxy, err := q.Proxy.Where(q.Proxy.ID.Eq(id)).Select(q.Proxy.ID, q.Proxy.IP).First()
if err != nil {
return core.NewServErr("获取代理数据失败", err)
}
if proxy == nil {
return core.NewBizErr("代理不存在")
}
return rebuildFreeChans(id, proxy.IP.Addr)
}
func (s *proxyService) Remove(id int32) error {
used, err := hasUsedChans(id)
if err != nil {