mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 20:11:19 -04:00
Keep track of clientAddr in statsChannel.
This commit is contained in:
parent
4697746120
commit
58556dc07b
1 changed files with 7 additions and 1 deletions
|
@ -155,7 +155,13 @@ func webSocketHandler(ws *websocket.WebSocket) {
|
|||
|
||||
// Pass the address of client as the remote address of incoming connection
|
||||
clientIPParam := ws.Request().URL.Query().Get("client_ip")
|
||||
or, err := pt.DialOr(&ptInfo, clientAddr(clientIPParam), ptMethodName)
|
||||
addr := clientAddr(clientIPParam)
|
||||
if addr == "" {
|
||||
statsChannel <- false
|
||||
} else {
|
||||
statsChannel <- true
|
||||
}
|
||||
or, err := pt.DialOr(&ptInfo, addr, ptMethodName)
|
||||
|
||||
if err != nil {
|
||||
log.Printf("failed to connect to ORPort: %s", err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue