tun

package module
v0.0.0-...-2f326a3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 28, 2019 License: MIT Imports: 9 Imported by: 2

README

grpc-tun

gRPC reverse tunnel over gRPC streaming

Usage

See example/hello.

example/hello/proto defines an example gRPC service GreetingService.

example/hello/tun-server is a tunnel server and GreetingService client.

example/hello/tun-client is a tunnel client and GreetingService server.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(name string) (*tunnelClient, error)

func NewServer

func NewServer() (*tunnelServer, error)

Types

type Addr

type Addr string

func (Addr) Network

func (a Addr) Network() string

func (Addr) String

func (a Addr) String() string

type Conn

type Conn struct {
	LocalNetAddr  net.Addr
	RemoteNetAddr net.Addr
	// contains filtered or unexported fields
}

Conn implements net.Conn

func (*Conn) Close

func (c *Conn) Close() error

func (*Conn) LocalAddr

func (c *Conn) LocalAddr() net.Addr

func (*Conn) Open

func (c *Conn) Open() (recv, send chan []byte, err error)

func (*Conn) Read

func (c *Conn) Read(b []byte) (n int, err error)

func (*Conn) RemoteAddr

func (c *Conn) RemoteAddr() net.Addr

func (*Conn) SetDeadline

func (c *Conn) SetDeadline(t time.Time) error

func (*Conn) SetReadDeadline

func (c *Conn) SetReadDeadline(t time.Time) error

func (*Conn) SetWriteDeadline

func (c *Conn) SetWriteDeadline(t time.Time) error

func (*Conn) Write

func (c *Conn) Write(b []byte) (n int, err error)

type ErrType

type ErrType struct {
	IsTimeout   bool
	IsTemporary bool
	// contains filtered or unexported fields
}

func (*ErrType) Temporary

func (e *ErrType) Temporary() bool

func (*ErrType) Timeout

func (e *ErrType) Timeout() bool

Directories

Path Synopsis
example

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL