Merge branch 'main' of hiddify-github:hiddify/hiddify-next
This commit is contained in:
96
.github/ISSUE_TEMPLATE/bug_report.yaml
vendored
Normal file
96
.github/ISSUE_TEMPLATE/bug_report.yaml
vendored
Normal file
@@ -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!)
|
||||||
5
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
5
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@@ -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
|
||||||
10
.github/ISSUE_TEMPLATE/feature_request.yaml
vendored
Normal file
10
.github/ISSUE_TEMPLATE/feature_request.yaml
vendored
Normal file
@@ -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
|
||||||
21
.github/release_message.md
vendored
Normal file
21
.github/release_message.md
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<!--<p dir="ltr" style="font-size: 20px">"$RELEASE_VERSION"</p> -->
|
||||||
|
<div align=left>
|
||||||
|
<a href="https://play.google.com/store/apps/details?id=app.hiddify.com"><img width=20% src="https://github.com/hiddify/hiddify-next/blob/main/assets/images/google-play-badge.png"></a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
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)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
38
README.md
38
README.md
@@ -5,7 +5,8 @@
|
|||||||
<div align="center">
|
<div align="center">
|
||||||
|
|
||||||
|
|
||||||
[](https://play.cuzi.workers.dev/play?i=app.hiddify.com&l=GooglePlay&m=$installs)[](https://img.shields.io/github/downloads/Hiddify/Hiddify-Next/total)[](https://github.com/hiddify/hiddify-server/)[](https://github.com/hiddify/hiddify-next/)[](https://www.youtube.com/@hiddify)[](https://telegram.dog/hiddify)[](https://telegram.dog/hiddify_board)
|
[](https://play.cuzi.workers.dev/play?i=app.hiddify.com&l=GooglePlay&m=$installs) [](https://img.shields.io/github/downloads/Hiddify/Hiddify-Next/total)[](https://github.com/hiddify/hiddify-server/)[](https://github.com/hiddify/hiddify-next/)
|
||||||
|
[](https://www.youtube.com/@hiddify)[](https://telegram.dog/hiddify)[](https://telegram.dog/hiddify_board)
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -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)
|
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)
|
- 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)
|
- 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.
|
<div align=center>
|
||||||
|
<a href="https://play.google.com/store/apps/details?id=app.hiddify.com"><img width=20% src="./assets/images/google-play-badge.png"></a>
|
||||||
|
</div>
|
||||||
|
|
||||||
### 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
|
## Acknowledgements
|
||||||
|
|
||||||
@@ -115,7 +95,7 @@ We need your collaboration in order to develop this project. If you are speciali
|
|||||||
|
|
||||||
</br>
|
</br>
|
||||||
|
|
||||||
[](mailto:contribute@hiddify.com)
|
[](mailto:contribute@hiddify.com)
|
||||||
[](https://telegram.dog/hiddify)
|
[](https://telegram.dog/hiddify)
|
||||||
[](https://telegram.dog/hiddify_board)
|
[](https://telegram.dog/hiddify_board)
|
||||||
[](https://www.youtube.com/@hiddify)
|
[](https://www.youtube.com/@hiddify)
|
||||||
@@ -130,7 +110,7 @@ We need your collaboration in order to develop this project. If you are speciali
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p align=center>
|
<p align=center>
|
||||||
<a href="https://github.com/hiddify/hiddify-server/graphs/contributors">
|
<a href="https://github.com/hiddify/hiddify-next/graphs/contributors">
|
||||||
<img src="https://contrib.rocks/image?repo=hiddify/hiddify-next" />
|
<img src="https://contrib.rocks/image?repo=hiddify/hiddify-next" />
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
77
README_fa.md
77
README_fa.md
@@ -9,7 +9,8 @@
|
|||||||
<div align="center">
|
<div align="center">
|
||||||
|
|
||||||
|
|
||||||
[](https://play.cuzi.workers.dev/play?i=app.hiddify.com&l=GooglePlay&m=$installs)[](https://img.shields.io/github/downloads/Hiddify/Hiddify-Next/total)[](https://github.com/hiddify/hiddify-server/)[](https://github.com/hiddify/hiddify-next/)[](https://www.youtube.com/@hiddify)[](https://telegram.dog/hiddify)[](https://telegram.dog/hiddify_board)
|
[](https://play.cuzi.workers.dev/play?i=app.hiddify.com&l=GooglePlay&m=$installs) [](https://img.shields.io/github/downloads/Hiddify/Hiddify-Next/total)[](https://github.com/hiddify/hiddify-server/)[](https://github.com/hiddify/hiddify-next/)
|
||||||
|
[](https://www.youtube.com/@hiddify)[](https://telegram.dog/hiddify)[](https://telegram.dog/hiddify_board)
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -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)
|
||||||
|
|
||||||
|
<div align=center>
|
||||||
|
<a href="https://play.google.com/store/apps/details?id=app.hiddify.com"><img width=20% src="./assets/images/google-play-badge.png"></a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
.
|
## سپاسگزاری
|
||||||
|
|
||||||
|
- [سینگباکس](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
|
||||||
|
|
||||||
|
</br>
|
||||||
|
<div align=center>
|
||||||
|
|
||||||
|
[](mailto:contribute@hiddify.com)
|
||||||
|
[](https://telegram.dog/hiddify)
|
||||||
|
[](https://telegram.dog/hiddify_board)
|
||||||
|
[](https://www.youtube.com/@hiddify)
|
||||||
|
[](https://twitter.com/intent/follow?screen_name=hiddify_com)
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p align=center>
|
||||||
|
از همه کسانی که در این پروژه مشارکت میکنند سپاسگزاریم. بعضی از آنها اینجا هستند و خیلی های دیگه خارج از گیتهاب. همگی خیلی برای ما ارزشمندند. ♥
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p align=center>
|
||||||
|
<a href="https://github.com/hiddify/hiddify-next/graphs/contributors">
|
||||||
|
<img src="https://contrib.rocks/image?repo=hiddify/hiddify-next" />
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
<p align=center>
|
||||||
|
ساخته شده با <a rel="" target="_blank" href="https://contrib.rocks">Contrib.Rocks</a>
|
||||||
|
</p>
|
||||||
|
|||||||
@@ -59,7 +59,6 @@ class MainActivity : FlutterFragmentActivity(), ServiceConnection.Callback {
|
|||||||
|
|
||||||
fun startService() {
|
fun startService() {
|
||||||
if (!ServiceNotification.checkPermission()) {
|
if (!ServiceNotification.checkPermission()) {
|
||||||
// Log.d(TAG, "missing notification permission")
|
|
||||||
grantNotificationPermission()
|
grantNotificationPermission()
|
||||||
return
|
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) {
|
override fun onServiceStatusChanged(status: Status) {
|
||||||
Log.d(TAG, "service status changed: $status")
|
|
||||||
serviceStatus.postValue(status)
|
serviceStatus.postValue(status)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
override fun onServiceAlert(type: Alert, message: String?) {
|
override fun onServiceAlert(type: Alert, message: String?) {
|
||||||
Log.d(TAG, "service alert: $type")
|
|
||||||
serviceAlerts.postValue(ServiceEvent(Status.Stopped, type, message))
|
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?) {
|
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
||||||
super.onActivityResult(requestCode, resultCode, data)
|
super.onActivityResult(requestCode, resultCode, data)
|
||||||
if (requestCode == VPN_PERMISSION_REQUEST_CODE) {
|
if (requestCode == VPN_PERMISSION_REQUEST_CODE) {
|
||||||
|
|||||||
@@ -172,5 +172,9 @@ object DefaultNetworkListener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun unregister() = Application.connectivity.unregisterNetworkCallback(Callback)
|
private fun unregister() {
|
||||||
|
runCatching {
|
||||||
|
Application.connectivity.unregisterNetworkCallback(Callback)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -7,7 +7,7 @@ class ProxyService : Service(), PlatformInterfaceWrapper {
|
|||||||
|
|
||||||
private val service = BoxService(this, this)
|
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)
|
service.onStartCommand(intent, flags, startId)
|
||||||
|
|
||||||
override fun onBind(intent: Intent) = service.onBind(intent)
|
override fun onBind(intent: Intent) = service.onBind(intent)
|
||||||
|
|||||||
BIN
assets/images/google-play-badge.png
Normal file
BIN
assets/images/google-play-badge.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.5 KiB |
28
contribute.md
Normal file
28
contribute.md
Normal file
@@ -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
|
||||||
|
```
|
||||||
@@ -63,10 +63,11 @@ class AppUpdateNotifier extends _$AppUpdateNotifier with AppLogger {
|
|||||||
return state = AppUpdateState.error(err);
|
return state = AppUpdateState.error(err);
|
||||||
},
|
},
|
||||||
(remote) {
|
(remote) {
|
||||||
if (remote.version == _ignoreReleasePref.getValue()) {
|
if (remote.version.compareTo(currentVersion) > 0) {
|
||||||
loggy.debug("ignored release [${remote.version}]");
|
if (remote.version == _ignoreReleasePref.getValue()) {
|
||||||
return state = AppUpdateStateIgnored(remote);
|
loggy.debug("ignored release [${remote.version}]");
|
||||||
} else if (remote.version.compareTo(currentVersion) > 0) {
|
return state = AppUpdateStateIgnored(remote);
|
||||||
|
}
|
||||||
loggy.debug("new version available: $remote");
|
loggy.debug("new version available: $remote");
|
||||||
return state = AppUpdateState.available(remote);
|
return state = AppUpdateState.available(remote);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,9 +13,10 @@ class WindowController extends _$WindowController
|
|||||||
@override
|
@override
|
||||||
Future<bool> build() async {
|
Future<bool> build() async {
|
||||||
await windowManager.ensureInitialized();
|
await windowManager.ensureInitialized();
|
||||||
|
const size = Size(868, 668);
|
||||||
const windowOptions = WindowOptions(
|
const windowOptions = WindowOptions(
|
||||||
size: Size(868, 768),
|
size: size,
|
||||||
minimumSize: Size(868, 648),
|
minimumSize: size,
|
||||||
center: true,
|
center: true,
|
||||||
);
|
);
|
||||||
await windowManager.setPreventClose(true);
|
await windowManager.setPreventClose(true);
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import 'package:flutter/gestures.dart';
|
import 'package:flutter/gestures.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||||
import 'package:gap/gap.dart';
|
import 'package:gap/gap.dart';
|
||||||
import 'package:hiddify/core/core_providers.dart';
|
import 'package:hiddify/core/core_providers.dart';
|
||||||
import 'package:hiddify/core/prefs/prefs.dart';
|
import 'package:hiddify/core/prefs/prefs.dart';
|
||||||
@@ -18,6 +19,8 @@ class IntroPage extends HookConsumerWidget with PresLogger {
|
|||||||
Widget build(BuildContext context, WidgetRef ref) {
|
Widget build(BuildContext context, WidgetRef ref) {
|
||||||
final t = ref.watch(translationsProvider);
|
final t = ref.watch(translationsProvider);
|
||||||
|
|
||||||
|
final isStarting = useState(false);
|
||||||
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
body: CustomScrollView(
|
body: CustomScrollView(
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
@@ -68,6 +71,8 @@ class IntroPage extends HookConsumerWidget with PresLogger {
|
|||||||
),
|
),
|
||||||
child: FilledButton(
|
child: FilledButton(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
|
if (isStarting.value) return;
|
||||||
|
isStarting.value = true;
|
||||||
if (!ref.read(enableAnalyticsProvider)) {
|
if (!ref.read(enableAnalyticsProvider)) {
|
||||||
loggy.info("disabling analytics per user request");
|
loggy.info("disabling analytics per user request");
|
||||||
try {
|
try {
|
||||||
@@ -84,7 +89,12 @@ class IntroPage extends HookConsumerWidget with PresLogger {
|
|||||||
.read(introCompletedProvider.notifier)
|
.read(introCompletedProvider.notifier)
|
||||||
.update(true);
|
.update(true);
|
||||||
},
|
},
|
||||||
child: Text(t.intro.start),
|
child: isStarting.value
|
||||||
|
? LinearProgressIndicator(
|
||||||
|
backgroundColor: Colors.transparent,
|
||||||
|
color: Theme.of(context).colorScheme.onSurface,
|
||||||
|
)
|
||||||
|
: Text(t.intro.start),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -15,6 +15,8 @@ bool canSendEvent(dynamic throwable) {
|
|||||||
UnexpectedFailure(:final error) => canSendEvent(error),
|
UnexpectedFailure(:final error) => canSendEvent(error),
|
||||||
DioException _ => false,
|
DioException _ => false,
|
||||||
SocketException _ => false,
|
SocketException _ => false,
|
||||||
|
HttpException _ => false,
|
||||||
|
HandshakeException _ => false,
|
||||||
ExpectedFailure _ => false,
|
ExpectedFailure _ => false,
|
||||||
ExpectedMeasuredFailure _ => false,
|
ExpectedMeasuredFailure _ => false,
|
||||||
_ => true,
|
_ => true,
|
||||||
|
|||||||
Reference in New Issue
Block a user