Documentation
¶
Index ¶
- Constants
- Variables
- func API() *cli.Command
- func ConfigFromContext(c *cli.Context) *config.Config
- func DNS() *cli.Command
- func FileReceive() *cli.Command
- func FileSend() *cli.Command
- func Main() func(c *cli.Context) error
- func MainFlags() []cli.Flag
- func Peergate() *cli.Command
- func Proxy() *cli.Command
- func ServiceAdd() *cli.Command
- func ServiceConnect() *cli.Command
- func Start() *cli.Command
Constants ¶
View Source
const Copyright string = `` /* 188-byte string literal not displayed */
Variables ¶
View Source
var CommonFlags []cli.Flag = []cli.Flag{ &cli.StringFlag{ Name: "config", Usage: "Specify a path to a edgevpn config file", EnvVars: []string{"EDGEVPNCONFIG"}, }, &cli.StringSliceFlag{ Name: "listen-maddrs", Usage: "Override default 0.0.0.0 listen multiaddresses", EnvVars: []string{"EDGEVPNLISTENMADDRS"}, }, &cli.StringSliceFlag{ Name: "dht-announce-maddrs", Usage: "Override listen-maddrs on DHT announce", EnvVars: []string{"EDGEVPNDHTANNOUNCEMADDRS"}, }, &cli.StringFlag{ Name: "timeout", Usage: "Specify a default timeout for connection stream", EnvVars: []string{"EDGEVPNTIMEOUT"}, Value: "15s", }, &cli.IntFlag{ Name: "mtu", Usage: "Specify a mtu", EnvVars: []string{"EDGEVPNMTU"}, Value: 1200, }, &cli.BoolFlag{ Name: "bootstrap-iface", Usage: "Setup interface on startup (need privileges)", EnvVars: []string{"EDGEVPNBOOTSTRAPIFACE"}, Value: true, }, &cli.IntFlag{ Name: "packet-mtu", Usage: "Specify a mtu", EnvVars: []string{"EDGEVPNPACKETMTU"}, Value: 1420, }, &cli.IntFlag{ Name: "channel-buffer-size", Usage: "Specify a channel buffer size", EnvVars: []string{"EDGEVPNCHANNELBUFFERSIZE"}, Value: 0, }, &cli.IntFlag{ Name: "discovery-interval", Usage: "DHT discovery interval time", EnvVars: []string{"EDGEVPNDHTINTERVAL"}, Value: 720, }, &cli.IntFlag{ Name: "ledger-announce-interval", Usage: "Ledger announce interval time", EnvVars: []string{"EDGEVPNLEDGERINTERVAL"}, Value: 10, }, &cli.StringFlag{ Name: "autorelay-discovery-interval", Usage: "Autorelay discovery interval", EnvVars: []string{"EDGEVPNAUTORELAYDISCOVERYINTERVAL"}, Value: "5m", }, &cli.BoolFlag{ Name: "autorelay-static-only", Usage: "Use only defined static relays", EnvVars: []string{"EDGEVPNAUTORELAYSTATICONLY"}, }, &cli.IntFlag{ Name: "ledger-synchronization-interval", Usage: "Ledger synchronization interval time", EnvVars: []string{"EDGEVPNLEDGERSYNCINTERVAL"}, Value: 10, }, &cli.IntFlag{ Name: "nat-ratelimit-global", Usage: "Rate limit global requests", EnvVars: []string{"EDGEVPNNATRATELIMITGLOBAL"}, Value: 10, }, &cli.IntFlag{ Name: "nat-ratelimit-peer", Usage: "Rate limit perr requests", EnvVars: []string{"EDGEVPNNATRATELIMITPEER"}, Value: 10, }, &cli.IntFlag{ Name: "nat-ratelimit-interval", Usage: "Rate limit interval", EnvVars: []string{"EDGEVPNNATRATELIMITINTERVAL"}, Value: 60, }, &cli.BoolFlag{ Name: "nat-ratelimit", Usage: "Changes the default rate limiting configured in helping other peers determine their reachability status", EnvVars: []string{"EDGEVPNNATRATELIMIT"}, Value: true, }, &cli.IntFlag{ Name: "max-connections", Usage: "Max connections", EnvVars: []string{"EDGEVPNMAXCONNS"}, Value: 0, }, &cli.StringFlag{ Name: "ledger-state", Usage: "Specify a ledger state directory", EnvVars: []string{"EDGEVPNLEDGERSTATE"}, }, &cli.BoolFlag{ Name: "mdns", Usage: "Enable mDNS for peer discovery", EnvVars: []string{"EDGEVPNMDNS"}, Value: true, }, &cli.BoolFlag{ Name: "autorelay", Usage: "Automatically act as a relay if the node can accept inbound connections", EnvVars: []string{"EDGEVPNAUTORELAY"}, Value: true, }, &cli.IntFlag{ Name: "concurrency", Usage: "Number of concurrent requests to serve", Value: runtime.NumCPU(), }, &cli.BoolFlag{ Name: "holepunch", Usage: "Automatically try holepunching when possible", EnvVars: []string{"EDGEVPNHOLEPUNCH"}, Value: true, }, &cli.BoolFlag{ Name: "natservice", Usage: "Tries to determine reachability status of nodes", EnvVars: []string{"EDGEVPNNATSERVICE"}, Value: true, }, &cli.BoolFlag{ Name: "natmap", Usage: "Tries to open a port in the firewall via upnp", EnvVars: []string{"EDGEVPNNATMAP"}, Value: true, }, &cli.BoolFlag{ Name: "dht", Usage: "Enable DHT for peer discovery", EnvVars: []string{"EDGEVPNDHT"}, Value: true, }, &cli.BoolFlag{ Name: "low-profile", Usage: "Enable low profile. Lowers connections usage", EnvVars: []string{"EDGEVPNLOWPROFILE"}, Value: true, }, &cli.IntFlag{ Name: "aliveness-healthcheck-interval", Usage: "Healthcheck interval", EnvVars: []string{"HEALTHCHECKINTERVAL"}, Value: 120, }, &cli.IntFlag{ Name: "aliveness-healthcheck-scrub-interval", Usage: "Healthcheck scrub interval", EnvVars: []string{"HEALTHCHECKSCRUBINTERVAL"}, Value: 600, }, &cli.IntFlag{ Name: "aliveness-healthcheck-max-interval", Usage: "Healthcheck max interval. Threshold after a node is determined offline", EnvVars: []string{"HEALTHCHECKMAXINTERVAL"}, Value: 900, }, &cli.StringFlag{ Name: "log-level", Usage: "Specify loglevel", EnvVars: []string{"EDGEVPNLOGLEVEL"}, Value: "info", }, &cli.StringFlag{ Name: "libp2p-log-level", Usage: "Specify libp2p loglevel", EnvVars: []string{"EDGEVPNLIBP2PLOGLEVEL"}, Value: "fatal", }, &cli.StringSliceFlag{ Name: "discovery-bootstrap-peers", Usage: "List of discovery peers to use", EnvVars: []string{"EDGEVPNBOOTSTRAPPEERS"}, }, &cli.IntFlag{ Name: "connection-high-water", Usage: "max number of connection allowed", EnvVars: []string{"EDGEVPN_CONNECTION_HIGH_WATER"}, Value: 0, }, &cli.IntFlag{ Name: "connection-low-water", Usage: "low number of connection allowed", EnvVars: []string{"EDGEVPN_CONNECTION_LOW_WATER"}, Value: 0, }, &cli.StringSliceFlag{ Name: "autorelay-static-peer", Usage: "List of autorelay static peers to use", EnvVars: []string{"EDGEVPNAUTORELAYPEERS"}, }, &cli.StringSliceFlag{ Name: "blacklist", Usage: "List of peers/cidr to gate", EnvVars: []string{"EDGEVPNBLACKLIST"}, }, &cli.StringFlag{ Name: "token", Usage: "Specify an edgevpn token in place of a config file", EnvVars: []string{"EDGEVPNTOKEN"}, }, &cli.BoolFlag{ Name: "limit-enable", Usage: "Enable resource management", EnvVars: []string{"LIMITENABLE"}, }, &cli.StringFlag{ Name: "limit-file", Usage: "Specify a resource limit config (json)", EnvVars: []string{"LIMITFILE"}, }, &cli.StringFlag{ Name: "limit-scope", Usage: "Specify a limit scope", EnvVars: []string{"LIMITSCOPE"}, Value: "system", }, &cli.IntFlag{ Name: "limit-config-streams", Usage: "Streams resource limit configuration", EnvVars: []string{"LIMITCONFIGSTREAMS"}, Value: 200, }, &cli.IntFlag{ Name: "limit-config-streams-inbound", Usage: "Inbound streams resource limit configuration", EnvVars: []string{"LIMITCONFIGSTREAMSINBOUND"}, Value: 30, }, &cli.IntFlag{ Name: "limit-config-streams-outbound", Usage: "Outbound streams resource limit configuration", EnvVars: []string{"LIMITCONFIGSTREAMSOUTBOUND"}, Value: 30, }, &cli.IntFlag{ Name: "limit-config-conn", Usage: "Connections resource limit configuration", EnvVars: []string{"LIMITCONFIGCONNS"}, Value: 200, }, &cli.IntFlag{ Name: "limit-config-conn-inbound", Usage: "Inbound connections resource limit configuration", EnvVars: []string{"LIMITCONFIGCONNSINBOUND"}, Value: 30, }, &cli.IntFlag{ Name: "limit-config-conn-outbound", Usage: "Outbound connections resource limit configuration", EnvVars: []string{"LIMITCONFIGCONNSOUTBOUND"}, Value: 30, }, &cli.IntFlag{ Name: "limit-config-fd", Usage: "Max fd resource limit configuration", EnvVars: []string{"LIMITCONFIGFD"}, Value: 30, }, &cli.BoolFlag{ Name: "peerguard", Usage: "Enable peerguard. (Experimental)", EnvVars: []string{"PEERGUARD"}, }, &cli.BoolFlag{ Name: "privkey-cache", Usage: "Enable privkey caching. (Experimental)", EnvVars: []string{"EDGEVPNPRIVKEYCACHE"}, }, &cli.StringFlag{ Name: "privkey-cache-dir", Usage: "Specify a directory used to store the generated privkey", EnvVars: []string{"EDGEVPNPRIVKEYCACHEDIR"}, Value: stateDir(), }, &cli.StringSliceFlag{ Name: "static-peertable", Usage: "List of static peers to use (in `ip:peerid` format)", EnvVars: []string{"EDGEVPNSTATICPEERTABLE"}, }, &cli.StringSliceFlag{ Name: "whitelist", Usage: "List of peers in the whitelist", EnvVars: []string{"EDGEVPNWHITELIST"}, }, &cli.BoolFlag{ Name: "peergate", Usage: "Enable peergating. (Experimental)", EnvVars: []string{"PEERGATE"}, }, &cli.BoolFlag{ Name: "peergate-autoclean", Usage: "Enable peergating autoclean. (Experimental)", EnvVars: []string{"PEERGATE_AUTOCLEAN"}, }, &cli.BoolFlag{ Name: "peergate-relaxed", Usage: "Enable peergating relaxation. (Experimental)", EnvVars: []string{"PEERGATE_RELAXED"}, }, &cli.StringFlag{ Name: "peergate-auth", Usage: "Peergate auth", EnvVars: []string{"PEERGATE_AUTH"}, Value: "", }, &cli.IntFlag{ Name: "peergate-interval", Usage: "Peergater interval time", EnvVars: []string{"EDGEVPNPEERGATEINTERVAL"}, Value: 120, }, }
Functions ¶
func ConfigFromContext ¶ added in v0.25.3
ConfigFromContext returns a config object from a cli context
func FileReceive ¶ added in v0.2.1
func FileReceive() *cli.Command
func ServiceAdd ¶ added in v0.2.0
func ServiceAdd() *cli.Command
func ServiceConnect ¶ added in v0.2.0
func ServiceConnect() *cli.Command
Types ¶
This section is empty.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.