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