浏览代码

Update documentation

世界 3 年之前
父节点
当前提交
43353ca5a4
共有 6 个文件被更改,包括 113 次插入9 次删除
  1. 8 1
      docs/changelog.md
  2. 1 1
      docs/configuration/inbound/http.md
  3. 1 0
      docs/configuration/inbound/index.md
  4. 90 0
      docs/configuration/inbound/naive.md
  5. 12 7
      docs/index.md
  6. 1 0
      mkdocs.yml

+ 8 - 1
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
 #### 2022/08/08
 
 
-No changelog before.
+No changelog before.
+
+[#9]: https://github.com/SagerNet/sing-box/pull/9

+ 1 - 1
docs/configuration/inbound/http.md

@@ -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
     }
     }
   ]
   ]

+ 1 - 0
docs/configuration/inbound/index.md

@@ -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)           |

+ 90 - 0
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.

+ 12 - 7
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
 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
 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
 
 

+ 1 - 0
mkdocs.yml

@@ -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