Update documentation

This commit is contained in:
世界 2022-08-10 21:17:02 +08:00
parent b79b19c470
commit 43353ca5a4
No known key found for this signature in database
GPG key ID: CD109927C34A63C4
6 changed files with 113 additions and 9 deletions

View file

@ -1,3 +1,10 @@
#### 2022/08/09
* Add full-featured [Naive](/configuration/inbound/naive) inbound
* Fix default dns server option [#9] by iKirby
#### 2022/08/08 #### 2022/08/08
No changelog before. No changelog before.
[#9]: https://github.com/SagerNet/sing-box/pull/9

View file

@ -16,13 +16,13 @@
"sniff_override_destination": false, "sniff_override_destination": false,
"domain_strategy": "prefer_ipv6", "domain_strategy": "prefer_ipv6",
"tls": {},
"users": [ "users": [
{ {
"username": "admin", "username": "admin",
"password": "admin" "password": "admin"
} }
], ],
"tls": {},
"set_system_proxy": false "set_system_proxy": false
} }
] ]

View file

@ -22,6 +22,7 @@
| `shadowsocks` | [Shadowsocks](./shadowsocks) | | `shadowsocks` | [Shadowsocks](./shadowsocks) |
| `vmess` | [VMess](./vmess) | | `vmess` | [VMess](./vmess) |
| `trojan` | [Trojan](./trojan) | | `trojan` | [Trojan](./trojan) |
| `naive` | [Naive](./naive) |
| `tun` | [Tun](./tun) | | `tun` | [Tun](./tun) |
| `redirect` | [Redirect](./redirect) | | `redirect` | [Redirect](./redirect) |
| `tproxy` | [TProxy](./tproxy) | | `tproxy` | [TProxy](./tproxy) |

View file

@ -0,0 +1,90 @@
### Structure
```json
{
"inbounds": [
{
"type": "naive",
"tag": "naive-in",
"listen": "::",
"listen_port": 443,
"tcp_fast_open": false,
"sniff": false,
"sniff_override_destination": false,
"domain_strategy": "prefer_ipv6",
"network": "udp",
"users": [
{
"username": "sekai",
"password": "password"
}
],
"tls": {}
}
]
}
```
!!! warning ""
HTTP3 transport is not included by default, see [Installation](/#Installation).
### Listen Fields
#### listen
==Required==
Listen address.
#### listen_port
==Required==
Listen port.
#### tcp_fast_open
Enable tcp fast open for listener.
#### sniff
Enable sniffing.
See [Sniff](/configuration/route/sniff/) for details.
#### sniff_override_destination
Override the connection destination address with the sniffed domain.
If the domain name is invalid (like tor), this will not work.
#### domain_strategy
One of `prefer_ipv4` `prefer_ipv6` `ipv4_only` `ipv6_only`.
If set, the requested domain name will be resolved to IP before routing.
If `sniff_override_destination` is in effect, its value will be taken as a fallback.
### Naive Fields
#### tls
==Required==
TLS configuration, see [TLS inbound structure](/configuration/shared/tls/#inbound-structure).
#### users
==Required==
Naive users.
#### network
Listen network, one of `tcp` `udp`.
Both if empty.

View file

@ -18,12 +18,12 @@ Install with options:
go install -v -tags with_clash_api github.com/sagernet/sing-box/cmd/sing-box@latest go install -v -tags with_clash_api github.com/sagernet/sing-box/cmd/sing-box@latest
``` ```
| Build Tag | Description | | Build Tag | Description |
|----------------------------|--------------------------------------------------------------------------------------------------| |----------------------------|----------------------------------------------------------------------------------------------------------------------------------------------|
| `with_quic` | Build with QUIC support, see [QUIC and HTTP3](./configuration/dns/server) dns transports. | | `with_quic` | Build with QUIC support, see [QUIC and HTTP3 dns transports](./configuration/dns/server) and [Naive inbound](./configuration/inbound/naive). |
| `with_clash_api` | Build with Clash api support, see [Experimental](./configuration/experimental#clash-api-fields). | | `with_clash_api` | Build with Clash api support, see [Experimental](./configuration/experimental#clash-api-fields). |
| `no_gvisor` | Build without gVisor tun stack support, see [Tun](./configuration/inbound/tun#stack). | | `no_gvisor` | Build without gVisor tun stack support, see [Tun inbound](./configuration/inbound/tun#stack). |
| `with_lwip` (CGO required) | Build with LWIP tun stack support, see [Tun](./configuration/inbound/tun#stack). | | `with_lwip` (CGO required) | Build with LWIP tun stack support, see [Tun inbound](./configuration/inbound/tun#stack). |
The binary is built under $GOPATH/bin The binary is built under $GOPATH/bin
@ -31,7 +31,12 @@ The binary is built under $GOPATH/bin
sing-box version sing-box version
``` ```
It is also recommended to use systemd to manage sing-box service, see [Linux server installation example](./examples/linux-server-installation). It is also recommended to use systemd to manage sing-box service,
see [Linux server installation example](./examples/linux-server-installation).
## Contributors
[![](https://opencollective.com/sagernet/contributors.svg?width=740&button=false)](https://github.com/sagernet/sing-box/graphs/contributors)
## License ## License

View file

@ -49,6 +49,7 @@ nav:
- Shadowsocks: configuration/inbound/shadowsocks.md - Shadowsocks: configuration/inbound/shadowsocks.md
- VMess: configuration/inbound/vmess.md - VMess: configuration/inbound/vmess.md
- Trojan: configuration/inbound/trojan.md - Trojan: configuration/inbound/trojan.md
- Naive: configuration/inbound/naive.md
- Tun: configuration/inbound/tun.md - Tun: configuration/inbound/tun.md
- Redirect: configuration/inbound/redirect.md - Redirect: configuration/inbound/redirect.md
- TProxy: configuration/inbound/tproxy.md - TProxy: configuration/inbound/tproxy.md