Initial zh-CN document translation: examples

This commit is contained in:
世界 2022-08-24 13:12:21 +08:00
parent 132222013b
commit 1bc7d2237e
No known key found for this signature in database
GPG key ID: CD109927C34A63C4
10 changed files with 113 additions and 13 deletions

View file

@ -1,5 +1,3 @@
# Log
### Structure
```json

View file

@ -1,5 +1,3 @@
# geoip
### Structure
```json

View file

@ -1,5 +1,3 @@
# geosite
### Structure
```json

View file

@ -1,5 +1,3 @@
# DNS Hijack
#### Sniff Mode
```json

View file

@ -0,0 +1,65 @@
#### 探测模式
```json
{
"inbounds": [
{
"type": "tun",
"inet4_address": "172.19.0.1/30",
"auto_route": true,
"sniff": true // 必须
}
],
"outbounds": [
{
"type": "direct"
},
{
"type": "dns",
"tag": "dns-out"
}
],
"route": {
"rules": [
{
"protocol": "dns",
"outbound": "dns-out"
}
],
"auto_detect_interface": true
}
}
```
#### 端口模式
```json
{
"inbounds": [
{
"type": "tun",
"inet4_address": "172.19.0.1/30",
"auto_route": true,
"sniff": true // 非必须
}
],
"outbounds": [
{
"type": "direct"
},
{
"type": "dns",
"tag": "dns-out"
}
],
"route": {
"rules": [
{
"port": 53,
"outbound": "dns-out"
}
],
"auto_detect_interface": true
}
}
```

View file

@ -0,0 +1,9 @@
# 示例
sing-box 的配置示例。
* [Linux 服务器安装](./linux-server-installation)
* [Shadowsocks 服务器](./ss-server)
* [Shadowsocks 客户端](./ss-client)
* [Shadowsocks Tun](./ss-tun)
* [DNS 劫持](./dns-hijack.md)

View file

@ -1,4 +1,4 @@
# Requirements
#### Requirements
* Linux & Systemd
* Git

View file

@ -0,0 +1,38 @@
#### 依赖
* Linux & Systemd
* Git
* Go 1.18.5+
* C 编译器环境
#### 安装
```shell
git clone https://github.com/SagerNet/sing-box
cd sing-box
./release/local/install.sh
```
Edit configuration file in `/usr/local/etc/sing-box/config.json`
```shell
./release/local/enable.sh
```
#### 更新
```shell
./release/local/update.sh
```
#### 其他命令
| 操作 | 命令 |
|------|-----------------------------------------------|
| 启动 | `sudo systemctl start sing-box` |
| 停止 | `sudo systemctl stop sing-box` |
| 强制停止 | `sudo systemctl kill sing-box` |
| 重启 | `sudo systemctl restart sing-box` |
| 查看日志 | `sudo journalctl -u sing-box --output cat -e` |
| 实时日志 | `sudo journalctl -u sing-box --output cat -f` |
| 卸载 | `./release/local/uninstall.sh` |

View file

@ -1,5 +1,3 @@
# Shadowsocks Client
```json
{
"inbounds": [

View file

@ -1,5 +1,3 @@
# Shadowsocks Server
```json
{
"inbounds": [