[Bug]: Gitlab.com is not used if selected in Settings
But... jihulab is :(

https://github.com/lihenggui/blocker/blob/7331367d7c578a37b0056bcf3a7678b25a3f19ea/core/network/src/main/java/com/merxury/blocker/core/network/model/OnlineSourceType.kt#L24

https://github.com/lihenggui/blocker/blob/7331367d7c578a37b0056bcf3a7678b25a3f19ea/core/model/src/main/java/com/merxury/blocker/core/model/preference/RuleServerProvider.kt#L24

diff --git a/app-compose/src/main/java/com/merxury/blocker/BlockerApplication.kt b/app-compose/src/main/java/com/merxury/blocker/BlockerApplication.kt
index 359859b3..7604e136 100644
--- a/app-compose/src/main/java/com/merxury/blocker/BlockerApplication.kt
+++ b/app-compose/src/main/java/com/merxury/blocker/BlockerApplication.kt
@@ -23,14 +23,18 @@ import androidx.work.Configuration
 import coil.ImageLoader
 import coil.ImageLoaderFactory
 import com.merxury.blocker.core.data.respository.userdata.UserDataRepository
+import com.merxury.blocker.core.model.preference.RuleServerProvider.GITHUB
+import com.merxury.blocker.core.model.preference.RuleServerProvider.GITLAB
 import com.merxury.blocker.core.network.BlockerNetworkDataSource
 import com.topjohnwu.superuser.Shell
 import dagger.hilt.android.HiltAndroidApp
 import kotlinx.coroutines.MainScope
 import kotlinx.coroutines.flow.distinctUntilChanged
+import kotlinx.coroutines.flow.first
 import kotlinx.coroutines.flow.map
 import kotlinx.coroutines.launch
 import timber.log.Timber
+import java.util.Locale
 import javax.inject.Inject
 import javax.inject.Provider
 
@@ -74,6 +78,20 @@ class BlockerApplication : Application(), ImageLoaderFactory, Configuration.Prov
 
     private fun initServerProvider() {
         applicationScope.launch {
+            val userData = userDataRepository.userData.first()
+            if (!userData.isFirstTimeInitializationCompleted) {
+                // Set default server provider for first time run
+                val locale = Locale.getDefault().toString()
+                if (locale == "zh_CN") {
+                    // Set default server provider to GitLab for Chinese users
+                    Timber.i("Set default server provider to GitLab")
+                    blockerNetworkDataSource.changeServerProvider(GITLAB)
+                } else {
+                    Timber.i("Set default server provider to GitHub")
+                    blockerNetworkDataSource.changeServerProvider(GITHUB)
+                }
+                userDataRepository.setIsFirstTimeInitializationCompleted(true)
+            }
             userDataRepository.userData
                 .map { it.ruleServerProvider }
                 .distinctUntilChanged()
diff --git a/core/data/src/main/java/com/merxury/blocker/core/data/respository/userdata/LocalUserDataRepository.kt b/core/data/src/main/java/com/merxury/blocker/core/data/respository/userdata/LocalUserDataRepository.kt
index da151cc0..18e5be7c 100644
--- a/core/data/src/main/java/com/merxury/blocker/core/data/respository/userdata/LocalUserDataRepository.kt
+++ b/core/data/src/main/java/com/merxury/blocker/core/data/respository/userdata/LocalUserDataRepository.kt
@@ -122,4 +122,8 @@ class LocalUserDataRepository @Inject constructor(
         blockerPreferenceDataSource.setShowRunningAppsOnTop(shouldShowRunningAppsOnTop)
         analyticsHelper.logShowRunningAppsOnTopPreferenceChanged(shouldShowRunningAppsOnTop)
     }
+
+    override suspend fun setIsFirstTimeInitializationCompleted(completed: Boolean) {
+        blockerPreferenceDataSource.setIsFirstTimeInitializationCompleted(completed)
+    }
 }
diff --git a/core/data/src/main/java/com/merxury/blocker/core/data/respository/userdata/UserDataRepository.kt b/core/data/src/main/java/com/merxury/blocker/core/data/respository/userdata/UserDataRepository.kt
index fa0fb7ee..5d39e8ca 100644
--- a/core/data/src/main/java/com/merxury/blocker/core/data/respository/userdata/UserDataRepository.kt
+++ b/core/data/src/main/java/com/merxury/blocker/core/data/respository/userdata/UserDataRepository.kt
@@ -61,4 +61,6 @@ interface UserDataRepository {
     suspend fun setComponentSorting(sorting: ComponentSorting)
 
     suspend fun setShowRunningAppsOnTop(shouldShowRunningAppsOnTop: Boolean)
+
+    suspend fun setIsFirstTimeInitializationCompleted(completed: Boolean)
 }
diff --git a/core/datastore/src/main/java/com/merxury/blocker/core/datastore/BlockerPreferencesDataSource.kt b/core/datastore/src/main/java/com/merxury/blocker/core/datastore/BlockerPreferencesDataSource.kt
index 1bcd25bf..9533bbb6 100644
--- a/core/datastore/src/main/java/com/merxury/blocker/core/datastore/BlockerPreferencesDataSource.kt
+++ b/core/datastore/src/main/java/com/merxury/blocker/core/datastore/BlockerPreferencesDataSource.kt
@@ -65,10 +65,10 @@ class BlockerPreferencesDataSource @Inject constructor(
             ruleServerProvider = when (it.ruleServerProvider) {
                 null,
                 RuleServerProviderProto.UNRECOGNIZED,
-                RuleServerProviderProto.GITLAB,
-                -> RuleServerProvider.GITLAB
+                RuleServerProviderProto.GITHUB,
+                -> RuleServerProvider.GITHUB
 
-                RuleServerProviderProto.GITHUB -> RuleServerProvider.GITHUB
+                RuleServerProviderProto.GITLAB -> RuleServerProvider.GITLAB
             },
             ruleBackupFolder = it.ruleBackupFolder,
             backupSystemApp = it.backupSystemApp,
@@ -124,6 +124,7 @@ class BlockerPreferencesDataSource @Inject constructor(
             },
             useDynamicColor = it.useDynamicColor,
             showRunningAppsOnTop = it.showRunningAppsOnTop,
+            isFirstTimeInitializationCompleted = it.isFirstTimeInitializationCompleted,
         )
     }
 
@@ -272,4 +273,10 @@ class BlockerPreferencesDataSource @Inject constructor(
             it.copy { this.showRunningAppsOnTop = showRunningAppsOnTop }
         }
     }
+
+    suspend fun setIsFirstTimeInitializationCompleted(completed: Boolean) {
+        userPreferences.updateData {
+            it.copy { this.isFirstTimeInitializationCompleted = completed }
+        }
+    }
 }
diff --git a/core/datastore/src/main/proto/com/merxury/blocker/data/user_preferences.proto b/core/datastore/src/main/proto/com/merxury/blocker/data/user_preferences.proto
index 222ef6bc..8b098750 100644
--- a/core/datastore/src/main/proto/com/merxury/blocker/data/user_preferences.proto
+++ b/core/datastore/src/main/proto/com/merxury/blocker/data/user_preferences.proto
@@ -44,4 +44,5 @@ message UserPreferences {
     bool use_dynamic_color = 13;
     bool show_running_apps_on_top = 14;
     ComponentSortingOrderProto component_sorting_order = 15;
+    bool is_first_time_initialization_completed = 16;
 }
diff --git a/core/model/src/main/java/com/merxury/blocker/core/model/preference/UserPreferenceData.kt b/core/model/src/main/java/com/merxury/blocker/core/model/preference/UserPreferenceData.kt
index 1b21f44f..9aafe11e 100644
--- a/core/model/src/main/java/com/merxury/blocker/core/model/preference/UserPreferenceData.kt
+++ b/core/model/src/main/java/com/merxury/blocker/core/model/preference/UserPreferenceData.kt
@@ -34,4 +34,5 @@ data class UserPreferenceData(
     val componentSortingOrder: SortingOrder,
     val componentShowPriority: ComponentShowPriority,
     val showRunningAppsOnTop: Boolean,
+    val isFirstTimeInitializationCompleted: Boolean,
 )
diff --git a/feature/settings/src/main/java/com/merxury/blocker/feature/settings/SettingsViewModel.kt b/feature/settings/src/main/java/com/merxury/blocker/feature/settings/SettingsViewModel.kt
index a8f880ac..35716a6b 100644
--- a/feature/settings/src/main/java/com/merxury/blocker/feature/settings/SettingsViewModel.kt
+++ b/feature/settings/src/main/java/com/merxury/blocker/feature/settings/SettingsViewModel.kt
@@ -32,7 +32,7 @@ import com.merxury.blocker.core.model.data.ControllerType
 import com.merxury.blocker.core.model.data.ControllerType.IFW
 import com.merxury.blocker.core.model.preference.DarkThemeConfig
 import com.merxury.blocker.core.model.preference.RuleServerProvider
-import com.merxury.blocker.core.model.preference.RuleServerProvider.GITLAB
+import com.merxury.blocker.core.model.preference.RuleServerProvider.GITHUB
 import com.merxury.blocker.core.rule.entity.RuleWorkResult
 import com.merxury.blocker.core.rule.entity.RuleWorkType
 import com.merxury.blocker.core.rule.entity.RuleWorkType.EXPORT_BLOCKER_RULES
@@ -293,7 +293,7 @@ class SettingsViewModel @Inject constructor(
 
 data class UserEditableSettings(
     val controllerType: ControllerType = IFW,
-    val ruleServerProvider: RuleServerProvider = GITLAB,
+    val ruleServerProvider: RuleServerProvider = GITHUB,
     val ruleBackupFolder: String = "",
     val backupSystemApp: Boolean = false,
     val restoreSystemApp: Boolean = false,
['core/datastore/src/main/proto/com/merxury/blocker/data/user_preferences.proto', 'core/data/src/main/java/com/merxury/blocker/core/data/respository/userdata/UserDataRepository.kt', 'app-compose/src/main/java/com/merxury/blocker/BlockerApplication.kt', 'core/model/src/main/java/com/merxury/blocker/core/model/preference/UserPreferenceData.kt', 'feature/settings/src/main/java/com/merxury/blocker/feature/settings/SettingsViewModel.kt', 'core/datastore/src/main/java/com/merxury/blocker/core/datastore/BlockerPreferencesDataSource.kt', 'core/data/src/main/java/com/merxury/blocker/core/data/respository/userdata/LocalUserDataRepository.kt']