diff --git a/404.html b/404.html index 8f2e2a9..3ce28d7 100644 --- a/404.html +++ b/404.html @@ -32,7 +32,7 @@

Trojan-Go Docs

- Version 0.4.11 + Version 0.4.12

An unidentifiable mechanism that helps you bypass GFW.

diff --git a/advance/forward/index.html b/advance/forward/index.html index b9fef78..5cd8d3b 100644 --- a/advance/forward/index.html +++ b/advance/forward/index.html @@ -39,7 +39,7 @@

Trojan-Go Docs

- Version 0.4.11 + Version 0.4.12

An unidentifiable mechanism that helps you bypass GFW.

diff --git a/advance/index.html b/advance/index.html index 05b1b5a..db33837 100644 --- a/advance/index.html +++ b/advance/index.html @@ -32,7 +32,7 @@

Trojan-Go Docs

- Version 0.4.11 + Version 0.4.12

An unidentifiable mechanism that helps you bypass GFW.

diff --git a/advance/mux/index.html b/advance/mux/index.html index 7937377..c864d36 100644 --- a/advance/mux/index.html +++ b/advance/mux/index.html @@ -39,7 +39,7 @@

Trojan-Go Docs

- Version 0.4.11 + Version 0.4.12

An unidentifiable mechanism that helps you bypass GFW.

diff --git a/advance/nginx-relay/index.html b/advance/nginx-relay/index.html index 5d2e98b..9231d7f 100644 --- a/advance/nginx-relay/index.html +++ b/advance/nginx-relay/index.html @@ -39,7 +39,7 @@

Trojan-Go Docs

- Version 0.4.11 + Version 0.4.12

An unidentifiable mechanism that helps you bypass GFW.

diff --git a/advance/relay/index.html b/advance/relay/index.html index 30faa6f..aa796b6 100644 --- a/advance/relay/index.html +++ b/advance/relay/index.html @@ -39,7 +39,7 @@

Trojan-Go Docs

- Version 0.4.11 + Version 0.4.12

An unidentifiable mechanism that helps you bypass GFW.

diff --git a/advance/router/index.html b/advance/router/index.html index 2a6bf85..d2d0fdc 100644 --- a/advance/router/index.html +++ b/advance/router/index.html @@ -30,7 +30,7 @@ - + @@ -39,7 +39,7 @@

Trojan-Go Docs

- Version 0.4.11 + Version 0.4.12

An unidentifiable mechanism that helps you bypass GFW.

@@ -67,7 +67,7 @@ "your_password" ], "ssl": { - "sni": "your_domain_name" + "sni": "your-domain-name.com" }, "mux" :{ "enabled": true @@ -75,65 +75,31 @@ "router":{ "enabled": true, "bypass": [ - "geosite:cn", "geoip:cn", - "geoip:private" + "geoip:private", + "geosite:cn", + "geosite:geolocation-cn" ], "block": [ "geosite:category-ads" + ], + "proxy": [ + "geosite:geolocation-!cn" ] } } -

所需要的geoip.dat和geosite.dat已经包含在release的压缩包中,直接使用即可。它们来自v2ray的domain-list-communitygeoip

-

这个配置文件激活了router模块,使用的是白名单的模式,当匹配到中国大陆的ip或域名时,将使用直接连接,否则使用trojan代理进行连接。

-

你也可以配置自己的列表文件,列表文件每一行是一个域名或者IP子网(CIDR)。例如,你想要屏蔽所有example.com域名以及其子域名,以及192.168.1.0/24,只需要编写一个txt文件

+

这个配置文件激活了router模块,使用的是白名单的模式,当匹配到中国大陆或者局域网的IP/域名时,直接连接。如果是广告运营商的域名,则直接断开连接。

+

所需要的数据库geoip.dat和geosite.dat已经包含在release的压缩包中,直接使用即可。它们来自v2ray的domain-list-communitygeoip。你可以使用如geosite:cngeosite:bilibili的形式来指定某一类域名,使用如geoip:cngeoip:private的形式来指定某一类IP。所有可用的tag可以在domain-list-community仓库中找到。

+

你也可以配置自己的列表文件,列表文件每一行是一个域名或者IP子网(CIDR)。例如,想要屏蔽所有example.com域名以及其子域名,以及192.168.1.0/24,只需要编写一个txt文件

test_list.txt

example.com
 192.168.1.0/24
-

然后在block字段中填入该文件名

-

同时geosite中也含有广告提供商的域名,可以通过"geosite:category-ads"指定屏蔽它们。下面这个例子使用了一个列表文件,和geosite的category-ads标签,对相关连接进行屏蔽

-
"router":{
-    "enabled": true,
-    "bypass": [
-        "geosite:cn",
-        "geoip:cn",
-        "geoip:private"
-    ],
-    "block": [
-        "test_list.txt",
-        "geosite:category-ads"
-    ],
-}
-

下面是完整的路由策略设置

-

路由策略有三种

-
    -
  • -

    Proxy 代理。将请求通过TLS隧道进行代理,由trojan服务器和目的地址进行连接。

    -
  • -
  • -

    Bypass 绕过。直接在本地和目的地址进行连接。

    -
  • -
  • -

    Block 封锁。不代理请求,直接关闭连接。

    -
  • -
-
"router": {
-    "enabled": true,
-    "bypass": [
-        "geoip:tag1",
-        "geosite:tag2",
-        "bypass_list1.txt",
-        "bypass_list2.txt"
-    ],
-    "block": [
-        "block_list.txt"
-    ],
-    "proxy": [
-        "proxy_list.txt"
-    ]
-}
-

其中bypass,block, proxy字段中填入相应的列表文件或者geo数据库tag。列表文件每行是一个域名或者IP地址段(CIDR)。geo数据库geoip和geosite为IP数据库和域名数据库。一旦匹配,则执行相应策略。

-

更详细的说明参考完整的配置文件。

+

然后在修改上面的block选项,添加一行指定该文件名即可

+
"block": [
+    "geosite:category-ads",
+    "test_list.txt"
+]
+

更详细的说明参考"完整的配置文件"一节。