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 ¶ added in v0.6.0
func ListenRawConn(l net.Listener, nextHandler TransportHandler) error
Types ¶
type Client ¶ added in v0.5.0
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 ¶ added in v0.5.0
type DstTransportHandler ¶ added in v0.8.0
type DstTransportHandler struct {
// contains filtered or unexported fields
}
func NewDstTransportHandler ¶ added in v0.8.0
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 ¶ added in v0.5.0
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 ¶ added in v0.5.0
type TransportHandler ¶ added in v0.6.0
Source Files ¶
Click to show internal directories.
Click to hide internal directories.