Documentation
¶
Index ¶
Constants ¶
View Source
const ( // LambdaMinMemorySize is the minimum memory size for a Lambda function in MB LambdaMinMemorySize = 128 // LambdaMaxMemorySize is the maximum memory size for a Lambda function in MB LambdaMaxMemorySize = 3008 // LambdaDelayedCleanupTime is the time to wait if active connections still exist // this should be never be higher than LambdaExecutionTimeoutBuffer or function timeout // will happen before cleanup occurs LambdaDelayedCleanupTime = time.Second * 20 // LambdaExecutionTimeoutBuffer is the time added to user specified execution frequency // to get the overall function timeout value LambdaExecutionTimeoutBuffer = time.Second * 30 // LambdaMinExecutionFrequency is the minimum frequency for function execution. LambdaMinExecutionFrequency = time.Second * 60 // LambdaMaxExecutionFrequency is the maximum frequency for function execution. // The current max execution time is 900 seconds, but this takes into account // LambdaExecutionTimeoutBuffer + 10 seconds of leeway LambdaMaxExecutionFrequency = time.Second * 860 )
Variables ¶
This section is empty.
Functions ¶
func GetSessionAWS ¶
func GetValidLambdaRegions ¶
func GetValidLambdaRegions() []string
func NewSSHManager ¶
NewSSHManager generates an ssh key and adds to authorized_keys so Lambda can connect to the host
func SetupLambdaInfrastructure ¶
SetupLambdaInfrastructure sets up IAM role needed to run awslambdaproxy
Types ¶
type Config ¶
type Config struct { // LambdaName is a name of Lambda function LambdaName string // LambdaIamRoleName is a name of Lambda function IAM role LambdaIamRoleName string // LambdaRegions is all regions to execute Lambda functions in LambdaRegions []string // LambdaMemory is the size of memory to assign Lambda function LambdaMemory int // LambdaExecutionFrequency is the frequency at which to execute Lambda functions LambdaExecutionFrequency time.Duration // ProxyListeners defines all listeners, protocol, and auth information // in format like this [scheme://][user:pass@host]:port. // see https://github.com/ginuerzh/gost/blob/master/README_en.md#getting-started ProxyListeners []string // ProxyDebug is whether debug logging should be shown for proxy traffic // note this will log all visited domains ProxyDebug bool // ReverseTunnelSSHUser is the ssh user to use for the lambda reverse ssh tunnel ReverseTunnelSSHUser string // ReverseTunnelSSHPort is the ssh port to use for the lambda reverse ssh tunnel ReverseTunnelSSHPort string // Debug enables general debug logging Debug bool // Bypass is a comma separated list of ips/domains to bypass proxy Bypass string }
Config is used to define the configuration for Server
type LocalProxy ¶
type LocalProxy struct {
// contains filtered or unexported fields
}
LocalProxy is proxy listener and where to forward
func NewLocalProxy ¶
func NewLocalProxy(listeners []string, debugProxy bool, bypass string) (*LocalProxy, error)
NewLocalProxy starts a local proxy that will forward to proxy running in Lambda
Source Files
¶
Click to show internal directories.
Click to hide internal directories.