From 2a81865263c7c2190889181d9d1fe36841e8daba Mon Sep 17 00:00:00 2001 From: root Date: Fri, 11 Sep 2026 19:30:48 +0800 Subject: [PATCH 1/6] feat: add IPv6 address support for wireless ADB connection IPv6 addresses contain colons which conflict with the IP:port format. Auto-detect IPv6 addresses and wrap them in brackets: [ipv6]:port This allows FreeControl to connect to devices via IPv6 addresses like [240e:438:b307:d43c:9cb9:db73:a3bb:375e]:5555 --- FreeControl/Main.cs | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/FreeControl/Main.cs b/FreeControl/Main.cs index 4e61af6..e3d70a5 100644 --- a/FreeControl/Main.cs +++ b/FreeControl/Main.cs @@ -425,7 +425,13 @@ private void StartButtonClick(object sender, EventArgs e) // 无线访问 if (_Setting.UseWireless) { - StartParameters.Add($"--tcpip={_Setting.IPAddress}:{_Setting.Port}"); + string address = _Setting.IPAddress; + // IPv6 地址需要用方括号包裹,否则冒号会和端口分隔符混淆 + if (address.Contains(":") && !address.StartsWith("[")) + { + address = $"[{address}]"; + } + StartParameters.Add($"--tcpip={address}:{_Setting.Port}"); ADBConnectFunc.BeginInvoke(ADBConnectCallback, ADBConnectFunc); } else @@ -445,9 +451,13 @@ private void StartButtonClick(object sender, EventArgs e) /// private readonly Func ADBConnectFunc = () => { - // 不再验证adb连接状态 - // return ADB.Execute($"connect {_Setting.IPAddress}:{_Setting.Port}"); - return string.Empty; + // IPv6 地址需要用方括号包裹 + string address = _Setting.IPAddress; + if (address.Contains(":") && !address.StartsWith("[")) + { + address = $"[{address}]"; + } + return ADB.Execute($"connect {address}:{_Setting.Port}"); }; /// From bcec311f5454525d0b60a2b6d6da0363fd4c13de Mon Sep 17 00:00:00 2001 From: root Date: Fri, 11 Sep 2026 19:31:40 +0800 Subject: [PATCH 2/6] ci: add GitHub Actions build workflow --- .github/workflows/build.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..3081820 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,30 @@ +name: Build FreeControl + +on: + push: + branches: [ ipv6-support ] + workflow_dispatch: + +jobs: + build: + runs-on: windows-latest + steps: + - uses: actions/checkout@v4 + + - name: Setup MSBuild + uses: microsoft/setup-msbuild@v2 + + - name: Setup NuGet + uses: NuGet/setup-nuget@v2 + + - name: Restore NuGet packages + run: nuget restore FreeControl.sln + + - name: Build + run: msbuild FreeControl.sln /p:Configuration=Release /p:Platform=x86 + + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: FreeControl-IPv6 + path: FreeControl/bin/Release/FreeControl.exe From 572d60c3f8572d3dce6a8e9675399ff1723e3f47 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 11 Sep 2026 19:36:24 +0800 Subject: [PATCH 3/6] ci: fix platform config to Any CPU --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3081820..5f046ba 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,10 +21,10 @@ jobs: run: nuget restore FreeControl.sln - name: Build - run: msbuild FreeControl.sln /p:Configuration=Release /p:Platform=x86 + run: msbuild FreeControl.sln /p:Configuration=Release /p:Platform="Any CPU" - name: Upload artifact uses: actions/upload-artifact@v4 with: name: FreeControl-IPv6 - path: FreeControl/bin/Release/FreeControl.exe + path: FreeControl/bin/Release/ From 820e239180d1309a49314db189f2d0c512e853bc Mon Sep 17 00:00:00 2001 From: root Date: Fri, 11 Sep 2026 22:50:57 +0800 Subject: [PATCH 4/6] docs: add IPv6 support section to README --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 60b83ca..f38480e 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,18 @@ https://github.com/pdone/FreeControl/releases/latest/download/FreeControl.exe https://cdn.awaw.cc/gh/pdone/FreeControl/releases/latest/download/FreeControl.exe +## IPv6 支持 + +本 Fork 版本新增了 IPv6 地址支持,适用于仅有 IPv6 公网地址的 Android 设备(如车载车机等)。 + +- 无线连接时自动检测 IPv6 地址,用方括号 `[ipv6]:port` 格式传递给 ADB 和 scrcpy +- IPv4 地址保持原有行为不变 +- 使用方式:在 FreeControl 设置中直接填写 IPv6 地址(如 `240e:438:xxxx:xxxx::1`)或 IPv6 域名(如 `byd.car.example.com`),端口填 `5555` + +### 下载 + +[GitHub Release (IPv6)](https://github.com/lzw981731/FreeControl/releases/latest) + ## 代码存储库 [![](https://img.shields.io/badge/github-Free_Control-blue?style=for-the-badge&logo=github)](https://github.com/pdone/FreeControl) From 87a3895ef028171caba6507531cc01fe15e26717 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 11 Sep 2026 23:00:47 +0800 Subject: [PATCH 5/6] docs: update all links to lzw981731/FreeControl fork, add IPv6 section to English README --- README.en.md | 34 +++++++++++++++++++++++----------- README.md | 22 +++++++++++----------- 2 files changed, 34 insertions(+), 22 deletions(-) diff --git a/README.en.md b/README.en.md index 770ddb8..1059444 100644 --- a/README.en.md +++ b/README.en.md @@ -1,14 +1,14 @@ # FreeControl -[![](https://img.shields.io/github/actions/workflow/status/pdone/FreeControl/build-and-release.yml?style=for-the-badge)](https://github.com/pdone/FreeControl/actions/workflows/build-and-release.yml) -[![](https://img.shields.io/github/release/pdone/FreeControl?style=for-the-badge)](https://github.com/pdone/FreeControl/releases/latest) -[![](https://img.shields.io/github/downloads/pdone/FreeControl/total?style=for-the-badge)](https://github.com/pdone/FreeControl/releases) -[![](https://img.shields.io/github/stars/pdone/FreeControl?style=for-the-badge)](https://github.com/pdone/FreeControl) -[![](https://img.shields.io/github/issues/pdone/FreeControl?style=for-the-badge)](https://github.com/pdone/FreeControl/issues) +[![](https://img.shields.io/github/actions/workflow/status/lzw981731/FreeControl/build-and-release.yml?style=for-the-badge)](https://github.com/lzw981731/FreeControl/actions/workflows/build-and-release.yml) +[![](https://img.shields.io/github/release/lzw981731/FreeControl?style=for-the-badge)](https://github.com/lzw981731/FreeControl/releases/latest) +[![](https://img.shields.io/github/downloads/lzw981731/FreeControl/total?style=for-the-badge)](https://github.com/lzw981731/FreeControl/releases) +[![](https://img.shields.io/github/stars/lzw981731/FreeControl?style=for-the-badge)](https://github.com/lzw981731/FreeControl) +[![](https://img.shields.io/github/issues/lzw981731/FreeControl?style=for-the-badge)](https://github.com/lzw981731/FreeControl/issues) ## Introduction -[ English | [中文](https://github.com/pdone/FreeControl/blob/master/README.md) ] +[ English | [中文](https://github.com/lzw981731/FreeControl/blob/master/README.md) ] Based on the open source project [**scrcpy**](https://github.com/Genymobile/scrcpy), it provides a simple interactive interface. @@ -27,19 +27,31 @@ Based on the open source project [**scrcpy**](https://github.com/Genymobile/scrc ## Download ### GitHub Release -https://github.com/pdone/FreeControl/releases/latest/download/FreeControl.exe +https://github.com/lzw981731/FreeControl/releases/latest/download/FreeControl.exe ### My Proxy -https://cdn.awaw.cc/gh/pdone/FreeControl/releases/latest/download/FreeControl.exe +https://cdn.awaw.cc/gh/lzw981731/FreeControl/releases/latest/download/FreeControl.exe + +## IPv6 Support + +This fork adds IPv6 address support, suitable for Android devices with only IPv6 public addresses (e.g., car headunits). + +- Automatically detects IPv6 addresses in wireless connection mode, wrapping them in brackets `[ipv6]:port` for ADB and scrcpy +- IPv4 addresses work as before, no changes needed +- Usage: Enter an IPv6 address (e.g., `240e:438:xxxx:xxxx::1`) or IPv6 domain (e.g., `byd.car.example.com`) in FreeControl settings, port `5555` + +### Download + +[GitHub Release (IPv6)](https://github.com/lzw981731/FreeControl/releases/latest) ## Code Repository -[![](https://img.shields.io/badge/github-Free_Control-blue?style=for-the-badge&logo=github)](https://github.com/pdone/FreeControl) +[![](https://img.shields.io/badge/github-Free_Control-blue?style=for-the-badge&logo=github)](https://github.com/lzw981731/FreeControl) ## Update Record -[![](https://img.shields.io/badge/updete-record-fedcba?style=for-the-badge)](https://github.com/pdone/FreeControl/blob/master/FreeControl/Update.en.md) +[![](https://img.shields.io/badge/updete-record-fedcba?style=for-the-badge)](https://github.com/lzw981731/FreeControl/blob/master/FreeControl/Update.en.md) ## FAQ @@ -220,4 +232,4 @@ If you think this project is helpful, please invite the author to have a cup of [![Donate](https://img.shields.io/badge/Donate-PayPal-blue.svg?style=for-the-badge)](https://paypal.me/alexpdone) ## Stargazers Over Time -[![Stargazers over time](https://starchart.cc/pdone/FreeControl.svg?variant=adaptive)](https://starchart.cc/pdone/FreeControl) +[![Stargazers over time](https://starchart.cc/lzw981731/FreeControl.svg?variant=adaptive)](https://starchart.cc/lzw981731/FreeControl) diff --git a/README.md b/README.md index f38480e..17efc9e 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,14 @@ # FreeControl -[![](https://img.shields.io/github/actions/workflow/status/pdone/FreeControl/build-and-release.yml?style=for-the-badge)](https://github.com/pdone/FreeControl/actions/workflows/build-and-release.yml) -[![](https://img.shields.io/github/release/pdone/FreeControl?style=for-the-badge)](https://github.com/pdone/FreeControl/releases/latest) -[![](https://img.shields.io/github/downloads/pdone/FreeControl/total?style=for-the-badge)](https://github.com/pdone/FreeControl/releases) -[![](https://img.shields.io/github/stars/pdone/FreeControl?style=for-the-badge)](https://github.com/pdone/FreeControl) -[![](https://img.shields.io/github/issues/pdone/FreeControl?style=for-the-badge)](https://github.com/pdone/FreeControl/issues) +[![](https://img.shields.io/github/actions/workflow/status/lzw981731/FreeControl/build-and-release.yml?style=for-the-badge)](https://github.com/lzw981731/FreeControl/actions/workflows/build-and-release.yml) +[![](https://img.shields.io/github/release/lzw981731/FreeControl?style=for-the-badge)](https://github.com/lzw981731/FreeControl/releases/latest) +[![](https://img.shields.io/github/downloads/lzw981731/FreeControl/total?style=for-the-badge)](https://github.com/lzw981731/FreeControl/releases) +[![](https://img.shields.io/github/stars/lzw981731/FreeControl?style=for-the-badge)](https://github.com/lzw981731/FreeControl) +[![](https://img.shields.io/github/issues/lzw981731/FreeControl?style=for-the-badge)](https://github.com/lzw981731/FreeControl/issues) ## 介绍 -[ 中文 | [English](https://github.com/pdone/FreeControl/blob/master/README.en.md) ] +[ 中文 | [English](https://github.com/lzw981731/FreeControl/blob/master/README.en.md) ] 基于开源项目[**scrcpy**](https://github.com/Genymobile/scrcpy),提供简洁的交互界面。 @@ -27,11 +27,11 @@ ## 下载 ### GitHub Release -https://github.com/pdone/FreeControl/releases/latest/download/FreeControl.exe +https://github.com/lzw981731/FreeControl/releases/latest/download/FreeControl.exe ### My Proxy -https://cdn.awaw.cc/gh/pdone/FreeControl/releases/latest/download/FreeControl.exe +https://cdn.awaw.cc/gh/lzw981731/FreeControl/releases/latest/download/FreeControl.exe ## IPv6 支持 @@ -47,11 +47,11 @@ https://cdn.awaw.cc/gh/pdone/FreeControl/releases/latest/download/FreeControl.ex ## 代码存储库 -[![](https://img.shields.io/badge/github-Free_Control-blue?style=for-the-badge&logo=github)](https://github.com/pdone/FreeControl) +[![](https://img.shields.io/badge/github-Free_Control-blue?style=for-the-badge&logo=github)](https://github.com/lzw981731/FreeControl) ## 更新记录 -[![](https://img.shields.io/badge/updete-record-fedcba?style=for-the-badge)](https://github.com/pdone/FreeControl/blob/master/FreeControl/Update.md) +[![](https://img.shields.io/badge/updete-record-fedcba?style=for-the-badge)](https://github.com/lzw981731/FreeControl/blob/master/FreeControl/Update.md) ## 常见问题 @@ -264,4 +264,4 @@ Android 11 及更高版本支持使用 Android 调试桥 (adb) 从工作站以 ## Stargazers Over Time -[![Stargazers over time](https://starchart.cc/pdone/FreeControl.svg?variant=adaptive)](https://starchart.cc/pdone/FreeControl) +[![Stargazers over time](https://starchart.cc/lzw981731/FreeControl.svg?variant=adaptive)](https://starchart.cc/lzw981731/FreeControl) From 8a5576b4845c5dcbef6bd53ae7f733fc7dacd6ac Mon Sep 17 00:00:00 2001 From: root Date: Fri, 11 Sep 2026 23:02:50 +0800 Subject: [PATCH 6/6] docs: remove donation section --- README.en.md | 6 ------ README.md | 11 ----------- 2 files changed, 17 deletions(-) diff --git a/README.en.md b/README.en.md index 1059444..7d4885b 100644 --- a/README.en.md +++ b/README.en.md @@ -225,11 +225,5 @@ Audio forwarding is supported on devices using 'Android 11 'or higher and is ena - For `Android 11` , you need to make sure that the device screen is unlocked when starting scrcpy. The fake pop-up window will appear briefly, making the system think that the shell application is in the foreground. Without this, audio capture will fail. - For `Android 10` or earlier, audio cannot be captured and is automatically disabled. -## Donate - -If you think this project is helpful, please invite the author to have a cup of coffee.☕ - -[![Donate](https://img.shields.io/badge/Donate-PayPal-blue.svg?style=for-the-badge)](https://paypal.me/alexpdone) - ## Stargazers Over Time [![Stargazers over time](https://starchart.cc/lzw981731/FreeControl.svg?variant=adaptive)](https://starchart.cc/lzw981731/FreeControl) diff --git a/README.md b/README.md index 17efc9e..60bd196 100644 --- a/README.md +++ b/README.md @@ -252,16 +252,5 @@ Android 11 及更高版本支持使用 Android 调试桥 (adb) 从工作站以 - 对于 `Android 11` ,您需要确保在启动scrcpy时设备屏幕已解锁。假的弹出窗口将短暂出现,使系统认为shell应用程序处于前台。没有这个,音频捕获将失败。 - 对于 `Android 10` 或更早版本,无法捕获音频并自动禁用。 -## 捐赠 -如果您觉得这个项目对您有帮助,欢迎请作者喝杯咖啡。☕ - -
-展开 - -![](https://raw.githubusercontent.com/pdone/static/master/img/donate/zfb_wx.jpg) - -爱发电❤ https://afdian.net/a/pdone -
- ## Stargazers Over Time [![Stargazers over time](https://starchart.cc/lzw981731/FreeControl.svg?variant=adaptive)](https://starchart.cc/lzw981731/FreeControl)