From 7ebbd58b00f6dd98fa0a4155858c2e1681c7d6be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Sat, 3 Dec 2022 13:31:25 +0800 Subject: [PATCH] Update documentation --- constant/version.go | 2 +- docs/changelog.md | 29 +++++ docs/examples/clash-api.md | 52 +++++++++ docs/examples/index.md | 9 +- docs/examples/index.zh.md | 9 +- docs/examples/shadowsocks.md | 157 ++++++++++++++++++++++++++++ docs/examples/shadowtls.md | 4 + docs/examples/ss-client.md | 21 ---- docs/examples/ss-server.md | 13 --- docs/examples/{ss-tun.md => tun.md} | 23 +++- docs/faq/known-issues.md | 4 +- docs/faq/known-issues.zh.md | 4 +- mkdocs.yml | 11 +- 13 files changed, 279 insertions(+), 59 deletions(-) create mode 100644 docs/examples/clash-api.md create mode 100644 docs/examples/shadowsocks.md delete mode 100644 docs/examples/ss-client.md delete mode 100644 docs/examples/ss-server.md rename docs/examples/{ss-tun.md => tun.md} (81%) diff --git a/constant/version.go b/constant/version.go index a45d9f24..f7588873 100644 --- a/constant/version.go +++ b/constant/version.go @@ -1,3 +1,3 @@ package constant -var Version = "1.1-rc1" +var Version = "1.1" diff --git a/docs/changelog.md b/docs/changelog.md index 029eb95c..1112b702 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,3 +1,32 @@ +#### 1.1 + +* Fix close clash cache + +Important changes since 1.0: + +* Add support for use with android VPNService +* Add tun support for WireGuard outbound +* Add system tun stack +* Add comment filter for config +* Add option for allow optional proxy protocol header +* Add Clash mode and persistence support +* Add TLS ECH and uTLS support for outbound TLS options +* Add internal simple-obfs and v2ray-plugin +* Add ShadowsocksR outbound +* Add VLESS outbound and XUDP +* Skip wait for hysteria tcp handshake response +* Add v2ray mux support for all inbound +* Add XUDP support for VMess +* Improve websocket writer +* Refine tproxy write back +* Fix DNS leak caused by + Windows' ordinary multihomed DNS resolution behavior +* Add sniff_timeout listen option +* Add custom route support for tun +* Add option for custom wireguard reserved bytes +* Split bind_address into ipv4 and ipv6 +* Add ShadowTLS v1 and v2 support + #### 1.1-rc1 * Fix TLS config for h2 server diff --git a/docs/examples/clash-api.md b/docs/examples/clash-api.md new file mode 100644 index 00000000..ca5a0133 --- /dev/null +++ b/docs/examples/clash-api.md @@ -0,0 +1,52 @@ +```json +{ + "dns": { + "rules": [ + { + "domain": [ + "clash.razord.top", + "yacd.haishan.me" + ], + "server": "local" + }, + { + "clash_mode": "direct", + "server": "local" + } + ] + }, + "outbounds": [ + { + "type": "selector", + "tag": "default", + "outbounds": [ + "proxy-a", + "proxy-b" + ] + } + ], + "route": { + "rules": [ + { + "clash_mode": "direct", + "outbound": "direct" + }, + { + "domain": [ + "clash.razord.top", + "yacd.haishan.me" + ], + "outbound": "direct" + } + ], + "final": "default" + }, + "experimental": { + "clash_api": { + "external_controller": "127.0.0.1:9090", + "store_selected": true + } + } +} + +``` \ No newline at end of file diff --git a/docs/examples/index.md b/docs/examples/index.md index 49b0e81f..ca2fa8e9 100644 --- a/docs/examples/index.md +++ b/docs/examples/index.md @@ -3,7 +3,8 @@ Configuration examples for sing-box. * [Linux Server Installation](./linux-server-installation) -* [Shadowsocks Server](./ss-server) -* [Shadowsocks Client](./ss-client) -* [Shadowsocks Tun](./ss-tun) -* [DNS Hijack](./dns-hijack.md) \ No newline at end of file +* [Tun](./tun) +* [DNS Hijack](./dns-hijack.md) +* [Shadowsocks](./shadowsocks) +* [ShadowTLS](./shadowtls) +* [Clash API](./clash-api) diff --git a/docs/examples/index.zh.md b/docs/examples/index.zh.md index b0b576b5..e4d17c38 100644 --- a/docs/examples/index.zh.md +++ b/docs/examples/index.zh.md @@ -3,7 +3,8 @@ sing-box 的配置示例。 * [Linux 服务器安装](./linux-server-installation) -* [Shadowsocks 服务器](./ss-server) -* [Shadowsocks 客户端](./ss-client) -* [Shadowsocks Tun](./ss-tun) -* [DNS 劫持](./dns-hijack.md) \ No newline at end of file +* [Tun](./tun) +* [DNS 劫持](./dns-hijack.md) +* [Shadowsocks](./shadowsocks) +* [ShadowTLS](./shadowtls) +* [Clash API](./clash-api) diff --git a/docs/examples/shadowsocks.md b/docs/examples/shadowsocks.md new file mode 100644 index 00000000..462ca449 --- /dev/null +++ b/docs/examples/shadowsocks.md @@ -0,0 +1,157 @@ +# Shadowsocks + +## Single User + +#### Server + +```json +{ + "inbounds": [ + { + "type": "shadowsocks", + "listen": "::", + "listen_port": 8080, + "method": "2022-blake3-aes-128-gcm", + "password": "8JCsPssfgS8tiRwiMlhARg==" + } + ] +} +``` + +#### Client + +```json +{ + "inbounds": [ + { + "type": "mixed", + "listen": "::", + "listen_port": 2080 + } + ], + "outbounds": [ + { + "type": "shadowsocks", + "server": "127.0.0.1", + "server_port": 8080, + "method": "2022-blake3-aes-128-gcm", + "password": "8JCsPssfgS8tiRwiMlhARg==" + } + ] +} + +``` + +## Multiple Users + +#### Server + +```json +{ + "inbounds": [ + { + "type": "shadowsocks", + "listen": "::", + "listen_port": 8080, + "method": "2022-blake3-aes-128-gcm", + "password": "8JCsPssfgS8tiRwiMlhARg==", + "users": [ + { + "name": "sekai", + "password": "BXYxVUXJ9NgF7c7KPLQjkg==" + } + ] + } + ] +} +``` + +#### Client + +```json +{ + "inbounds": [ + { + "type": "mixed", + "listen": "::", + "listen_port": 2080 + } + ], + "outbounds": [ + { + "type": "shadowsocks", + "server": "127.0.0.1", + "server_port": 8080, + "method": "2022-blake3-aes-128-gcm", + "password": "8JCsPssfgS8tiRwiMlhARg==:BXYxVUXJ9NgF7c7KPLQjkg==" + } + ] +} + +``` + +## Relay + +#### Server + +```json +{ + "inbounds": [ + { + "type": "shadowsocks", + "listen": "::", + "listen_port": 8080, + "method": "2022-blake3-aes-128-gcm", + "password": "8JCsPssfgS8tiRwiMlhARg==" + } + ] +} +``` + +#### Relay + +```json +{ + "inbounds": [ + { + "type": "shadowsocks", + "listen": "::", + "listen_port": 8081, + "method": "2022-blake3-aes-128-gcm", + "password": "BXYxVUXJ9NgF7c7KPLQjkg==", + "destinations": [ + { + "name": "my_server", + "password": "8JCsPssfgS8tiRwiMlhARg==", + "server": "127.0.0.1", + "server_port": 8080 + } + ] + } + ] +} +``` + +#### Client + +```json +{ + "inbounds": [ + { + "type": "mixed", + "listen": "::", + "listen_port": 2080 + } + ], + "outbounds": [ + { + "type": "shadowsocks", + "server": "127.0.0.1", + "server_port": 8081, + "method": "2022-blake3-aes-128-gcm", + "password": "8JCsPssfgS8tiRwiMlhARg==:BXYxVUXJ9NgF7c7KPLQjkg==" + } + ] +} + +``` \ No newline at end of file diff --git a/docs/examples/shadowtls.md b/docs/examples/shadowtls.md index 39c8988d..af4b1da3 100644 --- a/docs/examples/shadowtls.md +++ b/docs/examples/shadowtls.md @@ -7,6 +7,8 @@ "type": "shadowtls", "listen": "::", "listen_port": 4443, + "version": 2, + "password": "fuck me till the daylight", "handshake": { "server": "google.com", "server_port": 443 @@ -45,6 +47,8 @@ "tag": "shadowtls-out", "server": "127.0.0.1", "server_port": 4443, + "version": 2, + "password": "fuck me till the daylight", "tls": { "enabled": true, "server_name": "google.com" diff --git a/docs/examples/ss-client.md b/docs/examples/ss-client.md deleted file mode 100644 index 7856dbbb..00000000 --- a/docs/examples/ss-client.md +++ /dev/null @@ -1,21 +0,0 @@ -```json -{ - "inbounds": [ - { - "type": "mixed", - "listen": "::", - "listen_port": 2080 - } - ], - "outbounds": [ - { - "type": "shadowsocks", - "server": "::", - "server_port": 8080, - "method": "2022-blake3-aes-128-gcm", - "password": "8JCsPssfgS8tiRwiMlhARg==" - } - ] -} - -``` \ No newline at end of file diff --git a/docs/examples/ss-server.md b/docs/examples/ss-server.md deleted file mode 100644 index edbb96df..00000000 --- a/docs/examples/ss-server.md +++ /dev/null @@ -1,13 +0,0 @@ -```json -{ - "inbounds": [ - { - "type": "shadowsocks", - "listen": "::", - "listen_port": 8080, - "method": "2022-blake3-aes-128-gcm", - "password": "8JCsPssfgS8tiRwiMlhARg==" - } - ] -} -``` \ No newline at end of file diff --git a/docs/examples/ss-tun.md b/docs/examples/tun.md similarity index 81% rename from docs/examples/ss-tun.md rename to docs/examples/tun.md index e41b3d48..e4273a8d 100644 --- a/docs/examples/ss-tun.md +++ b/docs/examples/tun.md @@ -10,9 +10,18 @@ "tag": "local", "address": "223.5.5.5", "detour": "direct" + }, + { + "tag": "block", + "address": "rcode://success" } ], "rules": [ + { + "geosite": "category-ads-all", + "server": "block", + "disable_cache": true + }, { "domain": "mydomain.com", "geosite": "cn", @@ -26,6 +35,7 @@ "type": "tun", "inet4_address": "172.19.0.1/30", "auto_route": true, + "strict_route": false, "sniff": true } ], @@ -58,13 +68,16 @@ "outbound": "dns-out" }, { - "geosite": "category-ads-all", - "outbound": "block" + "geosite": "cn", + "geoip": [ + "private", + "cn" + ], + "outbound": "direct" }, { - "geosite": "cn", - "geoip": "cn", - "outbound": "direct" + "geosite": "category-ads-all", + "outbound": "block" } ], "auto_detect_interface": true diff --git a/docs/faq/known-issues.md b/docs/faq/known-issues.md index a787ed79..2bb2eedc 100644 --- a/docs/faq/known-issues.md +++ b/docs/faq/known-issues.md @@ -7,11 +7,11 @@ the public internet. ##### on Android -`auto-route` cannot automatically hijack DNS requests when Android's `Private DNS` is enabled. +`auto-route` cannot automatically hijack DNS requests when Android's `Private DNS` enabled or `strict_route` disabled. ##### on Linux -`auto-route` cannot automatically hijack DNS requests with `systemd-resolved` enabled, you can switch to NetworkManager. +`auto-route` cannot automatically hijack DNS requests with `systemd-resolved` enabled and `strict_route` disabled. #### System proxy diff --git a/docs/faq/known-issues.zh.md b/docs/faq/known-issues.zh.md index 1aaf8fe7..929087a0 100644 --- a/docs/faq/known-issues.zh.md +++ b/docs/faq/known-issues.zh.md @@ -6,11 +6,11 @@ ##### Android -`auto-route` 无法自动劫持 DNS 请求如果 `私人 DNS` 开启. +`auto-route` 无法自动劫持 DNS 请求如果 `私人 DNS` 开启或 `strict_route` 禁用。 ##### Linux -`auto-route` 无法自动劫持 DNS 请求如果 `systemd-resolved` 开启, 您可以切换到 NetworkManager. +`auto-route` 无法自动劫持 DNS 请求如果 `systemd-resolved` 开启且 `strict_route` 禁用。 #### 系统代理 diff --git a/mkdocs.yml b/mkdocs.yml index 0c1c5fea..1bf75758 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -97,11 +97,11 @@ nav: - Examples: - examples/index.md - Linux Server Installation: examples/linux-server-installation.md - - Shadowsocks Server: examples/ss-server.md - - Shadowsocks Client: examples/ss-client.md - - Shadowsocks Tun: examples/ss-tun.md - - ShadowTLS: examples/shadowtls.md + - Tun: examples/tun.md - DNS Hijack: examples/dns-hijack.md + - Shadowsocks: examples/shadowsocks.md + - ShadowTLS: examples/shadowtls.md + - Clash API: examples/clash-api.md - Contributing: - contributing/index.md - Developing: @@ -168,7 +168,4 @@ plugins: Known Issues: 已知问题 Examples: 示例 Linux Server Installation: Linux 服务器安装 - Shadowsocks Server: Shadowsocks 服务器 - Shadowsocks Client: Shadowsocks 客户端 - Shadowsocks Tun: Shadowsocks Tun DNS Hijack: DNS 劫持 \ No newline at end of file