From 1e05ea63d684083e7a05d0548d980efbeb2ff450 Mon Sep 17 00:00:00 2001 From: gVisor bot Date: Sun, 23 Dec 2018 00:42:08 +0800 Subject: [PATCH] Chore: make a consistent code style --- component/vmess/websocket.go | 2 +- proxy/redir/tcp_freebsd.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/component/vmess/websocket.go b/component/vmess/websocket.go index fc50b813..02e95d55 100644 --- a/component/vmess/websocket.go +++ b/component/vmess/websocket.go @@ -118,7 +118,7 @@ func newWebsocketConn(conn net.Conn, c *websocketConfig) (net.Conn, error) { dialer.TLSClientConfig = c.tlsConfig } - host, port, err := net.SplitHostPort(c.host) + host, port, _ := net.SplitHostPort(c.host) if (scheme == "ws" && port != "80") || (scheme == "wss" && port != "443") { host = c.host } diff --git a/proxy/redir/tcp_freebsd.go b/proxy/redir/tcp_freebsd.go index f0ceb36c..1f90121b 100644 --- a/proxy/redir/tcp_freebsd.go +++ b/proxy/redir/tcp_freebsd.go @@ -38,7 +38,7 @@ func parserPacket(conn net.Conn) (socks.Addr, error) { func getorigdst(fd uintptr) (socks.Addr, error) { raw := syscall.RawSockaddrInet4{} siz := unsafe.Sizeof(raw) - _, _, err := syscall.Syscall6(syscall.SYS_GETSOCKOPT, fd, syscall.IPPROTO_IP, SO_ORIGINAL_DST, uintptr(unsafe.Pointer(&raw)), uintptr(unsafe.Pointer(&siz)), 0); + _, _, err := syscall.Syscall6(syscall.SYS_GETSOCKOPT, fd, syscall.IPPROTO_IP, SO_ORIGINAL_DST, uintptr(unsafe.Pointer(&raw)), uintptr(unsafe.Pointer(&siz)), 0) if err != 0 { return nil, err }