diff --git a/docs/changelog.md b/docs/changelog.md index d29a4794..2527eeda 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -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 -No changelog before. \ No newline at end of file +No changelog before. + +[#9]: https://github.com/SagerNet/sing-box/pull/9 \ No newline at end of file diff --git a/docs/configuration/inbound/http.md b/docs/configuration/inbound/http.md index bfc1a653..8dc57e61 100644 --- a/docs/configuration/inbound/http.md +++ b/docs/configuration/inbound/http.md @@ -16,13 +16,13 @@ "sniff_override_destination": false, "domain_strategy": "prefer_ipv6", - "tls": {}, "users": [ { "username": "admin", "password": "admin" } ], + "tls": {}, "set_system_proxy": false } ] diff --git a/docs/configuration/inbound/index.md b/docs/configuration/inbound/index.md index 1a6f5882..a38c59bc 100644 --- a/docs/configuration/inbound/index.md +++ b/docs/configuration/inbound/index.md @@ -22,6 +22,7 @@ | `shadowsocks` | [Shadowsocks](./shadowsocks) | | `vmess` | [VMess](./vmess) | | `trojan` | [Trojan](./trojan) | +| `naive` | [Naive](./naive) | | `tun` | [Tun](./tun) | | `redirect` | [Redirect](./redirect) | | `tproxy` | [TProxy](./tproxy) | diff --git a/docs/configuration/inbound/naive.md b/docs/configuration/inbound/naive.md new file mode 100644 index 00000000..337c2d97 --- /dev/null +++ b/docs/configuration/inbound/naive.md @@ -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. \ No newline at end of file diff --git a/docs/index.md b/docs/index.md index bae698ef..e5f061d2 100644 --- a/docs/index.md +++ b/docs/index.md @@ -18,12 +18,12 @@ Install with options: go install -v -tags with_clash_api github.com/sagernet/sing-box/cmd/sing-box@latest ``` -| Build Tag | Description | -|----------------------------|--------------------------------------------------------------------------------------------------| -| `with_quic` | Build with QUIC support, see [QUIC and HTTP3](./configuration/dns/server) dns transports. | -| `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). | -| `with_lwip` (CGO required) | Build with LWIP tun stack support, see [Tun](./configuration/inbound/tun#stack). | +| Build Tag | Description | +|----------------------------|----------------------------------------------------------------------------------------------------------------------------------------------| +| `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). | +| `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 inbound](./configuration/inbound/tun#stack). | The binary is built under $GOPATH/bin @@ -31,7 +31,12 @@ The binary is built under $GOPATH/bin 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 diff --git a/mkdocs.yml b/mkdocs.yml index f1bfa8b3..10d91a44 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -49,6 +49,7 @@ nav: - Shadowsocks: configuration/inbound/shadowsocks.md - VMess: configuration/inbound/vmess.md - Trojan: configuration/inbound/trojan.md + - Naive: configuration/inbound/naive.md - Tun: configuration/inbound/tun.md - Redirect: configuration/inbound/redirect.md - TProxy: configuration/inbound/tproxy.md