mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 20:11:19 -04:00
Pull client IP from SDP for AMP cache rendezvous
The remote address for AMP cache rendezvous is always geolocated to the AMP cache server address. For more accurate metrics on where this rendezvous method is used and working, we can pull the remote address directly from the client SDP sent in the poll request.
This commit is contained in:
parent
8ae1994e4b
commit
31f879aad5
2 changed files with 18 additions and 5 deletions
|
@ -9,7 +9,6 @@ import (
|
|||
|
||||
"gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/v2/common/amp"
|
||||
"gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/v2/common/messages"
|
||||
"gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/v2/common/util"
|
||||
)
|
||||
|
||||
// ampClientOffers is the AMP-speaking endpoint for client poll messages,
|
||||
|
@ -41,7 +40,7 @@ func ampClientOffers(i *IPC, w http.ResponseWriter, r *http.Request) {
|
|||
if err == nil {
|
||||
arg := messages.Arg{
|
||||
Body: encPollReq,
|
||||
RemoteAddr: util.GetClientIp(r),
|
||||
RemoteAddr: "",
|
||||
RendezvousMethod: messages.RendezvousAmpCache,
|
||||
Context: ctx,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue