File tree Expand file tree Collapse file tree
app/src/main/java/io/nekohasekai/sagernet/fmt Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -623,8 +623,21 @@ fun buildConfig(
623623 is ShadowsocksRBean ->
624624 buildSingBoxOutboundShadowsocksRBean(bean)
625625
626- is WireGuardBean ->
626+ is WireGuardBean -> {
627+ val endpointMtu = bean.mtu?.takeIf { it > 0 }
628+ val peerAddressFamily = when {
629+ bean.serverAddress?.contains(' :' ) == true -> " ipv6"
630+ bean.serverAddress?.isNotBlank() == true -> " ipv4-or-domain"
631+ else -> " missing"
632+ }
633+ Logs .i(
634+ " WireGuardEndpointTrace profileId=${proxyEntity.id} forTest=$forTest " +
635+ " endpointMtu=${endpointMtu ? : " default(1408)" } " +
636+ " tunMtu=${DataStore .mtu} peerAddressFamily=$peerAddressFamily " +
637+ " peerPort=${bean.serverPort} "
638+ )
627639 buildSingBoxEndpointWireGuardBean(bean)
640+ }
628641
629642 is SSHBean ->
630643 buildSingBoxOutboundSSHBean(bean)
You can’t perform that action at this time.
0 commit comments