Check duplicated outbound tag

This commit is contained in:
世界 2023-06-26 18:47:52 +08:00
parent c2bda9fbde
commit 9bb62ad6b5
No known key found for this signature in database
GPG Key ID: CD109927C34A63C4
1 changed files with 3 additions and 0 deletions

View File

@ -19,6 +19,9 @@ func (s *Box) startOutbounds() error {
} else {
outboundTag = outboundToStart.Tag()
}
if _, exists := outbounds[outboundTag]; exists {
return E.New("outbound tag ", outboundTag, " duplicated")
}
outboundTags[outboundToStart] = outboundTag
outbounds[outboundTag] = outboundToStart
}