Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -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="Any CPU"

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: FreeControl-IPv6
path: FreeControl/bin/Release/
18 changes: 14 additions & 4 deletions FreeControl/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -445,9 +451,13 @@ private void StartButtonClick(object sender, EventArgs e)
/// </summary>
private readonly Func<string> 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}");
};

/// <summary>
Expand Down
40 changes: 23 additions & 17 deletions README.en.md
Original file line number Diff line number Diff line change
@@ -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.

Expand All @@ -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

Expand Down Expand Up @@ -213,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/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)
45 changes: 23 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -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),提供简洁的交互界面。

Expand All @@ -27,19 +27,31 @@
## 下载
### 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 支持

本 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)
[![](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)

## 常见问题

Expand Down Expand Up @@ -240,16 +252,5 @@ Android 11 及更高版本支持使用 Android 调试桥 (adb) 从工作站以
- 对于 `Android 11` ,您需要确保在启动scrcpy时设备屏幕已解锁。假的弹出窗口将短暂出现,使系统认为shell应用程序处于前台。没有这个,音频捕获将失败。
- 对于 `Android 10` 或更早版本,无法捕获音频并自动禁用。

## 捐赠
如果您觉得这个项目对您有帮助,欢迎请作者喝杯咖啡。☕

<details>
<summary>展开</summary>

![](https://raw.githubusercontent.com/pdone/static/master/img/donate/zfb_wx.jpg)

爱发电❤ https://afdian.net/a/pdone
</details>

## 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)