Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ServeFileWithConfig ¶
func ServeFileWithConfig(conf FileServerConfig)
func ServeFileWithToken ¶
Types ¶
type Config ¶
type Config struct { /* Token is a string. It identify an user. You can find a token at the https://dashboard.pinggy.io. Token is required to connect in TCP and TLS tunnel. */ Token string /* Tunnel type. It can be one of TCP or TLS or HTTP or empty. Both type and altType cannot be empty. */ Type TunnelType /* Alternate AltTunnelType. It can be UDP or empty. However, both type and altType cannot be empty. As of now only one of them can be populated. */ AltType AltTunnelType /* Pinggy supports ssh over ssl when user is behind a firewall which does not allow anything but ssl. Simply enable this flag and this package would take care of this problem. */ SshOverSsl bool /* Pinggy server to connect to. Default value `a.pinggy.io`. Users are discouraged to use this. */ Server string // contains filtered or unexported fields }
type FileServerConfig ¶
type PinggyListener ¶
type PinggyListener interface { net.Listener net.PacketConn /* Return the remote urls to access the tunnels. */ RemoteUrls() []string /* Start webdebugger. This can not be call multiple time. Once the debugger started, it cannot be closed. Also, the debugger is not available in case of `tls` and `tcp` tunnel */ InitiateWebDebug(addr string) error /* Start a webserver. */ ServeHttp(fs fs.FS) error }
func Connect ¶
func Connect() (PinggyListener, error)
func ConnectTcp ¶
func ConnectTcp(token string) (PinggyListener, error)
func ConnectTls ¶
func ConnectTls(token string) (PinggyListener, error)
func ConnectToken ¶
func ConnectToken(token string) (PinggyListener, error)
func ConnectWithConfig ¶
func ConnectWithConfig(conf Config) (PinggyListener, error)
type TunnelType ¶
type TunnelType string
const ( TCP TunnelType = "tcp" TLS TunnelType = "tls" HTTP TunnelType = "http" )
Click to show internal directories.
Click to hide internal directories.