mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-12-30 05:56:54 -05:00
move vendor to external
This commit is contained in:
parent
44d87ed642
commit
f1934a4ff2
@ -29,7 +29,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
========================================================================
|
||||
|
||||
The x64 field arithmetic implementation was derived from the Microsoft Research
|
||||
SIDH implementation, <https://github.com/Microsoft/PQCrypto-SIDH>, available
|
||||
SIDH implementation, <https://v2ray.com/core/external/github.com/Microsoft/PQCrypto-SIDH>, available
|
||||
under the following license:
|
||||
|
||||
========================================================================
|
@ -3,7 +3,7 @@
|
||||
package p503
|
||||
|
||||
import (
|
||||
. "github.com/cloudflare/sidh/internal/isogeny"
|
||||
. "v2ray.com/core/external/github.com/cloudflare/sidh/internal/isogeny"
|
||||
)
|
||||
|
||||
// If choice = 0, leave x,y unchanged. If choice = 1, set x,y = y,x.
|
@ -3,8 +3,8 @@
|
||||
package p503
|
||||
|
||||
import (
|
||||
. "github.com/cloudflare/sidh/internal/arith"
|
||||
. "github.com/cloudflare/sidh/internal/isogeny"
|
||||
. "v2ray.com/core/external/github.com/cloudflare/sidh/internal/arith"
|
||||
. "v2ray.com/core/external/github.com/cloudflare/sidh/internal/isogeny"
|
||||
)
|
||||
|
||||
// Compute z = x + y (mod p).
|
@ -1,8 +1,8 @@
|
||||
package p503
|
||||
|
||||
import (
|
||||
. "github.com/cloudflare/sidh/internal/isogeny"
|
||||
cpu "github.com/cloudflare/sidh/internal/utils"
|
||||
. "v2ray.com/core/external/github.com/cloudflare/sidh/internal/isogeny"
|
||||
cpu "v2ray.com/core/external/github.com/cloudflare/sidh/internal/utils"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -25,7 +25,7 @@ const (
|
||||
)
|
||||
|
||||
// CPU Capabilities. Those flags are referred by assembly code. According to
|
||||
// https://github.com/golang/go/issues/28230, variables referred from the
|
||||
// https://v2ray.com/core/external/github.com/golang/go/issues/28230, variables referred from the
|
||||
// assembly must be in the same package.
|
||||
// We declare them variables not constants in order to facilitate testing.
|
||||
var (
|
@ -1,7 +1,7 @@
|
||||
package p503
|
||||
|
||||
import (
|
||||
. "github.com/cloudflare/sidh/internal/isogeny"
|
||||
. "v2ray.com/core/external/github.com/cloudflare/sidh/internal/isogeny"
|
||||
)
|
||||
|
||||
type fp503Ops struct{}
|
@ -3,7 +3,7 @@
|
||||
package p751
|
||||
|
||||
import (
|
||||
. "github.com/cloudflare/sidh/internal/isogeny"
|
||||
. "v2ray.com/core/external/github.com/cloudflare/sidh/internal/isogeny"
|
||||
)
|
||||
|
||||
// If choice = 0, leave x,y unchanged. If choice = 1, set x,y = y,x.
|
@ -3,8 +3,8 @@
|
||||
package p751
|
||||
|
||||
import (
|
||||
. "github.com/cloudflare/sidh/internal/arith"
|
||||
. "github.com/cloudflare/sidh/internal/isogeny"
|
||||
. "v2ray.com/core/external/github.com/cloudflare/sidh/internal/arith"
|
||||
. "v2ray.com/core/external/github.com/cloudflare/sidh/internal/isogeny"
|
||||
)
|
||||
|
||||
// Compute z = x + y (mod p).
|
@ -1,8 +1,8 @@
|
||||
package p751
|
||||
|
||||
import (
|
||||
. "github.com/cloudflare/sidh/internal/isogeny"
|
||||
cpu "github.com/cloudflare/sidh/internal/utils"
|
||||
. "v2ray.com/core/external/github.com/cloudflare/sidh/internal/isogeny"
|
||||
cpu "v2ray.com/core/external/github.com/cloudflare/sidh/internal/utils"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -25,7 +25,7 @@ const (
|
||||
)
|
||||
|
||||
// CPU Capabilities. Those flags are referred by assembly code. According to
|
||||
// https://github.com/golang/go/issues/28230, variables referred from the
|
||||
// https://v2ray.com/core/external/github.com/golang/go/issues/28230, variables referred from the
|
||||
// assembly must be in the same package.
|
||||
// We declare them variables not constants in order to facilitate testing.
|
||||
var (
|
@ -1,6 +1,6 @@
|
||||
package p751
|
||||
|
||||
import . "github.com/cloudflare/sidh/internal/isogeny"
|
||||
import . "v2ray.com/core/external/github.com/cloudflare/sidh/internal/isogeny"
|
||||
|
||||
// 2*p751
|
||||
var ()
|
@ -2,7 +2,7 @@ package sidh
|
||||
|
||||
import (
|
||||
"errors"
|
||||
. "github.com/cloudflare/sidh/internal/isogeny"
|
||||
. "v2ray.com/core/external/github.com/cloudflare/sidh/internal/isogeny"
|
||||
"io"
|
||||
)
|
||||
|
@ -1,9 +1,9 @@
|
||||
package sidh
|
||||
|
||||
import (
|
||||
. "github.com/cloudflare/sidh/internal/isogeny"
|
||||
p503 "github.com/cloudflare/sidh/p503"
|
||||
p751 "github.com/cloudflare/sidh/p751"
|
||||
. "v2ray.com/core/external/github.com/cloudflare/sidh/internal/isogeny"
|
||||
p503 "v2ray.com/core/external/github.com/cloudflare/sidh/p503"
|
||||
p751 "v2ray.com/core/external/github.com/cloudflare/sidh/p751"
|
||||
)
|
||||
|
||||
// Keeps mapping: SIDH prime field ID to domain parameters
|
@ -1,7 +1,7 @@
|
||||
package sidh
|
||||
|
||||
import (
|
||||
. "github.com/cloudflare/sidh/internal/isogeny"
|
||||
. "v2ray.com/core/external/github.com/cloudflare/sidh/internal/isogeny"
|
||||
)
|
||||
|
||||
// -----------------------------------------------------------------------------
|
64
external/github.com/gorilla/websocket/README.md
vendored
Normal file
64
external/github.com/gorilla/websocket/README.md
vendored
Normal file
@ -0,0 +1,64 @@
|
||||
# Gorilla WebSocket
|
||||
|
||||
Gorilla WebSocket is a [Go](http://golang.org/) implementation of the
|
||||
[WebSocket](http://www.rfc-editor.org/rfc/rfc6455.txt) protocol.
|
||||
|
||||
[![Build Status](https://travis-ci.org/gorilla/websocket.svg?branch=master)](https://travis-ci.org/gorilla/websocket)
|
||||
[![GoDoc](https://godoc.org/v2ray.com/core/external/v2ray.com/core/external/v2ray.com/core/external/v2ray.com/core/external/v2ray.com/core/external/github.com/gorilla/websocket?status.svg)](https://godoc.org/v2ray.com/core/external/v2ray.com/core/external/v2ray.com/core/external/v2ray.com/core/external/v2ray.com/core/external/github.com/gorilla/websocket)
|
||||
|
||||
### Documentation
|
||||
|
||||
* [API Reference](http://godoc.org/v2ray.com/core/external/v2ray.com/core/external/v2ray.com/core/external/v2ray.com/core/external/v2ray.com/core/external/github.com/gorilla/websocket)
|
||||
* [Chat example](https://v2ray.com/core/external/v2ray.com/core/external/v2ray.com/core/external/v2ray.com/core/external/v2ray.com/core/external/github.com/gorilla/websocket/tree/master/examples/chat)
|
||||
* [Command example](https://v2ray.com/core/external/v2ray.com/core/external/v2ray.com/core/external/v2ray.com/core/external/v2ray.com/core/external/github.com/gorilla/websocket/tree/master/examples/command)
|
||||
* [Client and server example](https://v2ray.com/core/external/v2ray.com/core/external/v2ray.com/core/external/v2ray.com/core/external/v2ray.com/core/external/github.com/gorilla/websocket/tree/master/examples/echo)
|
||||
* [File watch example](https://v2ray.com/core/external/v2ray.com/core/external/v2ray.com/core/external/v2ray.com/core/external/v2ray.com/core/external/github.com/gorilla/websocket/tree/master/examples/filewatch)
|
||||
|
||||
### Status
|
||||
|
||||
The Gorilla WebSocket package provides a complete and tested implementation of
|
||||
the [WebSocket](http://www.rfc-editor.org/rfc/rfc6455.txt) protocol. The
|
||||
package API is stable.
|
||||
|
||||
### Installation
|
||||
|
||||
go get v2ray.com/core/external/v2ray.com/core/external/v2ray.com/core/external/v2ray.com/core/external/v2ray.com/core/external/github.com/gorilla/websocket
|
||||
|
||||
### Protocol Compliance
|
||||
|
||||
The Gorilla WebSocket package passes the server tests in the [Autobahn Test
|
||||
Suite](http://autobahn.ws/testsuite) using the application in the [examples/autobahn
|
||||
subdirectory](https://v2ray.com/core/external/v2ray.com/core/external/v2ray.com/core/external/v2ray.com/core/external/v2ray.com/core/external/github.com/gorilla/websocket/tree/master/examples/autobahn).
|
||||
|
||||
### Gorilla WebSocket compared with other packages
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th><a href="http://godoc.org/v2ray.com/core/external/v2ray.com/core/external/v2ray.com/core/external/v2ray.com/core/external/v2ray.com/core/external/github.com/gorilla/websocket">v2ray.com/core/external/v2ray.com/core/external/v2ray.com/core/external/v2ray.com/core/external/v2ray.com/core/external/github.com/gorilla</a></th>
|
||||
<th><a href="http://godoc.org/golang.org/x/net/websocket">golang.org/x/net</a></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr><td colspan="3"><a href="http://tools.ietf.org/html/rfc6455">RFC 6455</a> Features</td></tr>
|
||||
<tr><td>Passes <a href="http://autobahn.ws/testsuite/">Autobahn Test Suite</a></td><td><a href="https://v2ray.com/core/external/v2ray.com/core/external/v2ray.com/core/external/v2ray.com/core/external/v2ray.com/core/external/github.com/gorilla/websocket/tree/master/examples/autobahn">Yes</a></td><td>No</td></tr>
|
||||
<tr><td>Receive <a href="https://tools.ietf.org/html/rfc6455#section-5.4">fragmented</a> message<td>Yes</td><td><a href="https://code.google.com/p/go/issues/detail?id=7632">No</a>, see note 1</td></tr>
|
||||
<tr><td>Send <a href="https://tools.ietf.org/html/rfc6455#section-5.5.1">close</a> message</td><td><a href="http://godoc.org/v2ray.com/core/external/v2ray.com/core/external/v2ray.com/core/external/v2ray.com/core/external/v2ray.com/core/external/github.com/gorilla/websocket#hdr-Control_Messages">Yes</a></td><td><a href="https://code.google.com/p/go/issues/detail?id=4588">No</a></td></tr>
|
||||
<tr><td>Send <a href="https://tools.ietf.org/html/rfc6455#section-5.5.2">pings</a> and receive <a href="https://tools.ietf.org/html/rfc6455#section-5.5.3">pongs</a></td><td><a href="http://godoc.org/v2ray.com/core/external/v2ray.com/core/external/v2ray.com/core/external/v2ray.com/core/external/v2ray.com/core/external/github.com/gorilla/websocket#hdr-Control_Messages">Yes</a></td><td>No</td></tr>
|
||||
<tr><td>Get the <a href="https://tools.ietf.org/html/rfc6455#section-5.6">type</a> of a received data message</td><td>Yes</td><td>Yes, see note 2</td></tr>
|
||||
<tr><td colspan="3">Other Features</tr></td>
|
||||
<tr><td><a href="https://tools.ietf.org/html/rfc7692">Compression Extensions</a></td><td>Experimental</td><td>No</td></tr>
|
||||
<tr><td>Read message using io.Reader</td><td><a href="http://godoc.org/v2ray.com/core/external/v2ray.com/core/external/v2ray.com/core/external/v2ray.com/core/external/v2ray.com/core/external/github.com/gorilla/websocket#Conn.NextReader">Yes</a></td><td>No, see note 3</td></tr>
|
||||
<tr><td>Write message using io.WriteCloser</td><td><a href="http://godoc.org/v2ray.com/core/external/v2ray.com/core/external/v2ray.com/core/external/v2ray.com/core/external/v2ray.com/core/external/github.com/gorilla/websocket#Conn.NextWriter">Yes</a></td><td>No, see note 3</td></tr>
|
||||
</table>
|
||||
|
||||
Notes:
|
||||
|
||||
1. Large messages are fragmented in [Chrome's new WebSocket implementation](http://www.ietf.org/mail-archive/web/hybi/current/msg10503.html).
|
||||
2. The application can get the type of a received data message by implementing
|
||||
a [Codec marshal](http://godoc.org/golang.org/x/net/websocket#Codec.Marshal)
|
||||
function.
|
||||
3. The go.net io.Reader and io.Writer operate across WebSocket frame boundaries.
|
||||
Read returns when the input buffer is full or a frame boundary is
|
||||
encountered. Each call to Write sends a single frame message. The Gorilla
|
||||
io.Reader and io.WriteCloser operate on a single WebSocket message.
|
||||
|
@ -36,8 +36,8 @@
|
||||
- Add a `quic.Config` option to configure keep-alive
|
||||
- Rename the STK to Cookie
|
||||
- Implement `net.Conn`-style deadlines for streams
|
||||
- Remove the `tls.Config` from the `quic.Config`. The `tls.Config` must now be passed to the `Dial` and `Listen` functions as a separate parameter. See the [Godoc](https://godoc.org/github.com/lucas-clemente/quic-go) for details.
|
||||
- Changed the log level environment variable to only accept strings ("DEBUG", "INFO", "ERROR"), see [the wiki](https://github.com/lucas-clemente/quic-go/wiki/Logging) for more details.
|
||||
- Remove the `tls.Config` from the `quic.Config`. The `tls.Config` must now be passed to the `Dial` and `Listen` functions as a separate parameter. See the [Godoc](https://godoc.org/v2ray.com/core/external/github.com/lucas-clemente/quic-go) for details.
|
||||
- Changed the log level environment variable to only accept strings ("DEBUG", "INFO", "ERROR"), see [the wiki](https://v2ray.com/core/external/github.com/lucas-clemente/quic-go/wiki/Logging) for more details.
|
||||
- Rename the `h2quic.QuicRoundTripper` to `h2quic.RoundTripper`
|
||||
- Changed `h2quic.Server.Serve()` to accept a `net.PacketConn`
|
||||
- Drop support for Go 1.7 and 1.8.
|
@ -2,25 +2,25 @@
|
||||
|
||||
<img src="docs/quic.png" width=303 height=124>
|
||||
|
||||
[![Godoc Reference](https://img.shields.io/badge/godoc-reference-blue.svg?style=flat-square)](https://godoc.org/github.com/lucas-clemente/quic-go)
|
||||
[![Godoc Reference](https://img.shields.io/badge/godoc-reference-blue.svg?style=flat-square)](https://godoc.org/v2ray.com/core/external/github.com/lucas-clemente/quic-go)
|
||||
[![Travis Build Status](https://img.shields.io/travis/lucas-clemente/quic-go/master.svg?style=flat-square&label=Travis+build)](https://travis-ci.org/lucas-clemente/quic-go)
|
||||
[![CircleCI Build Status](https://img.shields.io/circleci/project/github/lucas-clemente/quic-go.svg?style=flat-square&label=CircleCI+build)](https://circleci.com/gh/lucas-clemente/quic-go)
|
||||
[![Windows Build Status](https://img.shields.io/appveyor/ci/lucas-clemente/quic-go/master.svg?style=flat-square&label=windows+build)](https://ci.appveyor.com/project/lucas-clemente/quic-go/branch/master)
|
||||
[![Code Coverage](https://img.shields.io/codecov/c/github/lucas-clemente/quic-go/master.svg?style=flat-square)](https://codecov.io/gh/lucas-clemente/quic-go/)
|
||||
|
||||
quic-go is an implementation of the [QUIC](https://en.wikipedia.org/wiki/QUIC) protocol in Go. It roughly implements the [IETF QUIC draft](https://github.com/quicwg/base-drafts), although we don't fully support any of the draft versions at the moment.
|
||||
quic-go is an implementation of the [QUIC](https://en.wikipedia.org/wiki/QUIC) protocol in Go. It roughly implements the [IETF QUIC draft](https://v2ray.com/core/external/github.com/quicwg/base-drafts), although we don't fully support any of the draft versions at the moment.
|
||||
|
||||
## Version compatibility
|
||||
|
||||
Since quic-go is under active development, there's no guarantee that two builds of different commits are interoperable. The QUIC version used in the *master* branch is just a placeholder, and should not be considered stable.
|
||||
|
||||
If you want to use quic-go as a library in other projects, please consider using a [tagged release](https://github.com/lucas-clemente/quic-go/releases). These releases expose [experimental QUIC versions](https://github.com/quicwg/base-drafts/wiki/QUIC-Versions), which are guaranteed to be stable.
|
||||
If you want to use quic-go as a library in other projects, please consider using a [tagged release](https://v2ray.com/core/external/github.com/lucas-clemente/quic-go/releases). These releases expose [experimental QUIC versions](https://v2ray.com/core/external/github.com/quicwg/base-drafts/wiki/QUIC-Versions), which are guaranteed to be stable.
|
||||
|
||||
## Google QUIC
|
||||
|
||||
quic-go used to support both the QUIC versions supported by Google Chrome and QUIC as deployed on Google's servers, as well as IETF QUIC. Due to the divergence of the two protocols, we decided to not support both versions any more.
|
||||
|
||||
The *master* branch **only** supports IETF QUIC. For Google QUIC support, please refer to the [gquic branch](https://github.com/lucas-clemente/quic-go/tree/gquic).
|
||||
The *master* branch **only** supports IETF QUIC. For Google QUIC support, please refer to the [gquic branch](https://v2ray.com/core/external/github.com/lucas-clemente/quic-go/tree/gquic).
|
||||
|
||||
## Guides
|
||||
|
||||
@ -65,4 +65,4 @@ http.Client{
|
||||
|
||||
## Contributing
|
||||
|
||||
We are always happy to welcome new contributors! We have a number of self-contained issues that are suitable for first-time contributors, they are tagged with [help wanted](https://github.com/lucas-clemente/quic-go/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22). If you have any questions, please feel free to reach out by opening an issue or leaving a comment.
|
||||
We are always happy to welcome new contributors! We have a number of self-contained issues that are suitable for first-time contributors, they are tagged with [help wanted](https://v2ray.com/core/external/github.com/lucas-clemente/quic-go/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22). If you have any questions, please feel free to reach out by opening an issue or leaving a comment.
|
@ -10,7 +10,7 @@ environment:
|
||||
- GOARCH: 386
|
||||
- GOARCH: amd64
|
||||
|
||||
clone_folder: c:\gopath\src\github.com\lucas-clemente\quic-go
|
||||
clone_folder: c:\gopath\src\v2ray.com/core/external/github.com\lucas-clemente\quic-go
|
||||
|
||||
install:
|
||||
- rmdir c:\go /s /q
|
||||
@ -19,8 +19,8 @@ install:
|
||||
- set PATH=%PATH%;%GOPATH%\bin\windows_%GOARCH%;%GOPATH%\bin
|
||||
- echo %PATH%
|
||||
- echo %GOPATH%
|
||||
- go get github.com/onsi/ginkgo/ginkgo
|
||||
- go get github.com/onsi/gomega
|
||||
- go get v2ray.com/core/external/github.com/onsi/ginkgo/ginkgo
|
||||
- go get v2ray.com/core/external/github.com/onsi/gomega
|
||||
- go version
|
||||
- go env
|
||||
- go get -v -t ./...
|
@ -3,7 +3,7 @@ package quic
|
||||
import (
|
||||
"sync"
|
||||
|
||||
"github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
"v2ray.com/core/common/bytespool"
|
||||
)
|
||||
|
@ -7,11 +7,11 @@ import (
|
||||
"net"
|
||||
"sync"
|
||||
|
||||
"github.com/lucas-clemente/quic-go/internal/handshake"
|
||||
"github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
"github.com/lucas-clemente/quic-go/internal/qerr"
|
||||
"github.com/lucas-clemente/quic-go/internal/utils"
|
||||
"github.com/lucas-clemente/quic-go/internal/wire"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/handshake"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/qerr"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/wire"
|
||||
)
|
||||
|
||||
type client struct {
|
@ -5,9 +5,9 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
|
||||
"github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
"github.com/lucas-clemente/quic-go/internal/utils"
|
||||
"github.com/lucas-clemente/quic-go/internal/wire"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/wire"
|
||||
)
|
||||
|
||||
type cryptoStream interface {
|
@ -3,8 +3,8 @@ package quic
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
"github.com/lucas-clemente/quic-go/internal/wire"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/wire"
|
||||
)
|
||||
|
||||
type cryptoDataHandler interface {
|
@ -3,8 +3,8 @@ package quic
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
"github.com/lucas-clemente/quic-go/internal/utils"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils"
|
||||
)
|
||||
|
||||
type frameSorter struct {
|
@ -3,8 +3,8 @@ package quic
|
||||
import (
|
||||
"sync"
|
||||
|
||||
"github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
"github.com/lucas-clemente/quic-go/internal/wire"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/wire"
|
||||
)
|
||||
|
||||
type framer interface {
|
@ -6,8 +6,8 @@ import (
|
||||
"net"
|
||||
"time"
|
||||
|
||||
"github.com/lucas-clemente/quic-go/internal/handshake"
|
||||
"github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/handshake"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
)
|
||||
|
||||
// The StreamID is the ID of a QUIC stream.
|
@ -3,8 +3,8 @@ package ackhandler
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
"github.com/lucas-clemente/quic-go/internal/wire"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/wire"
|
||||
)
|
||||
|
||||
// SentPacketHandler handles ACKs received for outgoing packets
|
@ -3,8 +3,8 @@ package ackhandler
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
"github.com/lucas-clemente/quic-go/internal/wire"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/wire"
|
||||
)
|
||||
|
||||
// A Packet is a packet
|
@ -1,6 +1,6 @@
|
||||
// This file was automatically generated by genny.
|
||||
// Any changes will be lost if this file is regenerated.
|
||||
// see https://github.com/cheekybits/genny
|
||||
// see https://v2ray.com/core/external/github.com/cheekybits/genny
|
||||
|
||||
package ackhandler
|
||||
|
@ -4,8 +4,8 @@ import (
|
||||
"crypto/rand"
|
||||
"math"
|
||||
|
||||
"github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
"github.com/lucas-clemente/quic-go/internal/wire"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/wire"
|
||||
)
|
||||
|
||||
// The packetNumberGenerator generates the packet number for the next packet
|
@ -4,10 +4,10 @@ import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/lucas-clemente/quic-go/internal/congestion"
|
||||
"github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
"github.com/lucas-clemente/quic-go/internal/utils"
|
||||
"github.com/lucas-clemente/quic-go/internal/wire"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/congestion"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/wire"
|
||||
)
|
||||
|
||||
const (
|
@ -1,10 +1,10 @@
|
||||
package ackhandler
|
||||
|
||||
import (
|
||||
"github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
"github.com/lucas-clemente/quic-go/internal/qerr"
|
||||
"github.com/lucas-clemente/quic-go/internal/utils"
|
||||
"github.com/lucas-clemente/quic-go/internal/wire"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/qerr"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/wire"
|
||||
)
|
||||
|
||||
// The receivedPacketHistory stores if a packet number has already been received.
|
@ -3,10 +3,10 @@ package ackhandler
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/lucas-clemente/quic-go/internal/congestion"
|
||||
"github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
"github.com/lucas-clemente/quic-go/internal/utils"
|
||||
"github.com/lucas-clemente/quic-go/internal/wire"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/congestion"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/wire"
|
||||
)
|
||||
|
||||
type receivedPacketTracker struct {
|
@ -1,6 +1,6 @@
|
||||
package ackhandler
|
||||
|
||||
import "github.com/lucas-clemente/quic-go/internal/wire"
|
||||
import "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/wire"
|
||||
|
||||
// Returns a new slice with all non-retransmittable frames deleted.
|
||||
func stripNonRetransmittableFrames(fs []wire.Frame) []wire.Frame {
|
@ -6,11 +6,11 @@ import (
|
||||
"math"
|
||||
"time"
|
||||
|
||||
"github.com/lucas-clemente/quic-go/internal/congestion"
|
||||
"github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
"github.com/lucas-clemente/quic-go/internal/qerr"
|
||||
"github.com/lucas-clemente/quic-go/internal/utils"
|
||||
"github.com/lucas-clemente/quic-go/internal/wire"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/congestion"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/qerr"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/wire"
|
||||
)
|
||||
|
||||
const (
|
@ -3,7 +3,7 @@ package ackhandler
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
)
|
||||
|
||||
type sentPacketHistory struct {
|
@ -3,7 +3,7 @@ package congestion
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
)
|
||||
|
||||
// Bandwidth of a connection
|
@ -4,8 +4,8 @@ import (
|
||||
"math"
|
||||
"time"
|
||||
|
||||
"github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
"github.com/lucas-clemente/quic-go/internal/utils"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils"
|
||||
)
|
||||
|
||||
// This cubic implementation is based on the one found in Chromiums's QUIC
|
@ -3,8 +3,8 @@ package congestion
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
"github.com/lucas-clemente/quic-go/internal/utils"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils"
|
||||
)
|
||||
|
||||
const (
|
@ -3,8 +3,8 @@ package congestion
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
"github.com/lucas-clemente/quic-go/internal/utils"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils"
|
||||
)
|
||||
|
||||
// Note(pwestin): the magic clamping numbers come from the original code in
|
@ -3,7 +3,7 @@ package congestion
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
)
|
||||
|
||||
// A SendAlgorithm performs congestion control and calculates the congestion window
|
@ -1,7 +1,7 @@
|
||||
package congestion
|
||||
|
||||
import (
|
||||
"github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
)
|
||||
|
||||
// PrrSender implements the Proportional Rate Reduction (PRR) per RFC 6937
|
@ -3,7 +3,7 @@ package congestion
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/lucas-clemente/quic-go/internal/utils"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils"
|
||||
)
|
||||
|
||||
const (
|
@ -1,6 +1,6 @@
|
||||
package congestion
|
||||
|
||||
import "github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
import "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
|
||||
type connectionStats struct {
|
||||
slowstartPacketsLost protocol.PacketNumber
|
@ -1,6 +1,6 @@
|
||||
package crypto
|
||||
|
||||
import "github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
import "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
|
||||
// An AEAD implements QUIC's authenticated encryption and associated data
|
||||
type AEAD interface {
|
@ -6,7 +6,7 @@ import (
|
||||
"encoding/binary"
|
||||
"errors"
|
||||
|
||||
"github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
)
|
||||
|
||||
type aeadAESGCM struct {
|
@ -6,7 +6,7 @@ import (
|
||||
"encoding/binary"
|
||||
)
|
||||
|
||||
// copied from https://github.com/cloudflare/tls-tris/blob/master/hkdf.go
|
||||
// copied from https://v2ray.com/core/external/github.com/cloudflare/tls-tris/blob/master/hkdf.go
|
||||
func hkdfExtract(hash crypto.Hash, secret, salt []byte) []byte {
|
||||
if salt == nil {
|
||||
salt = make([]byte, hash.Size())
|
||||
@ -19,7 +19,7 @@ func hkdfExtract(hash crypto.Hash, secret, salt []byte) []byte {
|
||||
return extractor.Sum(nil)
|
||||
}
|
||||
|
||||
// copied from https://github.com/cloudflare/tls-tris/blob/master/hkdf.go
|
||||
// copied from https://v2ray.com/core/external/github.com/cloudflare/tls-tris/blob/master/hkdf.go
|
||||
func hkdfExpand(hash crypto.Hash, prk, info []byte, l int) []byte {
|
||||
var (
|
||||
expander = hmac.New(hash.New, prk)
|
@ -3,7 +3,7 @@ package crypto
|
||||
import (
|
||||
"crypto"
|
||||
|
||||
"github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
)
|
||||
|
||||
var quicVersion1Salt = []byte{0x9c, 0x10, 0x8f, 0x98, 0x52, 0x0a, 0x5c, 0x5c, 0x32, 0x96, 0x8e, 0x95, 0x0e, 0x8a, 0x2c, 0x5f, 0xe0, 0x6d, 0x6c, 0x38}
|
@ -4,9 +4,9 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/lucas-clemente/quic-go/internal/congestion"
|
||||
"github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
"github.com/lucas-clemente/quic-go/internal/utils"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/congestion"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils"
|
||||
)
|
||||
|
||||
type baseFlowController struct {
|
@ -3,10 +3,10 @@ package flowcontrol
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/lucas-clemente/quic-go/internal/congestion"
|
||||
"github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
"github.com/lucas-clemente/quic-go/internal/qerr"
|
||||
"github.com/lucas-clemente/quic-go/internal/utils"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/congestion"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/qerr"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils"
|
||||
)
|
||||
|
||||
type connectionFlowController struct {
|
@ -1,6 +1,6 @@
|
||||
package flowcontrol
|
||||
|
||||
import "github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
import "v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
|
||||
type flowController interface {
|
||||
// for sending
|
@ -3,10 +3,10 @@ package flowcontrol
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/lucas-clemente/quic-go/internal/congestion"
|
||||
"github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
"github.com/lucas-clemente/quic-go/internal/qerr"
|
||||
"github.com/lucas-clemente/quic-go/internal/utils"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/congestion"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/qerr"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils"
|
||||
)
|
||||
|
||||
type streamFlowController struct {
|
@ -4,7 +4,7 @@ import (
|
||||
"crypto/cipher"
|
||||
"encoding/binary"
|
||||
|
||||
"github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
)
|
||||
|
||||
type sealer struct {
|
@ -6,7 +6,7 @@ import (
|
||||
"net"
|
||||
"time"
|
||||
|
||||
"github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
)
|
||||
|
||||
const (
|
@ -7,9 +7,9 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
|
||||
"github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
"github.com/lucas-clemente/quic-go/internal/utils"
|
||||
"github.com/marten-seemann/qtls"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils"
|
||||
"v2ray.com/core/external/github.com/marten-seemann/qtls"
|
||||
)
|
||||
|
||||
type messageType uint8
|
@ -4,8 +4,8 @@ import (
|
||||
"crypto"
|
||||
"crypto/aes"
|
||||
|
||||
"github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
"github.com/marten-seemann/qtls"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
"v2ray.com/core/external/github.com/marten-seemann/qtls"
|
||||
)
|
||||
|
||||
var quicVersion1Salt = []byte{0xef, 0x4f, 0xb0, 0xab, 0xb4, 0x74, 0x70, 0xc4, 0x1b, 0xef, 0xcf, 0x80, 0x31, 0x33, 0x4f, 0xae, 0x48, 0x5e, 0x09, 0xa0}
|
@ -4,8 +4,8 @@ import (
|
||||
"crypto/x509"
|
||||
"io"
|
||||
|
||||
"github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
"github.com/marten-seemann/qtls"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
"v2ray.com/core/external/github.com/marten-seemann/qtls"
|
||||
)
|
||||
|
||||
// Opener opens a packet
|
@ -3,7 +3,7 @@ package handshake
|
||||
import (
|
||||
"crypto/tls"
|
||||
|
||||
"github.com/marten-seemann/qtls"
|
||||
"v2ray.com/core/external/github.com/marten-seemann/qtls"
|
||||
)
|
||||
|
||||
func tlsConfigToQtlsConfig(c *tls.Config) *qtls.Config {
|
@ -6,8 +6,8 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
"github.com/lucas-clemente/quic-go/internal/utils"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils"
|
||||
)
|
||||
|
||||
const quicTLSExtensionType = 0xffa5
|
@ -4,10 +4,10 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
"github.com/lucas-clemente/quic-go/internal/qerr"
|
||||
"github.com/lucas-clemente/quic-go/internal/utils"
|
||||
"github.com/marten-seemann/qtls"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/qerr"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils"
|
||||
"v2ray.com/core/external/github.com/marten-seemann/qtls"
|
||||
)
|
||||
|
||||
type extensionHandlerClient struct {
|
@ -3,10 +3,10 @@ package handshake
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
"github.com/lucas-clemente/quic-go/internal/qerr"
|
||||
"github.com/lucas-clemente/quic-go/internal/utils"
|
||||
"github.com/marten-seemann/qtls"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/qerr"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils"
|
||||
"v2ray.com/core/external/github.com/marten-seemann/qtls"
|
||||
)
|
||||
|
||||
type extensionHandlerServer struct {
|
@ -8,8 +8,8 @@ import (
|
||||
"sort"
|
||||
"time"
|
||||
|
||||
"github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
"github.com/lucas-clemente/quic-go/internal/utils"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
"v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/utils"
|
||||
)
|
||||
|
||||
type transportParameterID uint16
|
@ -7,13 +7,13 @@
|
||||
# Afterwards, it corrects the import paths (replaces internalpackage back to internal).
|
||||
|
||||
TEMP_DIR=$(mktemp -d)
|
||||
mkdir -p $TEMP_DIR/src/github.com/lucas-clemente/quic-go/internalpackage
|
||||
mkdir -p $TEMP_DIR/src/v2ray.com/core/external/github.com/lucas-clemente/quic-go/internalpackage
|
||||
|
||||
# uppercase the name of the interface (only has an effect for private interfaces)
|
||||
INTERFACE_NAME="$(tr '[:lower:]' '[:upper:]' <<< ${4:0:1})${4:1}"
|
||||
PACKAGE_NAME=`echo $3 | sed 's/.*\///'`
|
||||
|
||||
cp -r $GOPATH/src/github.com/lucas-clemente/quic-go/internal/* $TEMP_DIR/src/github.com/lucas-clemente/quic-go/internalpackage
|
||||
cp -r $GOPATH/src/v2ray.com/core/external/github.com/lucas-clemente/quic-go/internal/* $TEMP_DIR/src/v2ray.com/core/external/github.com/lucas-clemente/quic-go/internalpackage
|
||||
find $TEMP_DIR -type f -name "*.go" -exec sed -i '' 's/internal/internalpackage/g' {} \;
|
||||
|
||||
export GOPATH="$TEMP_DIR:$GOPATH"
|
@ -10,7 +10,7 @@ import (
|
||||
// VersionNumber is a version number as int
|
||||
type VersionNumber uint32
|
||||
|
||||
// gQUIC version range as defined in the wiki: https://github.com/quicwg/base-drafts/wiki/QUIC-Versions
|
||||
// gQUIC version range as defined in the wiki: https://v2ray.com/core/external/github.com/quicwg/base-drafts/wiki/QUIC-Versions
|
||||
const (
|
||||
gquicVersion0 = 0x51303030
|
||||
maxGquicVersion = 0x51303439
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user