From a543842f6661d2222008b6d6325819e35bf6514c Mon Sep 17 00:00:00 2001 From: endotrizine Date: Wed, 29 Jul 2026 10:04:42 +0500 Subject: [PATCH 01/14] add flake --- flake.nix | 133 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 flake.nix diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000000..31f6a66b7d --- /dev/null +++ b/flake.nix @@ -0,0 +1,133 @@ +{ + description = "A fork of the multi-platform proxy client FlClash, based on original Mihomo Core, simple and easy to use, open source and ad-free."; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + flake-utils.url = "github:numtide/flake-utils"; + }; + + outputs = + { + self, + nixpkgs, + flake-utils, + }: + flake-utils.lib.eachDefaultSystem ( + system: + let + pkgs = import nixpkgs { inherit system; }; + + version = "0.4.2"; + + src = pkgs.lib.cleanSource ./.; + + flclashCore = pkgs.buildGoModule { + pname = "flclashx-core"; + inherit version src; + + modRoot = "core"; + + vendorHash = "sha256-BsFT/KrD8SX3edFtipK/eaJvVopvOCmTiw+Ydh+oa0s="; + + env = { + CGO_ENABLED = "0"; + }; + + buildPhase = '' + runHook preBuild + + go build \ + -tags=with_gvisor \ + -trimpath \ + -ldflags="-w -s -X github.com/metacubex/mihomo/constant.Version=${version}" \ + -o FlClashCore . + + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + + install -Dm755 FlClashCore $out/bin/FlClashCore + + runHook postInstall + ''; + + doCheck = false; + }; + + flclashx = pkgs.flutter.buildFlutterApplication { + pname = "flclashx"; + inherit version src; + + pubspecLock = builtins.fromJSON ( + builtins.readFile ( + pkgs.runCommand "pubspec.lock.json" { } '' + ${pkgs.yq-go}/bin/yq -o=json ${./pubspec.lock} > $out + '' + ) + ); + + gitHashes = { + flutter_js = "sha256-4PgiUL7aBnWVOmz2bcSxKt81BRVMnopabj5LDbtPYk4="; + }; + + preBuild = '' + mkdir -p libclash/linux + cp ${flclashCore}/bin/FlClashCore libclash/linux/FlClashCore + ''; + + nativeBuildInputs = with pkgs; [ + pkg-config + wrapGAppsHook3 + ]; + + buildInputs = with pkgs; [ + gtk3 + glib + gdk-pixbuf + cairo + pango + atk + harfbuzz + libepoxy + libayatana-appindicator + keybinder3 + libX11 + libXcursor + libXrandr + libXinerama + libXi + ]; + + meta = with pkgs.lib; { + homepage = "https://github.com/pluralplay/FlClashX"; + license = licenses.gpl3Only; + mainProgram = "FlClashX"; + platforms = platforms.linux; + }; + }; + in + { + packages = rec { + default = flclashx; + inherit flclashx; + flclashx-core = flclashCore; + }; + + devShells.default = pkgs.mkShell { + inputsFrom = [ flclashx ]; + nativeBuildInputs = with pkgs; [ + flutter + go + yq-go + ]; + }; + } + ) + // { + overlays.default = final: prev: { + flclashx = self.packages.${final.system}.flclashx; + }; + }; +} From 2b743fb4651ee51a3cd870907e648b6937580ead Mon Sep 17 00:00:00 2001 From: endotrizine Date: Wed, 29 Jul 2026 10:05:05 +0500 Subject: [PATCH 02/14] add flake lock --- flake.lock | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 flake.lock diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000000..bdd5c20973 --- /dev/null +++ b/flake.lock @@ -0,0 +1,61 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1785090369, + "narHash": "sha256-m0pDuRJG7EDo9ri+4Ksu83VsI+PlxNC9lNBfydejce4=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "624af665418d3c65d544145b4d34ad696439570e", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} From 779aebbc89a25ea382ae5de03ee98c93bf82bb91 Mon Sep 17 00:00:00 2001 From: endotrizine Date: Wed, 29 Jul 2026 10:06:18 +0500 Subject: [PATCH 03/14] add nix workflow --- .github/workflows/nix.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/workflows/nix.yaml diff --git a/.github/workflows/nix.yaml b/.github/workflows/nix.yaml new file mode 100644 index 0000000000..6ccef4adcb --- /dev/null +++ b/.github/workflows/nix.yaml @@ -0,0 +1,15 @@ +name: "Nix Build" + +on: + pull_request: + push: + branches: [main, master] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: DeterminateSystems/nix-installer-action@v12 + - uses: DeterminateSystems/magic-nix-cache-action@v8 + - run: nix build From 9b9406ad62c77c50deb7b62af1afc49b1c590b91 Mon Sep 17 00:00:00 2001 From: endotrizine <53936918+endotrizine@users.noreply.github.com> Date: Wed, 29 Jul 2026 10:18:57 +0500 Subject: [PATCH 04/14] Add workflow_dispatch trigger to Nix Build --- .github/workflows/nix.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/nix.yaml b/.github/workflows/nix.yaml index 6ccef4adcb..436142f986 100644 --- a/.github/workflows/nix.yaml +++ b/.github/workflows/nix.yaml @@ -1,6 +1,7 @@ name: "Nix Build" on: + workflow_dispatch: pull_request: push: branches: [main, master] From b3d7a338c9d41da4aacb8571a75cfacfb33d68e1 Mon Sep 17 00:00:00 2001 From: endotrizine <53936918+endotrizine@users.noreply.github.com> Date: Wed, 29 Jul 2026 10:44:24 +0500 Subject: [PATCH 05/14] Add NixOS support section to README --- README.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/README.md b/README.md index 9d7cdcc5be..9c589b0cbc 100644 --- a/README.md +++ b/README.md @@ -398,6 +398,36 @@ proxy-groups: sudo apt-get install libkeybinder-3.0-dev ``` +### ❄️ NixOS + +Добавьте репозиторий в `inputs` флейка и подключите оверлей: + +`flake.nix` +```nix +{ + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + flclashx.url = "github:pluralplay/FlClashX"; + }; + + outputs = { self, nixpkgs, flclashx, ... }: { + nixosConfigurations.myhostname = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + { + # Оверлей + nixpkgs.overlays = [ flclashx.overlays.default ]; + + # Установка пакета + environment.systemPackages = [ pkgs.flclashx ]; + } + ]; + }; + }; +} +``` + + ### Android Поддерживаются следующие действия: @@ -423,3 +453,4 @@ proxy-groups: Если хотите поддержать копеечкой, то можно сделать это тут.

**TON USDT:** `UQDSfrJ_k1BdsknhdR_zj4T3Is3OdMylD8PnDJ9mxO35i-TE` + From 7b2de7695a3aa7be873fed178a576129cbdc3a8b Mon Sep 17 00:00:00 2001 From: endotrizine <53936918+endotrizine@users.noreply.github.com> Date: Wed, 29 Jul 2026 10:44:44 +0500 Subject: [PATCH 06/14] Add NixOS setup instructions to README --- README_EN.md | 374 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 374 insertions(+) diff --git a/README_EN.md b/README_EN.md index 3c6d9ac44b..39a4276ae0 100644 --- a/README_EN.md +++ b/README_EN.md @@ -315,6 +315,380 @@ By default, the following configuration parameters received from the subscriptio sudo apt-get install libkeybinder-3.0-dev ``` +### ❄️ NixOS + +Add the repository to your flake's `inputs` and apply the overlay: + +`flake.nix` + +```nix +{ + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + flclashx.url = "github:pluralplay/FlClashX"; + }; + + outputs = { self, nixpkgs, flclashx, ... }: { + nixosConfigurations.myhostname = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + { + # Overlay + nixpkgs.overlays = [ flclashx.overlays.default ]; + + # Install the package + environment.systemPackages = [ pkgs.flclashx ]; + } + ]; + }; + }; +} + +``` + +### Android + +The following actions are supported: + +```bash + com.follow.clashx.action.START + + com.follow.clashx.action.STOP + + com.follow.clashx.action.CHANGE +``` + +## Download + +Get it on GitHub +Get it on Obtanium + +## Star + +

+The easiest way to support the developers is to click the star (⭐) at the top of the page.
+If you want to support with a small donation, you can do so here. +

+ +**TON USDT:** `UQDSfrJ_k1BdsknhdR_zj4T3Is3OdMylD8PnDJ9mxO35i-TE` +
+ +[**Russian**](README.md) + +
+ +## FlClashX + +[![Downloads](https://img.shields.io/github/downloads/pluralplay/FlClashX/total?style=flat-square&logo=github)](https://github.com/pluralplay/FlClashX/releases/) +[![Last Version](https://img.shields.io/github/release/pluralplay/FlClashX/all.svg?style=flat-square)](https://github.com/pluralplay/FlClashX/releases/) +[![License](https://img.shields.io/github/license/pluralplay/FlClashX?style=flat-square)](LICENSE) + +[![Channel](https://img.shields.io/badge/Telegram-Chat-blue?style=flat-square&logo=telegram)](https://t.me/FlClashX) + +A fork of the multi-platform proxy client FlClash based on ClashMeta, simple and easy to use, open source and ad-free. + +on Desktop: + +

+ desktop +

+ +on Mobile: + +

+ mobile +

+ +## Added Functionality + +🛠️ Fixed default settings: process search mode on, TUN mode on, system proxy mode off, proxy list display mode set to 'list', changed camera behavior when adding a subscription via QR. + +📱 **Android 120Hz Display Support:** Added support for high refresh rate displays (120Hz) on Android devices for smoother animations and scrolling. + +🗑️ **Clear Application Data:** Added "Clear Data" button in Application Settings that removes all profiles from the profiles folder. Useful for troubleshooting or resetting the application. + +🇷🇺 Added Russian language to the installer and redesigned the localization in the application. + +✈️ Transmit HWID to the panel (Works only with Remnawave). + +💻 Added a new "Announcements" widget. It transmits announcements from the panel to the widget. (Works only with Remnawave). + +📺 Optimized controls for Android TV: + +- Added a "Paste" button to the menu for adding a subscription via a link. +- Added a profile selection button. +- Added the ability to transfer a profile from the mobile app via a QR code. + +🪪 Redesigned the profile card: + +- Uses a traffic volume indicator with color change (not displayed if traffic is unlimited). +- Displays subscription expiration date (if the year is 2099, it displays "Your subscription is permanent"). +- Added a new "Support" button in the profile, which pulls the supportUrl from the panel. +- The autoupdateinterval parameter for the profile is now correctly transmitted from the panel. + +🪪 +- Added "Meta-Info" widget. Transmits subscription parameters to the widget: remaining traffic, subscription expiration date, profile name, and prominently displays days remaining until subscription expires (3 days before expiration). +- Added "serviceInfo" widget. Displays your service name. You can additionally pass the `flclashx-servicelogo` header for a custom logo (supports svg/png links), and clicking opens the support link (supportURL). +- Added "changeServerButton" widget. Clicking redirects to the proxy page. + +🌐 Added parsing of custom headers from the subscription page: + +- flclashx-widgets: arranges widgets in the order received from the subscription. + + | Value | Name widget | + | :------------------: | ----------------------------------------------------------- | + | `announce` | Announce Badge | + | `networkSpeed` | Network speed | + | `outboundModeV2` | Proxy mode (new type) | + | `outboundMode` | Proxy mode (old type) | + | `trafficUsage` | Traffic usage | + | `networkDetection` | Determining location and IP | + | `tunButton` | TUN button (Desktop only) | + | `vpnButton` | VPN button (Android only) | + | `systemProxyButton` | System Proxy Button (Desktop only) | + | `intranetIp` | Local IP-Address | + | `memoryInfo` | Memory usage | + | `metainfo` | Profile information | + | `changeServerButton` | Change server button | + | `serviceInfo` | Service information (only with header flclashx-servicename) | + +Usage: + +```bash + flclashx-widgets: announce,metainfo,outboundModeV2,networkDetection +``` + +- flclashx-view: Configures the appearance of the proxy page obtained from the subscription. + +| Value | Description | Possible values | +| :------: | ----------------------------- | --------------------------------- | +| `type` | Display mode | `list`,`tab` | +| `sort` | Sorting type | `none`,`delay`,`name` | +| `layout` | Layout | `loose`,`standard`,`tight` | +| `icon` | Icon style (for list display) | `none`,`icon` | +| `card` | Card size | `expand`,`shrink`,`min`,`oneline` | + +Usage: + +```bash + flclashx-view: type:list; sort:delay; layout:tight; icon:icon; card:shrink +``` + +- flclashx-custom: Controls the application of styles for Dashboard and ProxyView. + +| Value | Description | +| :------: | ------------------------------------------------------------ | +| `add` | Styles are applied only when the subscription is first added | +| `update` | Styles are applied every time the subscription is updated | + +Usage: + +```bash + flclashx-custom: update +``` + +- flclashx-denywidgets: When set to true, editing the Dashboard page is disabled. Accepts true/false. + +Usage: + +```bash + flclashx-denywidgets: true +``` + +- flclashx-servicename: Your service name displayed in the ServiceInfo widget. + +Usage: + +```bash + flclashx-servicename: FlClashX +``` + +- flclashx-servicelogo: Your logo used in the ServiceInfo widget (works only with active flclashx-servicename header). Supports png/svg. + +Usage: + +```bash + flclashx-servicelogo: https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/remnawave.svg +``` + +- flclashx-serverinfo: Proxy group name to display in the ChangeServerButton widget. The widget shows the active server from the specified group with country flag, ping, and a quick switch button. + +**Displayed elements:** + - Country flag (automatically extracted from serverDescription or proxy name) + - Active server name + - Current ping with color indication (green < 600ms, orange >= 600ms, red - timeout) + - Quick navigation button to proxy page + +Usage: + +```bash + flclashx-serverinfo: Proxy +``` + +- flclashx-background: Sets a custom background image for the application. Provide a direct link to an image. Optionally append a comma and a transparency (visibility) value from 1 to 100 (higher = more visible image; omit it for the default dimmed look). + +**Image Recommendations:** + - Format: PNG, JPG, or WebP + - Resolution: 1920x1080 or higher for desktop, 1080x1920 for mobile + - File size: Keep under 2MB for better performance + - Content: Use images with subtle patterns or gradients; avoid too bright or busy images + - Contrast: Ensure good readability of text over the background + +Usage: + +```bash + flclashx-background: https://example.com/background.jpg + # with transparency (1-100, higher = more visible background): + flclashx-background: https://example.com/background.jpg,30 +``` + +- flclashx-settings: Manage application settings via header (with client-side override option). By default, all parameters are **disabled**. If you pass a parameter, it will be **enabled**. If you don't pass it - it stays **disabled**. + +| Parameter | Description | Default | +| :-----------: | ------------------------------------------------ | :----------: | +| `minimize` | Minimize application on exit instead of closing | ❌ Disabled | +| `autorun` | Launch application on system startup | ❌ Disabled | +| `shadowstart` | Launch application minimized to tray | ❌ Disabled | +| `autostart` | Automatically start proxy on application launch | ❌ Disabled | +| `autoupdate` | Automatically check for application updates | ❌ Disabled | +| `openlogs` | Enable logging (the "Logs" tab and core log stream) | ❌ Disabled | +|`closeconnections`| Drop active connections when switching proxy/mode | ❌ Disabled | + +> Note: `closeconnections` is enabled by default in the app itself, but when `flclashx-settings` is used the state is set explicitly — if you don't pass the token, the option will be disabled. + +**Client-side override:** Users can enable "Override provider settings" in Application Settings to apply their local configuration instead of subscription settings. The matching toggles in settings (including "Logs" and "Close connections") are editable only when "Override provider settings" is enabled. + +Usage: + +```bash + flclashx-settings: minimize, autorun, shadowstart, autostart, autoupdate, openlogs, closeconnections +``` + +- flclashx-globalmode: When set to `false`, hides all proxy-mode controls from the client (tray, proxies page, mode-switch widgets). + +Usage: + +```bash + flclashx-globalmode: false +``` + +- flclashx-hex: Configures the app theme — primary color, scheme variant, and an optional "pure black" mode via `pureblack`. Variants: `tonalSpot`, `fidelity`, `monochrome`, `neutral`, `vibrant`, `expressive`, `content`, `rainbow`, `fruitSalad`. + +Usage: + +```bash + flclashx-hex: FF5733 + flclashx-hex: FF5733:vibrant + flclashx-hex: FF5733:vibrant:pureblack +``` + +Parameters can also be used separately: + +```bash + flclashx-hex: FF5733 + flclashx-hex: vibrant + flclashx-hex: pureblack +``` + +- flclashx-androidsecure: Forces `mixed-port: 0` on Android devices only, even when a port (e.g. 7890) is active in the config. + +Usage: + +```bash + flclashx-androidsecure: true +``` + +- flclashx-newboard: When `true`, enables the new home screen instead of the widget grid: a large logo and service name, a traffic/expiry card, an active-server panel (flag, IP, ping) with a fan of available locations, a connect button, and the bottom navigation. Widget editing is hidden in this mode. Users can enable the same look locally via the "New look" setting. + +Usage: + +```bash + flclashx-newboard: true +``` + +- flclashx-newdomain: Subscription domain migration. If the value differs from the current host of the profile link, on the next update the client automatically replaces the host in the subscription URL with the given one (path and query are preserved). Useful for moving the subscription page to a new domain without users reinstalling the profile. + +Usage: + +```bash + flclashx-newdomain: new.example.com +``` + +- flclashx-buyplan: Direct subscription purchase/renewal link. The "Renew subscription" button appears under the traffic card on the new dashboard (`flclashx-newboard`) only when less than 3 days remain until expiry (including already-expired subscriptions). Tapping it opens the given link. + +Usage: + +```bash + flclashx-buyplan: https://example.com/pay +``` + +- flclashx-buytraffic: Direct extra-traffic purchase link. The "Buy traffic" button appears under the traffic card on the new dashboard (`flclashx-newboard`) only when less than 10% of the traffic limit remains. When both triggers fire (`flclashx-buyplan` and `flclashx-buytraffic`), the buttons are shown in one row. + +Usage: + +```bash + flclashx-buytraffic: https://example.com/buy-traffic +``` + +### YAML keys in the config + +These keys are set directly in the subscription's YAML config (in the `proxy-groups` section), not in HTTP response headers. + +- flclashx-override (inside the GLOBAL group): Set inside the `GLOBAL` proxy-group. With `flclashx-override: true` the client uses this group's proxy list and order as a "curated GLOBAL": in Global mode the Proxies screen shows only the `GLOBAL` group with exactly these entries in this order, and the service groups (used by rule mode) are hidden. Without the flag the behavior is unchanged — `GLOBAL` is auto-built by the core from all groups. + +Usage: + +```yaml +proxy-groups: + - name: GLOBAL + flclashx-override: true + type: select + proxies: + - 🎲 Any available + - 🔓 No VPN + - 🌍 Main VPN + - 🇩🇪 Germany + - 🇫🇮 Finland +``` + +- description (on any proxy-group): A custom subtitle for the group on the Proxies screen. By default the group's type (Selector/URLTest/Fallback…) or the currently selected node is shown under its name; setting `description` displays the given text instead. Handy for clearer labels on nested groups. + +Usage: + +```yaml +proxy-groups: + - name: 🌍 Main VPN + type: select + description: Auto-pick the best location + proxies: + - 🇩🇪 Germany + - 🇫🇮 Finland +``` + +### Configuration Settings Override + +By default, the following configuration parameters received from the subscription are **not overridden** by the client: + +- `allow-lan` - Allow LAN connections +- `ipv6` - Enable IPv6 support +- `find-process-mode` - Process search mode +- `tun-stack` - TUN mode network stack +- `mixed-port` - Mixed port for HTTP/SOCKS proxy + +**Client-side override:** Users can enable "Override provider settings" or "Override network settings" in Application Settings to apply their local configuration instead of subscription settings. This is useful when you need custom network settings. + +## Application Usage + +### Linux + +⚠️ Before use, ensure the following dependencies are installed: + +```bash + sudo apt-get install libayatana-appindicator3-dev + sudo apt-get install libkeybinder-3.0-dev +``` + ### Android The following actions are supported: From 37bbc3972198d7415dd29c79b91e4b63074ea3b6 Mon Sep 17 00:00:00 2001 From: endotrizine <53936918+endotrizine@users.noreply.github.com> Date: Wed, 29 Jul 2026 10:54:20 +0500 Subject: [PATCH 07/14] Update NixOS readme --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 9c589b0cbc..abfbfaa840 100644 --- a/README.md +++ b/README.md @@ -407,6 +407,7 @@ proxy-groups: { inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + # Новый инпут flclashx.url = "github:pluralplay/FlClashX"; }; From 05d9e2ed0ae4f185dc7ad9ee91838af67b2d23ed Mon Sep 17 00:00:00 2001 From: endotrizine <53936918+endotrizine@users.noreply.github.com> Date: Wed, 29 Jul 2026 10:54:38 +0500 Subject: [PATCH 08/14] Update NixOS readme --- README_EN.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README_EN.md b/README_EN.md index 39a4276ae0..8fb007e148 100644 --- a/README_EN.md +++ b/README_EN.md @@ -325,6 +325,7 @@ Add the repository to your flake's `inputs` and apply the overlay: { inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + # New input flclashx.url = "github:pluralplay/FlClashX"; }; From 0d14e98f71346c000455438b39979cb6af950c0f Mon Sep 17 00:00:00 2001 From: endotrizine <53936918+endotrizine@users.noreply.github.com> Date: Wed, 29 Jul 2026 11:06:38 +0500 Subject: [PATCH 09/14] add hash maintenance guide --- flake.nix | 45 ++++++++++++++++++++------------------------- 1 file changed, 20 insertions(+), 25 deletions(-) diff --git a/flake.nix b/flake.nix index 31f6a66b7d..589e217edd 100644 --- a/flake.nix +++ b/flake.nix @@ -1,11 +1,9 @@ { description = "A fork of the multi-platform proxy client FlClash, based on original Mihomo Core, simple and easy to use, open source and ad-free."; - inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; flake-utils.url = "github:numtide/flake-utils"; }; - outputs = { self, @@ -19,47 +17,53 @@ version = "0.4.2"; + # ========================================================== + # ХЕШИ — обновляются при апдейте зависимостей. + # При hash mismatch: поставь pkgs.lib.fakeHash в нужное поле, + # собери, вставь сюда значение из строки "got:" в ошибке. + # ========================================================== + + # Меняется когда меняется core/go.sum + vendorHash = "sha256-BsFT/KrD8SX3edFtipK/eaJvVopvOCmTiw+Ydh+oa0s="; + + # Меняется когда меняется pubspec.lock (git-зависимости). + # Ключ = имя пакета из pubspec.lock (source: git). + # Новую git-зависимость -> добавить новую строку сюда. + gitHashes = { + flutter_js = "sha256-4PgiUL7aBnWVOmz2bcSxKt81BRVMnopabj5LDbtPYk4="; + }; + + # ========================================================== + src = pkgs.lib.cleanSource ./.; flclashCore = pkgs.buildGoModule { pname = "flclashx-core"; - inherit version src; - + inherit version src vendorHash; modRoot = "core"; - - vendorHash = "sha256-BsFT/KrD8SX3edFtipK/eaJvVopvOCmTiw+Ydh+oa0s="; - env = { CGO_ENABLED = "0"; }; - buildPhase = '' runHook preBuild - go build \ -tags=with_gvisor \ -trimpath \ -ldflags="-w -s -X github.com/metacubex/mihomo/constant.Version=${version}" \ -o FlClashCore . - runHook postBuild ''; - installPhase = '' runHook preInstall - install -Dm755 FlClashCore $out/bin/FlClashCore - runHook postInstall ''; - doCheck = false; }; flclashx = pkgs.flutter.buildFlutterApplication { pname = "flclashx"; - inherit version src; - + inherit version src gitHashes; pubspecLock = builtins.fromJSON ( builtins.readFile ( pkgs.runCommand "pubspec.lock.json" { } '' @@ -67,21 +71,14 @@ '' ) ); - - gitHashes = { - flutter_js = "sha256-4PgiUL7aBnWVOmz2bcSxKt81BRVMnopabj5LDbtPYk4="; - }; - preBuild = '' mkdir -p libclash/linux cp ${flclashCore}/bin/FlClashCore libclash/linux/FlClashCore ''; - nativeBuildInputs = with pkgs; [ pkg-config wrapGAppsHook3 ]; - buildInputs = with pkgs; [ gtk3 glib @@ -99,7 +96,6 @@ libXinerama libXi ]; - meta = with pkgs.lib; { homepage = "https://github.com/pluralplay/FlClashX"; license = licenses.gpl3Only; @@ -114,7 +110,6 @@ inherit flclashx; flclashx-core = flclashCore; }; - devShells.default = pkgs.mkShell { inputsFrom = [ flclashx ]; nativeBuildInputs = with pkgs; [ From 72d483d9e334ec4d93f54e0e3240779610a31c7e Mon Sep 17 00:00:00 2001 From: endotrizine <53936918+endotrizine@users.noreply.github.com> Date: Wed, 29 Jul 2026 11:20:53 +0500 Subject: [PATCH 10/14] Improve comments on hash mismatch handling Updated comments for clarity on hash management in Nix. --- flake.nix | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/flake.nix b/flake.nix index 589e217edd..6d6156a1fb 100644 --- a/flake.nix +++ b/flake.nix @@ -19,16 +19,27 @@ # ========================================================== # ХЕШИ — обновляются при апдейте зависимостей. - # При hash mismatch: поставь pkgs.lib.fakeHash в нужное поле, - # собери, вставь сюда значение из строки "got:" в ошибке. + # + # 1. vendorHash - для Go-модулей. Ломается когда меняется go.sum. + # 2. gitHashes.flutter_js - для Flutter. Ломается когда меняется + # pubspec.lock и там есть пакет с source: git. + # + # Как чинить hash mismatch: + # 1. Смотрите в error - там всегда есть строка `got: sha256-...` + # 2. Копируете именно это значение (не `specified:`, это старое) + # 3. Вставляете сюда на нужное место: + # - ошибка про ...-go-modules... -> vendorHash + # - ошибка про ...-flutter_js-source... (или + # другое имя пакета) -> gitHashes."имя_пакета" + # 4. Пересобираете. Если вылезла новая ошибка - то же самое для неё. + # + # Чтобы не угадывать по названию - можно сразу временно поставить + # pkgs.lib.fakeHash вместо строки с хешем, собрать, и Nix сразу + # выдаст реальный хеш взамен фейкового. Всё это видно в логах + # воркфлоу, оттуда и брать хеши. # ========================================================== - # Меняется когда меняется core/go.sum vendorHash = "sha256-BsFT/KrD8SX3edFtipK/eaJvVopvOCmTiw+Ydh+oa0s="; - - # Меняется когда меняется pubspec.lock (git-зависимости). - # Ключ = имя пакета из pubspec.lock (source: git). - # Новую git-зависимость -> добавить новую строку сюда. gitHashes = { flutter_js = "sha256-4PgiUL7aBnWVOmz2bcSxKt81BRVMnopabj5LDbtPYk4="; }; From df9ac03bcaed4396beae1fc95effdaec8ce95e44 Mon Sep 17 00:00:00 2001 From: endotrizine <53936918+endotrizine@users.noreply.github.com> Date: Wed, 29 Jul 2026 11:21:23 +0500 Subject: [PATCH 11/14] Clean up comments in flake.nix Removed comments regarding hash updates and management. --- flake.nix | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/flake.nix b/flake.nix index 6d6156a1fb..d46874b000 100644 --- a/flake.nix +++ b/flake.nix @@ -17,26 +17,7 @@ version = "0.4.2"; - # ========================================================== - # ХЕШИ — обновляются при апдейте зависимостей. - # - # 1. vendorHash - для Go-модулей. Ломается когда меняется go.sum. - # 2. gitHashes.flutter_js - для Flutter. Ломается когда меняется - # pubspec.lock и там есть пакет с source: git. - # - # Как чинить hash mismatch: - # 1. Смотрите в error - там всегда есть строка `got: sha256-...` - # 2. Копируете именно это значение (не `specified:`, это старое) - # 3. Вставляете сюда на нужное место: - # - ошибка про ...-go-modules... -> vendorHash - # - ошибка про ...-flutter_js-source... (или - # другое имя пакета) -> gitHashes."имя_пакета" - # 4. Пересобираете. Если вылезла новая ошибка - то же самое для неё. - # - # Чтобы не угадывать по названию - можно сразу временно поставить - # pkgs.lib.fakeHash вместо строки с хешем, собрать, и Nix сразу - # выдаст реальный хеш взамен фейкового. Всё это видно в логах - # воркфлоу, оттуда и брать хеши. + # HASHES # ========================================================== vendorHash = "sha256-BsFT/KrD8SX3edFtipK/eaJvVopvOCmTiw+Ydh+oa0s="; From 312f349ca8d71f16866f7616b69a374711ede717 Mon Sep 17 00:00:00 2001 From: endotrizine <53936918+endotrizine@users.noreply.github.com> Date: Wed, 29 Jul 2026 11:25:13 +0500 Subject: [PATCH 12/14] remove hardcoded version --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index d46874b000..5f134838ce 100644 --- a/flake.nix +++ b/flake.nix @@ -15,7 +15,7 @@ let pkgs = import nixpkgs { inherit system; }; - version = "0.4.2"; + version = self.shortRev or self.dirtyShortRev or "unknown"; # HASHES # ========================================================== From 065a3110c0728143880ea44da4b81e4f7276efdb Mon Sep 17 00:00:00 2001 From: endotrizine <53936918+endotrizine@users.noreply.github.com> Date: Thu, 30 Jul 2026 00:07:46 +0500 Subject: [PATCH 13/14] remove accidental duplication --- README_EN.md | 336 --------------------------------------------------- 1 file changed, 336 deletions(-) diff --git a/README_EN.md b/README_EN.md index 8fb007e148..843c81aaa5 100644 --- a/README_EN.md +++ b/README_EN.md @@ -379,340 +379,4 @@ If you want to support with a small donation, you can - desktop -

- -on Mobile: - -

- mobile -

- -## Added Functionality - -🛠️ Fixed default settings: process search mode on, TUN mode on, system proxy mode off, proxy list display mode set to 'list', changed camera behavior when adding a subscription via QR. - -📱 **Android 120Hz Display Support:** Added support for high refresh rate displays (120Hz) on Android devices for smoother animations and scrolling. - -🗑️ **Clear Application Data:** Added "Clear Data" button in Application Settings that removes all profiles from the profiles folder. Useful for troubleshooting or resetting the application. - -🇷🇺 Added Russian language to the installer and redesigned the localization in the application. - -✈️ Transmit HWID to the panel (Works only with
Remnawave). - -💻 Added a new "Announcements" widget. It transmits announcements from the panel to the widget. (Works only with Remnawave). - -📺 Optimized controls for Android TV: - -- Added a "Paste" button to the menu for adding a subscription via a link. -- Added a profile selection button. -- Added the ability to transfer a profile from the mobile app via a QR code. - -🪪 Redesigned the profile card: - -- Uses a traffic volume indicator with color change (not displayed if traffic is unlimited). -- Displays subscription expiration date (if the year is 2099, it displays "Your subscription is permanent"). -- Added a new "Support" button in the profile, which pulls the supportUrl from the panel. -- The autoupdateinterval parameter for the profile is now correctly transmitted from the panel. - -🪪 -- Added "Meta-Info" widget. Transmits subscription parameters to the widget: remaining traffic, subscription expiration date, profile name, and prominently displays days remaining until subscription expires (3 days before expiration). -- Added "serviceInfo" widget. Displays your service name. You can additionally pass the `flclashx-servicelogo` header for a custom logo (supports svg/png links), and clicking opens the support link (supportURL). -- Added "changeServerButton" widget. Clicking redirects to the proxy page. - -🌐 Added parsing of custom headers from the subscription page: - -- flclashx-widgets: arranges widgets in the order received from the subscription. - - | Value | Name widget | - | :------------------: | ----------------------------------------------------------- | - | `announce` | Announce Badge | - | `networkSpeed` | Network speed | - | `outboundModeV2` | Proxy mode (new type) | - | `outboundMode` | Proxy mode (old type) | - | `trafficUsage` | Traffic usage | - | `networkDetection` | Determining location and IP | - | `tunButton` | TUN button (Desktop only) | - | `vpnButton` | VPN button (Android only) | - | `systemProxyButton` | System Proxy Button (Desktop only) | - | `intranetIp` | Local IP-Address | - | `memoryInfo` | Memory usage | - | `metainfo` | Profile information | - | `changeServerButton` | Change server button | - | `serviceInfo` | Service information (only with header flclashx-servicename) | - -Usage: - -```bash - flclashx-widgets: announce,metainfo,outboundModeV2,networkDetection -``` - -- flclashx-view: Configures the appearance of the proxy page obtained from the subscription. - -| Value | Description | Possible values | -| :------: | ----------------------------- | --------------------------------- | -| `type` | Display mode | `list`,`tab` | -| `sort` | Sorting type | `none`,`delay`,`name` | -| `layout` | Layout | `loose`,`standard`,`tight` | -| `icon` | Icon style (for list display) | `none`,`icon` | -| `card` | Card size | `expand`,`shrink`,`min`,`oneline` | - -Usage: - -```bash - flclashx-view: type:list; sort:delay; layout:tight; icon:icon; card:shrink -``` - -- flclashx-custom: Controls the application of styles for Dashboard and ProxyView. - -| Value | Description | -| :------: | ------------------------------------------------------------ | -| `add` | Styles are applied only when the subscription is first added | -| `update` | Styles are applied every time the subscription is updated | - -Usage: - -```bash - flclashx-custom: update -``` - -- flclashx-denywidgets: When set to true, editing the Dashboard page is disabled. Accepts true/false. - -Usage: - -```bash - flclashx-denywidgets: true -``` - -- flclashx-servicename: Your service name displayed in the ServiceInfo widget. - -Usage: - -```bash - flclashx-servicename: FlClashX -``` - -- flclashx-servicelogo: Your logo used in the ServiceInfo widget (works only with active flclashx-servicename header). Supports png/svg. - -Usage: - -```bash - flclashx-servicelogo: https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/remnawave.svg -``` - -- flclashx-serverinfo: Proxy group name to display in the ChangeServerButton widget. The widget shows the active server from the specified group with country flag, ping, and a quick switch button. - -**Displayed elements:** - - Country flag (automatically extracted from serverDescription or proxy name) - - Active server name - - Current ping with color indication (green < 600ms, orange >= 600ms, red - timeout) - - Quick navigation button to proxy page - -Usage: - -```bash - flclashx-serverinfo: Proxy -``` - -- flclashx-background: Sets a custom background image for the application. Provide a direct link to an image. Optionally append a comma and a transparency (visibility) value from 1 to 100 (higher = more visible image; omit it for the default dimmed look). - -**Image Recommendations:** - - Format: PNG, JPG, or WebP - - Resolution: 1920x1080 or higher for desktop, 1080x1920 for mobile - - File size: Keep under 2MB for better performance - - Content: Use images with subtle patterns or gradients; avoid too bright or busy images - - Contrast: Ensure good readability of text over the background - -Usage: - -```bash - flclashx-background: https://example.com/background.jpg - # with transparency (1-100, higher = more visible background): - flclashx-background: https://example.com/background.jpg,30 -``` - -- flclashx-settings: Manage application settings via header (with client-side override option). By default, all parameters are **disabled**. If you pass a parameter, it will be **enabled**. If you don't pass it - it stays **disabled**. - -| Parameter | Description | Default | -| :-----------: | ------------------------------------------------ | :----------: | -| `minimize` | Minimize application on exit instead of closing | ❌ Disabled | -| `autorun` | Launch application on system startup | ❌ Disabled | -| `shadowstart` | Launch application minimized to tray | ❌ Disabled | -| `autostart` | Automatically start proxy on application launch | ❌ Disabled | -| `autoupdate` | Automatically check for application updates | ❌ Disabled | -| `openlogs` | Enable logging (the "Logs" tab and core log stream) | ❌ Disabled | -|`closeconnections`| Drop active connections when switching proxy/mode | ❌ Disabled | - -> Note: `closeconnections` is enabled by default in the app itself, but when `flclashx-settings` is used the state is set explicitly — if you don't pass the token, the option will be disabled. - -**Client-side override:** Users can enable "Override provider settings" in Application Settings to apply their local configuration instead of subscription settings. The matching toggles in settings (including "Logs" and "Close connections") are editable only when "Override provider settings" is enabled. - -Usage: - -```bash - flclashx-settings: minimize, autorun, shadowstart, autostart, autoupdate, openlogs, closeconnections -``` - -- flclashx-globalmode: When set to `false`, hides all proxy-mode controls from the client (tray, proxies page, mode-switch widgets). - -Usage: - -```bash - flclashx-globalmode: false -``` - -- flclashx-hex: Configures the app theme — primary color, scheme variant, and an optional "pure black" mode via `pureblack`. Variants: `tonalSpot`, `fidelity`, `monochrome`, `neutral`, `vibrant`, `expressive`, `content`, `rainbow`, `fruitSalad`. - -Usage: - -```bash - flclashx-hex: FF5733 - flclashx-hex: FF5733:vibrant - flclashx-hex: FF5733:vibrant:pureblack -``` - -Parameters can also be used separately: - -```bash - flclashx-hex: FF5733 - flclashx-hex: vibrant - flclashx-hex: pureblack -``` - -- flclashx-androidsecure: Forces `mixed-port: 0` on Android devices only, even when a port (e.g. 7890) is active in the config. - -Usage: - -```bash - flclashx-androidsecure: true -``` - -- flclashx-newboard: When `true`, enables the new home screen instead of the widget grid: a large logo and service name, a traffic/expiry card, an active-server panel (flag, IP, ping) with a fan of available locations, a connect button, and the bottom navigation. Widget editing is hidden in this mode. Users can enable the same look locally via the "New look" setting. - -Usage: - -```bash - flclashx-newboard: true -``` - -- flclashx-newdomain: Subscription domain migration. If the value differs from the current host of the profile link, on the next update the client automatically replaces the host in the subscription URL with the given one (path and query are preserved). Useful for moving the subscription page to a new domain without users reinstalling the profile. - -Usage: - -```bash - flclashx-newdomain: new.example.com -``` - -- flclashx-buyplan: Direct subscription purchase/renewal link. The "Renew subscription" button appears under the traffic card on the new dashboard (`flclashx-newboard`) only when less than 3 days remain until expiry (including already-expired subscriptions). Tapping it opens the given link. - -Usage: - -```bash - flclashx-buyplan: https://example.com/pay -``` - -- flclashx-buytraffic: Direct extra-traffic purchase link. The "Buy traffic" button appears under the traffic card on the new dashboard (`flclashx-newboard`) only when less than 10% of the traffic limit remains. When both triggers fire (`flclashx-buyplan` and `flclashx-buytraffic`), the buttons are shown in one row. - -Usage: - -```bash - flclashx-buytraffic: https://example.com/buy-traffic -``` - -### YAML keys in the config - -These keys are set directly in the subscription's YAML config (in the `proxy-groups` section), not in HTTP response headers. - -- flclashx-override (inside the GLOBAL group): Set inside the `GLOBAL` proxy-group. With `flclashx-override: true` the client uses this group's proxy list and order as a "curated GLOBAL": in Global mode the Proxies screen shows only the `GLOBAL` group with exactly these entries in this order, and the service groups (used by rule mode) are hidden. Without the flag the behavior is unchanged — `GLOBAL` is auto-built by the core from all groups. - -Usage: - -```yaml -proxy-groups: - - name: GLOBAL - flclashx-override: true - type: select - proxies: - - 🎲 Any available - - 🔓 No VPN - - 🌍 Main VPN - - 🇩🇪 Germany - - 🇫🇮 Finland -``` - -- description (on any proxy-group): A custom subtitle for the group on the Proxies screen. By default the group's type (Selector/URLTest/Fallback…) or the currently selected node is shown under its name; setting `description` displays the given text instead. Handy for clearer labels on nested groups. - -Usage: - -```yaml -proxy-groups: - - name: 🌍 Main VPN - type: select - description: Auto-pick the best location - proxies: - - 🇩🇪 Germany - - 🇫🇮 Finland -``` - -### Configuration Settings Override - -By default, the following configuration parameters received from the subscription are **not overridden** by the client: - -- `allow-lan` - Allow LAN connections -- `ipv6` - Enable IPv6 support -- `find-process-mode` - Process search mode -- `tun-stack` - TUN mode network stack -- `mixed-port` - Mixed port for HTTP/SOCKS proxy - -**Client-side override:** Users can enable "Override provider settings" or "Override network settings" in Application Settings to apply their local configuration instead of subscription settings. This is useful when you need custom network settings. - -## Application Usage - -### Linux - -⚠️ Before use, ensure the following dependencies are installed: - -```bash - sudo apt-get install libayatana-appindicator3-dev - sudo apt-get install libkeybinder-3.0-dev -``` - -### Android - -The following actions are supported: - -```bash - com.follow.clashx.action.START - - com.follow.clashx.action.STOP - - com.follow.clashx.action.CHANGE -``` - -## Download - -Get it on GitHub -Get it on Obtanium - -## Star - -

-The easiest way to support the developers is to click the star (⭐) at the top of the page.
-If you want to support with a small donation, you can do so here. -

- **TON USDT:** `UQDSfrJ_k1BdsknhdR_zj4T3Is3OdMylD8PnDJ9mxO35i-TE` From 95aa8421793b33c18867e24205d44b8a1d738cf2 Mon Sep 17 00:00:00 2001 From: endotrizine <53936918+endotrizine@users.noreply.github.com> Date: Thu, 30 Jul 2026 00:08:47 +0500 Subject: [PATCH 14/14] fix readme --- README_EN.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README_EN.md b/README_EN.md index 843c81aaa5..e70cff56c3 100644 --- a/README_EN.md +++ b/README_EN.md @@ -378,5 +378,3 @@ If you want to support with a small donation, you can