### Install main application binary Source: https://github.com/hiddify/hiddify-app/blob/main/linux/CMakeLists.txt Installs the main application binary (${BINARY_NAME}) to the install prefix. ```cmake install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" COMPONENT Runtime) ``` -------------------------------- ### Install git on Debian/Ubuntu Source: https://github.com/hiddify/hiddify-app/wiki/How-to-contribute-to-this-project Install git on Debian/Ubuntu distributions using apt. ```bash sudo apt-get install git-all ``` -------------------------------- ### Install git on Arch Source: https://github.com/hiddify/hiddify-app/wiki/How-to-contribute-to-this-project Install git on Arch distribution using pacman. ```bash pacman -Syu git-all ``` -------------------------------- ### Install HiddifyCli executable Source: https://github.com/hiddify/hiddify-app/blob/main/linux/CMakeLists.txt Installs the HiddifyCli executable to the install prefix with execute and read permissions for owner, group, and world. ```cmake install( FILES "../hiddify-core/bin/HiddifyCli" DESTINATION "${CMAKE_INSTALL_PREFIX}" PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ COMPONENT Runtime ) ``` -------------------------------- ### Install git on Fedora Source: https://github.com/hiddify/hiddify-app/wiki/How-to-contribute-to-this-project Install git on Fedora distribution using dnf. ```bash dnf install git-all ``` -------------------------------- ### Clean build bundle directory before install Source: https://github.com/hiddify/hiddify-app/blob/main/linux/CMakeLists.txt Removes the build bundle directory every time before installation to ensure a clean start. ```cmake install(CODE " file(REMOVE_RECURSE \"${BUILD_BUNDLE_DIR}/\") " COMPONENT Runtime) ``` -------------------------------- ### Install bundled plugin libraries Source: https://github.com/hiddify/hiddify-app/blob/main/linux/CMakeLists.txt Installs each bundled plugin library to the lib directory within the bundle. ```cmake foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES}) install(FILES "${bundled_library}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" COMPONENT Runtime) endforeach(bundled_library) ``` -------------------------------- ### Define install bundle data and lib directories Source: https://github.com/hiddify/hiddify-app/blob/main/linux/CMakeLists.txt Sets the destination directories for data and library files within the install bundle. ```cmake set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib") ``` -------------------------------- ### Set install prefix to bundle directory Source: https://github.com/hiddify/hiddify-app/blob/main/linux/CMakeLists.txt By default, installing creates a relocatable bundle in the build directory. This sets the install prefix to the bundle directory if it was initialized to default. ```cmake set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle") if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) endif() ``` -------------------------------- ### Commit example for core changes Source: https://github.com/hiddify/hiddify-app/wiki/How-to-contribute-to-this-project Example commit message when changes are related to the core department. ```bash git commit -m "add some features to the core" ``` -------------------------------- ### Install Flutter library Source: https://github.com/hiddify/hiddify-app/blob/main/linux/CMakeLists.txt Installs the Flutter library to the lib directory within the bundle. ```cmake install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" COMPONENT Runtime) ``` -------------------------------- ### Install hiddify-core shared library Source: https://github.com/hiddify/hiddify-app/blob/main/linux/CMakeLists.txt Installs the hiddify-core shared library to the lib directory within the bundle. ```cmake install(FILES "../hiddify-core/bin/lib/hiddify-core.so" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" COMPONENT Runtime) ``` -------------------------------- ### List connected devices with flutter devices Source: https://github.com/hiddify/hiddify-app/blob/main/CONTRIBUTING.md Run this command to get the Device ID of a connected device before building a release. The example response shows three connected devices with their IDs and platforms. ```shell $ flutter devices # example response 3 connected devices: 2211143G (mobile) • 35492ae2 • android-arm64 • Android 13 (API 33) Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.22000.2482] Chrome (web) • chrome • web-javascript • Google Chrome 117.0.5938.149 ``` -------------------------------- ### Example deeplink Source: https://github.com/hiddify/hiddify-app/wiki/URL-Scheme Example deeplinks for importing configurations. ```text hiddify://import/https://hiddify.com/autosub#name hiddify://import/trojan://your_password@aws-ar-buenosaires-1.f1cflineb.com:443#name ``` -------------------------------- ### Check Flutter version with flutter --version Source: https://github.com/hiddify/hiddify-app/blob/main/CONTRIBUTING.md Use this command to verify your installed Flutter version before starting development. The example response shows Flutter 3.13.4 on the stable channel with Dart 3.1.2. ```shell $ flutter --version # example response Flutter 3.13.4 • channel stable • https://github.com/flutter/flutter.git Framework • revision 367f9ea16b (4 weeks ago) • 2023-09-12 23:27:53 -0500 Engine • revision 9064459a8b Tools • Dart 3.1.2 • DevTools 2.25.0 ``` -------------------------------- ### Check git version on Windows Source: https://github.com/hiddify/hiddify-app/wiki/How-to-contribute-to-this-project Run this command in the command prompt to verify the installed git version on Windows. ```bash git version ``` -------------------------------- ### Installation rules for Hiddify Windows build Source: https://github.com/hiddify/hiddify-app/blob/main/windows/CMakeLists.txt Configures installation of the executable, Flutter data, and hiddify-core binaries. Sets the install prefix to the build bundle directory and installs required DLLs and executables. ```cmake # === Installation === # Support files are copied into place next to the executable, so that it can # run in place. This is done instead of making a separate bundle (as on Linux) # so that building and running from within Visual Studio will work. set(BUILD_BUNDLE_DIR "$") # Make the "install" step default, as it's required to run. set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1) if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) endif() set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}") install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" COMPONENT Runtime) # Renamed from icudtl.dat: see the DartProject construction in runner/main.cpp. install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" RENAME "icudtl.bin" COMPONENT Runtime) install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" COMPONENT Runtime) # install(FILES "../hiddify-core/bin/hiddify-core.dll" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" # COMPONENT Runtime) install(FILES "../hiddify-core/bin/hiddify-core.dll" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" COMPONENT Runtime RENAME hiddify-core.dll) install(FILES "../hiddify-core/bin/libcronet.dll" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" COMPONENT Runtime RENAME libcronet.dll) install(FILES "../hiddify-core/bin/HiddifyCli.exe" DESTINATION "${CMAKE_INSTALL_PREFIX}" COMPONENT Runtime RENAME HiddifyCli.exe) # Elevation helper (requireAdministrator manifest) used to install the VPN service. install(FILES "../hiddify-core/bin/HiddifyAdmin.exe" DESTINATION "${CMAKE_INSTALL_PREFIX}" COMPONENT Runtime RENAME HiddifyAdmin.exe) if(PLUGIN_BUNDLED_LIBRARIES) install(FILES "${PLUGIN_BUNDLED_LIBRARIES}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" COMPONENT Runtime) endif() # Fully re-copy the assets directory on each build to avoid having stale files # from a previous install. set(FLUTTER_ASSET_DIR_NAME "flutter_assets") install(CODE " file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") " COMPONENT Runtime) install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) # Install the AOT library on non-Debug builds only. install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" CONFIGURATIONS Profile;Release COMPONENT Runtime) ``` -------------------------------- ### Example sub link content in v2ray link format Source: https://github.com/hiddify/hiddify-app/wiki/URL-Scheme Example sub link content in v2ray link format, including normal and base64 examples. ```text #normal exmaple hiddify://import/https://raw.githubusercontent.com/yebekhe/TelegramV2rayCollector/fe3637db4ece53e56ac99ea09dbefa34466f280f/sub/normal/mix #base64 example hiddify://import/https://raw.githubusercontent.com/yebekhe/TelegramV2rayCollector/fe3637db4ece53e56ac99ea09dbefa34466f280f/sub/base64/mix ``` -------------------------------- ### Clone the HiddifyNext repository Source: https://github.com/hiddify/hiddify-app/wiki/How-to-contribute-to-this-project Clone the hiddify-next project from GitHub to start contributing. ```bash git clone https://github.com/hiddify/hiddify-next.git ``` -------------------------------- ### Example sub link content in Singbox format Source: https://github.com/hiddify/hiddify-app/wiki/URL-Scheme Example sub link content in Singbox format. ```text hiddify://import/https://raw.githubusercontent.com/yebekhe/TelegramV2rayCollector/fe3637db4ece53e56ac99ea09dbefa34466f280f/singbox/sfasfi/mixLite.json ``` -------------------------------- ### Sequential effects with delay Source: https://github.com/hiddify/hiddify-app/blob/main/third_party/flutter_animate/README.md Effects run in parallel by default; use a delay to run them sequentially. Here, the scale effect starts after the fade effect completes. ```dart Text("Hello").animate() .fade(duration: 500.ms) .scale(delay: 500.ms) // runs after fade. ``` -------------------------------- ### Install Flutter ICU data file Source: https://github.com/hiddify/hiddify-app/blob/main/linux/CMakeLists.txt Installs the Flutter ICU data file to the data directory within the bundle. ```cmake install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) ``` -------------------------------- ### Example sub link content in Clash format Source: https://github.com/hiddify/hiddify-app/wiki/URL-Scheme Example sub link content in Clash format. ```text hiddify://import/https://raw.githubusercontent.com/yebekhe/TelegramV2rayCollector/d6ce7b907eeb58abf503c283af192e7bc915d143/clash/mix.yml ``` -------------------------------- ### Animate delay and repeat Source: https://github.com/hiddify/hiddify-app/blob/main/third_party/flutter_animate/README.md Animate's own delay parameter defines a delay before the animation begins, applied only once even if the animation repeats. The effect's delay is applied at the start of each loop. ```dart Text("Hello").animate( delay: 1000.ms, // this delay only happens once at the very start onPlay: (controller) => controller.repeat(), // loop ).fadeIn(delay: 500.ms) // this delay happens at the start of each loop ``` -------------------------------- ### Re-copy flutter_assets directory on each build Source: https://github.com/hiddify/hiddify-app/blob/main/linux/CMakeLists.txt Removes the existing flutter_assets directory in the bundle data directory before installing a fresh copy. This avoids stale files from previous installs. The removal is done via an install(CODE) block, then the directory is installed from the project build directory. ```cmake # Fully re-copy the assets directory on each build to avoid having stale files # from a previous install. set(FLUTTER_ASSET_DIR_NAME "flutter_assets") install(CODE " file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") " COMPONENT Runtime) install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) ``` -------------------------------- ### Run dnstt with hiddify-core Source: https://github.com/hiddify/hiddify-app/blob/main/test.configs/dnstt/readme.md Command to run dnstt on a router or relay server using hiddify-core. Requires downloading hiddify-core from the provided release link and a config file (see dnstt_raw_config.json). ```bash hiddify-core srun -c config.json ``` -------------------------------- ### Run HiddifyNext with admin privilege on Mac (sudo command) Source: https://github.com/hiddify/hiddify-app/wiki/How-to-use-HiddifyNext-app Open the terminal, drag the HiddifyNext file from Applications > MacOS onto the terminal, press ctrl+a to go to the start of the line, then type sudo. Press Enter to run the program with admin privilege. ```bash sudo \Applications\HiddifyNext.app\Contents\MacOS\HiddifyNext ``` -------------------------------- ### Example sub link content in v2ray format Source: https://github.com/hiddify/hiddify-app/wiki/URL-Scheme Example sub link content in v2ray format, including various proxy types. ```text # http_WS_direct_vless تست vless://64177752-4266-4e00-94e3-1b8ececc6623@ip.sslip.io:80?security=none&sni=ip.sslip.io&type=ws&alpn=http/1.1&path=/2LBLzR6NsjNkCN830caotU&host=ip.sslip.io&encryption=none&fp=chrome&headerType=None#http_WS_direct_vless_تست # http_WS_direct_vmess تست vmess://64177752-4266-4e00-94e3-1b8ececc6623@ip.sslip.io:80?security=none&sni=ip.sslip.io&type=ws&alpn=http/1.1&path=/2LBLzR6NsjNkCN830caotU&host=ip.sslip.io&encryption=none&fp=chrome&headerType=None#http_WS_direct_vless_تست # ssconfig ssconf://s3.amazonaws.com/beedynconprd/ng4lf90ip01zstlyle4r0t56x1qli4cvmt2ws6nh0kdz1jpgzyedogxt3mpxfbxi.json#BeePass", # Reality vless://409f106a-b2f2-4416-b186-5429c9979cd9@54.38.144.4:2053?encryption=none&flow=&fp=chrome&pbk=SbVKOEMjK0sIlbwg4akyBg5mL5KZwwB-ed4eEE7YnRc&security=reality&serviceName=xyz&sid=&sni=discordapp.com&type=grpc#رایگان | REALITY | @EliV2ray | FR🇫🇷 | 0️⃣1️⃣ # Vless vless://25da296e-1d96-48ae-9867-4342796cd742@172.67.149.95:443?encryption=none&fp=chrome&host=vless.229feb8b52a0e7e117ea76f8b591bcb3.workers.dev&path=%2F%3Fed%3D2048&security=tls&sni=vless.229feb8b52a0e7e117ea76f8b591bcb3.workers.dev&type=ws#رایگان | VLESS | @Helix_Servers | US🇺🇸 | 0️⃣1️⃣ # Vmess vmess://eyJhZGQiOiI1MS4xNjEuMTMwLjE3MyIsImFpZCI6IjAiLCJhbHBuIjoiIiwiZnAiOiIiLCJob3N0IjoiIiwiaWQiOiJkNDNlZTVlMy0xYjA3LTU2ZDctYjJlYS04ZDIyYzQ0ZmRjNjYiLCJuZXQiOiJ0Y3AiLCJwYXRoIjoiIiwicG9ydCI6IjgwODAiLCJzY3kiOiJjaGFjaGEyMC1wb2x5MTMwNSIsInNuaSI6IiIsInRscyI6IiIsInR5cGUiOiJub25lIiwidiI6IjIiLCJwcyI6Ilx1MDYzMVx1MDYyN1x1MDZjY1x1MDZhZlx1MDYyN1x1MDY0NiB8IFZNRVNTIHwgQFdhdGFzaGlfVlBOIHwgQVVcdWQ4M2NcdWRkZTZcdWQ4M2NcdWRkZmEgfCAwXHVmZTBmXHUyMGUzMVx1ZmUwZlx1MjBlMyJ9" # ss ss://Y2hhY2hhMjAtaWV0Zi1wb2x5MTMwNTp0T3dPeXZsWGlZNUFUSkFVT3BYTlBO@5.35.34.107:55990#%D8%B1%D8%A7%DB%8C%DA%AF%D8%A7%D9%86+%7C+SS+%7C+%40iP_CF+%7C+RU%F0%9F%87%B7%F0%9F%87%BA+%7C+0%EF%B8%8F%E2%83%A31%EF%B8%8F%E2%83%A3" # TUIC tuic://3618921b-adeb-4bd3-a2a0-f98b72a674b1:dongtaiwang@108.181.24.7:23450?allow_insecure=1&alpn=h3&congestion_control=bbr&sni=www.google.com&udp_relay_mode=native#رایگان | TUIC | @V2rayCollector | CA🇨🇦 | 0️⃣1️⃣ # Hysteria1 hysteria://host:443?protocol=udp&auth=123456&peer=sni.domain&insecure=1&upmbps=100&downmbps=100&alpn=hysteria&obfs=xplus&obfsParam=123456#remarks", # Hysteria2 hysteria2://letmein@example.com/?insecure=1&obfs=salamander&obfs-password=gawrgura&pinSHA256=deadbeef&sni=real.example.com # SSH ssh://user:pass@server:22/?pk=pk&hk=hk" # Trojan trojan://your_password@aws-ar-buenosaires-1.f1cflineb.com:443?host=aws-ar-buenosaires-1.f1cflineb.com&path=%2Ff1rocket&security=tls&sni=aws-ar-buenosaires-1.f1cflineb.com&type=ws#رایگان | TROJAN | @VmessProtocol | RELAY🚩 | 0️⃣1️⃣" #Wireguard wg://[server]:222/?pk=[private_key]&local_address=10.0.0.2/24&peer_pk=[peer_public_key]&pre_shared_key=[pre_shared_key]&workers=[workers]&mtu=[mtu]&reserved=0,0,0 ``` -------------------------------- ### MUX parameters in link Source: https://github.com/hiddify/hiddify-app/wiki/URL-Scheme To set up Mux parameters in your link, use the following keys: `mux` (one of `smux`, `yamux`, `h2mux`), `mux_max` (maximum connections), `mux_min` (minimum streams), `mux_pad` (true/false, must match server), `mux_down` (download bandwidth in mbps), and `mux_up` (upload bandwidth in mbps). The example shows a complete MUX parameter string. ```plaintext mux : "smux/h2mux/yamux" mux_max : "number" e.g. 6 mux_min : "number" e.g. 2 mux_pad : "true/false" mux_down : "number in mbps" e.g. 100 mux_up : "number in mbps" e.g. 200 ``` ```plaintext mux=smux&mux_max=4&mux_min=0&mix_pad=false&mux_up=10&mux_down=10 ``` -------------------------------- ### Verify Windows build signatures with signtool, Get-AuthenticodeSignature, and gh attestation Source: https://github.com/hiddify/hiddify-app/blob/main/docs/windows-code-signing.md Run these PowerShell commands to verify the signature of the installer, the core DLL, and the CLI executable, and to verify the attestation against the repository. Get-AuthenticodeSignature must report Valid; a self-signed PFX shows UnknownError or NotTrusted. ```powershell signtool verify /pa /v Hiddify-Windows-Setup-x64.exe Get-AuthenticodeSignature .\Hiddify\hiddify-core.dll | Format-List (Get-Item .\Hiddify\HiddifyCli.exe).VersionInfo gh attestation verify Hiddify-Windows-Setup-x64.exe --repo hiddify/hiddify-app ``` -------------------------------- ### dnstt URI for app Source: https://github.com/hiddify/hiddify-app/blob/main/test.configs/dnstt/readme.md URI format for configuring dnstt in the app. Includes tunnel_per_resolver, resolver addresses, domain, and publicKey. ```plaintext socks://#name -> dnstt://?tunnel_per_resolver=4&resolver=8.8.8.8:53&resolver=8.8.4.4:53&domain=dnstt.hiddify.com&publicKey=xxxx ``` -------------------------------- ### Install native assets from build.dart Source: https://github.com/hiddify/hiddify-app/blob/main/linux/CMakeLists.txt Copies native assets provided by build.dart from all packages into the Linux bundle's library directory. Uses the NATIVE_ASSETS_DIR variable pointing to the native_assets/linux/ directory in the project build directory. ```cmake # Copy the native assets provided by the build.dart from all packages. set(NATIVE_ASSETS_DIR "${PROJECT_BUILD_DIR}native_assets/linux/") install(DIRECTORY "${NATIVE_ASSETS_DIR}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" COMPONENT Runtime) ``` -------------------------------- ### Example migration step from6To7 Source: https://github.com/hiddify/hiddify-app/blob/main/lib/core/db/README.md Adds a column using the target schema snapshot. Other ops: dropColumn, renameColumn, createTable, alterTable(TableMigration(...)). ```dart from6To7: (m, schema) async { await m.addColumn(schema.profileEntries, schema.profileEntries.pinned); }, ``` -------------------------------- ### Smart begin and end parameters Source: https://github.com/hiddify/hiddify-app/blob/main/third_party/flutter_animate/README.md Most effects have begin and end parameters that default to neutral values when unspecified. The examples show how fade uses begin=0, end=1 by default, and how specifying one parameter affects the other. ```dart // an opacity of 1 is "neutral" Text("Hello").animate().fade() // begin=0, end=1 Text("Hello").animate().fade(begin: 0.5) // end=1 Text("Hello").animate().fade(end: 0.5) // begin=1 ``` -------------------------------- ### Install AOT library on non-Debug builds Source: https://github.com/hiddify/hiddify-app/blob/main/linux/CMakeLists.txt Installs the AOT library into the bundle's library directory only when the build type is not Debug. Uses the AOT_LIBRARY variable and assigns the Runtime component. ```cmake # Install the AOT library on non-Debug builds only. if(NOT CMAKE_BUILD_TYPE MATCHES "Debug") install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" COMPONENT Runtime) endif() ``` -------------------------------- ### SwapEffect to replace widget Source: https://github.com/hiddify/hiddify-app/blob/main/third_party/flutter_animate/README.md SwapEffect swaps out the whole target widget at a specified time. This example replaces the text 'Before' with 'After' after 900ms. ```dart Text("Before").animate() .swap(duration: 900.ms, builder: (_, __) => Text("After")) ``` -------------------------------- ### ShaderEffect with GLSL shader Source: https://github.com/hiddify/hiddify-app/blob/main/third_party/flutter_animate/README.md ShaderEffect applies animated GLSL fragment shaders to widgets. This example combines a shader with a fade-in effect. ```dart myWidget.animate() .shader(duration: 2.seconds, shader: myShader) .fadeIn(duration: 300.ms) // shader can be combined with other effects ``` -------------------------------- ### SwapEffect for sequential effects Source: https://github.com/hiddify/hiddify-app/blob/main/third_party/flutter_animate/README.md SwapEffect can create sequential effects by swapping the target widget back in, effectively wiping all previous effects. This example fades out, then swaps in the original widget and fades back in. ```dart text.animate().fadeOut(300.ms) // fade out & then... // swap in original widget & fade back in via a new Animate: .swap(builder: (_, child) => child.animate().fadeIn()) ``` -------------------------------- ### Set MSSTORE_PRODUCT_ID GitHub variable Source: https://github.com/hiddify/hiddify-app/blob/main/docs/microsoft-store.md Sets the MSSTORE_PRODUCT_ID repository variable to the product's Store ID (12 characters, starts with 9). Without it, the sync workflow skips itself. No secrets are needed. ```bash gh variable set MSSTORE_PRODUCT_ID --repo hiddify/hiddify-app --body 9NXXXXXXXXXX ``` -------------------------------- ### CustomEffect without child for countdown Source: https://github.com/hiddify/hiddify-app/blob/main/third_party/flutter_animate/README.md Animate can be created without a child, so CustomEffect acts as a simplified builder. This example builds text counting down from 10 and fading out. ```dart Animate().custom( duration: 10.seconds, begin: 10, end: 0, builder: (_, value, __) => Text(value.round()), ).fadeOut() ``` -------------------------------- ### Basic Animate widget with effects Source: https://github.com/hiddify/hiddify-app/blob/main/third_party/flutter_animate/README.md Wrap a widget in Animate and specify a list of effects to apply animations. This is the primary syntax for using the library. ```dart Animate( effects: [FadeEffect(), ScaleEffect()], child: Text("Hello World!"), ) ``` -------------------------------- ### ToggleEffect with boolean builder Source: https://github.com/hiddify/hiddify-app/blob/main/third_party/flutter_animate/README.md ToggleEffect provides a boolean value that is true before the end of the effect and false after. This example toggles text based on the value. ```dart Animate().toggle( duration: 2.seconds, builder: (_, value, __) => Text(value ? "Before" : "After"), ) ``` -------------------------------- ### CustomEffect with builder for background color Source: https://github.com/hiddify/hiddify-app/blob/main/third_party/flutter_animate/README.md CustomEffect lets you build custom animated effects with a builder function that receives context, value, and child. This example adds a background behind the text and fades it from red to blue. ```dart Text("Hello World").animate().custom( duration: 300.ms, builder: (context, value, child) => Container( color: Color.lerp(Colors.red, Colors.blue, value), padding: EdgeInsets.all(8), child: child, // child is the Text widget being animated ) ) ``` -------------------------------- ### ToggleEffect to activate AnimatedContainer Source: https://github.com/hiddify/hiddify-app/blob/main/third_party/flutter_animate/README.md ToggleEffect can activate 'Animated' widgets like AnimatedContainer by toggling their values with a minimal delay. This example changes the container's color based on the boolean value. ```dart Animate().toggle( duration: 1.ms, builder: (_, value, __) => AnimatedContainer( duration: 1.seconds, color: value ? Colors.red : Colors.green, ), ) ``` -------------------------------- ### Sequence effects with ThenEffect Source: https://github.com/hiddify/hiddify-app/blob/main/third_party/flutter_animate/README.md ThenEffect establishes a new baseline time equal to the previous effect's end time plus its own delay. In this example, the slide runs 200ms after the fade ends. ```dart Text("Hello").animate() .fadeIn(duration: 600.ms) .then(delay: 200.ms) // baseline=800ms .slide() ``` -------------------------------- ### dnstt JSON config for app Source: https://github.com/hiddify/hiddify-app/blob/main/test.configs/dnstt/readme.md JSON configuration for dnstt in the app, defining a socks outbound that detours to a dnstt outbound with publicKey, domain, tunnel_per_resolver, and resolvers. ```json { "outbounds": [ { "type": "socks", "tag": "socks", "version": "5", "detour": "dnstt1§hide§" }, { "type": "dnstt", "tag": "dnstt1§hide§", "publicKey": "xxxx", "domain": "dnstt.hiddify.com", "tunnel_per_resolver": 4, "resolvers": ["8.8.8.8:53", "8.8.4.4:53"] } ] } ``` -------------------------------- ### Tint effect with color parameter Source: https://github.com/hiddify/hiddify-app/blob/main/third_party/flutter_animate/README.md Many effects have additional parameters that influence behavior, such as the tint effect's color parameter. ```dart Text('Hello').animate().tint(color: Colors.purple) ``` -------------------------------- ### Add headers to file for GitHub Source: https://github.com/hiddify/hiddify-app/wiki/URL-Scheme When you cannot modify HTTP headers (e.g., on GitHub), add headers in the first 10 lines of the file using skip characters like `//` for JSON or `#` for YAML and sub-links. The example shows supported header keys: `profile-title`, `profile-update-interval`, `subscription-userinfo`, `support-url`, and `profile-web-page-url`. The `profile-title` can be a plain string or a base64-encoded string prefixed with `base64:`. ```plaintext #profile-title: Hiddify #profile-title: base64:base64string #profile-update-interval: 1 #subscription-userinfo: upload=455727941; download=6174315083; total=1073741824000; expire=1671815872 #support-url: https://t.me/hiddify #profile-web-page-url: https://hiddify.com ``` -------------------------------- ### Repeat animation with onPlay callback Source: https://github.com/hiddify/hiddify-app/blob/main/third_party/flutter_animate/README.md Use the onPlay callback to access the AnimationController and repeat the animation in reverse. The callback receives the controller, allowing manipulation like repeat or reverse. ```dart Text("Horrible Pulsing Text") .animate(onPlay: (controller) => controller.repeat(reverse: true)) .fadeOut(curve: Curves.easeInOut) ``` -------------------------------- ### Fragment parameters in links Source: https://github.com/hiddify/hiddify-app/wiki/URL-Scheme To use Fragment in your links, include the `fragment` parameter with a value specifying size, sleep, and hellotls. The example shows a valid fragment value: `10-100,100-200,hellotls`. ```plaintext &fragment=size,sleep,hellotls ``` ```plaintext &fragment=10-100,100-200,hellotls ``` -------------------------------- ### Chainable .animate() extension method Source: https://github.com/hiddify/hiddify-app/blob/main/third_party/flutter_animate/README.md Use the .animate() extension method on any widget to wrap it in Animate, then chain effect methods like .fade() and .scale(). This shorthand style is used throughout the README. ```dart Text("Hello World!").animate().fade().scale() ``` -------------------------------- ### Inherited duration and curve Source: https://github.com/hiddify/hiddify-app/blob/main/third_party/flutter_animate/README.md When delay, duration, or curve are not specified, they are inherited from the previous effect or from Animate.defaultDuration and Animate.defaultCurve for the first effect. ```dart Text("Hello World!").animate() .fadeIn() // uses `Animate.defaultDuration` .scale() // inherits duration from fadeIn .move(delay: 300.ms, duration: 600.ms) // runs after the above w/new duration .blurXY() // inherits the delay & duration from move ``` -------------------------------- ### Deprecated URL Scheme formats Source: https://github.com/hiddify/hiddify-app/wiki/URL-Scheme Deprecated URL scheme formats for installing subscriptions, configs, and proxies. ```text hiddify://install-sub?url=# hiddify://install-config?url=# hiddify://install-proxy?url=# ``` -------------------------------- ### Animate lists with interval offset Source: https://github.com/hiddify/hiddify-app/blob/main/third_party/flutter_animate/README.md AnimateList offsets each child's animation by a specified interval. The shorthand uses the .animate() extension on a list of widgets. ```dart Column(children: AnimateList( interval: 400.ms, effects: [FadeEffect(duration: 300.ms)], children: [Text("Hello"), Text("World"), Text("Goodbye")], )) ``` ```dart // or shorthand: Column( children: [Text("Hello"), Text("World"), Text("Goodbye")] .animate(interval: 400.ms).fade(duration: 300.ms), ) ``` -------------------------------- ### Reuse shared effects globally Source: https://github.com/hiddify/hiddify-app/blob/main/third_party/flutter_animate/README.md Effect instances are immutable and can be reused, enabling a global collection of effects for design systems. Define the effects once and apply them to any widget. ```dart MyGlobalEffects.transitionIn = [ FadeEffect(duration: 100.ms, curve: Curves.easeOut), ScaleEffect(begin: 0.8, curve: Curves.easeIn) ] ``` ```dart // then: Text('Hello').animate(effects: MyGlobalEffects.transitionIn) ``` -------------------------------- ### Hysteria2 config link without relay Source: https://github.com/hiddify/hiddify-app/wiki/How-to-use-UDP-Turn-Relay Example Hysteria2 configuration link based on UDP. This is the base link to which the encoded relay parameter is appended. ```plaintext hysteria2://87543215-15ac-54f6-3895-34e4e931f5b4@45.120.34.46:11464?hiddify=1&obfs=salamander&obfs-password=bdgf!huy678559j89GrTu&sni=www.speedtest.net&insecure=1#test ``` -------------------------------- ### Listen to animation value with ListenEffect Source: https://github.com/hiddify/hiddify-app/blob/main/third_party/flutter_animate/README.md Use ListenEffect to register a callback that receives the animation value as a double. It inherits duration and curve from prior effects, and uses begin=0, end=1 by default. ```dart Text("Hello").animate().fadeIn(curve: Curves.easeOutExpo) .listen(callback: (value) => print('current opacity: $value')) ``` -------------------------------- ### Bale messenger relay parameters (unencoded) Source: https://github.com/hiddify/hiddify-app/wiki/How-to-use-UDP-Turn-Relay Example relay parameters for Bale messenger. The realm is bale.ai, host is meet-turn.bale.sh, port is 443, and credentials are balelivekit with the given password. This value must be URL-encoded before use. ```plaintext relay=urlencoded(turn://balelivekit:GygZPHQSgAV7L5L8@meet-turn.bale.sh:443?realm=bale.ai) ``` -------------------------------- ### Callback inherits delay and duration from prior effects Source: https://github.com/hiddify/hiddify-app/blob/main/third_party/flutter_animate/README.md CallbackEffect inherits the delay and duration of prior effects. Here the callback fires after the scale effect's delay and duration, printing when the scale is done. ```dart Text("Hello").animate().scale(delay: 200.ms, duration: 400.ms) .callback(callback: (_) => print('scale is done')) ``` -------------------------------- ### Animate to target value on state change Source: https://github.com/hiddify/hiddify-app/blob/main/third_party/flutter_animate/README.md Set a target value to make Animate react to state changes, animating to the new target position (0 = beginning, 1 = end). Combined with toggling _over via setState, this fades and scales the button on roll over. ```dart MyButton().animate(target: _over ? 1 : 0) .fade(end: 0.8).scaleXY(end: 1.1) ``` -------------------------------- ### Add callback halfway through fade with CallbackEffect Source: https://github.com/hiddify/hiddify-app/blob/main/third_party/flutter_animate/README.md Use CallbackEffect to add a callback at an arbitrary position in the animation. The callback inherits delay and duration from prior effects, so specifying duration 300.ms places it halfway through a 600.ms fade. ```dart Text("Hello").animate().fadeIn(duration: 600.ms) .callback(duration: 300.ms, callback: (_) => print('halfway')) ``` -------------------------------- ### Create and switch to a development branch Source: https://github.com/hiddify/hiddify-app/wiki/How-to-contribute-to-this-project Create a new branch named Hiddify-develop and switch to it for making changes. ```bash git branch Hiddify-develop git checkout Hiddify-develop ``` -------------------------------- ### Stage changes with git add Source: https://github.com/hiddify/hiddify-app/wiki/How-to-contribute-to-this-project Announce changes to git by staging them with the git add command. ```bash git add ``` -------------------------------- ### Commit changes with a description Source: https://github.com/hiddify/hiddify-app/wiki/How-to-contribute-to-this-project Commit the staged changes with a short description of the change. ```bash git commit -m "a short description of the change" ``` -------------------------------- ### Define application executable target Source: https://github.com/hiddify/hiddify-app/blob/main/linux/CMakeLists.txt Creates the executable target for the application using BINARY_NAME and lists the source files: main.cc, my_application.cc, and the generated plugin registrant. ```cmake add_executable(${BINARY_NAME} "main.cc" "my_application.cc" "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" ) ``` -------------------------------- ### Run HiddifyNext with root privilege on Linux (sudo command) Source: https://github.com/hiddify/hiddify-app/wiki/How-to-use-HiddifyNext-app Open the terminal and execute the following command to run the program with root privilege. If the program is in a different path, change the command accordingly. ```bash sudo ~/Downloads/hiddify-linux-x64.AppImage ``` -------------------------------- ### Apply standard settings to application target Source: https://github.com/hiddify/hiddify-app/blob/main/linux/CMakeLists.txt Calls the apply_standard_settings function on the application target to apply the standard build settings. ```cmake apply_standard_settings(${BINARY_NAME}) ``` -------------------------------- ### Check executable permission on Linux AppImage Source: https://github.com/hiddify/hiddify-app/wiki/How-to-install-HiddifyNext-app Run this command after downloading and extracting the HiddifyNext AppImage to verify it has execute permission. The expected output is a line like 'rwxr-xr-x 1 user user 26272960 Sep 30 07:55 ~/Downloads/hiddify-linux-x64.AppImage'. ```bash ls -la ~/Downloads/hiddify-linux-x64.AppImage ``` -------------------------------- ### Regenerate main code with build_runner Source: https://github.com/hiddify/hiddify-app/blob/main/lib/core/db/README.md Run after adding the migration step to regenerate generated files. ```sh dart run build_runner build --delete-conflicting-outputs ``` -------------------------------- ### Include generated plugin build rules Source: https://github.com/hiddify/hiddify-app/blob/main/linux/CMakeLists.txt Includes the generated CMake file that manages building plugins and adding them to the application. ```cmake include(flutter/generated_plugins.cmake) ``` -------------------------------- ### Push changes to GitHub Source: https://github.com/hiddify/hiddify-app/wiki/How-to-contribute-to-this-project Push the committed changes to GitHub. You will be prompted for your GitHub username and password. ```bash git push ``` -------------------------------- ### Run migration tests Source: https://github.com/hiddify/hiddify-app/blob/main/lib/core/db/README.md The 'simple migrations' group auto-tests every version pair. Add data-integrity tests only when a step transforms existing data. ```sh flutter test test/drift/db/migration_test.dart ``` -------------------------------- ### Find GTK package with PkgConfig Source: https://github.com/hiddify/hiddify-app/blob/main/linux/CMakeLists.txt Finds the PkgConfig package and uses it to locate the GTK+ 3.0 library as an imported target. ```cmake find_package(PkgConfig REQUIRED) pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) ``` -------------------------------- ### Run Flutter app on a device Source: https://github.com/hiddify/hiddify-app/blob/main/CONTRIBUTING.md Use this command to build and run the app on a selected device. The optional --device-id flag specifies a particular device from the flutter devices output. ```shell flutter run # or flutter run --device-id=35492ae2 ``` -------------------------------- ### Store videos on orphan branch Source: https://github.com/hiddify/hiddify-app/blob/main/AGENTS.md Bash commands to create an orphan branch named 'screenshots', add a worktree, copy webp files, commit, and push. The branch is created once and reused for all PR video folders. ```bash wt=$(mktemp -d) git fetch origin screenshots 2>/dev/null git worktree add $wt origin/screenshots 2>/dev/null || { git worktree add --detach $wt && git -C $wt switch --orphan screenshots; } mkdir -p $wt/ && cp