mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 20:11:19 -04:00
Rename *PollRequest methods to distinguish client/proxy
This commit is contained in:
parent
6e29dc676c
commit
6fd0f1ae5d
8 changed files with 12 additions and 12 deletions
|
@ -149,7 +149,7 @@ func clientOffers(i *IPC, w http.ResponseWriter, r *http.Request) {
|
|||
Offer: string(body),
|
||||
NAT: r.Header.Get("Snowflake-NAT-Type"),
|
||||
}
|
||||
body, err = req.EncodePollRequest()
|
||||
body, err = req.EncodeClientPollRequest()
|
||||
if err != nil {
|
||||
log.Printf("Error shimming the legacy request: %s", err.Error())
|
||||
w.WriteHeader(http.StatusInternalServerError)
|
||||
|
|
|
@ -75,7 +75,7 @@ func (i *IPC) Debug(_ interface{}, response *string) error {
|
|||
}
|
||||
|
||||
func (i *IPC) ProxyPolls(arg messages.Arg, response *[]byte) error {
|
||||
sid, proxyType, natType, clients, err := messages.DecodePollRequest(arg.Body)
|
||||
sid, proxyType, natType, clients, err := messages.DecodeProxyPollRequest(arg.Body)
|
||||
if err != nil {
|
||||
return messages.ErrBadRequest
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue