Documentation
¶
Index ¶
- func GenerateCertificate(serverName string, template *x509.Certificate) (dnsName string, cert *x509.Certificate, keyPEM, certPEM []byte, err error)
- func GetControlFunc(conf *TcpConfig) func(network, address string, c syscall.RawConn) error
- func ListenRawConn(l net.Listener, nextHandler TransportHandler) error
- func LoadCert(file string) (*x509.Certificate, error)
- type Client
- type DstTransportHandler
- type SIP003Args
- type Server
- type SpoArgs
- type TcpConfig
- type Transport
- type TransportHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateCertificate ¶
func GenerateCertificate(serverName string, template *x509.Certificate) (dnsName string, cert *x509.Certificate, keyPEM, certPEM []byte, err error)
func GetControlFunc ¶
func ListenRawConn ¶
func ListenRawConn(l net.Listener, nextHandler TransportHandler) error
Types ¶
type Client ¶
type Client struct {
BindAddr string
DstAddr string
GRPC bool
GRPCServiceName string
ServerName string
CA string
CertHash string
InsecureSkipVerify bool
IdleTimeout time.Duration
SocketOpts *TcpConfig
OutboundBuf int
InboundBuf int
// contains filtered or unexported fields
}
func (*Client) ActiveAndServe ¶
type DstTransportHandler ¶
type DstTransportHandler struct {
// contains filtered or unexported fields
}
func NewDstTransportHandler ¶
func NewDstTransportHandler(dst string, idleTimeout time.Duration, outboundBufSize int) *DstTransportHandler
type SIP003Args ¶
type SIP003Args struct {
SS_REMOTE_HOST string
SS_REMOTE_PORT string
SS_LOCAL_HOST string
SS_LOCAL_PORT string
SS_PLUGIN_OPTIONS SpoArgs
}
SIP003Args contains sip003 args
func GetSIP003Args ¶
func GetSIP003Args() (*SIP003Args, error)
GetSIP003Args get sip003 args from os.Environ(), if no args, returns nil
func (*SIP003Args) GetLocalAddr ¶
func (args *SIP003Args) GetLocalAddr() string
func (*SIP003Args) GetRemoteAddr ¶
func (args *SIP003Args) GetRemoteAddr() string
type Server ¶
type Server struct {
BindAddr string
DstAddr string
GRPC bool
GRPCServiceName string
Cert, Key, ServerName string
IdleTimeout time.Duration
OutboundBuf int
InboundBuf int
// contains filtered or unexported fields
}
func (*Server) ActiveAndServe ¶
type TransportHandler ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.