mirror of
https://github.com/v2ray/v2ray-core.git
synced 2026-11-19 23:03:08 +00:00
simplify port range
This commit is contained in:
1 parent
5ceac7a6e2
commit
393a64820f
10 files changed
+38
-81
No files matched your search
@@ -23,8 +23,8 @@ type InboundDetourHandler struct {
|
||||
|
||||
func (this *InboundDetourHandler) Initialize() error {
|
||||
ports := this.config.PortRange()
|
||||
this.ich = make([]*InboundConnectionHandlerWithPort, 0, ports.To()-ports.From()+1)
|
||||
for i := ports.From(); i <= ports.To(); i++ {
|
||||
this.ich = make([]*InboundConnectionHandlerWithPort, 0, ports.To-ports.From+1)
|
||||
for i := ports.From; i <= ports.To; i++ {
|
||||
ichConfig := this.config.Settings()
|
||||
ich, err := proxyrepo.CreateInboundConnectionHandler(this.config.Protocol(), this.space, ichConfig)
|
||||
if err != nil {
|
||||
|
||||
Reference in new issue
Block a user