mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-12-21 17:46:58 -05:00
Refresh rate of a inbound detour allocation
This commit is contained in:
parent
71c70416f5
commit
e19d8002a8
@ -30,8 +30,9 @@ const (
|
||||
)
|
||||
|
||||
type InboundDetourAllocationConfig interface {
|
||||
Strategy() string
|
||||
Concurrency() int
|
||||
Strategy() string // Allocation strategy of this inbound detour.
|
||||
Concurrency() int // Number of handlers (ports) running in parallel.
|
||||
Refresh() int // Number of seconds before a handler is regenerated.
|
||||
}
|
||||
|
||||
type InboundDetourConfig interface {
|
||||
|
@ -12,6 +12,11 @@ import (
|
||||
type InboundDetourAllocationConfig struct {
|
||||
StrategyValue string `json:"strategy"`
|
||||
ConcurrencyValue int `json:"concurrency"`
|
||||
RefreshSec int `json:"refresh"`
|
||||
}
|
||||
|
||||
func (this *InboundDetourAllocationConfig) Refresh() int {
|
||||
return this.RefreshSec
|
||||
}
|
||||
|
||||
func (this *InboundDetourAllocationConfig) Strategy() string {
|
||||
|
@ -55,6 +55,11 @@ func (this *PortRange) To() v2net.Port {
|
||||
type InboundDetourAllocationConfig struct {
|
||||
StrategyValue string
|
||||
ConcurrencyValue int
|
||||
RefreshSec int
|
||||
}
|
||||
|
||||
func (this *InboundDetourAllocationConfig) Refresh() int {
|
||||
return this.RefreshSec
|
||||
}
|
||||
|
||||
func (this *InboundDetourAllocationConfig) Strategy() string {
|
||||
|
Loading…
Reference in New Issue
Block a user