update tuyoosdk, set DNS IPs

This commit is contained in:
2026-06-03 15:57:50 +08:00
parent 92d04aba61
commit c9fe482c8c
3 changed files with 15 additions and 0 deletions

View File

@@ -124,6 +124,7 @@ public class SDKManager {
public static void UnityResetServerUrl(String url) { public static void UnityResetServerUrl(String url) {
SDKLog.i("UnityResetServerUrl : " + url); SDKLog.i("UnityResetServerUrl : " + url);
SetDNSIPsEnable(false);
SDKAPI.getIns().updateServer(url); SDKAPI.getIns().updateServer(url);
} }
@@ -561,6 +562,18 @@ public class SDKManager {
} }
} }
public static void SetDNSIPsEnable(bool enable) {
SDKAPI.enableDoh(enable);
if(enable) {
SDKAPI.setHttpDnsIps(new String[]{
"34.111.1.231",
"2600:1901:0:c31b::"
});
}
else{
SDKAPI.setHttpDnsIps(new string[0]);
}
}
} }

View File

@@ -12,6 +12,7 @@ public class TYApp extends Application {
public void onCreate() { public void onCreate() {
super.onCreate(); super.onCreate();
SDKAPI.getIns().onApplicationCreate(this); SDKAPI.getIns().onApplicationCreate(this);
SDKManager.SetDNSIPsEnable(true);
} }
@Override @Override
@@ -19,4 +20,5 @@ public class TYApp extends Application {
super.attachBaseContext(base); super.attachBaseContext(base);
SDKAPI.getIns().onAttachBaseContext(base, this); SDKAPI.getIns().onAttachBaseContext(base, this);
} }
} }