update tuyoosdk, set DNS IPs
This commit is contained in:
@@ -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]);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user