mirror of
https://github.com/SagerNet/sing-box.git
synced 2024-11-22 08:31:30 +00:00
Initial zh-CN document translation: examples
This commit is contained in:
parent
132222013b
commit
1bc7d2237e
|
@ -1,5 +1,3 @@
|
|||
# Log
|
||||
|
||||
### Structure
|
||||
|
||||
```json
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
# geoip
|
||||
|
||||
### Structure
|
||||
|
||||
```json
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
# geosite
|
||||
|
||||
### Structure
|
||||
|
||||
```json
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
# DNS Hijack
|
||||
|
||||
#### Sniff Mode
|
||||
|
||||
```json
|
||||
|
|
65
docs/examples/dns-hijack.zh.md
Normal file
65
docs/examples/dns-hijack.zh.md
Normal 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
|
||||
}
|
||||
}
|
||||
```
|
9
docs/examples/index.zh.md
Normal file
9
docs/examples/index.zh.md
Normal 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)
|
|
@ -1,4 +1,4 @@
|
|||
# Requirements
|
||||
#### Requirements
|
||||
|
||||
* Linux & Systemd
|
||||
* Git
|
||||
|
|
38
docs/examples/linux-server-installation.zh.md
Normal file
38
docs/examples/linux-server-installation.zh.md
Normal 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` |
|
|
@ -1,5 +1,3 @@
|
|||
# Shadowsocks Client
|
||||
|
||||
```json
|
||||
{
|
||||
"inbounds": [
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
# Shadowsocks Server
|
||||
|
||||
```json
|
||||
{
|
||||
"inbounds": [
|
||||
|
|
Loading…
Reference in a new issue