Documentation ¶
Index ¶
- func FetchExternalIP() (net.IP, error)
- func GetClient(ctx context.Context, addr, secret string) (context.Context, tpb.TunnelClient, *grpc.ClientConn, error)
- func GetDNSLogClient(addr string) (tpb.DNSLogClient, *grpc.ClientConn, error)
- func GetTunnelServerCommandCli() *cli.App
- func GetTunnelServerExternalIP(addr string, secret string) (net.IP, error)
- func HoldingCreateTunnelClient(client tpb.Tunnel_CreateTunnelClient, localhost string, localport int, ...) error
- func MirrorLocalPortToRemote(network string, localPort int, remotePort int, id string, addr, secret string, ...) error
- func MirrorLocalPortToRemoteEx(network string, localHost string, localPort int, remotePort int, id string, ...) error
- func MirrorLocalPortToRemoteWithRegisterEx(enableRegister bool, pubKey []byte, grpcSecret string, verbose string, ...) (fErr error)
- func QueryExistedDNSLogEvents(addr string, token string) ([]*tpb.DNSLogEvent, error)
- func QueryExistedDNSLogEventsEx(addr string, token string, timeout ...float64) ([]*tpb.DNSLogEvent, error)
- func QueryExistedRandomPortTriggerEvents(token, addr, secret string, ctx context.Context) (*tpb.RandomPortTriggerEvent, error)
- func QueryICMPLengthTriggerNotifications(length int, addr, secret string, ctx context.Context) (*tpb.ICMPTriggerNotification, error)
- func RemoveTunnel(id string)
- func RequireDNSLogDomain(addr string) (domain string, token string, _ error)
- func RequirePortByToken(token string, addr, secret string, ctx context.Context) (*tpb.RequireRandomPortTriggerResponse, error)
- type ICMPTrigger
- type ICMPTriggerNotification
- type RandomPortTrigger
- type TriggerNotification
- type Tunnel
- type TunnelClientConn
- type TunnelServer
- func (s *TunnelServer) CreateTunnel(server tpb.Tunnel_CreateTunnelServer) error
- func (t *TunnelServer) GetAllRegisteredTunnel(ctx context.Context, req *tpb.GetAllRegisteredTunnelRequest) (*tpb.GetAllRegisteredTunnelResponse, error)
- func (t *TunnelServer) GetRegisteredTunnelDescriptionByID(ctx context.Context, req *tpb.GetRegisteredTunnelDescriptionByIDRequest) (*tpb.RegisteredTunnel, error)
- func (s *TunnelServer) InitialReverseTrigger() error
- func (s *TunnelServer) QueryExistedDNSLog(ctx context.Context, params *tpb.QueryExistedDNSLogParams) (*tpb.QueryExistedDNSLogResponse, error)
- func (t *TunnelServer) QueryExistedRandomPortTrigger(c context.Context, req *tpb.QueryExistedRandomPortTriggerRequest) (*tpb.QueryExistedRandomPortTriggerResponse, error)
- func (s *TunnelServer) QuerySpecificICMPLengthTrigger(ctx context.Context, req *tpb.QuerySpecificICMPLengthTriggerParams) (*tpb.QuerySpecificICMPLengthTriggerResponse, error)
- func (s *TunnelServer) RegisterTunnel(ctx context.Context, req *tpb.RegisterTunnelRequest) (*tpb.RegisterTunnelResponse, error)
- func (s *TunnelServer) RemoteIP(ctx context.Context, req *tpb.Empty) (*tpb.RemoteIPResponse, error)
- func (s *TunnelServer) RequireDomain(ctx context.Context, params *tpb.RequireDomainParams) (*tpb.RequireDomainResponse, error)
- func (t *TunnelServer) RequireRandomPortTrigger(ctx context.Context, req *tpb.RequireRandomPortTriggerParams) (*tpb.RequireRandomPortTriggerResponse, error)
- type TunnelServerConn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchExternalIP ¶
func GetClient ¶
func GetClient(ctx context.Context, addr, secret string) (context.Context, tpb.TunnelClient, *grpc.ClientConn, error)
func GetDNSLogClient ¶
func GetDNSLogClient(addr string) (tpb.DNSLogClient, *grpc.ClientConn, error)
func MirrorLocalPortToRemote ¶
func QueryExistedDNSLogEvents ¶
func QueryExistedDNSLogEvents(addr string, token string) ([]*tpb.DNSLogEvent, error)
func QueryExistedDNSLogEventsEx ¶ added in v1.2.2
func RemoveTunnel ¶
func RemoveTunnel(id string)
func RequireDNSLogDomain ¶
func RequirePortByToken ¶
Types ¶
type ICMPTrigger ¶
type ICMPTrigger struct {
// contains filtered or unexported fields
}
func NewICMPTrigger ¶
func NewICMPTrigger() (*ICMPTrigger, error)
func (*ICMPTrigger) GetICMPTriggerNotification ¶
func (p *ICMPTrigger) GetICMPTriggerNotification(i int) (*ICMPTriggerNotification, error)
func (*ICMPTrigger) Run ¶
func (p *ICMPTrigger) Run() error
type ICMPTriggerNotification ¶
type ICMPTriggerNotification struct { Size int CurrentRemoteAddr string Histories []string CurrentRemoteCachedConnectionCount int SizeCachedHistoryConnectionCount int TriggerTimestamp int64 Timestamp int64 }
func (*ICMPTriggerNotification) Show ¶
func (t *ICMPTriggerNotification) Show()
type RandomPortTrigger ¶
type RandomPortTrigger struct {
// contains filtered or unexported fields
}
func NewRandomPortTrigger ¶
func NewRandomPortTrigger() (*RandomPortTrigger, error)
func (*RandomPortTrigger) GetTriggerNotification ¶
func (p *RandomPortTrigger) GetTriggerNotification(port int) (*TriggerNotification, error)
func (*RandomPortTrigger) Run ¶
func (p *RandomPortTrigger) Run() error
type TriggerNotification ¶
type TriggerNotification struct { LocalPort int CurrentRemoteAddr string Histories []string CurrentRemoteCachedConnectionCount int LocalPortCachedHistoryConnectionCount int TriggerTimestamp int64 Timestamp int64 }
func (*TriggerNotification) Show ¶
func (t *TriggerNotification) Show()
type Tunnel ¶
type Tunnel struct { Id string Host string Port int PublicKeyPEM []byte Secret string Verbose string // finished / registered / working Status string }
func GetTunnels ¶
func GetTunnels() []*Tunnel
type TunnelClientConn ¶
type TunnelClientConn struct {
// contains filtered or unexported fields
}
func NewTunnelClientConn ¶
func NewTunnelClientConn(id string, remoteAddr string, reader chan []byte, stream tpb.Tunnel_CreateTunnelClient) *TunnelClientConn
func (*TunnelClientConn) Close ¶
func (s *TunnelClientConn) Close() error
type TunnelServer ¶
type TunnelServer struct { tpb.TunnelServer ExternalIP string // 二级密码是用来分别 SecondaryPassword string }
func NewTunnelServer ¶
func NewTunnelServer() (*TunnelServer, error)
func (*TunnelServer) CreateTunnel ¶
func (s *TunnelServer) CreateTunnel(server tpb.Tunnel_CreateTunnelServer) error
func (*TunnelServer) GetAllRegisteredTunnel ¶
func (t *TunnelServer) GetAllRegisteredTunnel(ctx context.Context, req *tpb.GetAllRegisteredTunnelRequest) (*tpb.GetAllRegisteredTunnelResponse, error)
func (*TunnelServer) GetRegisteredTunnelDescriptionByID ¶
func (t *TunnelServer) GetRegisteredTunnelDescriptionByID(ctx context.Context, req *tpb.GetRegisteredTunnelDescriptionByIDRequest) (*tpb.RegisteredTunnel, error)
func (*TunnelServer) InitialReverseTrigger ¶
func (s *TunnelServer) InitialReverseTrigger() error
func (*TunnelServer) QueryExistedDNSLog ¶
func (s *TunnelServer) QueryExistedDNSLog(ctx context.Context, params *tpb.QueryExistedDNSLogParams) (*tpb.QueryExistedDNSLogResponse, error)
func (*TunnelServer) QueryExistedRandomPortTrigger ¶
func (t *TunnelServer) QueryExistedRandomPortTrigger(c context.Context, req *tpb.QueryExistedRandomPortTriggerRequest) (*tpb.QueryExistedRandomPortTriggerResponse, error)
func (*TunnelServer) QuerySpecificICMPLengthTrigger ¶
func (s *TunnelServer) QuerySpecificICMPLengthTrigger(ctx context.Context, req *tpb.QuerySpecificICMPLengthTriggerParams) (*tpb.QuerySpecificICMPLengthTriggerResponse, error)
func (*TunnelServer) RegisterTunnel ¶
func (s *TunnelServer) RegisterTunnel(ctx context.Context, req *tpb.RegisterTunnelRequest) (*tpb.RegisterTunnelResponse, error)
func (*TunnelServer) RemoteIP ¶
func (s *TunnelServer) RemoteIP(ctx context.Context, req *tpb.Empty) (*tpb.RemoteIPResponse, error)
func (*TunnelServer) RequireDomain ¶
func (s *TunnelServer) RequireDomain(ctx context.Context, params *tpb.RequireDomainParams) (*tpb.RequireDomainResponse, error)
func (*TunnelServer) RequireRandomPortTrigger ¶
func (t *TunnelServer) RequireRandomPortTrigger(ctx context.Context, req *tpb.RequireRandomPortTriggerParams) (*tpb.RequireRandomPortTriggerResponse, error)
type TunnelServerConn ¶
type TunnelServerConn struct { io.ReadWriteCloser // contains filtered or unexported fields }
func NewTunnelServerConn ¶
func NewTunnelServerConn(id string, desc *connectionDesc, stream tpb.Tunnel_CreateTunnelServer) *TunnelServerConn
func (*TunnelServerConn) Close ¶
func (s *TunnelServerConn) Close() error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.