From acde5a55b66eaaadaa86f53ee9fb3223ef2b356c Mon Sep 17 00:00:00 2001 From: wuxiaolong Date: Wed, 24 Jul 2019 22:08:21 +0800 Subject: [PATCH] Rewrite comments in English --- proxy/http/client.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/proxy/http/client.go b/proxy/http/client.go index fcb13189f..1c3282f66 100644 --- a/proxy/http/client.go +++ b/proxy/http/client.go @@ -46,8 +46,7 @@ func NewClient(ctx context.Context, config *ClientConfig) (*Client, error) { }, nil } -// Process implements proxy.Outbound.Process. -// 使用connect方法连接http代理服务器,获得一个隧道,然后通过该隧道通信 +// Process implements proxy.Outbound.Process. We first create a socket tunnel via HTTP CONNECT method, then redirect all inbound traffic to that tunnel. func (c *Client) Process(ctx context.Context, link *transport.Link, dialer internet.Dialer) error { outbound := session.OutboundFromContext(ctx) if outbound == nil || !outbound.Target.IsValid() { @@ -113,7 +112,7 @@ func (c *Client) Process(ctx context.Context, link *transport.Link, dialer inter return nil } -// 使用http connect方法建立一个隧道 +// setUpHttpTunnel will create a socket tunnel via HTTP CONNECT method func setUpHttpTunnel(reader io.Reader, writer io.Writer, destination *net.Destination, user *protocol.MemoryUser) error { var headers []string destNetAddr := destination.NetAddr()