mirror of
https://github.com/v2ray/v2ray-core.git
synced 2026-11-30 23:37:44 +00:00
protobuf for net
This commit is contained in:
20 files changed
+323
-77
No files matched your search
@@ -52,7 +52,7 @@ func (this *InboundDetourHandlerDynamic) pickUnusedPort() v2net.Port {
|
||||
delta := int(this.config.PortRange.To) - int(this.config.PortRange.From) + 1
|
||||
for {
|
||||
r := dice.Roll(delta)
|
||||
port := this.config.PortRange.From + v2net.Port(r)
|
||||
port := this.config.PortRange.FromPort() + v2net.Port(r)
|
||||
_, used := this.portsInUse[port]
|
||||
if !used {
|
||||
return port
|
||||
|
||||
Reference in new issue
Block a user