mirror of
https://github.com/SagerNet/sing-box.git
synced 2024-11-22 00:21:30 +00:00
documentation: Update installation
This commit is contained in:
parent
ffe515d0e0
commit
1e31d26e03
|
@ -5,7 +5,7 @@ Experimental iOS client for sing-box.
|
|||
#### Requirements
|
||||
|
||||
* iOS 15.0+
|
||||
* macOS 12.0+ with Apple Silicon
|
||||
* An Apple account outside of mainland China
|
||||
|
||||
#### Download
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#### 要求
|
||||
|
||||
* iOS 15.0+
|
||||
* macOS 12.0+ with Apple Silicon
|
||||
* 一个非中国大陆地区的 Apple 账号
|
||||
|
||||
#### 下载
|
||||
|
||||
|
|
|
@ -5,12 +5,19 @@ Experimental macOS client for sing-box.
|
|||
#### Requirements
|
||||
|
||||
* 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)
|
||||
* [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
|
||||
|
||||
* 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
|
||||
|
||||
* 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.
|
||||
|
|
|
@ -5,12 +5,19 @@
|
|||
#### 要求
|
||||
|
||||
* macOS 13.0+
|
||||
* 一个非中国大陆地区的 Apple 账号 (商店版本)
|
||||
|
||||
#### 下载
|
||||
#### 下载 (商店版本)
|
||||
|
||||
* [AppStore](https://apps.apple.com/us/app/sing-box/id6451272673)
|
||||
* [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)`
|
||||
|
|
25
docs/installation/clients/specification.md
Normal file
25
docs/installation/clients/specification.md
Normal 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
|
||||
```
|
7
docs/installation/package-manager/android.md
Normal file
7
docs/installation/package-manager/android.md
Normal file
|
@ -0,0 +1,7 @@
|
|||
# Android
|
||||
|
||||
## Termux
|
||||
|
||||
```shell
|
||||
pkg add sing-box
|
||||
```
|
14
docs/installation/package-manager/macOS.md
Normal file
14
docs/installation/package-manager/macOS.md
Normal 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
|
||||
```
|
13
docs/installation/package-manager/windows.md
Normal file
13
docs/installation/package-manager/windows.md
Normal file
|
@ -0,0 +1,13 @@
|
|||
# Windows
|
||||
|
||||
## Chocolatey
|
||||
|
||||
```shell
|
||||
choco install sing-box
|
||||
```
|
||||
|
||||
## winget
|
||||
|
||||
```shell
|
||||
winget install sing-box
|
||||
```
|
41
experimental/libbox/remote_profile.go
Normal file
41
experimental/libbox/remote_profile.go
Normal 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
|
||||
}
|
|
@ -37,7 +37,12 @@ nav:
|
|||
- Change Log: changelog.md
|
||||
- Installation:
|
||||
- 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:
|
||||
- Specification: installation/clients/specification.md
|
||||
- iOS: installation/clients/sfi.md
|
||||
- macOS: installation/clients/sfm.md
|
||||
- Android: installation/clients/sfa.md
|
||||
|
|
Loading…
Reference in a new issue