documentation: Update installation

This commit is contained in:
世界 2023-07-26 12:36:51 +08:00
parent ffe515d0e0
commit 1e31d26e03
No known key found for this signature in database
GPG key ID: CD109927C34A63C4
10 changed files with 124 additions and 5 deletions

View file

@ -5,7 +5,7 @@ Experimental iOS client for sing-box.
#### Requirements #### Requirements
* iOS 15.0+ * iOS 15.0+
* macOS 12.0+ with Apple Silicon * An Apple account outside of mainland China
#### Download #### Download

View file

@ -5,7 +5,7 @@
#### 要求 #### 要求
* iOS 15.0+ * iOS 15.0+
* macOS 12.0+ with Apple Silicon * 一个非中国大陆地区的 Apple 账号
#### 下载 #### 下载

View file

@ -5,12 +5,19 @@ Experimental macOS client for sing-box.
#### Requirements #### Requirements
* macOS 13.0+ * macOS 13.0+
* An Apple account outside of mainland China (App Store Version)
#### Download #### Download (App Store Version)
* [AppStore](https://apps.apple.com/us/app/sing-box/id6451272673) * [AppStore](https://apps.apple.com/us/app/sing-box/id6451272673)
* [TestFlight](https://testflight.apple.com/join/AcqO44FH) * [TestFlight](https://testflight.apple.com/join/AcqO44FH)
#### Download (Independent Version)
* [GitHub Release](https://github.com/SagerNet/sing-box/releases/latest)
* Homebrew (Cask): `brew install sfm`
* Homebrew (Tap): `brew tap sagernet/sing-box && brew install sagernet/sing-box/sfm`
#### Note #### Note
* User Agent in remote profile request is `SFM/$version ($version_code; sing-box $sing_box_version)` * User Agent in remote profile request is `SFM/$version ($version_code; sing-box $sing_box_version)`
@ -18,5 +25,5 @@ Experimental macOS client for sing-box.
#### Privacy policy #### Privacy policy
* SFI did not collect or share personal data. * SFM did not collect or share personal data.
* The data generated by the software is always on your device. * The data generated by the software is always on your device.

View file

@ -5,12 +5,19 @@
#### 要求 #### 要求
* macOS 13.0+ * macOS 13.0+
* 一个非中国大陆地区的 Apple 账号 (商店版本)
#### 下载 #### 下载 (商店版本)
* [AppStore](https://apps.apple.com/us/app/sing-box/id6451272673) * [AppStore](https://apps.apple.com/us/app/sing-box/id6451272673)
* [TestFlight](https://testflight.apple.com/join/AcqO44FH) * [TestFlight](https://testflight.apple.com/join/AcqO44FH)
#### 下载 (独立版本)
* [GitHub Release](https://github.com/SagerNet/sing-box/releases/latest)
* Homebrew (Cask): `brew install sfm`
* Homebrew (Tap): `brew tap sagernet/sing-box && brew install sagernet/sing-box/sfm`
#### 注意事项 #### 注意事项
* 远程配置文件请求中的 User Agent 为 `SFM/$version ($version_code; sing-box $sing_box_version)` * 远程配置文件请求中的 User Agent 为 `SFM/$version ($version_code; sing-box $sing_box_version)`

View file

@ -0,0 +1,25 @@
# Specification
## Profile
Profile defines a sing-box configuration with metadata in a GUI client.
## Profile Types
### Local
Create a empty configuration or import from a local file.
### iCloud (on Apple platforms)
Create a new configuration or use an existing configuration on iCloud.
### Remote
Use a remote URL as the configuration source, with HTTP basic authentication and automatic update support.
#### URL specification
```
sing-box://import-remote-profile?url=urlEncodedURL#urlEncodedName
```

View file

@ -0,0 +1,7 @@
# Android
## Termux
```shell
pkg add sing-box
```

View file

@ -0,0 +1,14 @@
# macOS
## Homebrew (core)
```shell
brew install sing-box
```
## Homebrew (Tap)
```shell
brew tap sagernet/sing-box
brew install sagernet/sing-box/sing-box
```

View file

@ -0,0 +1,13 @@
# Windows
## Chocolatey
```shell
choco install sing-box
```
## winget
```shell
winget install sing-box
```

View file

@ -0,0 +1,41 @@
package libbox
import (
"net/url"
)
func GenerateRemoteProfileImportLink(name string, remoteURL string) string {
importLink := &url.URL{
Scheme: "sing-box",
Host: "import-remote-profile",
RawQuery: url.Values{"url": []string{remoteURL}}.Encode(),
Fragment: name,
}
return importLink.String()
}
type ImportRemoteProfile struct {
Name string
URL string
Host string
}
func ParseRemoteProfileImportLink(importLink string) (*ImportRemoteProfile, error) {
importURL, err := url.Parse(importLink)
if err != nil {
return nil, err
}
remoteURL, err := url.Parse(importURL.Query().Get("url"))
if err != nil {
return nil, err
}
name := importURL.Fragment
if name == "" {
name = remoteURL.Host
}
return &ImportRemoteProfile{
Name: name,
URL: remoteURL.String(),
Host: remoteURL.Host,
}, nil
}

View file

@ -37,7 +37,12 @@ nav:
- Change Log: changelog.md - Change Log: changelog.md
- Installation: - Installation:
- From source: installation/from-source.md - From source: installation/from-source.md
- Package Manager:
- macOS: installation/package-manager/macOS.md
- Windows: installation/package-manager/windows.md
- Android: installation/package-manager/android.md
- Clients: - Clients:
- Specification: installation/clients/specification.md
- iOS: installation/clients/sfi.md - iOS: installation/clients/sfi.md
- macOS: installation/clients/sfm.md - macOS: installation/clients/sfm.md
- Android: installation/clients/sfa.md - Android: installation/clients/sfa.md