mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 11:11:30 -04:00
Client timeouts are currently counted from when the client is matched with a proxy. Instead, count client timeouts from the moment when the request is received. Closes #40449
30 lines
632 B
Go
30 lines
632 B
Go
package messages
|
|
|
|
import (
|
|
"context"
|
|
"errors"
|
|
)
|
|
|
|
type RendezvousMethod string
|
|
|
|
const (
|
|
RendezvousHttp RendezvousMethod = "http"
|
|
RendezvousAmpCache RendezvousMethod = "ampcache"
|
|
RendezvousSqs RendezvousMethod = "sqs"
|
|
)
|
|
|
|
type Arg struct {
|
|
Body []byte
|
|
RemoteAddr string
|
|
RendezvousMethod RendezvousMethod
|
|
Context context.Context
|
|
}
|
|
|
|
var (
|
|
ErrBadRequest = errors.New("bad request")
|
|
ErrInternal = errors.New("internal error")
|
|
ErrExtraInfo = errors.New("client sent extra info")
|
|
|
|
StrTimedOut = "timed out waiting for answer!"
|
|
StrNoProxies = "no snowflake proxies currently available"
|
|
)
|