Browse Source

Add examples

世界 3 years ago
parent
commit
76236a0b75
4 changed files with 48 additions and 0 deletions
  1. 6 0
      docs/examples/index.md
  2. 23 0
      docs/examples/ss-client.md
  3. 15 0
      docs/examples/ss-server.md
  4. 4 0
      mkdocs.yml

+ 6 - 0
docs/examples/index.md

@@ -0,0 +1,6 @@
+# Examples
+
+Configuration examples for sing-box.
+
+* [Shadowsocks Server](./ss-server)
+* [Shadowsocks Client](./ss-client)

+ 23 - 0
docs/examples/ss-client.md

@@ -0,0 +1,23 @@
+# Shadowsocks Client
+
+```json
+{
+  "inbounds": [
+    {
+      "type": "mixed",
+      "listen": "::",
+      "listen_port": 2080
+    }
+  ],
+  "outbounds": [
+    {
+      "type": "shadowsocks",
+      "server": "::",
+      "server_port": 8080,
+      "method": "2022-blake3-aes-128-gcm",
+      "password": "8JCsPssfgS8tiRwiMlhARg=="
+    }
+  ]
+}
+
+```

+ 15 - 0
docs/examples/ss-server.md

@@ -0,0 +1,15 @@
+# Shadowsocks Server
+
+```json
+{
+  "inbounds": [
+    {
+      "type": "shadowsocks",
+      "listen": "::",
+      "listen_port": 8080,
+      "method": "2022-blake3-aes-128-gcm",
+      "password": "8JCsPssfgS8tiRwiMlhARg=="
+    }
+  ]
+}
+```

+ 4 - 0
mkdocs.yml

@@ -55,6 +55,10 @@ nav:
           - GeoIP: configuration/route/geoip.md
           - Geosite: configuration/route/geosite.md
           - Route Rule: configuration/route/rule.md
+  - Examples:
+      - examples/index.md
+      - Shadowsocks Server: examples/ss-server.md
+      - Shadowsocks Client: examples/ss-client.md
 markdown_extensions:
   - pymdownx.inlinehilite
   - pymdownx.snippets