frp

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2023 License: GPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFRPServerPort

func GetFRPServerPort(host string) (string, error)

GetFRPServerPort Gets the port no from the FRPServer to establish the FRP connection needed.

func StartFRPCDockerContainer

func StartFRPCDockerContainer(ipaddress string, port string, Docker *docker.DockerVM) (*docker.DockerVM, error)

func StartFRPClientForServer

func StartFRPClientForServer(ipaddress string, port string, localport string, remoteport string) (string, error)

StartFRPClientForServer Starts Server using FRP server returns back a port remote port is a custom external port a user would want to open. This under the assumption the user knows the exact port available in server doing the TURN connection.

func StartFRPProxyFromRandom

func StartFRPProxyFromRandom() (int, error)

StartFRPProxyFromRandom starts reverse proxy server based on a random port generated

Types

type Client

type Client struct {
	Name           string
	Server         *Server
	ClientMappings []ClientMapping
}

Client This struct stores client information with server proxy connected

func (*Client) StartFRPClient

func (c *Client) StartFRPClient() error

StartFRPClient Starts FRP client

type ClientMapping

type ClientMapping struct {
	LocalIP    string
	LocalPort  int
	RemotePort int
}

ClientMapping Stores client mapping ports to proxy server

type Server

type Server struct {
	// contains filtered or unexported fields
}

func (*Server) StartFRPServer

func (s *Server) StartFRPServer() error

StartFRPServer The initial plan is only support reverse proxy for TCP ports This function starts a server that can act as a reverse proxy for nodes behind NAT.

Jump to

Keyboard shortcuts

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