Files

3.8 KiB

frp

import "github.com/Akilan1999/p2p-rendering-computation/p2p/frp"

Index

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

type Client

Client This struct stores client information with server proxy connected

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

func (*Client) StartFRPClient

func (c *Client) StartFRPClient() error

StartFRPClient Starts FRP client

type ClientMapping

ClientMapping Stores client mapping ports to proxy server

type ClientMapping struct {
    LocalIP    string
    LocalPort  int
    RemotePort int
}

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.

Generated by gomarkdoc