mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-09 08:33:51 +02:00
v2ray: update to 5.1.0.
This commit is contained in:
parent
c07ca81eba
commit
03439b4c5c
2 changed files with 6 additions and 54 deletions
|
@ -1,47 +0,0 @@
|
||||||
From 77b88171d6bd837b76a5ad6e6b23689391530ed6 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?=E6=9C=B1=E8=81=96=E9=BB=8E=20=28Zhu=20Sheng=20Li=29?=
|
|
||||||
<digglife@gmail.com>
|
|
||||||
Date: Sat, 6 Nov 2021 22:09:26 +0800
|
|
||||||
Subject: [PATCH] fix: readRequest API changed since go1.17 (#1370)
|
|
||||||
|
|
||||||
fixed: #1265
|
|
||||||
---
|
|
||||||
transport/internet/headers/http/http.go | 4 ++--
|
|
||||||
transport/internet/headers/http/linkedreadRequest.go | 2 +-
|
|
||||||
2 files changed, 3 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/transport/internet/headers/http/http.go b/transport/internet/headers/http/http.go
|
|
||||||
index c73f7a63..54611889 100644
|
|
||||||
--- a/transport/internet/headers/http/http.go
|
|
||||||
+++ b/transport/internet/headers/http/http.go
|
|
||||||
@@ -90,7 +90,7 @@ func (h *HeaderReader) Read(reader io.Reader) (*buf.Buffer, error) {
|
|
||||||
buffer.Clear()
|
|
||||||
copy(buffer.Extend(lenEnding), leftover)
|
|
||||||
|
|
||||||
- if _, err := readRequest(bufio.NewReader(bytes.NewReader(headerBuf.Bytes())), false); err != io.ErrUnexpectedEOF {
|
|
||||||
+ if _, err := readRequest(bufio.NewReader(bytes.NewReader(headerBuf.Bytes()))); err != io.ErrUnexpectedEOF {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -110,7 +110,7 @@ func (h *HeaderReader) Read(reader io.Reader) (*buf.Buffer, error) {
|
|
||||||
}
|
|
||||||
|
|
||||||
// Parse the request
|
|
||||||
- if req, err := readRequest(bufio.NewReader(bytes.NewReader(headerBuf.Bytes())), false); err != nil {
|
|
||||||
+ if req, err := readRequest(bufio.NewReader(bytes.NewReader(headerBuf.Bytes()))); err != nil {
|
|
||||||
return nil, err
|
|
||||||
} else { // nolint: golint
|
|
||||||
h.req = req
|
|
||||||
diff --git a/transport/internet/headers/http/linkedreadRequest.go b/transport/internet/headers/http/linkedreadRequest.go
|
|
||||||
index 35154b87..45773312 100644
|
|
||||||
--- a/transport/internet/headers/http/linkedreadRequest.go
|
|
||||||
+++ b/transport/internet/headers/http/linkedreadRequest.go
|
|
||||||
@@ -9,4 +9,4 @@ import (
|
|
||||||
)
|
|
||||||
|
|
||||||
//go:linkname readRequest net/http.readRequest
|
|
||||||
-func readRequest(b *bufio.Reader, deleteHostHeader bool) (req *http.Request, err error)
|
|
||||||
+func readRequest(b *bufio.Reader) (req *http.Request, err error)
|
|
||||||
--
|
|
||||||
2.33.1
|
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
# Template file for 'v2ray'
|
# Template file for 'v2ray'
|
||||||
pkgname=v2ray
|
pkgname=v2ray
|
||||||
version=4.44.0
|
version=5.1.0
|
||||||
revision=1
|
revision=1
|
||||||
wrksrc=${pkgname}-core-${version}
|
wrksrc=${pkgname}-core-${version}
|
||||||
build_style=go
|
build_style=go
|
||||||
go_import_path="github.com/v2fly/v2ray-core/v4"
|
go_import_path="github.com/v2fly/v2ray-core/v5"
|
||||||
go_ldflags="-X github.com/v2fly/v2ray-core/v4.codename=$pkgname
|
go_ldflags="-X github.com/v2fly/v2ray-core/v5.codename=$pkgname
|
||||||
-X github.com/v2fly/v2ray-core/v4.version=$version
|
-X github.com/v2fly/v2ray-core/v5.version=$version
|
||||||
-X github.com/v2fly/v2ray-core/v4.build=$SOURCE_DATE_EPOCH -buildid="
|
-X github.com/v2fly/v2ray-core/v5.build=$SOURCE_DATE_EPOCH -buildid="
|
||||||
short_desc="Platform for building proxies to bypass network restrictions"
|
short_desc="Platform for building proxies to bypass network restrictions"
|
||||||
maintainer="ipkalm <ipkalm@outlook.com>"
|
maintainer="ipkalm <ipkalm@outlook.com>"
|
||||||
license="MIT"
|
license="MIT"
|
||||||
homepage="https://github.com/v2fly/v2ray-core"
|
homepage="https://github.com/v2fly/v2ray-core"
|
||||||
distfiles="https://github.com/v2fly/v2ray-core/archive/v${version}/${pkgname}-${version}.tar.gz"
|
distfiles="https://github.com/v2fly/v2ray-core/archive/v${version}/${pkgname}-${version}.tar.gz"
|
||||||
checksum=d9973bafd3020f60a51fa3495b24ab417b08b3c8f9539a3748d00da6c68d0103
|
checksum=b3dbd2bbee9486999b81d1968545c5a6caa7b0f4726a7259939f1bda54fcf5ea
|
||||||
conf_files="/etc/v2ray/config.json"
|
conf_files="/etc/v2ray/config.json"
|
||||||
|
|
||||||
system_accounts="_v2ray"
|
system_accounts="_v2ray"
|
||||||
|
@ -23,7 +23,6 @@ export CGO_ENABLED=0
|
||||||
|
|
||||||
do_build() {
|
do_build() {
|
||||||
go build -ldflags "${go_ldflags}" -o "${GOPATH}/bin/v2ray" ./main
|
go build -ldflags "${go_ldflags}" -o "${GOPATH}/bin/v2ray" ./main
|
||||||
go build -ldflags "${go_ldflags}" -o "${GOPATH}/bin/v2ctl" -tags "confonly" ./infra/control/main
|
|
||||||
}
|
}
|
||||||
|
|
||||||
do_check() {
|
do_check() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue