From 90af5f19ba3e9dbbab72368eb5704370843beadd Mon Sep 17 00:00:00 2001 From: Roger Shimizu Date: Wed, 24 Jun 2020 12:57:03 +0800 Subject: [PATCH] Apply Debian's patch to upstream --- app/dns/dohdns.go | 2 +- app/dns/udpns.go | 2 +- app/proxyman/command/command.go | 0 common/crypto/chunk.go | 0 common/protocol/account.go | 0 common/protocol/context.go | 0 common/protocol/id.go | 0 common/signal/done/done.go | 0 common/signal/notifier.go | 0 common/uuid/uuid.go | 0 config.go | 0 core.go | 0 proxy/http/server.go | 0 proxy/proxy.go | 0 proxy/vmess/account.pb.go | 0 proxy/vmess/account.proto | 0 transport/internet/kcp/segment.go | 0 transport/internet/system_listener.go | 16 ++++++++-------- transport/internet/websocket/ws.go | 0 v2ray.go | 0 20 files changed, 10 insertions(+), 10 deletions(-) mode change 100755 => 100644 app/proxyman/command/command.go mode change 100755 => 100644 common/crypto/chunk.go mode change 100755 => 100644 common/protocol/account.go mode change 100755 => 100644 common/protocol/context.go mode change 100755 => 100644 common/protocol/id.go mode change 100755 => 100644 common/signal/done/done.go mode change 100755 => 100644 common/signal/notifier.go mode change 100755 => 100644 common/uuid/uuid.go mode change 100755 => 100644 config.go mode change 100755 => 100644 core.go mode change 100755 => 100644 proxy/http/server.go mode change 100755 => 100644 proxy/proxy.go mode change 100755 => 100644 proxy/vmess/account.pb.go mode change 100755 => 100644 proxy/vmess/account.proto mode change 100755 => 100644 transport/internet/kcp/segment.go mode change 100755 => 100644 transport/internet/websocket/ws.go mode change 100755 => 100644 v2ray.go diff --git a/app/dns/dohdns.go b/app/dns/dohdns.go index 89f96df8..26af4937 100644 --- a/app/dns/dohdns.go +++ b/app/dns/dohdns.go @@ -249,7 +249,7 @@ func (s *DoHNameServer) sendQuery(ctx context.Context, domain string, option IPO b, _ := dns.PackMessage(r.msg) resp, err := s.dohHTTPSContext(dnsCtx, b.Bytes()) if err != nil { - newError("failed to retrive response").Base(err).AtError().WriteToLog() + newError("failed to retrieve response").Base(err).AtError().WriteToLog() return } rec, err := parseResponse(resp) diff --git a/app/dns/udpns.go b/app/dns/udpns.go index 70148fde..f1f60aca 100644 --- a/app/dns/udpns.go +++ b/app/dns/udpns.go @@ -108,7 +108,7 @@ func (s *ClassicNameServer) HandleResponse(ctx context.Context, packet *udp_prot ipRec, err := parseResponse(packet.Payload.Bytes()) if err != nil { - newError(s.name, " fail to parse responsed DNS udp").AtError().WriteToLog() + newError(s.name, " fail to parse responded DNS udp").AtError().WriteToLog() return } diff --git a/app/proxyman/command/command.go b/app/proxyman/command/command.go old mode 100755 new mode 100644 diff --git a/common/crypto/chunk.go b/common/crypto/chunk.go old mode 100755 new mode 100644 diff --git a/common/protocol/account.go b/common/protocol/account.go old mode 100755 new mode 100644 diff --git a/common/protocol/context.go b/common/protocol/context.go old mode 100755 new mode 100644 diff --git a/common/protocol/id.go b/common/protocol/id.go old mode 100755 new mode 100644 diff --git a/common/signal/done/done.go b/common/signal/done/done.go old mode 100755 new mode 100644 diff --git a/common/signal/notifier.go b/common/signal/notifier.go old mode 100755 new mode 100644 diff --git a/common/uuid/uuid.go b/common/uuid/uuid.go old mode 100755 new mode 100644 diff --git a/config.go b/config.go old mode 100755 new mode 100644 diff --git a/core.go b/core.go old mode 100755 new mode 100644 diff --git a/proxy/http/server.go b/proxy/http/server.go old mode 100755 new mode 100644 diff --git a/proxy/proxy.go b/proxy/proxy.go old mode 100755 new mode 100644 diff --git a/proxy/vmess/account.pb.go b/proxy/vmess/account.pb.go old mode 100755 new mode 100644 diff --git a/proxy/vmess/account.proto b/proxy/vmess/account.proto old mode 100755 new mode 100644 diff --git a/transport/internet/kcp/segment.go b/transport/internet/kcp/segment.go old mode 100755 new mode 100644 diff --git a/transport/internet/system_listener.go b/transport/internet/system_listener.go index 3ab8d3a8..4c85c9ae 100644 --- a/transport/internet/system_listener.go +++ b/transport/internet/system_listener.go @@ -15,10 +15,10 @@ var ( type controller func(network, address string, fd uintptr) error type DefaultListener struct { - contollers []controller + controllers []controller } -func getControlFunc(ctx context.Context, sockopt *SocketConfig, contollers []controller) func(network, address string, c syscall.RawConn) error { +func getControlFunc(ctx context.Context, sockopt *SocketConfig, controllers []controller) func(network, address string, c syscall.RawConn) error { return func(network, address string, c syscall.RawConn) error { return c.Control(func(fd uintptr) { if sockopt != nil { @@ -27,7 +27,7 @@ func getControlFunc(ctx context.Context, sockopt *SocketConfig, contollers []con } } - for _, controller := range contollers { + for _, controller := range controllers { if err := controller(network, address, fd); err != nil { newError("failed to apply external controller").Base(err).WriteToLog(session.ExportIDToError(ctx)) } @@ -39,8 +39,8 @@ func getControlFunc(ctx context.Context, sockopt *SocketConfig, contollers []con func (dl *DefaultListener) Listen(ctx context.Context, addr net.Addr, sockopt *SocketConfig) (net.Listener, error) { var lc net.ListenConfig - if sockopt != nil || len(dl.contollers) > 0 { - lc.Control = getControlFunc(ctx, sockopt, dl.contollers) + if sockopt != nil || len(dl.controllers) > 0 { + lc.Control = getControlFunc(ctx, sockopt, dl.controllers) } return lc.Listen(ctx, addr.Network(), addr.String()) @@ -49,8 +49,8 @@ func (dl *DefaultListener) Listen(ctx context.Context, addr net.Addr, sockopt *S func (dl *DefaultListener) ListenPacket(ctx context.Context, addr net.Addr, sockopt *SocketConfig) (net.PacketConn, error) { var lc net.ListenConfig - if sockopt != nil || len(dl.contollers) > 0 { - lc.Control = getControlFunc(ctx, sockopt, dl.contollers) + if sockopt != nil || len(dl.controllers) > 0 { + lc.Control = getControlFunc(ctx, sockopt, dl.controllers) } return lc.ListenPacket(ctx, addr.Network(), addr.String()) @@ -65,6 +65,6 @@ func RegisterListenerController(controller func(network, address string, fd uint return newError("nil listener controller") } - effectiveListener.contollers = append(effectiveListener.contollers, controller) + effectiveListener.controllers = append(effectiveListener.controllers, controller) return nil } diff --git a/transport/internet/websocket/ws.go b/transport/internet/websocket/ws.go old mode 100755 new mode 100644 diff --git a/v2ray.go b/v2ray.go old mode 100755 new mode 100644