mirror of
https://github.com/SagerNet/sing-box.git
synced 2026-04-14 04:38:28 +10:00
Fix naiveproxy build
This commit is contained in:
@@ -24,9 +24,25 @@ icon: material/new-box
|
||||
}
|
||||
```
|
||||
|
||||
!!! warning ""
|
||||
!!! warning "Platform Support"
|
||||
|
||||
NaiveProxy outbound is only available on Apple platforms, Android, Windows and some Linux architectures, see [Build from source](/installation/build-from-source/#with_naive_outbound).
|
||||
NaiveProxy outbound is only available on Apple platforms, Android, Windows and certain Linux builds.
|
||||
|
||||
**Official Release Build Variants:**
|
||||
|
||||
| Build Variant | Platforms | Description |
|
||||
|---------------|-----------|-------------|
|
||||
| (default) | Linux amd64/arm64 | purego build with `libcronet.so` included |
|
||||
| `-glibc` | Linux 386/amd64/arm/arm64 | CGO build dynamically linked with glibc, requires glibc >= 2.31 |
|
||||
| `-musl` | Linux 386/amd64/arm/arm64 | CGO build statically linked with musl, no system requirements |
|
||||
| (default) | Windows amd64/arm64 | purego build with `libcronet.dll` included |
|
||||
|
||||
**Runtime Requirements:**
|
||||
|
||||
- **Linux purego**: `libcronet.so` must be in the same directory as the sing-box binary or in system library path
|
||||
- **Windows**: `libcronet.dll` must be in the same directory as `sing-box.exe` or in a directory listed in `PATH`
|
||||
|
||||
For self-built binaries, see [Build from source](/installation/build-from-source/#with_naive_outbound).
|
||||
|
||||
### Fields
|
||||
|
||||
|
||||
@@ -24,9 +24,25 @@ icon: material/new-box
|
||||
}
|
||||
```
|
||||
|
||||
!!! warning ""
|
||||
!!! warning "平台支持"
|
||||
|
||||
NaiveProxy 出站仅在 Apple 平台、Android、Windows 和部分架构的 Linux 上可用,参阅 [从源代码构建](/zh/installation/build-from-source/#with_naive_outbound)。
|
||||
NaiveProxy 出站仅在 Apple 平台、Android、Windows 和特定 Linux 构建上可用。
|
||||
|
||||
**官方发布版本区别:**
|
||||
|
||||
| 构建变体 | 平台 | 说明 |
|
||||
|-----------|------------------------|------------------------------------------|
|
||||
| (默认) | Linux amd64/arm64 | purego 构建,包含 `libcronet.so` |
|
||||
| `-glibc` | Linux 386/amd64/arm/arm64 | CGO 构建,动态链接 glibc,要求 glibc >= 2.31 |
|
||||
| `-musl` | Linux 386/amd64/arm/arm64 | CGO 构建,静态链接 musl,无系统要求 |
|
||||
| (默认) | Windows amd64/arm64 | purego 构建,包含 `libcronet.dll` |
|
||||
|
||||
**运行时要求:**
|
||||
|
||||
- **Linux purego**:`libcronet.so` 必须位于 sing-box 二进制文件相同目录或系统库路径中
|
||||
- **Windows**:`libcronet.dll` 必须位于 `sing-box.exe` 相同目录或 `PATH` 中的任意目录
|
||||
|
||||
自行构建请参阅 [从源代码构建](/zh/installation/build-from-source/#with_naive_outbound)。
|
||||
|
||||
### 字段
|
||||
|
||||
|
||||
@@ -68,26 +68,34 @@ NaiveProxy outbound requires special build configurations depending on your targ
|
||||
|
||||
### Supported Platforms
|
||||
|
||||
| Platform | Architectures | Mode | Requirements |
|
||||
|-----------------|--------------------|--------|--------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| Windows | * | purego | None |
|
||||
| Linux | amd64, arm64 | purego | Download libcronet from [cronet-go releases](https://github.com/sagernet/cronet-go/releases) to system library path or sing-box binary directory |
|
||||
| Linux | 386, amd64, arm, arm64 | CGO | Chromium toolchain (see [cronet-go](https://github.com/sagernet/cronet-go)) |
|
||||
| Apple platforms | * | CGO | Xcode |
|
||||
| Android | * | CGO | Android NDK |
|
||||
| Platform | Architectures | Mode | Requirements |
|
||||
|-----------------|------------------------|--------|---------------------------------------------------|
|
||||
| Linux | amd64, arm64 | purego | None (library included in official releases) |
|
||||
| Linux | 386, amd64, arm, arm64 | CGO | Chromium toolchain, glibc >= 2.31 at runtime |
|
||||
| Linux (musl) | 386, amd64, arm, arm64 | CGO | Chromium toolchain |
|
||||
| Windows | amd64, arm64 | purego | None (library included in official releases) |
|
||||
| Apple platforms | * | CGO | Xcode |
|
||||
| Android | * | CGO | Android NDK |
|
||||
|
||||
### Windows
|
||||
|
||||
Use `with_purego` tag.
|
||||
|
||||
For official releases, `libcronet.dll` is included in the archive. For self-built binaries, download from [cronet-go releases](https://github.com/sagernet/cronet-go/releases) and place in the same directory as `sing-box.exe` or in a directory listed in `PATH`.
|
||||
|
||||
### Linux (purego, amd64/arm64 only)
|
||||
|
||||
Download `libcronet.so` from [cronet-go releases](https://github.com/sagernet/cronet-go/releases) and install to system library path or the same directory as sing-box binary, then use `with_purego` tag.
|
||||
Use `with_purego` tag.
|
||||
|
||||
For official releases, `libcronet.so` is included in the archive. For self-built binaries, download from [cronet-go releases](https://github.com/sagernet/cronet-go/releases) and place in the same directory as sing-box binary or in system library path.
|
||||
|
||||
### Linux (CGO)
|
||||
|
||||
See [cronet-go](https://github.com/sagernet/cronet-go#linux-build-instructions).
|
||||
|
||||
- **glibc build**: Requires glibc >= 2.31 at runtime
|
||||
- **musl build**: Use `with_musl` tag, statically linked, no runtime requirements
|
||||
|
||||
### Apple platforms / Android
|
||||
|
||||
See [cronet-go](https://github.com/sagernet/cronet-go).
|
||||
|
||||
@@ -72,26 +72,34 @@ NaiveProxy 出站需要根据目标平台进行特殊的构建配置。
|
||||
|
||||
### 支持的平台
|
||||
|
||||
| 平台 | 架构 | 模式 | 要求 |
|
||||
|---------------|----------------------|--------|---------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| Windows | * | purego | 无 |
|
||||
| Linux | amd64, arm64 | purego | 从 [cronet-go releases](https://github.com/sagernet/cronet-go/releases) 下载 libcronet 到系统库目录或 sing-box 二进制文件相同目录 |
|
||||
| Linux | 386, amd64, arm, arm64 | CGO | Chromium 工具链(参阅 [cronet-go](https://github.com/sagernet/cronet-go)) |
|
||||
| Apple 平台 | * | CGO | Xcode |
|
||||
| Android | * | CGO | Android NDK |
|
||||
| 平台 | 架构 | 模式 | 要求 |
|
||||
|---------------|------------------------|--------|--------------------------------|
|
||||
| Linux | amd64, arm64 | purego | 无(官方发布版本已包含库文件) |
|
||||
| Linux | 386, amd64, arm, arm64 | CGO | Chromium 工具链,运行时需要 glibc >= 2.31 |
|
||||
| Linux (musl) | 386, amd64, arm, arm64 | CGO | Chromium 工具链 |
|
||||
| Windows | amd64, arm64 | purego | 无(官方发布版本已包含库文件) |
|
||||
| Apple 平台 | * | CGO | Xcode |
|
||||
| Android | * | CGO | Android NDK |
|
||||
|
||||
### Windows
|
||||
|
||||
使用 `with_purego` 标记。
|
||||
|
||||
官方发布版本已包含 `libcronet.dll`。自行构建时,从 [cronet-go releases](https://github.com/sagernet/cronet-go/releases) 下载并放置在 `sing-box.exe` 相同目录或 `PATH` 中的任意目录。
|
||||
|
||||
### Linux (purego, 仅 amd64/arm64)
|
||||
|
||||
从 [cronet-go releases](https://github.com/sagernet/cronet-go/releases) 下载 `libcronet.so` 并安装到系统库目录或 sing-box 二进制文件相同目录,然后使用 `with_purego` 标记。
|
||||
使用 `with_purego` 标记。
|
||||
|
||||
官方发布版本已包含 `libcronet.so`。自行构建时,从 [cronet-go releases](https://github.com/sagernet/cronet-go/releases) 下载并放置在 sing-box 二进制文件相同目录或系统库路径中。
|
||||
|
||||
### Linux (CGO)
|
||||
|
||||
参阅 [cronet-go](https://github.com/sagernet/cronet-go#linux-build-instructions)。
|
||||
|
||||
- **glibc 构建**:运行时需要 glibc >= 2.31
|
||||
- **musl 构建**:使用 `with_musl` 标记,静态链接,无运行时要求
|
||||
|
||||
### Apple 平台 / Android
|
||||
|
||||
参阅 [cronet-go](https://github.com/sagernet/cronet-go)。
|
||||
|
||||
Reference in New Issue
Block a user