diff --git a/android/app/src/main/kotlin/com/hiddify/hiddify/GroupsChannel.kt b/android/app/src/main/kotlin/com/hiddify/hiddify/GroupsChannel.kt index 7167f559..164607ff 100644 --- a/android/app/src/main/kotlin/com/hiddify/hiddify/GroupsChannel.kt +++ b/android/app/src/main/kotlin/com/hiddify/hiddify/GroupsChannel.kt @@ -58,10 +58,10 @@ class GroupsChannel(private val scope: CoroutineScope) : FlutterPlugin, CommandC } data class KOutboundGroup( - val tag: String, - val type: String, - val selected: String, - val items: List + @SerializedName("tag") val tag: String, + @SerializedName("type") val type: String, + @SerializedName("selected") val selected: String, + @SerializedName("items") val items: List ) { companion object { fun fromOutbound(group: OutboundGroup): KOutboundGroup { @@ -76,8 +76,8 @@ class GroupsChannel(private val scope: CoroutineScope) : FlutterPlugin, CommandC } data class KOutboundGroupItem( - val tag: String, - val type: String, + @SerializedName("tag") val tag: String, + @SerializedName("type") val type: String, @SerializedName("url-test-delay") val urlTestDelay: Int, ) { constructor(item: OutboundGroupItem) : this(item.tag, item.type, item.urlTestDelay) diff --git a/lib/services/singbox/mobile_singbox_service.dart b/lib/services/singbox/mobile_singbox_service.dart index d3d49cd4..d41d5211 100644 --- a/lib/services/singbox/mobile_singbox_service.dart +++ b/lib/services/singbox/mobile_singbox_service.dart @@ -76,6 +76,7 @@ class MobileSingboxService with InfraLogger implements SingboxService { if (event case String _) { return event; } + loggy.warning("[group client] unexpected type, msg: $event"); throw "invalid type"; }, );