diff --git a/.github/workflows/browerstack.yml b/.github/workflows/browerstack.yml index ce2f138bf..cd85f3afa 100644 --- a/.github/workflows/browerstack.yml +++ b/.github/workflows/browerstack.yml @@ -10,7 +10,8 @@ env: jobs: build: - runs-on: ubuntu-latest + runs-on: + group: large-runners steps: - uses: actions/checkout@v3 with: @@ -57,9 +58,10 @@ jobs: run: make android-lib ANDROID_ARCH=all - name: Build APK + env: + CI: "true" run: | flutter pub get - echo "CI=true" >> $GITHUB_ENV make do-android-debug ANDROID_ARCH=all - name: List files in current directory diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 4a47bcfc8..5ca490f68 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -9,7 +9,8 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: + group: large-runners steps: - uses: actions/checkout@v2 - name: Install libpcap diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7ab56f49c..d1e0f394c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,7 +12,8 @@ env: DATADOG_SITE: datadoghq.eu jobs: set-version: - runs-on: ubuntu-latest + runs-on: + group: large-runners outputs: version: ${{ steps.set-version.outputs.version }} prefix: ${{ steps.set-version.outputs.prefix }} @@ -57,7 +58,8 @@ jobs: version: ${{ needs.set-version.outputs.version }} version_file: ${{ needs.set-version.outputs.version_file }} prefix: ${{ needs.set-version.outputs.prefix }} - runs-on: ubuntu-latest-8-cores + runs-on: + group: large-runners steps: - uses: actions/checkout@v3 with: @@ -174,7 +176,8 @@ jobs: s3cmd modify --add-header='content-type':'application/vnd.android.package-archive' "s3://$S3_BUCKET/${{ env.prefix }}.aab" push-binaries: - runs-on: ubuntu-latest + runs-on: + group: large-runners needs: [ set-version , build-android ] env: version: ${{ needs.set-version.outputs.version }} diff --git a/Makefile b/Makefile index 21172efca..3ca47d731 100644 --- a/Makefile +++ b/Makefile @@ -289,9 +289,17 @@ $(MOBILE_TEST_APK) $(MOBILE_TESTS_APK): $(MOBILE_SOURCES) $(MOBILE_ANDROID_LIB) -b $(MOBILE_DIR)/app/build.gradle \ :app:assembleAutoTestDebug :app:assembleAutoTestDebugAndroidTest +dart-defines-debug: + @DART_DEFINES="$(CIBASE)"; \ + printf "$$DART_DEFINES" + do-android-debug: $(MOBILE_SOURCES) $(MOBILE_ANDROID_LIB) - ln -fs $(MOBILE_DIR)/gradle.properties . && \ - CI="$$CI" && $(GRADLE) -PlanternVersion=$(DEBUG_VERSION) -PddClientToken=$$DD_CLIENT_TOKEN -PddApplicationID=$$DD_APPLICATION_ID \ + @ln -fs $(MOBILE_DIR)/gradle.properties . && \ + DART_DEFINES=`make dart-defines-debug` && \ + echo "Value of DART_DEFINES is: $$DART_DEFINES" && \ + CI="$$CI" && \ + echo "Value of CI is: $$CI" && \ + $(GRADLE) -Pdart-defines="$$DART_DEFINES" -PlanternVersion=$(DEBUG_VERSION) -PddClientToken=$$DD_CLIENT_TOKEN -PddApplicationID=$$DD_APPLICATION_ID \ -PproServerUrl=$(PRO_SERVER_URL) -PpaymentProvider=$(PAYMENT_PROVIDER) -Pcountry=$(COUNTRY) \ -PplayVersion=$(FORCE_PLAY_VERSION) -PuseStaging=$(STAGING) -PstickyConfig=$(STICKY_CONFIG) \ -PlanternRevisionDate=$(REVISION_DATE) -PandroidArch=$(ANDROID_ARCH) \ @@ -354,7 +362,7 @@ android-release-install: $(MOBILE_RELEASE_APK) $(ADB) install -r $(MOBILE_RELEASE_APK) package-android: pubget require-version - @ANDROID_ARCH=all make android-release && \ + @ANDROID_ARCH=arm32 make android-release && \ ANDROID_ARCH=all make android-bundle && \ echo "-> $(MOBILE_RELEASE_APK)" diff --git a/README.md b/README.md index 6af90a2a8..6953eaa04 100644 --- a/README.md +++ b/README.md @@ -32,16 +32,16 @@ All those dependencies must be in your PATH * [Android Studio](https://developer.android.com/studio) * [Git](https://git-scm.com/downloads) * [Android NDK](#steps-to-run-the-project) - * NDK should be version 22.x, for example 22.1.7171670. Newer versions of the NDK don't work with the current release of gomobile. + * NDK should be version 26.x, for example 26.0.10792818. * [Git LFS](https://git-lfs.github.com) - more information in [Usage](#usage) -* [Flutter (3.10.5)](https://flutter.dev) +* [Flutter (3.13.5)](https://flutter.dev) * [sentry-cli](https://docs.sentry.io/product/cli/installation/) - This is used for uploading native debug symbols to Sentry * [gomobile](https://github.com/golang/go/wiki/Mobile#tools) * [json-server](https://github.com/typicode/json-server) * Only necessary for testing Replica -* CMake 3.18.1 +* CMake 3.22.1 * You can get this from Android SDK Manager In the welcome screen choose the "Open an existing Android Studio" option and select the `android` folder. diff --git a/android/app/build.gradle b/android/app/build.gradle index 87cef2b88..a5b818d80 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -37,7 +37,7 @@ if (flutterVersionName == null) { apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { - ndkVersion "23.0.7599858" + ndkVersion "26.0.10792818" bundle { density { @@ -139,7 +139,7 @@ android { externalNativeBuild { cmake { path file('cmake/CMakeLists.txt') - version '3.18.1' + version '3.22.1' } } diff --git a/android/app/cmake/CMakeLists.txt b/android/app/cmake/CMakeLists.txt index 681a25e2b..f0eabd8fa 100644 --- a/android/app/cmake/CMakeLists.txt +++ b/android/app/cmake/CMakeLists.txt @@ -2,11 +2,3 @@ # libc++_shared.so is included in the binary cmake_minimum_required(VERSION 3.10.2) project("lantern-android") - -message("Configuring STL for ${ANDROID_ABI}") -set(lib_path "llvm-libc++") -set(so_base "c++_shared") -configure_file( - "${ANDROID_NDK}/sources/cxx-stl/${lib_path}/libs/${ANDROID_ABI}/lib${so_base}.so" - "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/lib${so_base}.so" - COPYONLY) diff --git a/android/app/libs/alipaySdk-15.7.6-20200521195109.aar b/android/app/libs/alipaySdk-15.7.6-20200521195109.aar index 58b776abf..7878da034 100644 Binary files a/android/app/libs/alipaySdk-15.7.6-20200521195109.aar and b/android/app/libs/alipaySdk-15.7.6-20200521195109.aar differ diff --git a/android/app/libs/liblantern-all.aar b/android/app/libs/liblantern-all.aar deleted file mode 100644 index c989286aa..000000000 --- a/android/app/libs/liblantern-all.aar +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2e68ebf1e220075c35a15004b8d060994f444005f0126efb6013c7a2a62c6f78 -size 78284570 diff --git a/android/app/src/main/java/org/getlantern/mobilesdk/model/SessionManager.kt b/android/app/src/main/java/org/getlantern/mobilesdk/model/SessionManager.kt index 1c9292d3a..58841b846 100644 --- a/android/app/src/main/java/org/getlantern/mobilesdk/model/SessionManager.kt +++ b/android/app/src/main/java/org/getlantern/mobilesdk/model/SessionManager.kt @@ -24,6 +24,7 @@ import io.lantern.model.BaseModel import io.lantern.model.Vpn import org.getlantern.lantern.BuildConfig import org.getlantern.lantern.LanternApp +import org.getlantern.lantern.datadog.Datadog import org.getlantern.lantern.model.Bandwidth import org.getlantern.lantern.model.Stats import org.getlantern.lantern.model.Utils @@ -385,6 +386,7 @@ abstract class SessionManager(application: Application) : Session { override fun setCountry(country: String) { prefs.edit().putString(GEO_COUNTRY_CODE, country).apply() + Datadog.setCountry(country) } private val hasUpdatedStats = AtomicBoolean() diff --git a/android/app/src/main/kotlin/org/getlantern/lantern/LanternApp.kt b/android/app/src/main/kotlin/org/getlantern/lantern/LanternApp.kt index 73f36fcdd..6582acc88 100644 --- a/android/app/src/main/kotlin/org/getlantern/lantern/LanternApp.kt +++ b/android/app/src/main/kotlin/org/getlantern/lantern/LanternApp.kt @@ -6,8 +6,6 @@ import android.os.StrictMode import android.util.Log import androidx.appcompat.app.AppCompatDelegate import androidx.multidex.MultiDex -import org.getlantern.lantern.datadog.Datadog -import org.getlantern.lantern.datadog.FlutterExcludingComponentPredicate import org.getlantern.lantern.model.InAppBilling import org.getlantern.lantern.model.LanternHttpClient import org.getlantern.lantern.model.LanternSessionManager @@ -48,7 +46,6 @@ open class LanternApp : Application() { AppCompatDelegate.setCompatVectorFromResourcesEnabled(true) appContext = applicationContext session = LanternSessionManager(this) - if (!BuildConfig.DEBUG) Datadog.initialize() LanternProxySelector(session) diff --git a/android/app/src/main/kotlin/org/getlantern/lantern/datadog/Datadog.kt b/android/app/src/main/kotlin/org/getlantern/lantern/datadog/Datadog.kt index 29f5467f1..c98085d2f 100644 --- a/android/app/src/main/kotlin/org/getlantern/lantern/datadog/Datadog.kt +++ b/android/app/src/main/kotlin/org/getlantern/lantern/datadog/Datadog.kt @@ -1,7 +1,6 @@ package org.getlantern.lantern.datadog import android.util.Log -import com.datadog.android.Datadog as DatadogMain import com.datadog.android.DatadogSite import com.datadog.android.core.configuration.BatchSize import com.datadog.android.core.configuration.Configuration @@ -17,13 +16,20 @@ import org.getlantern.lantern.LanternApp import org.getlantern.mobilesdk.Logger import java.net.InetSocketAddress import java.net.Proxy +import java.net.URI import java.util.concurrent.atomic.AtomicBoolean +import com.datadog.android.Datadog as DatadogMain object Datadog { - private val tracedHosts = listOf( - "datadoghq.eu", - "127.0.0.1", - ) + private val tracedHosts = + listOf( + "datadoghq.eu", + "127.0.0.1", + "iantem.io", + "getlantern.org", + "getiantem.org", + "lantern.io", + ) private val initialized = AtomicBoolean() private lateinit var datadogConfig: Configuration @@ -33,13 +39,14 @@ object Datadog { DatadogMain.setVerbosity(Log.VERBOSE) datadogConfig = createDatadogConfiguration() - val datadogCredentials = Credentials( - clientToken = "puba617ab01333a95a25a9d3709f04e1654", - envName = "prod", - rumApplicationId = "f8eabf3c-5db3-4f7e-8e6a-5a72433b46d2", - variant = "release", - serviceName = "lantern-android", - ) + val datadogCredentials = + Credentials( + clientToken = "puba617ab01333a95a25a9d3709f04e1654", + envName = "prod", + rumApplicationId = "f8eabf3c-5db3-4f7e-8e6a-5a72433b46d2", + variant = "release", + serviceName = "lantern-android", + ) DatadogMain.initialize( LanternApp.getAppContext(), @@ -52,9 +59,20 @@ object Datadog { id = LanternApp.getSession().userId().toString(), ) - val monitor = RumMonitor.Builder().build() - GlobalRum.registerIfAbsent(monitor) + GlobalRum.registerIfAbsent { + RumMonitor.Builder().build() + } + val session = LanternApp.getSession() + setCountry(session.countryCode) initialized.set(true) + + // For some reason, sessions don't show up in DataDog RUM until we register a user action + // of some sort. So, here we fire the custom action "started" to get data to start flowing. + GlobalRum.get().addUserAction(RumActionType.CUSTOM, "started", emptyMap()) + } + + fun setCountry(country: String) { + GlobalRum.addAttribute("lantern.country_code", country) } fun addError( @@ -68,12 +86,12 @@ object Datadog { // trackUserAction is used to track specific user actions (such as taps, clicks, and scrolls) // with RumMonitor - fun trackUserAction( + private fun trackUserAction( actionType: RumActionType, name: String, actionAttributes: Map = emptyMap(), ) { - GlobalRum.get().addUserAction(actionType, name, actionAttributes) + GlobalRum.get().addUserAction(actionType, name, actionAttributes) } // trackUserClick is used to track user clicks with RumMonitor @@ -94,6 +112,8 @@ object Datadog { private fun createDatadogConfiguration(): Configuration { val session = LanternApp.getSession() + val hTTPAddr = session.hTTPAddr + val uri = URI("http://" + hTTPAddr) return Configuration.Builder( logsEnabled = true, tracesEnabled = true, @@ -105,8 +125,8 @@ object Datadog { Proxy( Proxy.Type.HTTP, InetSocketAddress( - session.settings.httpProxyHost, - session.settings.httpProxyPort.toInt(), + "127.0.0.1", + uri.getPort(), ), ), null, @@ -114,6 +134,7 @@ object Datadog { .sampleRumSessions(100f) .setUploadFrequency(UploadFrequency.FREQUENT) .useSite(DatadogSite.EU1) + .trackBackgroundRumEvents(true) .trackInteractions() .trackLongTasks() .setFirstPartyHosts(tracedHosts) diff --git a/android/app/src/main/kotlin/org/getlantern/lantern/service/LanternService.kt b/android/app/src/main/kotlin/org/getlantern/lantern/service/LanternService.kt index e81eb106c..aca65d7ae 100644 --- a/android/app/src/main/kotlin/org/getlantern/lantern/service/LanternService.kt +++ b/android/app/src/main/kotlin/org/getlantern/lantern/service/LanternService.kt @@ -13,6 +13,7 @@ import org.androidannotations.annotations.EService import org.getlantern.lantern.BuildConfig import org.getlantern.lantern.LanternApp import org.getlantern.lantern.R +import org.getlantern.lantern.datadog.Datadog import org.getlantern.lantern.model.AccountInitializationStatus import org.getlantern.lantern.model.LanternHttpClient import org.getlantern.lantern.model.LanternStatus @@ -109,6 +110,8 @@ open class LanternService : Service(), Runnable { createUser(0) } + Datadog.initialize() + if (!BuildConfig.PLAY_VERSION && !BuildConfig.DEVELOPMENT_MODE) { // check if an update is available autoUpdater.checkForUpdates() diff --git a/android/app/src/main/kotlin/org/getlantern/lantern/util/PaymentsUtil.kt b/android/app/src/main/kotlin/org/getlantern/lantern/util/PaymentsUtil.kt index bbcfcae64..1de300ab5 100644 --- a/android/app/src/main/kotlin/org/getlantern/lantern/util/PaymentsUtil.kt +++ b/android/app/src/main/kotlin/org/getlantern/lantern/util/PaymentsUtil.kt @@ -281,33 +281,32 @@ class PaymentsUtil(private val activity: Activity) { } ?: "usd" Logger.d(TAG, "Sending purchase request: provider $provider; plan ID: $planID; currency: $currency") val session = session - val formBody: FormBody.Builder = FormBody.Builder() - .add("idempotencyKey", System.currentTimeMillis().toString()) - .add("provider", provider.toString().lowercase()) - .add("email", email) - .add("plan", planID) - .add("currency", currency.lowercase()) - .add("deviceName", session.deviceName()) + val json: JsonObject = JsonObject() + json.addProperty("idempotencyKey", System.currentTimeMillis().toString()) + json.addProperty("provider", provider.toString().lowercase()) + json.addProperty("email", email) + json.addProperty("plan", planID) + json.addProperty("currency", currency.lowercase()) + json.addProperty("deviceName", session.deviceName()) when (provider) { PaymentProvider.Stripe -> { val stripePublicKey = session.stripePubKey() - stripePublicKey?.let { formBody.add("stripePublicKey", stripePublicKey) } - formBody.add("stripeEmail", email) - formBody.add("stripeToken", token) - formBody.add("token", token) + stripePublicKey?.let { json.addProperty("stripePublicKey", stripePublicKey) } + json.addProperty("stripeEmail", email) + json.addProperty("stripeToken", token) + json.addProperty("token", token) } PaymentProvider.GooglePlay -> { - formBody.add("token", token) + json.addProperty("token", token) } PaymentProvider.ResellerCode -> { + Logger.d(TAG, "Received reseller code purchase request") val resellerCode = LanternApp.getSession().resellerCode() - resellerCode?.let { - formBody.add("provider", "reseller-code") - formBody.add("resellerCode", resellerCode) - } + json.addProperty("provider", "reseller-code") + json.addProperty("resellerCode", resellerCode!!) } else -> {} @@ -315,7 +314,7 @@ class PaymentsUtil(private val activity: Activity) { lanternClient.post( LanternHttpClient.createProUrl("/purchase"), - formBody.build(), + LanternHttpClient.createJsonBody(json), object : ProCallback { override fun onSuccess(response: Response?, result: JsonObject?) { @@ -328,6 +327,7 @@ class PaymentsUtil(private val activity: Activity) { } override fun onFailure(t: Throwable?, error: ProError?) { + Logger.e(TAG, "Error with purchase request: $error") Datadog.addError("Error with purchase request: $error", t, mapOf( "provider" to provider.toString().lowercase(), "plan" to planID, diff --git a/appium_kotlin/app/src/test/resources/live/live_config.json b/appium_kotlin/app/src/test/resources/live/live_config.json index e96189c6f..f7b131b3c 100644 --- a/appium_kotlin/app/src/test/resources/live/live_config.json +++ b/appium_kotlin/app/src/test/resources/live/live_config.json @@ -2,7 +2,7 @@ "server": "hub-cloud.browserstack.com/wd/hub", "username": "jigarj_SNsRyw", "access_key": "dA4yyG26fHbfJxRUYMwr", - "app": "bs://5fb3d71c0a06de7d496ff6fceba612a15e835577", + "app": "bs://ac26c1c990dabab70870c250ec774ec9f63fa350", "capabilities": { "automationName": "Flutter", "setWebContentsDebuggingEnabled": true, @@ -10,7 +10,7 @@ "appium:logLevel": true, "enablePerformanceLogging": true, "bstack:options": { - "appiumVersion": "2.0.0", + "appiumVersion": "2.0.1", "networkLogs": true, "projectName": "Lantern", "buildName": "Lantern-APK", diff --git a/assets/locales/ar.po b/assets/locales/ar.po index 9228b5cb5..a4029b3ae 100644 --- a/assets/locales/ar.po +++ b/assets/locales/ar.po @@ -83,7 +83,7 @@ msgid "Go Pro Title" msgstr "الترقية إلى النسخة الاحترافية!" msgid "Go Pro Description" -msgstr "احصل على سرعات فائقة وبيانات غير محدودة!" +msgstr "" msgid "Server Location" msgstr "موقع الخادم" diff --git a/assets/locales/bn.po b/assets/locales/bn.po index 61433578c..753b07c41 100644 --- a/assets/locales/bn.po +++ b/assets/locales/bn.po @@ -72,7 +72,7 @@ msgid "Go Pro Title" msgstr "প্রো-তে যান!" msgid "Go Pro Description" -msgstr "আরও দ্রুত গতি এবং সীমিত ডেটা আনলক করুন!" +msgstr "" msgid "Server Location" msgstr "সার্ভারের অবস্থান" diff --git a/assets/locales/en.po b/assets/locales/en.po index 12a54fc97..10cda3ce3 100644 --- a/assets/locales/en.po +++ b/assets/locales/en.po @@ -57,7 +57,7 @@ msgid "Go Pro Title" msgstr "Go Pro!" msgid "Go Pro Description" -msgstr "Unlock faster speeds, and unlimited data!" +msgstr "Unlock faster speeds, ad-free experience, and unlimited data!" msgid "Server Location" msgstr "Server Location" diff --git a/assets/locales/es.po b/assets/locales/es.po index 36176dd40..11868bfb0 100644 --- a/assets/locales/es.po +++ b/assets/locales/es.po @@ -79,7 +79,7 @@ msgid "Go Pro Title" msgstr "¡Hágase Pro!" msgid "Go Pro Description" -msgstr "¡Navegue a más velocidad y con datos ilimitados!" +msgstr "" msgid "Server Location" msgstr "Ubicación del servidor" diff --git a/assets/locales/fa.po b/assets/locales/fa.po index 276ec8227..e05d3e78b 100644 --- a/assets/locales/fa.po +++ b/assets/locales/fa.po @@ -87,7 +87,7 @@ msgid "Go Pro Title" msgstr "به نسخه حرفه‌ای بروید!" msgid "Go Pro Description" -msgstr "به سرعت‌های بالاتر و داده‌های نامحدود دسترسی پیدا کنید!" +msgstr "" msgid "Server Location" msgstr "موقعیت سرور" diff --git a/assets/locales/fr.po b/assets/locales/fr.po index 56f03049d..f5d718a96 100644 --- a/assets/locales/fr.po +++ b/assets/locales/fr.po @@ -76,7 +76,7 @@ msgid "Go Pro Title" msgstr "Passez à la version Pro !" msgid "Go Pro Description" -msgstr "Profitez de vitesses plus rapides et de données illimitées !" +msgstr "" msgid "Server Location" msgstr "Emplacement du serveur" diff --git a/assets/locales/hi.po b/assets/locales/hi.po index 8ef84ee8a..202a1f7ef 100644 --- a/assets/locales/hi.po +++ b/assets/locales/hi.po @@ -76,7 +76,7 @@ msgid "Go Pro Title" msgstr "Pro आज़माएँ!" msgid "Go Pro Description" -msgstr "तेज गति, और असीमित डेटा अनलॉक करें!" +msgstr "" msgid "Server Location" msgstr "सर्वर स्थान" diff --git a/assets/locales/ms.po b/assets/locales/ms.po index 8379146f5..7a3f1258e 100644 --- a/assets/locales/ms.po +++ b/assets/locales/ms.po @@ -76,7 +76,7 @@ msgid "Go Pro Title" msgstr "Go Pro!" msgid "Go Pro Description" -msgstr "Buka kunci kelajuan lebih pantas, dan data tanpa had!" +msgstr "" msgid "Server Location" msgstr "Lokasi Server" diff --git a/assets/locales/ru.po b/assets/locales/ru.po index 368a3e549..4b3bb0d4e 100644 --- a/assets/locales/ru.po +++ b/assets/locales/ru.po @@ -86,7 +86,6 @@ msgstr "Перейдите на версию Pro!" msgid "Go Pro Description" msgstr "" -"Наслаждайтесь более высокой скоростью и неограниченным объемом данных!" msgid "Server Location" msgstr "Местоположение сервера" diff --git a/assets/locales/tr.po b/assets/locales/tr.po index 753665af6..6eeb79ca3 100644 --- a/assets/locales/tr.po +++ b/assets/locales/tr.po @@ -83,7 +83,7 @@ msgid "Go Pro Title" msgstr "Pro'ya Yükseltin!" msgid "Go Pro Description" -msgstr "Daha yüksek hızlara ve sınırsız veriye ulaşın!" +msgstr "" msgid "Server Location" msgstr "Sunucu Konumu" diff --git a/assets/locales/ur.po b/assets/locales/ur.po index f4df910f4..7101d8d10 100644 --- a/assets/locales/ur.po +++ b/assets/locales/ur.po @@ -72,7 +72,7 @@ msgid "Go Pro Title" msgstr "پرو اپنائیں!" msgid "Go Pro Description" -msgstr "تیز رفتار، اور لامحدود ڈیٹا کو ان لاک کریں!" +msgstr "" msgid "Server Location" msgstr "سرور لوکیشن" diff --git a/assets/locales/vi.po b/assets/locales/vi.po index 3f921645e..948ce86de 100644 --- a/assets/locales/vi.po +++ b/assets/locales/vi.po @@ -75,7 +75,7 @@ msgid "Go Pro Title" msgstr "Lên Pro!" msgid "Go Pro Description" -msgstr "Mở khóa tốc độ nhanh hơn và dữ liệu không giới hạn!" +msgstr "" msgid "Server Location" msgstr "Địa chỉ Server" diff --git a/assets/locales/zh-cn.po b/assets/locales/zh-cn.po index 2b701b0c0..d91c4377d 100644 --- a/assets/locales/zh-cn.po +++ b/assets/locales/zh-cn.po @@ -70,7 +70,7 @@ msgid "Go Pro Title" msgstr "专业互联!" msgid "Go Pro Description" -msgstr "解锁流畅网速,数据不限量!" +msgstr "" msgid "Server Location" msgstr "服务器位置" diff --git a/assets/locales/zh-hk.po b/assets/locales/zh-hk.po index 6e0c72a3b..15472bfcc 100644 --- a/assets/locales/zh-hk.po +++ b/assets/locales/zh-hk.po @@ -69,7 +69,7 @@ msgid "Go Pro Title" msgstr "升級至 Pro 版!" msgid "Go Pro Description" -msgstr "速度更快,網路數據用量無上限!" +msgstr "" msgid "Server Location" msgstr "伺服器位置" diff --git a/go.mod b/go.mod index 4a820a74f..907d6068a 100644 --- a/go.mod +++ b/go.mod @@ -30,10 +30,10 @@ replace github.com/eycorsican/go-tun2socks => github.com/getlantern/go-tun2socks require ( github.com/getlantern/appdir v0.0.0-20200615192800-a0ef1968f4da github.com/getlantern/autoupdate v0.0.0-20211217175350-d0b211f39ba7 - github.com/getlantern/dnsgrab v0.0.0-20211216020425-5d5e155a01a8 + github.com/getlantern/dnsgrab v0.0.0-20230822102054-7ff232ec3148 github.com/getlantern/errors v1.0.3 github.com/getlantern/eventual/v2 v2.0.2 - github.com/getlantern/flashlight/v7 v7.6.7 + github.com/getlantern/flashlight/v7 v7.6.9 github.com/getlantern/golog v0.0.0-20230503153817-8e72de7e0a65 github.com/getlantern/idletiming v0.0.0-20201229174729-33d04d220c4e github.com/getlantern/ipproxy v0.0.0-20230511223023-ee52513fd782 @@ -108,7 +108,7 @@ require ( github.com/felixge/httpsnoop v1.0.3 // indirect github.com/gaukas/godicttls v0.0.3 // indirect github.com/getlantern/borda v0.0.0-20230421223744-4e208135f082 // indirect - github.com/getlantern/broflake v0.0.0-20230822184836-0b9bbcadd5c6 // indirect + github.com/getlantern/broflake v0.0.0-20230926124502-c8269f54a586 // indirect github.com/getlantern/bufconn v0.0.0-20210901195825-fd7c0267b493 // indirect github.com/getlantern/byteexec v0.0.0-20220903142956-e6ed20032cfd // indirect github.com/getlantern/cmux v0.0.0-20230301223233-dac79088a4c0 // indirect diff --git a/go.sum b/go.sum index 01fceed15..8983fef8c 100644 --- a/go.sum +++ b/go.sum @@ -312,8 +312,8 @@ github.com/getlantern/autoupdate v0.0.0-20211217175350-d0b211f39ba7 h1:/efTOJpxX github.com/getlantern/autoupdate v0.0.0-20211217175350-d0b211f39ba7/go.mod h1:+X8pAviVhThDBjPEqLUB0iO7EPxhpWk7Q9VYxvz6rCY= github.com/getlantern/borda v0.0.0-20230421223744-4e208135f082 h1:Ka9rIAgef8zYhBr/VgLrt5+Qs7zE33g0OButzpIGcSs= github.com/getlantern/borda v0.0.0-20230421223744-4e208135f082/go.mod h1:oCpQojhSaK0F/6rWMrDvN8/QFHQhTC9Gb3uf7GcqPQQ= -github.com/getlantern/broflake v0.0.0-20230822184836-0b9bbcadd5c6 h1:/G1jb7daSg1FkEEFbvRRM7A927uErx5vEMVwrTcVzp0= -github.com/getlantern/broflake v0.0.0-20230822184836-0b9bbcadd5c6/go.mod h1:Ehdl8IASN5rJi9brldVuCjTDcSU25nvaGRlzNprgeQo= +github.com/getlantern/broflake v0.0.0-20230926124502-c8269f54a586 h1:d8z7UmXW6aKEqhM4lwmYE5IBHjNoii6xP4B5ikWEq+s= +github.com/getlantern/broflake v0.0.0-20230926124502-c8269f54a586/go.mod h1:Ehdl8IASN5rJi9brldVuCjTDcSU25nvaGRlzNprgeQo= github.com/getlantern/bufconn v0.0.0-20190625204133-a08544339f8d/go.mod h1:d6O4RY+V87kIt4o9wru4SaNo7C2NAkD3YnmJFXEpODo= github.com/getlantern/bufconn v0.0.0-20210901195825-fd7c0267b493 h1:8WjDNmpDLFVsAfcnHxqF4pfVKkdAQxyJ9iCHB4LxSfc= github.com/getlantern/bufconn v0.0.0-20210901195825-fd7c0267b493/go.mod h1:d6O4RY+V87kIt4o9wru4SaNo7C2NAkD3YnmJFXEpODo= @@ -341,8 +341,8 @@ github.com/getlantern/dhtup v0.0.0-20230218071625-e78bcd432e4b h1:s6hIG0ssf0ixxD github.com/getlantern/dhtup v0.0.0-20230218071625-e78bcd432e4b/go.mod h1:vHmyGO0tz9xO4rxi7rZCUjnI3GJ/26u6YHwdeamd3Bs= github.com/getlantern/dns v0.0.0-20210120185712-8d005533efa0 h1:8DQSmWtwBy8Z0Zr/kiRJRhBPQO4LMN0mziCJd+8edhw= github.com/getlantern/dns v0.0.0-20210120185712-8d005533efa0/go.mod h1:nd1wZuSxVB7DZVqZT1hCFkdWcMqbuO5XQSd+1Duk/fs= -github.com/getlantern/dnsgrab v0.0.0-20211216020425-5d5e155a01a8 h1:UKCd60g0A2N5t1EO45hNKR0fJ0QC9o33S476S3Aro9g= -github.com/getlantern/dnsgrab v0.0.0-20211216020425-5d5e155a01a8/go.mod h1:5GwF/pPObuqMzWoCQ26QDowRMysQ61Sa1Gbc/9mQUZM= +github.com/getlantern/dnsgrab v0.0.0-20230822102054-7ff232ec3148 h1:3RwZlptbVTFP+F/o+FlwD8HURN/L6R+CDRpS8mzoOpE= +github.com/getlantern/dnsgrab v0.0.0-20230822102054-7ff232ec3148/go.mod h1:5GwF/pPObuqMzWoCQ26QDowRMysQ61Sa1Gbc/9mQUZM= github.com/getlantern/domains v0.0.0-20220311111720-94f59a903271 h1:LPjvyUPESE32YBbM1JtwOhfDlLv1gub52mPqKcim77Q= github.com/getlantern/domains v0.0.0-20220311111720-94f59a903271/go.mod h1:ij0uyo1HGrb17vCYGonZBb9tWh+Ba3kgNhLrOghME/I= github.com/getlantern/elevate v0.0.0-20180207094634-c2e2e4901072/go.mod h1:T4VB2POK13lsPLFV98WJQrL7gAXYD9TyJxBU2P8c8p4= @@ -373,8 +373,8 @@ github.com/getlantern/fdcount v0.0.0-20210503151800-5decd65b3731/go.mod h1:XZwE+ github.com/getlantern/filepersist v0.0.0-20160317154340-c5f0cd24e799/go.mod h1:8DGAx0LNUfXNnEH+fXI0s3OCBA/351kZCiz/8YSK3i8= github.com/getlantern/filepersist v0.0.0-20210901195658-ed29a1cb0b7c h1:mcz27xtAkb1OuOLBct/uFfL1p3XxAIcFct82GbT+UZM= github.com/getlantern/filepersist v0.0.0-20210901195658-ed29a1cb0b7c/go.mod h1:8DGAx0LNUfXNnEH+fXI0s3OCBA/351kZCiz/8YSK3i8= -github.com/getlantern/flashlight/v7 v7.6.7 h1:61ueXqAv2tzM2TjSfmL14I0oaxf6LhTYK2eHLAx29QQ= -github.com/getlantern/flashlight/v7 v7.6.7/go.mod h1:FLZhyLFeSojL4sRjQEaLRtVl4RB1DdliWegTsIqgzlI= +github.com/getlantern/flashlight/v7 v7.6.9 h1:GqGY05jwvCy7sVQ7vOjLN51tT90yC0ZYMIp5MNQ0NSY= +github.com/getlantern/flashlight/v7 v7.6.9/go.mod h1:E81GrKxK8GU5mRzskGF3+4wZKMrEobE+Ff13S8ryPvs= github.com/getlantern/framed v0.0.0-20190601192238-ceb6431eeede h1:yrU6Px3ZkvCsDLPryPGi6FN+2iqFPq+JeCb7EFoDBhw= github.com/getlantern/framed v0.0.0-20190601192238-ceb6431eeede/go.mod h1:nhnoiS6DE6zfe+BaCMU4YI01UpsuiXnDqM5S8jxHuuI= github.com/getlantern/fronted v0.0.0-20230601004823-7fec719639d8 h1:r/Z/SPPIfLXDI3QA7/tE6nOfPncrqeUPDjiFjnNGP50= diff --git a/lib/common/session_model.dart b/lib/common/session_model.dart index 8a7fd7ec6..acfe71d05 100644 --- a/lib/common/session_model.dart +++ b/lib/common/session_model.dart @@ -32,15 +32,14 @@ class SessionModel extends Model { 'playVersion', false, ); - proxyAvailable = singleValueNotifier( - 'hasSucceedingProxy', - true, - ); + proxyAvailable = singleValueNotifier('hasSucceedingProxy', true); + country = singleValueNotifier('geo_country_code', 'US'); } ValueNotifier networkAvailable = ValueNotifier(true); late ValueNotifier isPlayVersion; late ValueNotifier proxyAvailable; + late ValueNotifier country; Widget proUser(ValueWidgetBuilder builder) { return subscribedSingleValueBuilder('prouser', builder: builder); diff --git a/lib/main.dart b/lib/main.dart index d53e6cbc2..e96ba72f6 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -6,7 +6,8 @@ import 'package:lantern/common/common.dart'; Future main() async { // CI will be true only when running appium test var CI = const String.fromEnvironment('CI', defaultValue: 'false'); - print('CI is running $CI'); + var boolCI = bool.fromEnvironment("CI", defaultValue: false); + print('Appium CI is running $CI and bool $boolCI'); if (CI == 'true') { enableFlutterDriverExtension(); } diff --git a/lib/plans/plan_details.dart b/lib/plans/plan_details.dart index 5d6ed09ef..51654359a 100644 --- a/lib/plans/plan_details.dart +++ b/lib/plans/plan_details.dart @@ -22,9 +22,10 @@ class PlanCard extends StatelessWidget { child: CInkWell( onTap: () async { final isPlayVersion = sessionModel.isPlayVersion.value ?? false; + final inRussia = sessionModel.country.value == 'RU'; // * Play version - if (isPlayVersion) { + if (isPlayVersion && !inRussia) { await sessionModel .submitGooglePlay(planName) .onError((error, stackTrace) { diff --git a/lib/vpn/protos_shared/vpn.pb.dart b/lib/vpn/protos_shared/vpn.pb.dart index 0ff95f49d..f64f79410 100644 --- a/lib/vpn/protos_shared/vpn.pb.dart +++ b/lib/vpn/protos_shared/vpn.pb.dart @@ -1,9 +1,13 @@ -/// +// // Generated code. Do not modify. // source: protos_shared/vpn.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import import 'dart:core' as $core; @@ -11,33 +15,34 @@ import 'package:fixnum/fixnum.dart' as $fixnum; import 'package:protobuf/protobuf.dart' as $pb; class ServerInfo extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'ServerInfo', createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'city') - ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'country') - ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'countryCode', protoName: 'countryCode') - ..hasRequiredFields = false - ; - - ServerInfo._() : super(); factory ServerInfo({ $core.String? city, $core.String? country, $core.String? countryCode, }) { - final _result = create(); + final $result = create(); if (city != null) { - _result.city = city; + $result.city = city; } if (country != null) { - _result.country = country; + $result.country = country; } if (countryCode != null) { - _result.countryCode = countryCode; + $result.countryCode = countryCode; } - return _result; + return $result; } + ServerInfo._() : super(); factory ServerInfo.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory ServerInfo.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ServerInfo', createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'city') + ..aOS(2, _omitFieldNames ? '' : 'country') + ..aOS(3, _omitFieldNames ? '' : 'countryCode', protoName: 'countryCode') + ..hasRequiredFields = false + ; + @$core.Deprecated( 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' @@ -47,8 +52,10 @@ class ServerInfo extends $pb.GeneratedMessage { 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') - ServerInfo copyWith(void Function(ServerInfo) updates) => super.copyWith((message) => updates(message as ServerInfo)) as ServerInfo; // ignore: deprecated_member_use + ServerInfo copyWith(void Function(ServerInfo) updates) => super.copyWith((message) => updates(message as ServerInfo)) as ServerInfo; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static ServerInfo create() => ServerInfo._(); ServerInfo createEmptyInstance() => create(); @@ -86,38 +93,39 @@ class ServerInfo extends $pb.GeneratedMessage { } class Bandwidth extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'Bandwidth', createEmptyInstance: create) - ..aInt64(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'percent') - ..aInt64(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'remaining') - ..aInt64(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'allowed') - ..aInt64(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'ttlSeconds', protoName: 'ttlSeconds') - ..hasRequiredFields = false - ; - - Bandwidth._() : super(); factory Bandwidth({ $fixnum.Int64? percent, $fixnum.Int64? remaining, $fixnum.Int64? allowed, $fixnum.Int64? ttlSeconds, }) { - final _result = create(); + final $result = create(); if (percent != null) { - _result.percent = percent; + $result.percent = percent; } if (remaining != null) { - _result.remaining = remaining; + $result.remaining = remaining; } if (allowed != null) { - _result.allowed = allowed; + $result.allowed = allowed; } if (ttlSeconds != null) { - _result.ttlSeconds = ttlSeconds; + $result.ttlSeconds = ttlSeconds; } - return _result; + return $result; } + Bandwidth._() : super(); factory Bandwidth.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory Bandwidth.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Bandwidth', createEmptyInstance: create) + ..aInt64(1, _omitFieldNames ? '' : 'percent') + ..aInt64(2, _omitFieldNames ? '' : 'remaining') + ..aInt64(3, _omitFieldNames ? '' : 'allowed') + ..aInt64(4, _omitFieldNames ? '' : 'ttlSeconds', protoName: 'ttlSeconds') + ..hasRequiredFields = false + ; + @$core.Deprecated( 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' @@ -127,8 +135,10 @@ class Bandwidth extends $pb.GeneratedMessage { 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') - Bandwidth copyWith(void Function(Bandwidth) updates) => super.copyWith((message) => updates(message as Bandwidth)) as Bandwidth; // ignore: deprecated_member_use + Bandwidth copyWith(void Function(Bandwidth) updates) => super.copyWith((message) => updates(message as Bandwidth)) as Bandwidth; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static Bandwidth create() => Bandwidth._(); Bandwidth createEmptyInstance() => create(); @@ -175,38 +185,39 @@ class Bandwidth extends $pb.GeneratedMessage { } class AppData extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'AppData', createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'packageName', protoName: 'packageName') - ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'name') - ..a<$core.List<$core.int>>(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'icon', $pb.PbFieldType.OY) - ..aOB(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'allowedAccess', protoName: 'allowedAccess') - ..hasRequiredFields = false - ; - - AppData._() : super(); factory AppData({ $core.String? packageName, $core.String? name, $core.List<$core.int>? icon, $core.bool? allowedAccess, }) { - final _result = create(); + final $result = create(); if (packageName != null) { - _result.packageName = packageName; + $result.packageName = packageName; } if (name != null) { - _result.name = name; + $result.name = name; } if (icon != null) { - _result.icon = icon; + $result.icon = icon; } if (allowedAccess != null) { - _result.allowedAccess = allowedAccess; + $result.allowedAccess = allowedAccess; } - return _result; + return $result; } + AppData._() : super(); factory AppData.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory AppData.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'AppData', createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'packageName', protoName: 'packageName') + ..aOS(2, _omitFieldNames ? '' : 'name') + ..a<$core.List<$core.int>>(3, _omitFieldNames ? '' : 'icon', $pb.PbFieldType.OY) + ..aOB(4, _omitFieldNames ? '' : 'allowedAccess', protoName: 'allowedAccess') + ..hasRequiredFields = false + ; + @$core.Deprecated( 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' @@ -216,8 +227,10 @@ class AppData extends $pb.GeneratedMessage { 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') - AppData copyWith(void Function(AppData) updates) => super.copyWith((message) => updates(message as AppData)) as AppData; // ignore: deprecated_member_use + AppData copyWith(void Function(AppData) updates) => super.copyWith((message) => updates(message as AppData)) as AppData; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static AppData create() => AppData._(); AppData createEmptyInstance() => create(); @@ -264,33 +277,34 @@ class AppData extends $pb.GeneratedMessage { } class Device extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'Device', createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'id') - ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'name') - ..aInt64(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'created') - ..hasRequiredFields = false - ; - - Device._() : super(); factory Device({ $core.String? id, $core.String? name, $fixnum.Int64? created, }) { - final _result = create(); + final $result = create(); if (id != null) { - _result.id = id; + $result.id = id; } if (name != null) { - _result.name = name; + $result.name = name; } if (created != null) { - _result.created = created; + $result.created = created; } - return _result; + return $result; } + Device._() : super(); factory Device.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory Device.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Device', createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'id') + ..aOS(2, _omitFieldNames ? '' : 'name') + ..aInt64(3, _omitFieldNames ? '' : 'created') + ..hasRequiredFields = false + ; + @$core.Deprecated( 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' @@ -300,8 +314,10 @@ class Device extends $pb.GeneratedMessage { 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') - Device copyWith(void Function(Device) updates) => super.copyWith((message) => updates(message as Device)) as Device; // ignore: deprecated_member_use + Device copyWith(void Function(Device) updates) => super.copyWith((message) => updates(message as Device)) as Device; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static Device create() => Device._(); Device createEmptyInstance() => create(); @@ -339,23 +355,24 @@ class Device extends $pb.GeneratedMessage { } class Devices extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'Devices', createEmptyInstance: create) - ..pc(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'devices', $pb.PbFieldType.PM, subBuilder: Device.create) - ..hasRequiredFields = false - ; - - Devices._() : super(); factory Devices({ $core.Iterable? devices, }) { - final _result = create(); + final $result = create(); if (devices != null) { - _result.devices.addAll(devices); + $result.devices.addAll(devices); } - return _result; + return $result; } + Devices._() : super(); factory Devices.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory Devices.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Devices', createEmptyInstance: create) + ..pc(1, _omitFieldNames ? '' : 'devices', $pb.PbFieldType.PM, subBuilder: Device.create) + ..hasRequiredFields = false + ; + @$core.Deprecated( 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' @@ -365,8 +382,10 @@ class Devices extends $pb.GeneratedMessage { 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') - Devices copyWith(void Function(Devices) updates) => super.copyWith((message) => updates(message as Devices)) as Devices; // ignore: deprecated_member_use + Devices copyWith(void Function(Devices) updates) => super.copyWith((message) => updates(message as Devices)) as Devices; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static Devices create() => Devices._(); Devices createEmptyInstance() => create(); @@ -380,21 +399,6 @@ class Devices extends $pb.GeneratedMessage { } class Plan extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'Plan', createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'id') - ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'description') - ..aOB(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'bestValue', protoName: 'bestValue') - ..aInt64(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'usdPrice', protoName: 'usdPrice') - ..m<$core.String, $fixnum.Int64>(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'price', entryClassName: 'Plan.PriceEntry', keyFieldType: $pb.PbFieldType.OS, valueFieldType: $pb.PbFieldType.O6) - ..aOS(6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'totalCostBilledOneTime', protoName: 'totalCostBilledOneTime') - ..aOS(7, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'oneMonthCost', protoName: 'oneMonthCost') - ..aOS(8, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'totalCost', protoName: 'totalCost') - ..aOS(9, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'formattedBonus', protoName: 'formattedBonus') - ..aOS(10, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'renewalText', protoName: 'renewalText') - ..hasRequiredFields = false - ; - - Plan._() : super(); factory Plan({ $core.String? id, $core.String? description, @@ -407,41 +411,57 @@ class Plan extends $pb.GeneratedMessage { $core.String? formattedBonus, $core.String? renewalText, }) { - final _result = create(); + final $result = create(); if (id != null) { - _result.id = id; + $result.id = id; } if (description != null) { - _result.description = description; + $result.description = description; } if (bestValue != null) { - _result.bestValue = bestValue; + $result.bestValue = bestValue; } if (usdPrice != null) { - _result.usdPrice = usdPrice; + $result.usdPrice = usdPrice; } if (price != null) { - _result.price.addAll(price); + $result.price.addAll(price); } if (totalCostBilledOneTime != null) { - _result.totalCostBilledOneTime = totalCostBilledOneTime; + $result.totalCostBilledOneTime = totalCostBilledOneTime; } if (oneMonthCost != null) { - _result.oneMonthCost = oneMonthCost; + $result.oneMonthCost = oneMonthCost; } if (totalCost != null) { - _result.totalCost = totalCost; + $result.totalCost = totalCost; } if (formattedBonus != null) { - _result.formattedBonus = formattedBonus; + $result.formattedBonus = formattedBonus; } if (renewalText != null) { - _result.renewalText = renewalText; + $result.renewalText = renewalText; } - return _result; + return $result; } + Plan._() : super(); factory Plan.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory Plan.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Plan', createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'id') + ..aOS(2, _omitFieldNames ? '' : 'description') + ..aOB(3, _omitFieldNames ? '' : 'bestValue', protoName: 'bestValue') + ..aInt64(4, _omitFieldNames ? '' : 'usdPrice', protoName: 'usdPrice') + ..m<$core.String, $fixnum.Int64>(5, _omitFieldNames ? '' : 'price', entryClassName: 'Plan.PriceEntry', keyFieldType: $pb.PbFieldType.OS, valueFieldType: $pb.PbFieldType.O6) + ..aOS(6, _omitFieldNames ? '' : 'totalCostBilledOneTime', protoName: 'totalCostBilledOneTime') + ..aOS(7, _omitFieldNames ? '' : 'oneMonthCost', protoName: 'oneMonthCost') + ..aOS(8, _omitFieldNames ? '' : 'totalCost', protoName: 'totalCost') + ..aOS(9, _omitFieldNames ? '' : 'formattedBonus', protoName: 'formattedBonus') + ..aOS(10, _omitFieldNames ? '' : 'renewalText', protoName: 'renewalText') + ..hasRequiredFields = false + ; + @$core.Deprecated( 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' @@ -451,8 +471,10 @@ class Plan extends $pb.GeneratedMessage { 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') - Plan copyWith(void Function(Plan) updates) => super.copyWith((message) => updates(message as Plan)) as Plan; // ignore: deprecated_member_use + Plan copyWith(void Function(Plan) updates) => super.copyWith((message) => updates(message as Plan)) as Plan; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static Plan create() => Plan._(); Plan createEmptyInstance() => create(); @@ -547,23 +569,24 @@ class Plan extends $pb.GeneratedMessage { } class PaymentProviders extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'PaymentProviders', createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'name') - ..hasRequiredFields = false - ; - - PaymentProviders._() : super(); factory PaymentProviders({ $core.String? name, }) { - final _result = create(); + final $result = create(); if (name != null) { - _result.name = name; + $result.name = name; } - return _result; + return $result; } + PaymentProviders._() : super(); factory PaymentProviders.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory PaymentProviders.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'PaymentProviders', createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'name') + ..hasRequiredFields = false + ; + @$core.Deprecated( 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' @@ -573,8 +596,10 @@ class PaymentProviders extends $pb.GeneratedMessage { 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') - PaymentProviders copyWith(void Function(PaymentProviders) updates) => super.copyWith((message) => updates(message as PaymentProviders)) as PaymentProviders; // ignore: deprecated_member_use + PaymentProviders copyWith(void Function(PaymentProviders) updates) => super.copyWith((message) => updates(message as PaymentProviders)) as PaymentProviders; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static PaymentProviders create() => PaymentProviders._(); PaymentProviders createEmptyInstance() => create(); @@ -594,28 +619,29 @@ class PaymentProviders extends $pb.GeneratedMessage { } class PaymentMethod extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'PaymentMethod', createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'method') - ..pc(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'providers', $pb.PbFieldType.PM, subBuilder: PaymentProviders.create) - ..hasRequiredFields = false - ; - - PaymentMethod._() : super(); factory PaymentMethod({ $core.String? method, $core.Iterable? providers, }) { - final _result = create(); + final $result = create(); if (method != null) { - _result.method = method; + $result.method = method; } if (providers != null) { - _result.providers.addAll(providers); + $result.providers.addAll(providers); } - return _result; + return $result; } + PaymentMethod._() : super(); factory PaymentMethod.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory PaymentMethod.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'PaymentMethod', createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'method') + ..pc(2, _omitFieldNames ? '' : 'providers', $pb.PbFieldType.PM, subBuilder: PaymentProviders.create) + ..hasRequiredFields = false + ; + @$core.Deprecated( 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' @@ -625,8 +651,10 @@ class PaymentMethod extends $pb.GeneratedMessage { 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') - PaymentMethod copyWith(void Function(PaymentMethod) updates) => super.copyWith((message) => updates(message as PaymentMethod)) as PaymentMethod; // ignore: deprecated_member_use + PaymentMethod copyWith(void Function(PaymentMethod) updates) => super.copyWith((message) => updates(message as PaymentMethod)) as PaymentMethod; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static PaymentMethod create() => PaymentMethod._(); PaymentMethod createEmptyInstance() => create(); @@ -648,3 +676,6 @@ class PaymentMethod extends $pb.GeneratedMessage { $core.List get providers => $_getList(1); } + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/lib/vpn/protos_shared/vpn.pbenum.dart b/lib/vpn/protos_shared/vpn.pbenum.dart index 47a4066dd..197a6d2fc 100644 --- a/lib/vpn/protos_shared/vpn.pbenum.dart +++ b/lib/vpn/protos_shared/vpn.pbenum.dart @@ -1,7 +1,11 @@ -/// +// // Generated code. Do not modify. // source: protos_shared/vpn.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import diff --git a/lib/vpn/protos_shared/vpn.pbjson.dart b/lib/vpn/protos_shared/vpn.pbjson.dart index cc53613f7..4a4fd740b 100644 --- a/lib/vpn/protos_shared/vpn.pbjson.dart +++ b/lib/vpn/protos_shared/vpn.pbjson.dart @@ -1,121 +1,156 @@ -/// +// // Generated code. Do not modify. // source: protos_shared/vpn.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name -import 'dart:core' as $core; +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + import 'dart:convert' as $convert; +import 'dart:core' as $core; import 'dart:typed_data' as $typed_data; + @$core.Deprecated('Use serverInfoDescriptor instead') -const ServerInfo$json = const { +const ServerInfo$json = { '1': 'ServerInfo', - '2': const [ - const {'1': 'city', '3': 1, '4': 1, '5': 9, '10': 'city'}, - const {'1': 'country', '3': 2, '4': 1, '5': 9, '10': 'country'}, - const {'1': 'countryCode', '3': 3, '4': 1, '5': 9, '10': 'countryCode'}, + '2': [ + {'1': 'city', '3': 1, '4': 1, '5': 9, '10': 'city'}, + {'1': 'country', '3': 2, '4': 1, '5': 9, '10': 'country'}, + {'1': 'countryCode', '3': 3, '4': 1, '5': 9, '10': 'countryCode'}, ], }; /// Descriptor for `ServerInfo`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List serverInfoDescriptor = $convert.base64Decode('CgpTZXJ2ZXJJbmZvEhIKBGNpdHkYASABKAlSBGNpdHkSGAoHY291bnRyeRgCIAEoCVIHY291bnRyeRIgCgtjb3VudHJ5Q29kZRgDIAEoCVILY291bnRyeUNvZGU='); +final $typed_data.Uint8List serverInfoDescriptor = $convert.base64Decode( + 'CgpTZXJ2ZXJJbmZvEhIKBGNpdHkYASABKAlSBGNpdHkSGAoHY291bnRyeRgCIAEoCVIHY291bn' + 'RyeRIgCgtjb3VudHJ5Q29kZRgDIAEoCVILY291bnRyeUNvZGU='); + @$core.Deprecated('Use bandwidthDescriptor instead') -const Bandwidth$json = const { +const Bandwidth$json = { '1': 'Bandwidth', - '2': const [ - const {'1': 'percent', '3': 1, '4': 1, '5': 3, '10': 'percent'}, - const {'1': 'remaining', '3': 2, '4': 1, '5': 3, '10': 'remaining'}, - const {'1': 'allowed', '3': 3, '4': 1, '5': 3, '10': 'allowed'}, - const {'1': 'ttlSeconds', '3': 4, '4': 1, '5': 3, '10': 'ttlSeconds'}, + '2': [ + {'1': 'percent', '3': 1, '4': 1, '5': 3, '10': 'percent'}, + {'1': 'remaining', '3': 2, '4': 1, '5': 3, '10': 'remaining'}, + {'1': 'allowed', '3': 3, '4': 1, '5': 3, '10': 'allowed'}, + {'1': 'ttlSeconds', '3': 4, '4': 1, '5': 3, '10': 'ttlSeconds'}, ], }; /// Descriptor for `Bandwidth`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List bandwidthDescriptor = $convert.base64Decode('CglCYW5kd2lkdGgSGAoHcGVyY2VudBgBIAEoA1IHcGVyY2VudBIcCglyZW1haW5pbmcYAiABKANSCXJlbWFpbmluZxIYCgdhbGxvd2VkGAMgASgDUgdhbGxvd2VkEh4KCnR0bFNlY29uZHMYBCABKANSCnR0bFNlY29uZHM='); +final $typed_data.Uint8List bandwidthDescriptor = $convert.base64Decode( + 'CglCYW5kd2lkdGgSGAoHcGVyY2VudBgBIAEoA1IHcGVyY2VudBIcCglyZW1haW5pbmcYAiABKA' + 'NSCXJlbWFpbmluZxIYCgdhbGxvd2VkGAMgASgDUgdhbGxvd2VkEh4KCnR0bFNlY29uZHMYBCAB' + 'KANSCnR0bFNlY29uZHM='); + @$core.Deprecated('Use appDataDescriptor instead') -const AppData$json = const { +const AppData$json = { '1': 'AppData', - '2': const [ - const {'1': 'packageName', '3': 1, '4': 1, '5': 9, '10': 'packageName'}, - const {'1': 'name', '3': 2, '4': 1, '5': 9, '10': 'name'}, - const {'1': 'icon', '3': 3, '4': 1, '5': 12, '10': 'icon'}, - const {'1': 'allowedAccess', '3': 4, '4': 1, '5': 8, '10': 'allowedAccess'}, + '2': [ + {'1': 'packageName', '3': 1, '4': 1, '5': 9, '10': 'packageName'}, + {'1': 'name', '3': 2, '4': 1, '5': 9, '10': 'name'}, + {'1': 'icon', '3': 3, '4': 1, '5': 12, '10': 'icon'}, + {'1': 'allowedAccess', '3': 4, '4': 1, '5': 8, '10': 'allowedAccess'}, ], }; /// Descriptor for `AppData`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List appDataDescriptor = $convert.base64Decode('CgdBcHBEYXRhEiAKC3BhY2thZ2VOYW1lGAEgASgJUgtwYWNrYWdlTmFtZRISCgRuYW1lGAIgASgJUgRuYW1lEhIKBGljb24YAyABKAxSBGljb24SJAoNYWxsb3dlZEFjY2VzcxgEIAEoCFINYWxsb3dlZEFjY2Vzcw=='); +final $typed_data.Uint8List appDataDescriptor = $convert.base64Decode( + 'CgdBcHBEYXRhEiAKC3BhY2thZ2VOYW1lGAEgASgJUgtwYWNrYWdlTmFtZRISCgRuYW1lGAIgAS' + 'gJUgRuYW1lEhIKBGljb24YAyABKAxSBGljb24SJAoNYWxsb3dlZEFjY2VzcxgEIAEoCFINYWxs' + 'b3dlZEFjY2Vzcw=='); + @$core.Deprecated('Use deviceDescriptor instead') -const Device$json = const { +const Device$json = { '1': 'Device', - '2': const [ - const {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, - const {'1': 'name', '3': 2, '4': 1, '5': 9, '10': 'name'}, - const {'1': 'created', '3': 3, '4': 1, '5': 3, '10': 'created'}, + '2': [ + {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, + {'1': 'name', '3': 2, '4': 1, '5': 9, '10': 'name'}, + {'1': 'created', '3': 3, '4': 1, '5': 3, '10': 'created'}, ], }; /// Descriptor for `Device`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List deviceDescriptor = $convert.base64Decode('CgZEZXZpY2USDgoCaWQYASABKAlSAmlkEhIKBG5hbWUYAiABKAlSBG5hbWUSGAoHY3JlYXRlZBgDIAEoA1IHY3JlYXRlZA=='); +final $typed_data.Uint8List deviceDescriptor = $convert.base64Decode( + 'CgZEZXZpY2USDgoCaWQYASABKAlSAmlkEhIKBG5hbWUYAiABKAlSBG5hbWUSGAoHY3JlYXRlZB' + 'gDIAEoA1IHY3JlYXRlZA=='); + @$core.Deprecated('Use devicesDescriptor instead') -const Devices$json = const { +const Devices$json = { '1': 'Devices', - '2': const [ - const {'1': 'devices', '3': 1, '4': 3, '5': 11, '6': '.Device', '10': 'devices'}, + '2': [ + {'1': 'devices', '3': 1, '4': 3, '5': 11, '6': '.Device', '10': 'devices'}, ], }; /// Descriptor for `Devices`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List devicesDescriptor = $convert.base64Decode('CgdEZXZpY2VzEiEKB2RldmljZXMYASADKAsyBy5EZXZpY2VSB2RldmljZXM='); +final $typed_data.Uint8List devicesDescriptor = $convert.base64Decode( + 'CgdEZXZpY2VzEiEKB2RldmljZXMYASADKAsyBy5EZXZpY2VSB2RldmljZXM='); + @$core.Deprecated('Use planDescriptor instead') -const Plan$json = const { +const Plan$json = { '1': 'Plan', - '2': const [ - const {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, - const {'1': 'description', '3': 2, '4': 1, '5': 9, '10': 'description'}, - const {'1': 'bestValue', '3': 3, '4': 1, '5': 8, '10': 'bestValue'}, - const {'1': 'usdPrice', '3': 4, '4': 1, '5': 3, '10': 'usdPrice'}, - const {'1': 'price', '3': 5, '4': 3, '5': 11, '6': '.Plan.PriceEntry', '10': 'price'}, - const {'1': 'totalCostBilledOneTime', '3': 6, '4': 1, '5': 9, '10': 'totalCostBilledOneTime'}, - const {'1': 'oneMonthCost', '3': 7, '4': 1, '5': 9, '10': 'oneMonthCost'}, - const {'1': 'totalCost', '3': 8, '4': 1, '5': 9, '10': 'totalCost'}, - const {'1': 'formattedBonus', '3': 9, '4': 1, '5': 9, '10': 'formattedBonus'}, - const {'1': 'renewalText', '3': 10, '4': 1, '5': 9, '10': 'renewalText'}, + '2': [ + {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, + {'1': 'description', '3': 2, '4': 1, '5': 9, '10': 'description'}, + {'1': 'bestValue', '3': 3, '4': 1, '5': 8, '10': 'bestValue'}, + {'1': 'usdPrice', '3': 4, '4': 1, '5': 3, '10': 'usdPrice'}, + {'1': 'price', '3': 5, '4': 3, '5': 11, '6': '.Plan.PriceEntry', '10': 'price'}, + {'1': 'totalCostBilledOneTime', '3': 6, '4': 1, '5': 9, '10': 'totalCostBilledOneTime'}, + {'1': 'oneMonthCost', '3': 7, '4': 1, '5': 9, '10': 'oneMonthCost'}, + {'1': 'totalCost', '3': 8, '4': 1, '5': 9, '10': 'totalCost'}, + {'1': 'formattedBonus', '3': 9, '4': 1, '5': 9, '10': 'formattedBonus'}, + {'1': 'renewalText', '3': 10, '4': 1, '5': 9, '10': 'renewalText'}, ], - '3': const [Plan_PriceEntry$json], + '3': [Plan_PriceEntry$json], }; @$core.Deprecated('Use planDescriptor instead') -const Plan_PriceEntry$json = const { +const Plan_PriceEntry$json = { '1': 'PriceEntry', - '2': const [ - const {'1': 'key', '3': 1, '4': 1, '5': 9, '10': 'key'}, - const {'1': 'value', '3': 2, '4': 1, '5': 3, '10': 'value'}, + '2': [ + {'1': 'key', '3': 1, '4': 1, '5': 9, '10': 'key'}, + {'1': 'value', '3': 2, '4': 1, '5': 3, '10': 'value'}, ], - '7': const {'7': true}, + '7': {'7': true}, }; /// Descriptor for `Plan`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List planDescriptor = $convert.base64Decode('CgRQbGFuEg4KAmlkGAEgASgJUgJpZBIgCgtkZXNjcmlwdGlvbhgCIAEoCVILZGVzY3JpcHRpb24SHAoJYmVzdFZhbHVlGAMgASgIUgliZXN0VmFsdWUSGgoIdXNkUHJpY2UYBCABKANSCHVzZFByaWNlEiYKBXByaWNlGAUgAygLMhAuUGxhbi5QcmljZUVudHJ5UgVwcmljZRI2ChZ0b3RhbENvc3RCaWxsZWRPbmVUaW1lGAYgASgJUhZ0b3RhbENvc3RCaWxsZWRPbmVUaW1lEiIKDG9uZU1vbnRoQ29zdBgHIAEoCVIMb25lTW9udGhDb3N0EhwKCXRvdGFsQ29zdBgIIAEoCVIJdG90YWxDb3N0EiYKDmZvcm1hdHRlZEJvbnVzGAkgASgJUg5mb3JtYXR0ZWRCb251cxIgCgtyZW5ld2FsVGV4dBgKIAEoCVILcmVuZXdhbFRleHQaOAoKUHJpY2VFbnRyeRIQCgNrZXkYASABKAlSA2tleRIUCgV2YWx1ZRgCIAEoA1IFdmFsdWU6AjgB'); +final $typed_data.Uint8List planDescriptor = $convert.base64Decode( + 'CgRQbGFuEg4KAmlkGAEgASgJUgJpZBIgCgtkZXNjcmlwdGlvbhgCIAEoCVILZGVzY3JpcHRpb2' + '4SHAoJYmVzdFZhbHVlGAMgASgIUgliZXN0VmFsdWUSGgoIdXNkUHJpY2UYBCABKANSCHVzZFBy' + 'aWNlEiYKBXByaWNlGAUgAygLMhAuUGxhbi5QcmljZUVudHJ5UgVwcmljZRI2ChZ0b3RhbENvc3' + 'RCaWxsZWRPbmVUaW1lGAYgASgJUhZ0b3RhbENvc3RCaWxsZWRPbmVUaW1lEiIKDG9uZU1vbnRo' + 'Q29zdBgHIAEoCVIMb25lTW9udGhDb3N0EhwKCXRvdGFsQ29zdBgIIAEoCVIJdG90YWxDb3N0Ei' + 'YKDmZvcm1hdHRlZEJvbnVzGAkgASgJUg5mb3JtYXR0ZWRCb251cxIgCgtyZW5ld2FsVGV4dBgK' + 'IAEoCVILcmVuZXdhbFRleHQaOAoKUHJpY2VFbnRyeRIQCgNrZXkYASABKAlSA2tleRIUCgV2YW' + 'x1ZRgCIAEoA1IFdmFsdWU6AjgB'); + @$core.Deprecated('Use paymentProvidersDescriptor instead') -const PaymentProviders$json = const { +const PaymentProviders$json = { '1': 'PaymentProviders', - '2': const [ - const {'1': 'name', '3': 1, '4': 1, '5': 9, '10': 'name'}, + '2': [ + {'1': 'name', '3': 1, '4': 1, '5': 9, '10': 'name'}, ], }; /// Descriptor for `PaymentProviders`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List paymentProvidersDescriptor = $convert.base64Decode('ChBQYXltZW50UHJvdmlkZXJzEhIKBG5hbWUYASABKAlSBG5hbWU='); +final $typed_data.Uint8List paymentProvidersDescriptor = $convert.base64Decode( + 'ChBQYXltZW50UHJvdmlkZXJzEhIKBG5hbWUYASABKAlSBG5hbWU='); + @$core.Deprecated('Use paymentMethodDescriptor instead') -const PaymentMethod$json = const { +const PaymentMethod$json = { '1': 'PaymentMethod', - '2': const [ - const {'1': 'method', '3': 1, '4': 1, '5': 9, '10': 'method'}, - const {'1': 'providers', '3': 2, '4': 3, '5': 11, '6': '.PaymentProviders', '10': 'providers'}, + '2': [ + {'1': 'method', '3': 1, '4': 1, '5': 9, '10': 'method'}, + {'1': 'providers', '3': 2, '4': 3, '5': 11, '6': '.PaymentProviders', '10': 'providers'}, ], }; /// Descriptor for `PaymentMethod`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List paymentMethodDescriptor = $convert.base64Decode('Cg1QYXltZW50TWV0aG9kEhYKBm1ldGhvZBgBIAEoCVIGbWV0aG9kEi8KCXByb3ZpZGVycxgCIAMoCzIRLlBheW1lbnRQcm92aWRlcnNSCXByb3ZpZGVycw=='); +final $typed_data.Uint8List paymentMethodDescriptor = $convert.base64Decode( + 'Cg1QYXltZW50TWV0aG9kEhYKBm1ldGhvZBgBIAEoCVIGbWV0aG9kEi8KCXByb3ZpZGVycxgCIA' + 'MoCzIRLlBheW1lbnRQcm92aWRlcnNSCXByb3ZpZGVycw=='); + diff --git a/lib/vpn/protos_shared/vpn.pbserver.dart b/lib/vpn/protos_shared/vpn.pbserver.dart index 48cdbc486..8f457ab54 100644 --- a/lib/vpn/protos_shared/vpn.pbserver.dart +++ b/lib/vpn/protos_shared/vpn.pbserver.dart @@ -1,9 +1,14 @@ -/// +// // Generated code. Do not modify. // source: protos_shared/vpn.proto // // @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import export 'vpn.pb.dart'; diff --git a/lib/vpn/vpn_tab.dart b/lib/vpn/vpn_tab.dart index b9a874a11..e0ed8f08c 100644 --- a/lib/vpn/vpn_tab.dart +++ b/lib/vpn/vpn_tab.dart @@ -24,8 +24,8 @@ class VPNTab extends StatelessWidget { body: Column( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - proUser ? Container() : ProBanner(), - VPNSwitch(), + proUser ? const SizedBox() : ProBanner(), + const VPNSwitch(), Container( padding: const EdgeInsetsDirectional.all(16), decoration: BoxDecoration( @@ -40,13 +40,9 @@ class VPNTab extends StatelessWidget { child: Column( children: [ VPNStatus(), - Container( - child: const CDivider(height: 32.0), - ), + const CDivider(height: 32.0), ServerLocationWidget(), - Container( - child: const CDivider(height: 32.0), - ), + const CDivider(height: 32.0), SplitTunnelingWidget(), VPNBandwidth(), ], diff --git a/pubspec.lock b/pubspec.lock index a2234e1d6..3cf74f15a 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -261,10 +261,10 @@ packages: dependency: transitive description: name: collection - sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c" + sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687 url: "https://pub.dev" source: hosted - version: "1.17.1" + version: "1.17.2" convert: dependency: transitive description: @@ -784,10 +784,10 @@ packages: dependency: "direct main" description: name: intl - sha256: a3715e3bc90294e971cb7dc063fbf3cd9ee0ebf8604ffeafabd9e6f16abbdbe6 + sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d" url: "https://pub.dev" source: hosted - version: "0.18.0" + version: "0.18.1" io: dependency: transitive description: @@ -856,18 +856,18 @@ packages: dependency: transitive description: name: matcher - sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb" + sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" url: "https://pub.dev" source: hosted - version: "0.12.15" + version: "0.12.16" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724 + sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" url: "https://pub.dev" source: hosted - version: "0.2.0" + version: "0.5.0" meta: dependency: transitive description: @@ -1290,13 +1290,13 @@ packages: source: sdk version: "0.0.99" sliver_tools: - dependency: transitive + dependency: "direct main" description: name: sliver_tools - sha256: ccdc502098a8bfa07b3ec582c282620031481300035584e1bb3aca296a505e8c + sha256: eae28220badfb9d0559207badcbbc9ad5331aac829a88cb0964d330d2a4636a6 url: "https://pub.dev" source: hosted - version: "0.2.10" + version: "0.2.12" source_gen: dependency: transitive description: @@ -1325,10 +1325,10 @@ packages: dependency: transitive description: name: source_span - sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" url: "https://pub.dev" source: hosted - version: "1.9.1" + version: "1.10.0" sprintf: dependency: transitive description: @@ -1429,26 +1429,26 @@ packages: dependency: "direct dev" description: name: test - sha256: "3dac9aecf2c3991d09b9cdde4f98ded7b30804a88a0d7e4e7e1678e78d6b97f4" + sha256: "13b41f318e2a5751c3169137103b60c584297353d4b1761b66029bae6411fe46" url: "https://pub.dev" source: hosted - version: "1.24.1" + version: "1.24.3" test_api: dependency: transitive description: name: test_api - sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb + sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8" url: "https://pub.dev" source: hosted - version: "0.5.1" + version: "0.6.0" test_core: dependency: transitive description: name: test_core - sha256: "5138dbffb77b2289ecb12b81c11ba46036590b72a64a7a90d6ffb880f1a29e93" + sha256: "99806e9e6d95c7b059b7a0fc08f07fc53fabe54a829497f0d9676299f1e8637e" url: "https://pub.dev" source: hosted - version: "0.5.1" + version: "0.5.3" timezone: dependency: transitive description: @@ -1637,10 +1637,10 @@ packages: dependency: transitive description: name: vm_service - sha256: f6deed8ed625c52864792459709183da231ebf66ff0cf09e69b573227c377efe + sha256: c620a6f783fa22436da68e42db7ebbf18b8c44b9a46ab911f666ff09ffd9153f url: "https://pub.dev" source: hosted - version: "11.3.0" + version: "11.7.1" wakelock: dependency: "direct main" description: @@ -1689,6 +1689,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.1.0" + web: + dependency: transitive + description: + name: web + sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10 + url: "https://pub.dev" + source: hosted + version: "0.1.4-beta" web_socket_channel: dependency: transitive description: @@ -1794,5 +1802,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.0.3 <4.0.0" + dart: ">=3.1.0-185.0.dev <4.0.0" flutter: ">=3.10.0" diff --git a/pubspec.yaml b/pubspec.yaml index bb1ed964c..1ca26afbe 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -33,6 +33,8 @@ dependencies: protobuf: any uuid: ^3.0.7 + sliver_tools: ^0.2.12 + # UI Enhancements & User Input google_fonts: flutter_switch: ^0.3.2