set RemoteAddr in http request objects

fixes #266
This commit is contained in:
Lucas Clemente
2016-08-09 11:50:27 +02:00
parent d8f53d4cf7
commit 8c5a3dabd6
6 changed files with 20 additions and 7 deletions

View File

@@ -45,7 +45,7 @@ func (c *linkedConnection) write(p []byte) error {
}
func (*linkedConnection) setCurrentRemoteAddr(addr interface{}) {}
func (*linkedConnection) IP() net.IP { return nil }
func (*linkedConnection) RemoteAddr() *net.UDPAddr { return &net.UDPAddr{} }
func setAEAD(cs *handshake.CryptoSetup, aead crypto.AEAD) {
*(*bool)(unsafe.Pointer(reflect.ValueOf(cs).Elem().FieldByName("receivedForwardSecurePacket").UnsafeAddr())) = true