mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 20:11:19 -04:00
proxy: webRTCconn gives the remote IP instead of the Address
We only use the IP part of the address.
This commit is contained in:
parent
57eefd4b37
commit
b3c734ed63
2 changed files with 11 additions and 16 deletions
|
@ -113,13 +113,9 @@ func (c *webRTCConn) LocalAddr() net.Addr {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (c *webRTCConn) RemoteAddr() net.Addr {
|
||||
func (c *webRTCConn) RemoteIP() net.IP {
|
||||
//Parse Remote SDP offer and extract client IP
|
||||
clientIP := remoteIPFromSDP(c.pc.RemoteDescription().SDP)
|
||||
if clientIP == nil {
|
||||
return nil
|
||||
}
|
||||
return &net.IPAddr{IP: clientIP, Zone: ""}
|
||||
return remoteIPFromSDP(c.pc.RemoteDescription().SDP)
|
||||
}
|
||||
|
||||
func (c *webRTCConn) SetDeadline(t time.Time) error {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue