Documentation ¶
Index ¶
- Constants
- type Agent
- type Conn
- func (c *Conn) Close() error
- func (c *Conn) LocalAddr() net.Addr
- func (c *Conn) Read(b []byte) (n int, err error)
- func (c *Conn) RemoteAddr() net.Addr
- func (c *Conn) SetDeadline(t time.Time) error
- func (c *Conn) SetReadDeadline(t time.Time) error
- func (c *Conn) SetWriteDeadline(t time.Time) error
- func (c *Conn) Write(b []byte) (n int, err error)
- type ConnThroughRelay
- func (c *ConnThroughRelay) Close() error
- func (c *ConnThroughRelay) LocalAddr() net.Addr
- func (c *ConnThroughRelay) Read(b []byte) (n int, err error)
- func (c *ConnThroughRelay) RemoteAddr() net.Addr
- func (c *ConnThroughRelay) SetDeadline(t time.Time) error
- func (c *ConnThroughRelay) SetReadDeadline(t time.Time) error
- func (c *ConnThroughRelay) SetWriteDeadline(t time.Time) error
- func (c *ConnThroughRelay) Write(b []byte) (n int, err error)
- type ConnectionManager
- type Dialer
- type Frame
- type Relay
- type Server
- func (s *Server) Accept(_ *http.Server, conn *tls.Conn, _ http.Handler)
- func (s *Server) DialUpstream(ctx context.Context, name string) (net.Conn, error)
- func (s *Server) DialUpstreamForRelay(ctx context.Context, name string, w io.Writer, dialId uint32) (uint32, *net.TCPAddr, error)
- func (s *Server) RoundTrip(httpBackend *configv2.HTTPBackend, req *http.Request) (*http.Response, error)
- func (s *Server) Serve(conn net.Conn) error
- type Stream
Constants ¶
View Source
const ( AddrTypeV4 byte = 0x01 AddrTypeV6 byte = 02 )
View Source
const ( ProtocolName = "lc1" DefaultCertificatePassword = "ZRechGaCSqBPdtTZ599Ivw" )
View Source
const ( OpcodeDial uint8 = 1 + iota OpcodeDialSuccess OpcodePacket OpcodeHeartbeat )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agent ¶
type Agent struct {
// contains filtered or unexported fields
}
func NewAgent ¶
func NewAgent(cert *x509.Certificate, privateKey crypto.PrivateKey, caCert []*x509.Certificate, backend string) *Agent
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
func (*Conn) RemoteAddr ¶
type ConnThroughRelay ¶
type ConnThroughRelay struct {
// contains filtered or unexported fields
}
func NewConnThroughRelay ¶
func (*ConnThroughRelay) Close ¶
func (c *ConnThroughRelay) Close() error
func (*ConnThroughRelay) LocalAddr ¶
func (c *ConnThroughRelay) LocalAddr() net.Addr
func (*ConnThroughRelay) RemoteAddr ¶
func (c *ConnThroughRelay) RemoteAddr() net.Addr
func (*ConnThroughRelay) SetDeadline ¶
func (c *ConnThroughRelay) SetDeadline(t time.Time) error
func (*ConnThroughRelay) SetReadDeadline ¶
func (c *ConnThroughRelay) SetReadDeadline(t time.Time) error
func (*ConnThroughRelay) SetWriteDeadline ¶
func (c *ConnThroughRelay) SetWriteDeadline(t time.Time) error
type ConnectionManager ¶
type ConnectionManager struct { MaxConnsPerHost int // contains filtered or unexported fields }
func NewConnectionManager ¶
func NewConnectionManager(conf *configv2.Config, locator database.RelayLocator) *ConnectionManager
type Server ¶
type Server struct { Config *configv2.Config Locator database.RelayLocator Pool *ConnectionManager // contains filtered or unexported fields }
func NewServer ¶
func NewServer(conf *configv2.Config, rpcConn *grpc.ClientConn, locator database.RelayLocator) *Server
func (*Server) DialUpstream ¶
func (*Server) DialUpstreamForRelay ¶
Click to show internal directories.
Click to hide internal directories.