diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml new file mode 100644 index 00000000..7e2b790f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -0,0 +1,96 @@ +name: Bug Report +description: Report a bug encountered while using Hiddify Next +labels: ['bug'] +body: + - type: markdown + attributes: + value: | + If you have a feature idea or need help, please go to [our Telegram group](https://t.me/hiddify_board). + + Please make sure to provide a descriptive, deterministic, and reproducible report. It saves time for both the developers and users who are looking for solutions. Providing as much information as possible, including screenshots and logs, is highly appreciated. This will help us to better understand the issue and respond more effectively. + + Please DO NOT use this template to ask questions. There are other appropriate channels to ask questions. This template is strictly for reporting bugs. + - type: checkboxes + id: confirm-search + attributes: + label: Search first + description: Please search [existing issues](https://github.com/hiddify/hiddify-next/issues) before reporting. + options: + - label: I searched and no similar issues were found + required: true + - type: textarea + id: problem + attributes: + label: What Happened? + description: | + Please provide as much info as possible. Not doing so may result in your bug not being addressed in a timely manner. + validations: + required: true + - type: textarea + id: reproduce + attributes: + label: Reproduce the Bug + description: | + Please tell us the steps to reproduce the bug. + placeholder: | + 1. Go to '...' + 2. Click on '....' + 3. Scroll down to '....' + 4. See error + validations: + required: true + - type: textarea + id: expected + attributes: + label: Expected Behavior + description: | + Please tell us what's the behavior you expect. + validations: + required: false + - type: input + id: version + attributes: + label: Version + description: What version of Hiddify Next are you using? + placeholder: v1.3.8 etc + validations: + required: true + - type: dropdown + id: platform + attributes: + label: Platform/OS + description: What platform are you seeing the problem on? + multiple: true + options: + - Android + - Windows + - macOS + - Linux + - iOS + validations: + required: true + - type: textarea + id: additional + attributes: + label: Additional Context + description: | + If applicable, add screenshots, screen recordings or additional context to help explain your problem. + validations: + required: false + - type: textarea + id: logs + attributes: + label: Relevant log output + description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. + render: shell + + - type: checkboxes + id: ask-pr + attributes: + label: Are you willing to submit a PR? If you know how to fix the bug. + description: | + If you are not familiar with programming, you can skip this step. + If you are a developer and know how to fix the bug, you can submit a PR to fix it. + Your contributions are greatly appreciated and play a vital role in helping to improve the project! + options: + - label: I'm willing to submit a PR (Thank you!) diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 00000000..51356b73 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: false +contact_links: + - name: Questions & Help + url: https://t.me/hiddify_board + about: Ask a question about Hiddify Next diff --git a/.github/ISSUE_TEMPLATE/feature_request.yaml b/.github/ISSUE_TEMPLATE/feature_request.yaml new file mode 100644 index 00000000..01f66c09 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yaml @@ -0,0 +1,10 @@ +name: Feature Request +description: Request a new feature +title: '[FR] ' +body: + - type: textarea + attributes: + label: Feature description + description: Please provide a clear and concise description of what you want to happen and what problem will this solve. + validations: + required: true diff --git a/.github/release_message.md b/.github/release_message.md new file mode 100644 index 00000000..16ff5e73 --- /dev/null +++ b/.github/release_message.md @@ -0,0 +1,21 @@ + +
+ +
+ +or download from below based on your OS: + +- **Android:** [Universal](https://github.com/hiddify/hiddify-next/releases/latest/download/hiddify-android-universal.apk) - [Arm64](https://github.com/hiddify/hiddify-next/releases/latest/download/hiddify-android-arm64.apk) - [Arm7](https://github.com/hiddify/hiddify-next/releases/latest/download/hiddify-android-arm7.apk) - [x86_64](https://github.com/hiddify/hiddify-next/releases/latest/download/hiddify-android-x86_64.apk) + +- **Windows:** [x64 Setup](https://github.com/hiddify/hiddify-next/releases/latest/download/hiddify-windows-x64-setup.exe) - [x64 Portable](https://github.com/hiddify/hiddify-next/releases/latest/download/hiddify-windows-x64-portable.zip) + +- **Linux:** [x64 AppImage](https://github.com/hiddify/hiddify-next/releases/latest/download/hiddify-linux-x64.AppImage.zip) + +- **macOS (v10.14+):** [Universal (x64, M series)](https://github.com/hiddify/hiddify-next/releases/latest/download/hiddify-macos-universal.dmg) + +- **Build from source:** [Build & contribute guide](contribute.md) + +**List of all changes:** [ChangeLog](https://github.com/hiddify/hiddify-next/blob/main/changelog.md) + + + diff --git a/README.md b/README.md index 630f636c..e9e8c3ce 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,8 @@
-[![GP-Intalls](https://img.shields.io/endpoint?color=green&logo=google-play&logoColor=green&url=https%3A%2F%2Fplay.cuzi.workers.dev%2Fplay%3Fi%3Dapp.hiddify.com%26l%3DGoogle%2520Play%26m%3D%24shortinstalls&style=flat-square)](https://play.cuzi.workers.dev/play?i=app.hiddify.com&l=GooglePlay&m=$installs)[![Downloads](https://img.shields.io/github/downloads/hiddify/hiddify-next/total?style=flat-square&logo=github)](https://img.shields.io/github/downloads/Hiddify/Hiddify-Next/total)[![Last Version](https://img.shields.io/github/release/hiddify/hiddify-next/all.svg?style=flat-square)](https://github.com/hiddify/hiddify-server/)[![Last Release Date](https://img.shields.io/github/release-date/hiddify/hiddify-next.svg?style=flat-square)](https://github.com/hiddify/hiddify-next/)![commits](https://img.shields.io/github/commit-activity/m/hiddify/hiddify-next?style=flat-square)[![Youtube](https://img.shields.io/youtube/channel/views/UCxrmeMvVryNfB4XL35lXQNg?label=Youtube&style=flat-square&logo=youtube)](https://www.youtube.com/@hiddify)[![Telegram Channel](https://img.shields.io/endpoint?label=Channel&style=flat-square&url=https%3A%2F%2Ftg.sumanjay.workers.dev%2Fhiddify&color=blue)](https://telegram.dog/hiddify)[![Telegram Group](https://img.shields.io/endpoint?color=neon&label=Support%20Group&style=flat-square&url=https%3A%2F%2Ftg.sumanjay.workers.dev%2Fhiddify_board)](https://telegram.dog/hiddify_board) +[![GP-Intalls](https://img.shields.io/endpoint?color=green&logo=google-play&logoColor=green&url=https%3A%2F%2Fplay.cuzi.workers.dev%2Fplay%3Fi%3Dapp.hiddify.com%26l%3DGoogle%2520Play%26m%3D%24shortinstalls&style=flat-square)](https://play.cuzi.workers.dev/play?i=app.hiddify.com&l=GooglePlay&m=$installs) [![Downloads](https://img.shields.io/github/downloads/hiddify/hiddify-next/total?style=flat-square&logo=github)](https://img.shields.io/github/downloads/Hiddify/Hiddify-Next/total)[![Last Version](https://img.shields.io/github/release/hiddify/hiddify-next/all.svg?style=flat-square)](https://github.com/hiddify/hiddify-server/)[![Last Release Date](https://img.shields.io/github/release-date/hiddify/hiddify-next.svg?style=flat-square)](https://github.com/hiddify/hiddify-next/)![commits](https://img.shields.io/github/commit-activity/m/hiddify/hiddify-next?style=flat-square) +[![Youtube](https://img.shields.io/youtube/channel/views/UCxrmeMvVryNfB4XL35lXQNg?label=Youtube&style=flat-square&logo=youtube)](https://www.youtube.com/@hiddify)[![Telegram Channel](https://img.shields.io/endpoint?label=Channel&style=flat-square&url=https%3A%2F%2Ftg.sumanjay.workers.dev%2Fhiddify&color=blue)](https://telegram.dog/hiddify)[![Telegram Group](https://img.shields.io/endpoint?color=neon&label=Support%20Group&style=flat-square&url=https%3A%2F%2Ftg.sumanjay.workers.dev%2Fhiddify_board)](https://telegram.dog/hiddify_board)
@@ -51,7 +52,7 @@ Clash, Sing-box and Shadowsocks For latest releases (including pre-releases), visit [releases page](https://github.com/hiddify/hiddify-next/releases) -- Android: [Universal](https://github.com/hiddify/hiddify-next/releases/latest/download/hiddify-android-universal.apk) - [Arm64](https://github.com/hiddify/hiddify-next/releases/latest/download/hiddify-android-arm64.apk) - [Arm7](https://github.com/hiddify/hiddify-next/releases/latest/download/hiddify-android-arm7.apk) - [x86_64](https://github.com/hiddify/hiddify-next/releases/latest/download/hiddify-android-x86_64.apk) +- Android: [Universal](https://github.com/hiddify/hiddify-next/releases/latest/download/hiddify-android-universal.apk) - [Arm64](https://github.com/hiddify/hiddify-next/releases/latest/download/hiddify-android-arm64.apk) - [Arm7](https://github.com/hiddify/hiddify-next/releases/latest/download/hiddify-android-arm7.apk) - [x86_64](https://github.com/hiddify/hiddify-next/releases/latest/download/hiddify-android-x86_64.apk) - Windows: [x64 Setup](https://github.com/hiddify/hiddify-next/releases/latest/download/hiddify-windows-x64-setup.exe) - [x64 Portable](https://github.com/hiddify/hiddify-next/releases/latest/download/hiddify-windows-x64-portable.zip) @@ -59,34 +60,13 @@ For latest releases (including pre-releases), visit [releases page](https://gith - macOS (v10.14+): [Universal (x64, M series)](https://github.com/hiddify/hiddify-next/releases/latest/download/hiddify-macos-universal.dmg) -## Build from source +- Build from source: [Build & contribute guide](contribute.md) -Hiddify Next relies on [core library](https://github.com/hiddify/hiddify-next-core) made with GO. if you're interested in building/contributing to that as well follow instructions there. +
+ +
-### requirements: -- Flutter v3.13+ -- Make -- Android SDK - -This project uses [flutter_distributor](https://github.com/leanflutter/flutter_distributor) for packaging. - -```shell -# fetch dependencies and build generated files -$ make get translate gen - -# fetch geo assets -$ make get-geo-assets - -for platform in [windows linux macos android]: - # fetch native libraries for respective platforms, follow core lib instructions for building - $ make $platform-libs - $ make release-$platform - -# example: - $ make windows-libs - $ make windows-release -``` ## Acknowledgements @@ -115,7 +95,7 @@ We need your collaboration in order to develop this project. If you are speciali
-[![Email](https://img.shields.io/badge/Gmail-contribute@hiddify.com-green?style=flat-square&logo=gmail)](mailto:contribute@hiddify.com) +[![Email](https://img.shields.io/badge/Email-contribute@hiddify.com-005FF9?style=flat-square&logo=mail.ru)](mailto:contribute@hiddify.com) [![Telegram Channel](https://img.shields.io/endpoint?label=Channel&style=flat-square&url=https%3A%2F%2Ftg.sumanjay.workers.dev%2Fhiddify&color=blue)](https://telegram.dog/hiddify) [![Telegram Group](https://img.shields.io/endpoint?color=neon&label=Support%20Group&style=flat-square&url=https%3A%2F%2Ftg.sumanjay.workers.dev%2Fhiddify_board)](https://telegram.dog/hiddify_board) [![Youtube](https://img.shields.io/youtube/channel/views/UCxrmeMvVryNfB4XL35lXQNg?label=Youtube&style=flat-square&logo=youtube)](https://www.youtube.com/@hiddify) @@ -130,7 +110,7 @@ We need your collaboration in order to develop this project. If you are speciali

- +

diff --git a/README_fa.md b/README_fa.md index 38b5a568..f40b763a 100644 --- a/README_fa.md +++ b/README_fa.md @@ -9,7 +9,8 @@
-[![GP-Intalls](https://img.shields.io/endpoint?color=green&logo=google-play&logoColor=green&url=https%3A%2F%2Fplay.cuzi.workers.dev%2Fplay%3Fi%3Dapp.hiddify.com%26l%3DGoogle%2520Play%26m%3D%24shortinstalls&style=flat-square)](https://play.cuzi.workers.dev/play?i=app.hiddify.com&l=GooglePlay&m=$installs)[![Downloads](https://img.shields.io/github/downloads/hiddify/hiddify-next/total?style=flat-square&logo=github)](https://img.shields.io/github/downloads/Hiddify/Hiddify-Next/total)[![Last Version](https://img.shields.io/github/release/hiddify/hiddify-next/all.svg?style=flat-square)](https://github.com/hiddify/hiddify-server/)[![Last Release Date](https://img.shields.io/github/release-date/hiddify/hiddify-next.svg?style=flat-square)](https://github.com/hiddify/hiddify-next/)![commits](https://img.shields.io/github/commit-activity/m/hiddify/hiddify-next?style=flat-square)[![Youtube](https://img.shields.io/youtube/channel/views/UCxrmeMvVryNfB4XL35lXQNg?label=Youtube&style=flat-square&logo=youtube)](https://www.youtube.com/@hiddify)[![Telegram Channel](https://img.shields.io/endpoint?label=Channel&style=flat-square&url=https%3A%2F%2Ftg.sumanjay.workers.dev%2Fhiddify&color=blue)](https://telegram.dog/hiddify)[![Telegram Group](https://img.shields.io/endpoint?color=neon&label=Support%20Group&style=flat-square&url=https%3A%2F%2Ftg.sumanjay.workers.dev%2Fhiddify_board)](https://telegram.dog/hiddify_board) +[![GP-Intalls](https://img.shields.io/endpoint?color=green&logo=google-play&logoColor=green&url=https%3A%2F%2Fplay.cuzi.workers.dev%2Fplay%3Fi%3Dapp.hiddify.com%26l%3DGoogle%2520Play%26m%3D%24shortinstalls&style=flat-square)](https://play.cuzi.workers.dev/play?i=app.hiddify.com&l=GooglePlay&m=$installs) [![Downloads](https://img.shields.io/github/downloads/hiddify/hiddify-next/total?style=flat-square&logo=github)](https://img.shields.io/github/downloads/Hiddify/Hiddify-Next/total)[![Last Version](https://img.shields.io/github/release/hiddify/hiddify-next/all.svg?style=flat-square)](https://github.com/hiddify/hiddify-server/)[![Last Release Date](https://img.shields.io/github/release-date/hiddify/hiddify-next.svg?style=flat-square)](https://github.com/hiddify/hiddify-next/)![commits](https://img.shields.io/github/commit-activity/m/hiddify/hiddify-next?style=flat-square) +[![Youtube](https://img.shields.io/youtube/channel/views/UCxrmeMvVryNfB4XL35lXQNg?label=Youtube&style=flat-square&logo=youtube)](https://www.youtube.com/@hiddify)[![Telegram Channel](https://img.shields.io/endpoint?label=Channel&style=flat-square&url=https%3A%2F%2Ftg.sumanjay.workers.dev%2Fhiddify&color=blue)](https://telegram.dog/hiddify)[![Telegram Group](https://img.shields.io/endpoint?color=neon&label=Support%20Group&style=flat-square&url=https%3A%2F%2Ftg.sumanjay.workers.dev%2Fhiddify_board)](https://telegram.dog/hiddify_board)
@@ -18,14 +19,16 @@ ## 🚀 امکانات اصلی: -⭐ استفاده بسیار آسان +⭐ استفاده بسیار آسان با رابط کاربری ساده + +✈️ پشتیبانی از چند پلتفرم: اندروید، ویندوز، لینوکس و مک (برای iOS پول رکوئست استقبال می‌شود) ⚙️ بر پایه هسته سینگ‌باکس 🔍 انتخاب خودکار بهترین سرور و کانفیگ -🚫 پشتیبانی از رنج وسیعی از پروتکل‌ها -V2ray, Xray, Vless, Vmess, Reality, TUIC, Hysteria, Shadowtls, SSH +🟡 پشتیبانی از رنج وسیعی از پروتکل‌ها +Sing-box, V2ray, Xray, Vless, Vmess, Reality, TUIC, Hysteria, Shadowtls, SSH, Clash, Clash meta 🟡 پشتیبانی لینک‌های سابسکریپشن‌ مختلف: کلش، سینگ‌باکس و شدوساکس @@ -44,9 +47,69 @@ V2ray, Xray, Vless, Vmess, Reality, TUIC, Hysteria, Shadowtls, SSH ⭐ کانفیگ متناسب برای ایران، چین، روسیه و‌ سایر کشورها -💻 انتشار نسخه اندروید در [گوگل پلی](https://play.google.com/store/apps/details?id=app.hiddify.com) +💻 انتشار نسخه اندروید در [گوگل‌پلی](https://play.google.com/store/apps/details?id=app.hiddify.com) -ت +## دانلود + +برای دریافت آخرین نسخه (شامل نسخه‌های پیش‌انتشار) از [صفحه انتشار](https://github.com/hiddify/hiddify-next/releases) بازدید نمایید. + +- اندروید: [Universal](https://github.com/hiddify/hiddify-next/releases/latest/download/hiddify-android-universal.apk) - [Arm64](https://github.com/hiddify/hiddify-next/releases/latest/download/hiddify-android-arm64.apk) - [Arm7](https://github.com/hiddify/hiddify-next/releases/latest/download/hiddify-android-arm7.apk) - [x86_64](https://github.com/hiddify/hiddify-next/releases/latest/download/hiddify-android-x86_64.apk) + +- ویندوز: [x64 Setup](https://github.com/hiddify/hiddify-next/releases/latest/download/hiddify-windows-x64-setup.exe) - [x64 Portable](https://github.com/hiddify/hiddify-next/releases/latest/download/hiddify-windows-x64-portable.zip) + +- لینوکس: [x64 AppImage](https://github.com/hiddify/hiddify-next/releases/latest/download/hiddify-linux-x64.AppImage.zip) + +- مک (نسخه 10.14 به بالا): [Universal (x64, M series)](https://github.com/hiddify/hiddify-next/releases/latest/download/hiddify-macos-universal.dmg) + +- بیلد از منبع: [راهنمای بیلد و مشارکت در پروژه](https://github.com/hiddify/hiddify-next/blob/main/contribute.md) + +
+ +
-. +## سپاسگزاری + +- [سینگ‌باکس](https://github.com/SagerNet/sing-box) +- [کلش](https://github.com/Dreamacro/clash) +- [کلش‌متا](https://github.com/MetaCubeX/Clash.Meta) +- [اف‌کلش](https://github.com/Fclash/Fclash) +- [سایر](./pubspec.yaml) + + +## حمایت از پروژه + +ساده‌ترین راه حمایت از ما کلیک کردن روی ستاره (⭐) بالای همین صفحه است. + +ما برای سرویس هایمان به کمک مالی هم نیاز داریم. تمامی فعالیت‌های ما به صورت داوطلبانه انجام می‌شود و حمایت‌های مالی صرف توسعه پروژه می‌شود. اطلاعات و آدرس‌های حمایت‌ از ما را در [این لینک](https://github.com/hiddify/hiddify-server/wiki/support) مشاهده فرمایید. + +## راه‌های همکاری و ارتباط با ما +اگر در هر یک از زمینه‌های زیر توانایی دارید، لطفا با ما در تماس باشید. +* برنامه‌نویسی فلاتر +* برنامه‌نویسی سوئیفت +* برنامه‌نویسی کاتلین +* برنامه‌نویسی Go + +
+
+ +[![Email](https://img.shields.io/badge/Email-contribute@hiddify.com-005FF9?style=flat-square&logo=mail.ru)](mailto:contribute@hiddify.com) +[![Telegram Channel](https://img.shields.io/endpoint?label=Channel&style=flat-square&url=https%3A%2F%2Ftg.sumanjay.workers.dev%2Fhiddify&color=blue)](https://telegram.dog/hiddify) +[![Telegram Group](https://img.shields.io/endpoint?color=neon&label=Support%20Group&style=flat-square&url=https%3A%2F%2Ftg.sumanjay.workers.dev%2Fhiddify_board)](https://telegram.dog/hiddify_board) +[![Youtube](https://img.shields.io/youtube/channel/views/UCxrmeMvVryNfB4XL35lXQNg?label=Youtube&style=flat-square&logo=youtube)](https://www.youtube.com/@hiddify) +[![Twitter](https://img.shields.io/twitter/follow/hiddify_com?color=%231DA1F2&logo=twitter&logoColor=1DA1F2&style=flat-square)](https://twitter.com/intent/follow?screen_name=hiddify_com) + +
+ +

+ از همه کسانی که در این پروژه مشارکت می‌کنند سپاسگزاریم. بعضی از آن‌ها اینجا هستند و خیلی های دیگه خارج از گیتهاب. همگی خیلی برای ما ارزشمندند. ♥ +

+ +

+ + + +

+

+ ساخته شده با Contrib.Rocks +

diff --git a/android/app/src/main/kotlin/com/hiddify/hiddify/MainActivity.kt b/android/app/src/main/kotlin/com/hiddify/hiddify/MainActivity.kt index a6d526c8..1d3165f3 100644 --- a/android/app/src/main/kotlin/com/hiddify/hiddify/MainActivity.kt +++ b/android/app/src/main/kotlin/com/hiddify/hiddify/MainActivity.kt @@ -59,7 +59,6 @@ class MainActivity : FlutterFragmentActivity(), ServiceConnection.Callback { fun startService() { if (!ServiceNotification.checkPermission()) { -// Log.d(TAG, "missing notification permission") grantNotificationPermission() return } @@ -81,15 +80,26 @@ class MainActivity : FlutterFragmentActivity(), ServiceConnection.Callback { } } + private suspend fun prepare() = withContext(Dispatchers.Main) { + try { + val intent = VpnService.prepare(this@MainActivity) + if (intent != null) { + startActivityForResult(intent, VPN_PERMISSION_REQUEST_CODE) + true + } else { + false + } + } catch (e: Exception) { + onServiceAlert(Alert.RequestVPNPermission, e.message) + false + } + } override fun onServiceStatusChanged(status: Status) { - Log.d(TAG, "service status changed: $status") serviceStatus.postValue(status) } - override fun onServiceAlert(type: Alert, message: String?) { - Log.d(TAG, "service alert: $type") serviceAlerts.postValue(ServiceEvent(Status.Stopped, type, message)) } @@ -154,22 +164,6 @@ class MainActivity : FlutterFragmentActivity(), ServiceConnection.Callback { } } - private suspend fun prepare() = withContext(Dispatchers.Main) { - try { - val intent = VpnService.prepare(this@MainActivity) - if (intent != null) { -// prepareLauncher.launch(intent) - startActivityForResult(intent, VPN_PERMISSION_REQUEST_CODE) - true - } else { - false - } - } catch (e: Exception) { - onServiceAlert(Alert.RequestVPNPermission, e.message) - false - } - } - override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { super.onActivityResult(requestCode, resultCode, data) if (requestCode == VPN_PERMISSION_REQUEST_CODE) { diff --git a/android/app/src/main/kotlin/com/hiddify/hiddify/bg/DefaultNetworkListener.kt b/android/app/src/main/kotlin/com/hiddify/hiddify/bg/DefaultNetworkListener.kt index e5608b58..c47d1c3f 100644 --- a/android/app/src/main/kotlin/com/hiddify/hiddify/bg/DefaultNetworkListener.kt +++ b/android/app/src/main/kotlin/com/hiddify/hiddify/bg/DefaultNetworkListener.kt @@ -172,5 +172,9 @@ object DefaultNetworkListener { } } - private fun unregister() = Application.connectivity.unregisterNetworkCallback(Callback) + private fun unregister() { + runCatching { + Application.connectivity.unregisterNetworkCallback(Callback) + } + } } \ No newline at end of file diff --git a/android/app/src/main/kotlin/com/hiddify/hiddify/bg/ProxyService.kt b/android/app/src/main/kotlin/com/hiddify/hiddify/bg/ProxyService.kt index ea30c2cd..5d65029e 100644 --- a/android/app/src/main/kotlin/com/hiddify/hiddify/bg/ProxyService.kt +++ b/android/app/src/main/kotlin/com/hiddify/hiddify/bg/ProxyService.kt @@ -7,7 +7,7 @@ class ProxyService : Service(), PlatformInterfaceWrapper { private val service = BoxService(this, this) - override fun onStartCommand(intent: Intent, flags: Int, startId: Int) = + override fun onStartCommand(intent: Intent?, flags: Int, startId: Int) = service.onStartCommand(intent, flags, startId) override fun onBind(intent: Intent) = service.onBind(intent) diff --git a/assets/images/google-play-badge.png b/assets/images/google-play-badge.png new file mode 100644 index 00000000..28fc271c Binary files /dev/null and b/assets/images/google-play-badge.png differ diff --git a/contribute.md b/contribute.md new file mode 100644 index 00000000..d1508d40 --- /dev/null +++ b/contribute.md @@ -0,0 +1,28 @@ +## Build from source + +Hiddify Next relies on [core library](https://github.com/hiddify/hiddify-next-core) made with GO. if you're interested in building/contributing to that as well follow instructions there. + +### requirements: + +- Flutter v3.13+ +- Make +- Android SDK + +This project uses [flutter_distributor](https://github.com/leanflutter/flutter_distributor) for packaging. + +```shell +# fetch dependencies and build generated files +$ make get translate gen + +# fetch geo assets +$ make get-geo-assets + +for platform in [windows linux macos android]: + # fetch native libraries for respective platforms, follow core lib instructions for building + $ make $platform-libs + $ make release-$platform + +# example: + $ make windows-libs + $ make windows-release +``` diff --git a/lib/features/common/app_update_notifier.dart b/lib/features/common/app_update_notifier.dart index dcfe4743..66d13581 100644 --- a/lib/features/common/app_update_notifier.dart +++ b/lib/features/common/app_update_notifier.dart @@ -63,10 +63,11 @@ class AppUpdateNotifier extends _$AppUpdateNotifier with AppLogger { return state = AppUpdateState.error(err); }, (remote) { - if (remote.version == _ignoreReleasePref.getValue()) { - loggy.debug("ignored release [${remote.version}]"); - return state = AppUpdateStateIgnored(remote); - } else if (remote.version.compareTo(currentVersion) > 0) { + if (remote.version.compareTo(currentVersion) > 0) { + if (remote.version == _ignoreReleasePref.getValue()) { + loggy.debug("ignored release [${remote.version}]"); + return state = AppUpdateStateIgnored(remote); + } loggy.debug("new version available: $remote"); return state = AppUpdateState.available(remote); } diff --git a/lib/features/common/window/window_controller.dart b/lib/features/common/window/window_controller.dart index 938d3d98..bd1f3c68 100644 --- a/lib/features/common/window/window_controller.dart +++ b/lib/features/common/window/window_controller.dart @@ -13,9 +13,10 @@ class WindowController extends _$WindowController @override Future build() async { await windowManager.ensureInitialized(); + const size = Size(868, 668); const windowOptions = WindowOptions( - size: Size(868, 768), - minimumSize: Size(868, 648), + size: size, + minimumSize: size, center: true, ); await windowManager.setPreventClose(true); diff --git a/lib/features/intro/view/intro_page.dart b/lib/features/intro/view/intro_page.dart index 54204917..f5671578 100644 --- a/lib/features/intro/view/intro_page.dart +++ b/lib/features/intro/view/intro_page.dart @@ -1,5 +1,6 @@ import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:gap/gap.dart'; import 'package:hiddify/core/core_providers.dart'; import 'package:hiddify/core/prefs/prefs.dart'; @@ -18,6 +19,8 @@ class IntroPage extends HookConsumerWidget with PresLogger { Widget build(BuildContext context, WidgetRef ref) { final t = ref.watch(translationsProvider); + final isStarting = useState(false); + return Scaffold( body: CustomScrollView( shrinkWrap: true, @@ -68,6 +71,8 @@ class IntroPage extends HookConsumerWidget with PresLogger { ), child: FilledButton( onPressed: () async { + if (isStarting.value) return; + isStarting.value = true; if (!ref.read(enableAnalyticsProvider)) { loggy.info("disabling analytics per user request"); try { @@ -84,7 +89,12 @@ class IntroPage extends HookConsumerWidget with PresLogger { .read(introCompletedProvider.notifier) .update(true); }, - child: Text(t.intro.start), + child: isStarting.value + ? LinearProgressIndicator( + backgroundColor: Colors.transparent, + color: Theme.of(context).colorScheme.onSurface, + ) + : Text(t.intro.start), ), ), ], diff --git a/lib/utils/sentry_utils.dart b/lib/utils/sentry_utils.dart index 9b250ced..44971fd6 100644 --- a/lib/utils/sentry_utils.dart +++ b/lib/utils/sentry_utils.dart @@ -15,6 +15,8 @@ bool canSendEvent(dynamic throwable) { UnexpectedFailure(:final error) => canSendEvent(error), DioException _ => false, SocketException _ => false, + HttpException _ => false, + HandshakeException _ => false, ExpectedFailure _ => false, ExpectedMeasuredFailure _ => false, _ => true,