mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-01-28 12:16:27 -05:00
7db39fb566
* add packetconn assembler * let kcp use environment dependency injection * Add destination override to simplified setting * add dtls dialer * add dtls listener * add dtls to default * fix bugs * add debug options to freedom outbound * fix kcp test failure for transport environment
49 lines
872 B
Go
49 lines
872 B
Go
package request
|
|
|
|
import (
|
|
"context"
|
|
"io"
|
|
|
|
"github.com/v2fly/v2ray-core/v5/common"
|
|
)
|
|
|
|
type RoundTripperClient interface {
|
|
Tripper
|
|
TransportClientAssemblyReceiver
|
|
}
|
|
|
|
type RoundTripperServer interface {
|
|
common.Runnable
|
|
TransportServerAssemblyReceiver
|
|
}
|
|
|
|
type Tripper interface {
|
|
RoundTrip(ctx context.Context, req Request, opts ...RoundTripperOption) (resp Response, err error)
|
|
}
|
|
|
|
type TripperReceiver interface {
|
|
OnRoundTrip(ctx context.Context, req Request, opts ...RoundTripperOption) (resp Response, err error)
|
|
}
|
|
|
|
type RoundTripperOption interface {
|
|
RoundTripperOption()
|
|
}
|
|
|
|
type Request struct {
|
|
Data []byte
|
|
ConnectionTag []byte
|
|
}
|
|
|
|
type Response struct {
|
|
Data []byte
|
|
}
|
|
|
|
type OptionSupportsStreamingResponse interface {
|
|
RoundTripperOption
|
|
GetResponseWriter() io.Writer
|
|
}
|
|
|
|
type OptionSupportsStreamingResponseExtensionFlusher interface {
|
|
Flush()
|
|
}
|