瀏覽代碼

KCP: VMess will advertise its KCP capacity

Shelikhoo 9 年之前
父節點
當前提交
29cb680a4b
共有 2 個文件被更改,包括 6 次插入2 次删除
  1. 3 1
      proxy/vmess/inbound/inbound.go
  2. 3 1
      proxy/vmess/outbound/outbound.go

+ 3 - 1
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) {

+ 3 - 1
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) {