Kaynağa Gözat

fix(internal/service): 修复游戏盾IP段生成逻辑

- 将 IP 地址的最后一个字节从 255 限制改为 254
- 这个修改避免了潜在的 IP地址冲突问题
fusu 3 ay önce
ebeveyn
işleme
a4cf91505a
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. 1 1
      internal/service/gameshieldsdkip.go

+ 1 - 1
internal/service/gameshieldsdkip.go

@@ -84,7 +84,7 @@ func (s *gameShieldSdkIpService) GenerateMultipleLoopbackIps(ctx context.Context
 
 	// 从最新IP的下一个地址开始
 	d++
-	if d > 255 {
+	if d > 254 {
 		d = 0
 		c++
 		if c > 255 {