Fix and improve port hopping interval handling
https://github.com/2dust/v2rayNG/issues/5171
This commit is contained in:
@@ -1227,7 +1227,11 @@ object V2rayConfigManager {
|
||||
if (profileItem.portHopping.isNotNullEmpty()) {
|
||||
hysteriaSetting.udphop = StreamSettingsBean.HysteriaSettingsBean.HysteriaUdpHopBean(
|
||||
port = profileItem.portHopping,
|
||||
interval = profileItem.portHoppingInterval?.ifEmpty { "30" }.orEmpty().toInt()
|
||||
interval = profileItem.portHoppingInterval
|
||||
?.trim()
|
||||
?.toIntOrNull()
|
||||
?.takeIf { it >= 5 }
|
||||
?: 30
|
||||
)
|
||||
}
|
||||
streamSettings.hysteriaSettings = hysteriaSetting
|
||||
|
||||
Reference in New Issue
Block a user