mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-11-17 18:06:15 -05:00
2ad7060375
- transparent proxy (pf rdr) in IPv4 environment - support both tcp and udp - enable TCP_FASTOPEN, SO_REUSEPORT_LB, SO_REUSEADDR - sockopt:mark is mapped to SO_USER_COOKIE
17 lines
350 B
Go
17 lines
350 B
Go
// +build !linux,!freebsd
|
|
|
|
package udp
|
|
|
|
import (
|
|
"v2ray.com/core/common/net"
|
|
)
|
|
|
|
func RetrieveOriginalDest(oob []byte) net.Destination {
|
|
return net.Destination{}
|
|
}
|
|
|
|
func ReadUDPMsg(conn *net.UDPConn, payload []byte, oob []byte) (int, int, int, *net.UDPAddr, error) {
|
|
nBytes, addr, err := conn.ReadFromUDP(payload)
|
|
return nBytes, 0, 0, addr, err
|
|
}
|