Chore: make a consistent code style

This commit is contained in:
gVisor bot 2018-12-23 00:42:08 +08:00
parent c8366739ee
commit 1e05ea63d6
2 changed files with 2 additions and 2 deletions

View file

@ -118,7 +118,7 @@ func newWebsocketConn(conn net.Conn, c *websocketConfig) (net.Conn, error) {
dialer.TLSClientConfig = c.tlsConfig 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") { if (scheme == "ws" && port != "80") || (scheme == "wss" && port != "443") {
host = c.host host = c.host
} }

View file

@ -38,7 +38,7 @@ func parserPacket(conn net.Conn) (socks.Addr, error) {
func getorigdst(fd uintptr) (socks.Addr, error) { func getorigdst(fd uintptr) (socks.Addr, error) {
raw := syscall.RawSockaddrInet4{} raw := syscall.RawSockaddrInet4{}
siz := unsafe.Sizeof(raw) 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 { if err != 0 {
return nil, err return nil, err
} }