Chore: make a consistent code style
This commit is contained in:
parent
c8366739ee
commit
1e05ea63d6
2 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue