From 29cb680a4ba75b1e4515218c09853c16a1b34dab Mon Sep 17 00:00:00 2001 From: Shelikhoo Date: Sun, 12 Jun 2016 13:52:29 +0800 Subject: [PATCH] KCP: VMess will advertise its KCP capacity --- proxy/vmess/inbound/inbound.go | 4 +++- proxy/vmess/outbound/outbound.go | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/proxy/vmess/inbound/inbound.go b/proxy/vmess/inbound/inbound.go index 12809a149..2e5579f2d 100644 --- a/proxy/vmess/inbound/inbound.go +++ b/proxy/vmess/inbound/inbound.go @@ -220,7 +220,9 @@ func (this *VMessInboundHandler) HandleConnection(connection *hub.Connection) { readFinish.Lock() } - +func (this *VMessInboundHandler) setProxyCap() { + this.meta.KcpSupported = true +} func init() { internal.MustRegisterInboundHandlerCreator("vmess", func(space app.Space, rawConfig interface{}, meta *proxy.InboundHandlerMeta) (proxy.InboundHandler, error) { diff --git a/proxy/vmess/outbound/outbound.go b/proxy/vmess/outbound/outbound.go index 3c7f46c89..a06d95122 100644 --- a/proxy/vmess/outbound/outbound.go +++ b/proxy/vmess/outbound/outbound.go @@ -154,7 +154,9 @@ func (this *VMessOutboundHandler) handleResponse(session *raw.ClientSession, con return } - +func (this *VMessOutboundHandler) setProxyCap() { + this.meta.KcpSupported = true +} func init() { internal.MustRegisterOutboundHandlerCreator("vmess", func(space app.Space, rawConfig interface{}, meta *proxy.OutboundHandlerMeta) (proxy.OutboundHandler, error) {