From 561a9e5275d4e12e3270bf2241636a517344397f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Sat, 27 Aug 2022 21:32:20 +0800 Subject: [PATCH] Update documentation --- .goreleaser.yaml | 4 +++- constant/version.go | 2 +- docs/changelog.md | 7 +++++++ docs/configuration/outbound/vmess.md | 5 +++++ docs/configuration/outbound/vmess.zh.md | 7 +++++++ docs/configuration/shared/v2ray-transport.md | 4 ++-- docs/configuration/shared/v2ray-transport.zh.md | 4 ++-- docs/contributing/environment.md | 2 +- docs/faq/index.zh.md | 2 -- docs/index.md | 2 +- docs/index.zh.md | 2 +- transport/v2raygrpc/conn.go | 3 +++ 12 files changed, 33 insertions(+), 11 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 48d01204..bc7ae9de 100644 --- a/.goreleaser.yaml +++ b/.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 diff --git a/constant/version.go b/constant/version.go index d0a1574e..f946d54a 100644 --- a/constant/version.go +++ b/constant/version.go @@ -1,6 +1,6 @@ package constant var ( - Version = "1.0-beta1" + Version = "1.0-beta2" Commit = "" ) diff --git a/docs/changelog.md b/docs/changelog.md index e78ae05b..03becbd3 100644 --- a/docs/changelog.md +++ b/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 diff --git a/docs/configuration/outbound/vmess.md b/docs/configuration/outbound/vmess.md index a4a0821b..89d01ee5 100644 --- a/docs/configuration/outbound/vmess.md +++ b/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). diff --git a/docs/configuration/outbound/vmess.zh.md b/docs/configuration/outbound/vmess.zh.md index 7aeae9fe..d6e8de80 100644 --- a/docs/configuration/outbound/vmess.zh.md +++ b/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)。 diff --git a/docs/configuration/shared/v2ray-transport.md b/docs/configuration/shared/v2ray-transport.md index b2e78f48..cd903614 100644 --- a/docs/configuration/shared/v2ray-transport.md +++ b/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 { diff --git a/docs/configuration/shared/v2ray-transport.zh.md b/docs/configuration/shared/v2ray-transport.zh.md index 2f7ae297..7a87d46e 100644 --- a/docs/configuration/shared/v2ray-transport.zh.md +++ b/docs/configuration/shared/v2ray-transport.zh.md @@ -118,9 +118,9 @@ HTTP 请求的额外标头。 ### gRPC -!!! warning "" +!!! note "" - 默认安装不包含 gRPC, 参阅 [安装](/zh/#_2)。 + 默认安装不包含标准 gRPC (兼容性好,但性能较差), 参阅 [安装](/zh/#_2)。 ```json { diff --git a/docs/contributing/environment.md b/docs/contributing/environment.md index dc6487ef..db2ac91a 100644 --- a/docs/contributing/environment.md +++ b/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 ``` diff --git a/docs/faq/index.zh.md b/docs/faq/index.zh.md index 598f8ebd..9f8a45ac 100644 --- a/docs/faq/index.zh.md +++ b/docs/faq/index.zh.md @@ -24,8 +24,6 @@ v2ray-core 中的 "底层传输协议" 实际上是一些专有协议的组合 例如,v2ray 社区将 v2ray 专有的 gRPC 协议称为 Trojan gRPC,其实并不是一个 协议,在滥用 CDN 之外没有任何作用。 -(译者注:由于实现错误, v2ray http2 传输层未能正确处理多路复用) - ## Tun #### 什么是 tun? diff --git a/docs/index.md b/docs/index.md index 2fcdffc3..20514724 100644 --- a/docs/index.md +++ b/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). | diff --git a/docs/index.zh.md b/docs/index.zh.md index 5b1eb023..944daff1 100644 --- a/docs/index.zh.md +++ b/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)。 | diff --git a/transport/v2raygrpc/conn.go b/transport/v2raygrpc/conn.go index 34281706..a8b06c65 100644 --- a/transport/v2raygrpc/conn.go +++ b/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 }