1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-21 17:46:58 -05:00

partially revert compression stream.

This commit is contained in:
Darien Raymond 2016-12-21 12:53:31 +01:00
parent 68fe9d8007
commit 99c897992d
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169
3 changed files with 15 additions and 2 deletions

View File

@ -14,11 +14,18 @@ const (
RequestCommandUDP = RequestCommand(0x02)
)
// RequestOption is the options of a request.
type RequestOption byte
const (
RequestOptionChunkStream = RequestOption(0x01)
// RequestOptionChunkStream indicates request payload is chunked. Each chunk consists of length, authentication and payload.
RequestOptionChunkStream = RequestOption(0x01)
// RequestOptionConnectionReuse indicates client side expects to reuse the connection.
RequestOptionConnectionReuse = RequestOption(0x02)
// RequestOptionCompressedStream indicates request payload is compressed.
RequestOptionCompressedStream = RequestOption(0x04)
)
func (v RequestOption) Has(option RequestOption) bool {
@ -66,7 +73,7 @@ func (v *RequestHeader) Destination() v2net.Destination {
type ResponseOption byte
const (
ResponseOptionConnectionReuse = ResponseOption(1)
ResponseOptionConnectionReuse = ResponseOption(0x01)
)
func (v *ResponseOption) Set(option ResponseOption) {

View File

@ -9,7 +9,10 @@ option java_outer_classname = "AccountProto";
import "v2ray.com/core/common/protocol/headers.proto";
message Account {
// ID of the account, in the form of an UUID, e.g., "66ad4540-b58c-4ad2-9926-ea63445a9b57".
string id = 1;
// Number of alternative IDs. Client and server must share the same number.
uint32 alter_id = 2;
// Security settings. Only applies to client side.
v2ray.core.common.protocol.SecurityConfig security_settings = 3;
}

View File

@ -18,12 +18,14 @@ import (
"v2ray.com/core/transport/ray"
)
// VMessOutboundHandler is an outbound connection handler for VMess protocol.
type VMessOutboundHandler struct {
serverList *protocol.ServerList
serverPicker protocol.ServerPicker
meta *proxy.OutboundHandlerMeta
}
// Dispatch implements OutboundHandler.Dispatch().
func (v *VMessOutboundHandler) Dispatch(target v2net.Destination, payload *buf.Buffer, ray ray.OutboundRay) {
defer ray.OutboundInput().Release()
defer ray.OutboundOutput().Close()
@ -150,6 +152,7 @@ func (v *VMessOutboundHandler) handleResponse(session *encoding.ClientSession, c
return
}
// Factory is a proxy factory for VMess outbound.
type Factory struct{}
func (v *Factory) StreamCapability() v2net.NetworkList {