diff --git a/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/data/DummyRelayItems.kt b/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/data/DummyRelayItems.kt index 052f2d897aa2..b0d5fef1e34a 100644 --- a/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/data/DummyRelayItems.kt +++ b/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/data/DummyRelayItems.kt @@ -63,7 +63,9 @@ private val DUMMY_RELAY_COUNTRY_2 = ) private val DUMMY_WIREGUARD_PORT_RANGES = ArrayList() -private val DUMMY_WIREGUARD_ENDPOINT_DATA = WireguardEndpointData(DUMMY_WIREGUARD_PORT_RANGES) +private val DUMMY_SHADOWSOCKS_PORT_RANGES = emptyList() +private val DUMMY_WIREGUARD_ENDPOINT_DATA = + WireguardEndpointData(DUMMY_WIREGUARD_PORT_RANGES, DUMMY_SHADOWSOCKS_PORT_RANGES) val DUMMY_RELAY_COUNTRIES = listOf(DUMMY_RELAY_COUNTRY_1, DUMMY_RELAY_COUNTRY_2) diff --git a/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/dialog/CustomPortDialogTest.kt b/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/dialog/CustomPortDialogTest.kt index bcb3908faed3..f04e959c9399 100644 --- a/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/dialog/CustomPortDialogTest.kt +++ b/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/dialog/CustomPortDialogTest.kt @@ -30,13 +30,15 @@ class CustomPortDialogTest { @SuppressLint("ComposableNaming") @Composable private fun testWireguardCustomPortDialog( + title: String = "", initialPort: Port? = null, allowedPortRanges: List = emptyList(), onSave: (Port?) -> Unit = { _ -> }, onDismiss: () -> Unit = {}, ) { - WireguardCustomPortDialog( + CustomPortDialog( + title = title, initialPort = initialPort, allowedPortRanges = allowedPortRanges, onSave = onSave, diff --git a/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/screen/ShadowsocksSettingsScreenTest.kt b/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/screen/ShadowsocksSettingsScreenTest.kt new file mode 100644 index 000000000000..492878e2d244 --- /dev/null +++ b/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/screen/ShadowsocksSettingsScreenTest.kt @@ -0,0 +1,85 @@ +package net.mullvad.mullvadvpn.compose.screen + +import androidx.compose.ui.test.ExperimentalTestApi +import androidx.compose.ui.test.onNodeWithTag +import androidx.compose.ui.test.onNodeWithText +import androidx.compose.ui.test.performClick +import io.mockk.coVerify +import io.mockk.mockk +import io.mockk.verify +import net.mullvad.mullvadvpn.compose.createEdgeToEdgeComposeExtension +import net.mullvad.mullvadvpn.compose.setContentWithTheme +import net.mullvad.mullvadvpn.compose.state.ShadowsocksSettingsState +import net.mullvad.mullvadvpn.compose.test.SHADOWSOCKS_CUSTOM_PORT_TEXT_TEST_TAG +import net.mullvad.mullvadvpn.compose.test.SHADOWSOCKS_PORT_ITEM_X_TEST_TAG +import net.mullvad.mullvadvpn.lib.model.Constraint +import net.mullvad.mullvadvpn.lib.model.Port +import net.mullvad.mullvadvpn.onNodeWithTagAndText +import org.junit.jupiter.api.Test +import org.junit.jupiter.api.extension.RegisterExtension + +@OptIn(ExperimentalTestApi::class) +class ShadowsocksSettingsScreenTest { + @JvmField @RegisterExtension val composeExtension = createEdgeToEdgeComposeExtension() + + @Test + fun testSelectTcpOverUdpPortOption() = + composeExtension.use { + // Arrange + val onObfuscationPortSelected: (Constraint) -> Unit = mockk(relaxed = true) + setContentWithTheme { + ShadowsocksSettingsScreen( + state = ShadowsocksSettingsState(port = Constraint.Any), + onObfuscationPortSelected = onObfuscationPortSelected + ) + } + + // Act + onNodeWithTagAndText( + testTag = String.format(SHADOWSOCKS_PORT_ITEM_X_TEST_TAG, 443), + text = "443" + ) + .assertExists() + .performClick() + + // Assert + coVerify(exactly = 1) { onObfuscationPortSelected.invoke(Constraint.Only(Port(443))) } + } + + @Test + fun testShowShadowsocksCustomPort() = + composeExtension.use { + // Arrange + setContentWithTheme { + ShadowsocksSettingsScreen( + state = ShadowsocksSettingsState(customPort = Port(4000)), + ) + } + + // Assert + onNodeWithText("4000").assertExists() + } + + @Test + fun testSelectShadowsocksCustomPort() = + composeExtension.use { + // Arrange + val onObfuscationPortSelected: (Constraint) -> Unit = mockk(relaxed = true) + setContentWithTheme { + ShadowsocksSettingsScreen( + state = + ShadowsocksSettingsState( + port = Constraint.Only(Port(4000)), + customPort = Port(4000) + ), + onObfuscationPortSelected = onObfuscationPortSelected + ) + } + + // Act + onNodeWithTag(testTag = SHADOWSOCKS_CUSTOM_PORT_TEXT_TEST_TAG).performClick() + + // Assert + verify { onObfuscationPortSelected.invoke(Constraint.Only(Port(4000))) } + } +} diff --git a/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/screen/Udp2TcpSettingsScreenTest.kt b/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/screen/Udp2TcpSettingsScreenTest.kt new file mode 100644 index 000000000000..efef32f4581c --- /dev/null +++ b/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/screen/Udp2TcpSettingsScreenTest.kt @@ -0,0 +1,44 @@ +package net.mullvad.mullvadvpn.compose.screen + +import androidx.compose.ui.test.ExperimentalTestApi +import androidx.compose.ui.test.performClick +import io.mockk.coVerify +import io.mockk.mockk +import net.mullvad.mullvadvpn.compose.createEdgeToEdgeComposeExtension +import net.mullvad.mullvadvpn.compose.setContentWithTheme +import net.mullvad.mullvadvpn.compose.state.Udp2TcpSettingsState +import net.mullvad.mullvadvpn.compose.test.UDP_OVER_TCP_PORT_ITEM_X_TEST_TAG +import net.mullvad.mullvadvpn.lib.model.Constraint +import net.mullvad.mullvadvpn.lib.model.Port +import net.mullvad.mullvadvpn.onNodeWithTagAndText +import org.junit.jupiter.api.Test +import org.junit.jupiter.api.extension.RegisterExtension + +@OptIn(ExperimentalTestApi::class) +class Udp2TcpSettingsScreenTest { + @JvmField @RegisterExtension val composeExtension = createEdgeToEdgeComposeExtension() + + @Test + fun testSelectTcpOverUdpPortOption() = + composeExtension.use { + // Arrange + val onObfuscationPortSelected: (Constraint) -> Unit = mockk(relaxed = true) + setContentWithTheme { + Udp2TcpSettingsScreen( + state = Udp2TcpSettingsState(port = Constraint.Any), + onObfuscationPortSelected = onObfuscationPortSelected + ) + } + + // Act + onNodeWithTagAndText( + testTag = String.format(UDP_OVER_TCP_PORT_ITEM_X_TEST_TAG, 5001), + text = "5001" + ) + .assertExists() + .performClick() + + // Assert + coVerify(exactly = 1) { onObfuscationPortSelected.invoke(Constraint.Only(Port(5001))) } + } +} diff --git a/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/screen/VpnSettingsScreenTest.kt b/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/screen/VpnSettingsScreenTest.kt index 2a3031ececdf..e5a42d019bc9 100644 --- a/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/screen/VpnSettingsScreenTest.kt +++ b/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/compose/screen/VpnSettingsScreenTest.kt @@ -8,7 +8,6 @@ import androidx.compose.ui.test.onNodeWithText import androidx.compose.ui.test.performClick import androidx.compose.ui.test.performScrollToNode import io.mockk.MockKAnnotations -import io.mockk.coVerify import io.mockk.mockk import io.mockk.verify import net.mullvad.mullvadvpn.compose.createEdgeToEdgeComposeExtension @@ -18,8 +17,6 @@ import net.mullvad.mullvadvpn.compose.test.LAZY_LIST_LAST_ITEM_TEST_TAG import net.mullvad.mullvadvpn.compose.test.LAZY_LIST_QUANTUM_ITEM_OFF_TEST_TAG import net.mullvad.mullvadvpn.compose.test.LAZY_LIST_QUANTUM_ITEM_ON_TEST_TAG import net.mullvad.mullvadvpn.compose.test.LAZY_LIST_TEST_TAG -import net.mullvad.mullvadvpn.compose.test.LAZY_LIST_UDP_OVER_TCP_PORT_ITEM_X_TEST_TAG -import net.mullvad.mullvadvpn.compose.test.LAZY_LIST_UDP_OVER_TCP_PORT_TEST_TAG import net.mullvad.mullvadvpn.compose.test.LAZY_LIST_WIREGUARD_CUSTOM_PORT_NUMBER_TEST_TAG import net.mullvad.mullvadvpn.compose.test.LAZY_LIST_WIREGUARD_CUSTOM_PORT_TEXT_TEST_TAG import net.mullvad.mullvadvpn.compose.test.LAZY_LIST_WIREGUARD_PORT_ITEM_X_TEST_TAG @@ -28,7 +25,6 @@ import net.mullvad.mullvadvpn.lib.model.Mtu import net.mullvad.mullvadvpn.lib.model.Port import net.mullvad.mullvadvpn.lib.model.PortRange import net.mullvad.mullvadvpn.lib.model.QuantumResistantState -import net.mullvad.mullvadvpn.lib.model.SelectedObfuscation import net.mullvad.mullvadvpn.onNodeWithTagAndText import net.mullvad.mullvadvpn.viewmodel.CustomDnsItem import org.junit.jupiter.api.BeforeEach @@ -210,74 +206,6 @@ class VpnSettingsScreenTest { onNodeWithContentDescription(LOCAL_DNS_SERVER_WARNING).assertExists() } - @Test - fun testSelectTcpOverUdpPortOption() = - composeExtension.use { - // Arrange - val onObfuscationPortSelected: (Constraint) -> Unit = mockk(relaxed = true) - setContentWithTheme { - VpnSettingsScreen( - state = - VpnSettingsUiState.createDefault( - selectedObfuscation = SelectedObfuscation.Udp2Tcp, - selectedObfuscationPort = Constraint.Only(Port(5001)) - ), - onObfuscationPortSelected = onObfuscationPortSelected - ) - } - - // Act - onNodeWithTag(LAZY_LIST_TEST_TAG) - .performScrollToNode(hasTestTag(LAZY_LIST_UDP_OVER_TCP_PORT_TEST_TAG)) - onNodeWithText("UDP-over-TCP port").performClick() - onNodeWithTag(LAZY_LIST_TEST_TAG) - .performScrollToNode( - hasTestTag(String.format(LAZY_LIST_UDP_OVER_TCP_PORT_ITEM_X_TEST_TAG, 5001)) - ) - - // Assert - onNodeWithTagAndText( - testTag = String.format(LAZY_LIST_UDP_OVER_TCP_PORT_ITEM_X_TEST_TAG, 5001), - text = "5001" - ) - .assertExists() - .performClick() - - coVerify(exactly = 1) { onObfuscationPortSelected.invoke(Constraint.Only(Port(5001))) } - } - - @Test - fun testAttemptSelectTcpOverUdpPortOption() = - composeExtension.use { - // Arrange - val onObfuscationPortSelected: (Constraint) -> Unit = mockk(relaxed = true) - setContentWithTheme { - VpnSettingsScreen( - state = - VpnSettingsUiState.createDefault( - selectedObfuscation = SelectedObfuscation.Off, - ), - onObfuscationPortSelected = onObfuscationPortSelected - ) - } - - // Act - onNodeWithTag(LAZY_LIST_TEST_TAG) - .performScrollToNode(hasTestTag(LAZY_LIST_UDP_OVER_TCP_PORT_TEST_TAG)) - onNodeWithText("UDP-over-TCP port").performClick() - onNodeWithTag(LAZY_LIST_TEST_TAG) - .performScrollToNode( - hasTestTag(String.format(LAZY_LIST_UDP_OVER_TCP_PORT_ITEM_X_TEST_TAG, 5001)) - ) - - // Assert - onNodeWithTag(String.format(LAZY_LIST_UDP_OVER_TCP_PORT_ITEM_X_TEST_TAG, 5001)) - .assertExists() - .performClick() - - verify(exactly = 0) { onObfuscationPortSelected.invoke(any()) } - } - @Test fun testShowSelectedTunnelQuantumOption() = composeExtension.use { @@ -487,9 +415,6 @@ class VpnSettingsScreenTest { } // Act - - onNodeWithTag(LAZY_LIST_TEST_TAG) - .performScrollToNode(hasTestTag(LAZY_LIST_UDP_OVER_TCP_PORT_TEST_TAG)) onNodeWithText("WireGuard obfuscation").performClick() // Assert diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/ShadowsocksSettingsScreen.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/ShadowsocksSettingsScreen.kt index 9d72177969c7..7e24a299b422 100644 --- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/ShadowsocksSettingsScreen.kt +++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/ShadowsocksSettingsScreen.kt @@ -22,8 +22,9 @@ import net.mullvad.mullvadvpn.compose.component.ScaffoldWithMediumTopBar import net.mullvad.mullvadvpn.compose.dialog.CustomPortNavArgs import net.mullvad.mullvadvpn.compose.extensions.itemWithDivider import net.mullvad.mullvadvpn.compose.state.ShadowsocksSettingsState -import net.mullvad.mullvadvpn.compose.test.LAZY_LIST_UDP_OVER_TCP_PORT_ITEM_AUTOMATIC_TEST_TAG -import net.mullvad.mullvadvpn.compose.test.LAZY_LIST_UDP_OVER_TCP_PORT_ITEM_X_TEST_TAG +import net.mullvad.mullvadvpn.compose.test.SHADOWSOCKS_CUSTOM_PORT_TEXT_TEST_TAG +import net.mullvad.mullvadvpn.compose.test.SHADOWSOCKS_PORT_ITEM_AUTOMATIC_TEST_TAG +import net.mullvad.mullvadvpn.compose.test.SHADOWSOCKS_PORT_ITEM_X_TEST_TAG import net.mullvad.mullvadvpn.compose.transitions.SlideInFromRightTransition import net.mullvad.mullvadvpn.compose.util.OnNavResultValue import net.mullvad.mullvadvpn.constant.SHADOWSOCKS_PRESET_PORTS @@ -102,7 +103,7 @@ fun ShadowsocksSettingsScreen( title = stringResource(id = R.string.automatic), isSelected = state.port is Constraint.Any, onCellClicked = { onObfuscationPortSelected(Constraint.Any) }, - testTag = LAZY_LIST_UDP_OVER_TCP_PORT_ITEM_AUTOMATIC_TEST_TAG, + testTag = SHADOWSOCKS_PORT_ITEM_AUTOMATIC_TEST_TAG, ) } itemWithDivider { @@ -111,8 +112,7 @@ fun ShadowsocksSettingsScreen( title = port.toString(), isSelected = state.port.hasValue(port), onCellClicked = { onObfuscationPortSelected(Constraint.Only(Port(port))) }, - testTag = - String.format(null, LAZY_LIST_UDP_OVER_TCP_PORT_ITEM_X_TEST_TAG, port) + testTag = String.format(null, SHADOWSOCKS_PORT_ITEM_X_TEST_TAG, port) ) } } @@ -129,6 +129,7 @@ fun ShadowsocksSettingsScreen( } }, onPortCellClicked = navigateToCustomPortDialog, + mainTestTag = SHADOWSOCKS_CUSTOM_PORT_TEXT_TEST_TAG ) } } diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/Udp2TcpSettingsScreen.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/Udp2TcpSettingsScreen.kt index 0d5ff34b9a31..c6e3a13c095e 100644 --- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/Udp2TcpSettingsScreen.kt +++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/Udp2TcpSettingsScreen.kt @@ -18,8 +18,8 @@ import net.mullvad.mullvadvpn.compose.component.NavigateBackIconButton import net.mullvad.mullvadvpn.compose.component.ScaffoldWithMediumTopBar import net.mullvad.mullvadvpn.compose.extensions.itemWithDivider import net.mullvad.mullvadvpn.compose.state.Udp2TcpSettingsState -import net.mullvad.mullvadvpn.compose.test.LAZY_LIST_UDP_OVER_TCP_PORT_ITEM_AUTOMATIC_TEST_TAG -import net.mullvad.mullvadvpn.compose.test.LAZY_LIST_UDP_OVER_TCP_PORT_ITEM_X_TEST_TAG +import net.mullvad.mullvadvpn.compose.test.UDP_OVER_TCP_PORT_ITEM_AUTOMATIC_TEST_TAG +import net.mullvad.mullvadvpn.compose.test.UDP_OVER_TCP_PORT_ITEM_X_TEST_TAG import net.mullvad.mullvadvpn.compose.transitions.SlideInFromRightTransition import net.mullvad.mullvadvpn.constant.UDP2TCP_PRESET_PORTS import net.mullvad.mullvadvpn.lib.model.Constraint @@ -72,7 +72,7 @@ fun Udp2TcpSettingsScreen( title = stringResource(id = R.string.automatic), isSelected = state.port is Constraint.Any, onCellClicked = { onObfuscationPortSelected(Constraint.Any) }, - testTag = LAZY_LIST_UDP_OVER_TCP_PORT_ITEM_AUTOMATIC_TEST_TAG, + testTag = UDP_OVER_TCP_PORT_ITEM_AUTOMATIC_TEST_TAG, ) } itemWithDivider { @@ -81,8 +81,7 @@ fun Udp2TcpSettingsScreen( title = port.toString(), isSelected = state.port.hasValue(port), onCellClicked = { onObfuscationPortSelected(Constraint.Only(Port(port))) }, - testTag = - String.format(null, LAZY_LIST_UDP_OVER_TCP_PORT_ITEM_X_TEST_TAG, port) + testTag = String.format(null, UDP_OVER_TCP_PORT_ITEM_X_TEST_TAG, port) ) } } diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/test/ComposeTestTagConstants.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/test/ComposeTestTagConstants.kt index 7e2743c9373d..cb879cc6954d 100644 --- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/test/ComposeTestTagConstants.kt +++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/test/ComposeTestTagConstants.kt @@ -14,13 +14,6 @@ const val LAZY_LIST_WIREGUARD_CUSTOM_PORT_TEXT_TEST_TAG = "lazy_list_wireguard_custom_port_text_test_tag" const val LAZY_LIST_WIREGUARD_CUSTOM_PORT_NUMBER_TEST_TAG = "lazy_list_wireguard_custom_port_number_test_tag" -const val LAZY_LIST_UDP_OVER_TCP_PORT_TEST_TAG = "lazy_list_udp_over_tcp_port_test_tag" -const val LAZY_LIST_UDP_OVER_TCP_PORT_ITEM_AUTOMATIC_TEST_TAG = - "lazy_list_udp_over_tcp_item_automatic_test_tag" -const val LAZY_LIST_UDP_OVER_TCP_PORT_ITEM_X_TEST_TAG = "lazy_list_udp_over_tcp_item_%d_test_tag" -const val LAZY_LIST_SHADOWSOCKS_PORT_ITEM_AUTOMATIC_TEST_TAG = - "lazy_list_shadowsocks_item_automatic_test_tag" -const val LAZY_LIST_SHADOWSOCKS_PORT_ITEM_X_TEST_TAG = "lazy_list_shadowsocks_item_%d_test_tag" const val CUSTOM_PORT_DIALOG_INPUT_TEST_TAG = "custom_port_dialog_input_test_tag" // SelectLocationScreen, ConnectScreen, CustomListLocationsScreen @@ -105,3 +98,12 @@ const val API_ACCESS_TEST_METHOD_BUTTON = "api_access_details_test_method_test_t // EditApiAccessMethodScreen const val EDIT_API_ACCESS_NAME_INPUT = "edit_api_access_name_input" + +// Udp2TcpSettingScreen +const val UDP_OVER_TCP_PORT_ITEM_AUTOMATIC_TEST_TAG = "udp_over_tcp_item_automatic_test_tag" +const val UDP_OVER_TCP_PORT_ITEM_X_TEST_TAG = "udp_over_tcp_item_%d_test_tag" + +// ShadowsocksSettingsScreen +const val SHADOWSOCKS_PORT_ITEM_AUTOMATIC_TEST_TAG = "shadowsocks_item_automatic_test_tag" +const val SHADOWSOCKS_PORT_ITEM_X_TEST_TAG = "shadowsocks_item_%d_test_tag" +const val SHADOWSOCKS_CUSTOM_PORT_TEXT_TEST_TAG = "shadowsocks_custom_port_text_test_tag" diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/util/PortExtensions.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/util/PortExtensions.kt index 3f5ff2ceb41b..a3cea30884cd 100644 --- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/util/PortExtensions.kt +++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/util/PortExtensions.kt @@ -1,6 +1,5 @@ package net.mullvad.mullvadvpn.util -import net.mullvad.mullvadvpn.constant.WIREGUARD_PRESET_PORTS import net.mullvad.mullvadvpn.lib.model.Constraint import net.mullvad.mullvadvpn.lib.model.Port import net.mullvad.mullvadvpn.lib.model.PortRange diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/viewmodel/Udp2TcpSettingsViewModel.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/viewmodel/Udp2TcpSettingsViewModel.kt index 8a9517242ee9..914c6248b50c 100644 --- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/viewmodel/Udp2TcpSettingsViewModel.kt +++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/viewmodel/Udp2TcpSettingsViewModel.kt @@ -28,8 +28,10 @@ class Udp2TcpSettingsViewModel(private val repository: SettingsRepository) : Vie ) fun onObfuscationPortSelected(port: Constraint) { - viewModelScope.launch { repository.setCustomUdp2TcpObfuscationPort(port).onLeft { - Logger.e("Select udp to tcp port error $it") - } } + viewModelScope.launch { + repository.setCustomUdp2TcpObfuscationPort(port).onLeft { + Logger.e("Select udp to tcp port error $it") + } + } } }