Sfoglia il codice sorgente

Update documentation

世界 3 anni fa
parent
commit
561a9e5275

+ 3 - 1
.goreleaser.yaml

@@ -13,11 +13,13 @@ builds:
     tags:
       - with_quic
       - with_wireguard
-      - with_acme
       - with_clash_api
     env:
       - CGO_ENABLED=0
     targets:
+      - android_arm64
+      - android_amd64
+      - android_amd64_v3
       - linux_amd64_v1
       - linux_amd64_v3
       - linux_arm64

+ 1 - 1
constant/version.go

@@ -1,6 +1,6 @@
 package constant
 
 var (
-	Version = "1.0-beta1"
+	Version = "1.0-beta2"
 	Commit  = ""
 )

+ 7 - 0
docs/changelog.md

@@ -1,3 +1,10 @@
+#### 1.0-beta2
+
+* Add strict_route option for [Tun inbound](/configuration/inbound/tun#strict_route)
+* Add packetaddr support for [VMess outbound](/configuration/outbound/vmess#packet_addr)
+* Add better performing alternative gRPC implementation
+* Fix sniff override destination
+
 #### 1.0-beta1
 
 * Initial release

+ 5 - 0
docs/configuration/outbound/vmess.md

@@ -16,6 +16,7 @@
       "authenticated_length": true,
       "network": "tcp",
       "tls": {},
+      "packet_addr": false,
       "multiplex": {},
       "transport": {},
 
@@ -95,6 +96,10 @@ Both is enabled by default.
 
 TLS configuration, see [TLS](/configuration/shared/tls/#outbound).
 
+#### packet_addr
+
+Enable packetaddr support.
+
 #### multiplex
 
 Multiplex configuration, see [Multiplex](/configuration/shared/multiplex).

+ 7 - 0
docs/configuration/outbound/vmess.zh.md

@@ -6,6 +6,7 @@
     {
       "type": "vmess",
       "tag": "vmess-out",
+      
       "server": "127.0.0.1",
       "server_port": 1080,
       "uuid": "bf000d23-0752-40b4-affe-68f7707a9661",
@@ -15,8 +16,10 @@
       "authenticated_length": true,
       "network": "tcp",
       "tls": {},
+      "packet_addr": false,
       "multiplex": {},
       "transport": {},
+      
       "detour": "upstream-out",
       "bind_interface": "en0",
       "bind_address": "0.0.0.0",
@@ -93,6 +96,10 @@ VMess 用户 ID。
 
 TLS 配置, 参阅 [TLS](/zh/configuration/shared/tls/#outbound)。
 
+#### packet_addr
+
+启用 packetaddr 支持。
+
 #### multiplex
 
 多路复用配置, 参阅 [多路复用](/zh/configuration/shared/multiplex)。

+ 2 - 2
docs/configuration/shared/v2ray-transport.md

@@ -119,9 +119,9 @@ It needs to be consistent with the server.
 
 ### gRPC
 
-!!! warning ""
+!!! note ""
 
-    gRPC is not included by default, see [Installation](/#installation).
+    standard gRPC has good compatibility but poor performance and is not included by default, see [Installation](/#installation).
 
 ```json
 {

+ 2 - 2
docs/configuration/shared/v2ray-transport.zh.md

@@ -118,9 +118,9 @@ HTTP 请求的额外标头。
 
 ### gRPC
 
-!!! warning ""
+!!! note ""
 
-    默认安装不包含 gRPC, 参阅 [安装](/zh/#_2)。
+    默认安装不包含标准 gRPC (兼容性好,但性能较差), 参阅 [安装](/zh/#_2)。
 
 ```json
 {

+ 1 - 1
docs/contributing/environment.md

@@ -29,7 +29,7 @@ By default you have the latest Go installed (currently 1.19), and added `GOPATH/
 ##### Setup
 
 ```shell
-make fmt_insall
+make fmt_insalll
 make lint_install
 ```
 

+ 0 - 2
docs/faq/index.zh.md

@@ -24,8 +24,6 @@ v2ray-core 中的 "底层传输协议" 实际上是一些专有协议的组合
 
 例如,v2ray 社区将 v2ray 专有的 gRPC 协议称为 Trojan gRPC,其实并不是一个 协议,在滥用 CDN 之外没有任何作用。
 
-(译者注:由于实现错误, v2ray http2 传输层未能正确处理多路复用)
-
 ## Tun
 
 #### 什么是 tun?

+ 1 - 1
docs/index.md

@@ -25,7 +25,7 @@ go install -v -tags with_clash_api github.com/sagernet/sing-box/cmd/sing-box@lat
 | Build Tag                          | Description                                                                                                                                                                                                                                                                                                                     |
 |------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
 | `with_quic`                        | Build with QUIC support, see [QUIC and HTTP3 dns transports](./configuration/dns/server), [Naive inbound](./configuration/inbound/naive), [Hysteria Inbound](./configuration/inbound/hysteria), [Hysteria Outbound](./configuration/outbound/hysteria) and [V2Ray Transport#QUIC](./configuration/shared/v2ray-transport#quic). |
-| `with_grpc`                        | Build with gRPC support, see [V2Ray Transport#gRPC](./configuration/shared/v2ray-transport#grpc).                                                                                                                                                                                                                               |
+| `with_grpc`                        | Build with standard gRPC support, see [V2Ray Transport#gRPC](./configuration/shared/v2ray-transport#grpc).                                                                                                                                                                                                                      |
 | `with_wireguard`                   | Build with WireGuard support, see [WireGuard outbound](./configuration/outbound/wireguard).                                                                                                                                                                                                                                     |
 | `with_acme`                        | Build with ACME TLS certificate issuer support, see [TLS](./configuration/shared/tls).                                                                                                                                                                                                                                          |
 | `with_clash_api`                   | Build with Clash API support, see [Experimental](./configuration/experimental#clash-api-fields).                                                                                                                                                                                                                                |

+ 1 - 1
docs/index.zh.md

@@ -25,7 +25,7 @@ go install -v -tags with_clash_api github.com/sagernet/sing-box/cmd/sing-box@lat
 | 构建标志                         | 描述                                                                                                                                                                                                                                                                           |
 |------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
 | `with_quic`                  | 启用 QUIC 支持,参阅 [QUIC 和 HTTP3 DNS 传输层](./configuration/dns/server),[Naive 入站](./configuration/inbound/naive),[Hysteria 入站](./configuration/inbound/hysteria),[Hysteria 出站](./configuration/outbound/hysteria) 和 [V2Ray 传输层#QUIC](./configuration/shared/v2ray-transport#quic)。 |
-| `with_grpc`                  | 启用 gRPC 支持,参阅 [V2Ray 传输层#gRPC](./configuration/shared/v2ray-transport#grpc)。                                                                                                                                                                                                 |
+| `with_grpc`                  | 启用标准 gRPC 支持,参阅 [V2Ray 传输层#gRPC](./configuration/shared/v2ray-transport#grpc)。                                                                                                                                                                                               |
 | `with_wireguard`             | 启用 WireGuard 支持,参阅 [WireGuard 出站](./configuration/outbound/wireguard)。                                                                                                                                                                                                       |
 | `with_acme`                  | 启用 ACME TLS 证书签发支持,参阅 [TLS](./configuration/shared/tls)。                                                                                                                                                                                                                     |
 | `with_clash_api`             | 启用 Clash api 支持,参阅 [实验性](./configuration/experimental#clash-api-fields)。                                                                                                                                                                                                     |

+ 3 - 0
transport/v2raygrpc/conn.go

@@ -105,5 +105,8 @@ func wrapError(err error) error {
 	if strings.Contains(err.Error(), "the client connection is closing") {
 		return net.ErrClosed
 	}
+	if strings.Contains(err.Error(), "server closed the stream without sending trailers") {
+		return net.ErrClosed
+	}
 	return err
 }