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 }