Documentation ¶
Index ¶
- type Conf
- func (c *Conf) AddAccessListMember(key string)
- func (f *Conf) Base32() string
- func (f *Conf) Base32Readable() string
- func (f *Conf) Base64() string
- func (f *Conf) Cleanup()
- func (f *Conf) Close() error
- func (c *Conf) Get(key string, label ...string) (string, bool)
- func (c *Conf) GetAccessListType(arg, def string, label ...string) string
- func (c *Conf) GetBool(key string, label ...string) (bool, bool)
- func (c *Conf) GetClientDest(arg, def string, label ...string) string
- func (c *Conf) GetCloseIdleTime(arg, def int, label ...string) int
- func (c *Conf) GetCloseOnIdle(arg, def bool, label ...string) bool
- func (c *Conf) GetControlHost(arg, def string, label ...string) string
- func (c *Conf) GetControlPort(arg, def string, label ...string) string
- func (c *Conf) GetDir(arg, def string, label ...string) string
- func (c *Conf) GetEncryptLeaseset(arg, def bool, label ...string) bool
- func (c *Conf) GetEndpointHost(arg, def string, label ...string) string
- func (c *Conf) GetFastRecieve(arg, def bool, label ...string) bool
- func (c *Conf) GetHost(arg, def string, label ...string) string
- func (c *Conf) GetInAllowZeroHop(arg, def bool, label ...string) bool
- func (c *Conf) GetInBackups(arg, def int, label ...string) int
- func (c *Conf) GetInLength(arg, def int, label ...string) int
- func (c *Conf) GetInQuantity(arg, def int, label ...string) int
- func (c *Conf) GetInVariance(arg, def int, label ...string) int
- func (c *Conf) GetInt(key string, label ...string) (int, bool)
- func (c *Conf) GetKeyFile(arg, def string, label ...string) string
- func (c *Conf) GetKeys(arg, def string, label ...string) string
- func (c *Conf) GetLeaseSetEncType(arg, def string, label ...string) string
- func (c *Conf) GetLeasesetKey(arg, def string, label ...string) string
- func (c *Conf) GetLeasesetPrivateKey(arg, def string, label ...string) string
- func (c *Conf) GetLeasesetPrivateSigningKey(arg, def string, label ...string) string
- func (c *Conf) GetMessageReliability(arg, def string, label ...string) string
- func (c *Conf) GetOtherType(typ, def string, label ...string) string
- func (c *Conf) GetOutAllowZeroHop(arg, def bool, label ...string) bool
- func (c *Conf) GetOutBackups(arg, def int, label ...string) int
- func (c *Conf) GetOutLength(arg, def int, label ...string) int
- func (c *Conf) GetOutQuantity(arg, def int, label ...string) int
- func (c *Conf) GetOutVariance(arg, def int, label ...string) int
- func (c *Conf) GetPassword(arg, def string, label ...string) string
- func (c *Conf) GetPort(arg, def string, label ...string) string
- func (c *Conf) GetPort443(arg, def string, label ...string) string
- func (c *Conf) GetReduceIdleQuantity(arg, def int, label ...string) int
- func (c *Conf) GetReduceIdleTime(arg, def int, label ...string) int
- func (c *Conf) GetReduceOnIdle(arg, def bool, label ...string) bool
- func (c *Conf) GetSAMHost(arg, def string, label ...string) string
- func (c *Conf) GetSAMPort(arg, def string, label ...string) string
- func (c *Conf) GetSaveFile(arg, def bool, label ...string) bool
- func (c *Conf) GetSigType(argt, def string, label ...string) string
- func (c *Conf) GetTLSConfigCertPem(arg, def string, label ...string) string
- func (c *Conf) GetTLSConfigKeyPem(arg, def string, label ...string) string
- func (f *Conf) GetType() string
- func (c *Conf) GetTypes(argc, argu, argh bool, def string, label ...string) string
- func (c *Conf) GetUseCompression(arg, def bool, label ...string) bool
- func (c *Conf) GetUseTLS(arg, def bool, label ...string) bool
- func (c *Conf) GetUserName(arg, def string, label ...string) string
- func (c *Conf) GetWWWDir(arg, def string, label ...string) string
- func (c *Conf) I2PINILoad(iniFile string, label ...string) error
- func (f *Conf) ID() string
- func (f *Conf) Keys() i2pkeys.I2PKeys
- func (f *Conf) Print() string
- func (c *Conf) PrintSlice() []string
- func (f *Conf) Props() map[string]string
- func (f *Conf) Search(search string) string
- func (f *Conf) Serve() error
- func (c *Conf) SetAccessListType(label ...string)
- func (c *Conf) SetAllowZeroHopIn(label ...string)
- func (c *Conf) SetAllowZeroHopOut(label ...string)
- func (c *Conf) SetClientDest(label ...string)
- func (c *Conf) SetCloseIdle(label ...string)
- func (c *Conf) SetCloseIdleTime(label ...string)
- func (c *Conf) SetCompressed(label ...string)
- func (c *Conf) SetControlHost(label ...string)
- func (c *Conf) SetControlPort(label ...string)
- func (c *Conf) SetDir(label ...string)
- func (c *Conf) SetEncryptLease(label ...string)
- func (c *Conf) SetEndpointHost(label ...string)
- func (c *Conf) SetFastRecieve(label ...string)
- func (c *Conf) SetHost(label ...string)
- func (c *Conf) SetInBackups(label ...string)
- func (c *Conf) SetInLength(label ...string)
- func (c *Conf) SetInQuantity(label ...string)
- func (c *Conf) SetInVariance(label ...string)
- func (c *Conf) SetKeyFile(label ...string)
- func (c *Conf) SetKeys(label ...string)
- func (c *Conf) SetLabels(iniFile string)
- func (c *Conf) SetLeaseSetEncType(label ...string)
- func (c *Conf) SetLeasesetKey(label ...string)
- func (c *Conf) SetLeasesetPrivateKey(label ...string)
- func (c *Conf) SetLeasesetPrivateSigningKey(label ...string)
- func (c *Conf) SetMessageReliability(label ...string)
- func (c *Conf) SetOutBackups(label ...string)
- func (c *Conf) SetOutLength(label ...string)
- func (c *Conf) SetOutQuantity(label ...string)
- func (c *Conf) SetOutVariance(label ...string)
- func (c *Conf) SetPassword(label ...string)
- func (c *Conf) SetPort(label ...string)
- func (c *Conf) SetReduceIdle(label ...string)
- func (c *Conf) SetReduceIdleQuantity(label ...string)
- func (c *Conf) SetReduceIdleTime(label ...string)
- func (c *Conf) SetSAMHost(label ...string)
- func (c *Conf) SetSAMPort(label ...string)
- func (c *Conf) SetSigType(label ...string)
- func (c *Conf) SetTLSConfigCertPem(label ...string)
- func (c *Conf) SetTLSConfigKeyPem(label ...string)
- func (c *Conf) SetTargetPort443(label ...string)
- func (c *Conf) SetTunName(label ...string)
- func (c *Conf) SetType(label ...string)
- func (c *Conf) SetUseTLS(label ...string)
- func (c *Conf) SetUserName(label ...string)
- func (c *Conf) SetWWWDir(label ...string)
- func (c *Conf) SignatureType() string
- func (c *Conf) TLSConfig() (*tls.Config, error)
- func (f *Conf) Target() string
- func (f *Conf) Up() bool
- func (c *Conf) Write() error
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conf ¶
type Conf struct { //Config *goini.INI `default:&goini.INI{}` *goini.INI FilePath string `default:"./"` KeyFilePath string `default:"./"` Labels []string `default:"{''}"` Client bool `default:"true"` ClientDest string `default:"idk.i2p"` SigType string `default:"SIGNATURE_TYPE=EdDSA_SHA512_Ed25519"` Type string `default:"client"` SaveDirectory string `default:"./"` ServeDirectory string `default:"./www"` SaveFile bool `default:"false"` TargetHost string `default:"127.0.0.1"` TargetPort string `default:"7778"` SamHost string `default:"127.0.0.1"` SamPort string `default:"7656"` TunnelHost string `default:"127.0.0.1"` ControlHost string `default:"127.0.0.1"` ControlPort string `default:"7951"` TargetForPort443 string `default:""` TunName string `default:"goi2ptunnel"` EncryptLeaseSet bool `default:"false"` LeaseSetKey string `default:""` LeaseSetEncType string `default:"4,0"` LeaseSetPrivateKey string `default:""` LeaseSetPrivateSigningKey string `default:""` InAllowZeroHop bool `default:"false"` OutAllowZeroHop bool `default:"false"` InLength int `default:"3"` OutLength int `default:"3"` InQuantity int `default:"1"` OutQuantity int `default:"1"` InVariance int `default:"0"` OutVariance int `default:"0"` InBackupQuantity int `default:"1"` OutBackupQuantity int `default:"1"` UseCompression bool `default:"true"` FastRecieve bool `default:"true"` ReduceIdle bool `default:"false"` ReduceIdleTime int `default:"36000000"` ReduceIdleQuantity int `default:"1"` CloseIdle bool `default:"false"` CloseIdleTime int `default:"36000000"` AccessListType string `default:"none"` AccessList []string `default:"{''}"` MessageReliability string `default:""` UserName string `default:""` Password string `default:""` UseTLS bool `default:"false"` Cert string `default:""` Pem string `default:""` HostName string `default:""` //TLSConf *tls.Config LoadedKeys i2pkeys.I2PKeys // contains filtered or unexported fields }
Conf is a tructure containing an ini config, with some functions to help when you use it for in conjunction with command-line flags
func NewI2PBlankTunConf ¶
func NewI2PBlankTunConf() *Conf
NewI2PBlankTunConf returns an empty but intialized tunconf
func NewI2PTunConf ¶
NewI2PTunConf returns a Conf structure from an ini file, for modification before starting the tunnel
func (*Conf) AddAccessListMember ¶
AddAccessListMember adds a member to either the blocklist or the allowlist
func (*Conf) Base32 ¶ added in v0.32.1
Base32 returns the base32 address where the local service is being forwarded
func (*Conf) Base32Readable ¶ added in v0.32.1
Base32Readable will always be an empty string when used here.
func (*Conf) Base64 ¶ added in v0.32.1
Base64 returns the base64 address where the local service is being forwarded
func (*Conf) GetAccessListType ¶
GetAccessListType takes an argument and a default. If the argument differs from the default, the argument is always returned. If the argument and default are the same and the key exists, the key is returned. If the key is absent, the default is returned.
func (*Conf) GetClientDest ¶
GetClientDest takes an argument and a default. If the argument differs from the default, the argument is always returned. If the argument and default are the same and the key exists, the key is returned. If the key is absent, the default is returned.
func (*Conf) GetCloseIdleTime ¶
GetCloseIdleTime takes an argument and a default. If the argument differs from the default, the argument is always returned. If the argument and default are the same and the key exists, the key is returned. If the key is absent, the default is returned.
func (*Conf) GetCloseOnIdle ¶
GetCloseOnIdle takes an argument and a default. If the argument differs from the default, the argument is always returned. If the argument and default are the same and the key exists, the key is returned. If the key is absent, the default is returned.
func (*Conf) GetControlHost ¶
GetHost takes an argument and a default. If the argument differs from the default, the argument is always returned. If the argument and default are the same and the key exists, the key is returned. If the key is absent, the default is returned.
func (*Conf) GetControlPort ¶
GetPort takes an argument and a default. If the argument differs from the default, the argument is always returned. If the argument and default are the same and the key exists, the key is returned. If the key is absent, the default is returned.
func (*Conf) GetDir ¶
GetDir takes an argument and a default. If the argument differs from the default, the argument is always returned. If the argument and default are the same and the key exists, the key is returned. If the key is absent, the default is returned.
func (*Conf) GetEncryptLeaseset ¶
GetEncryptLeaseset takes an argument and a default. If the argument differs from the default, the argument is always returned. If the argument and default are the same and the key exists, the key is returned. If the key is absent, the default is returned.
func (*Conf) GetEndpointHost ¶
GetEndpointHost takes an argument and a default. If the argument differs from the default, the argument is always returned. If the argument and default are the same and the key exists, the key is returned. If the key is absent, the default is returned.
func (*Conf) GetFastRecieve ¶
GetFastRecieve takes an argument and a default. If the argument differs from the default, the argument is always returned. If the argument and default are the same and the key exists, the key is returned. If the key is absent, the default is returned.
func (*Conf) GetHost ¶
GetHost takes an argument and a default. If the argument differs from the default, the argument is always returned. If the argument and default are the same and the key exists, the key is returned. If the key is absent, the default is returned.
func (*Conf) GetInAllowZeroHop ¶
GetInAllowZeroHop takes an argument and a default. If the argument differs from the default, the argument is always returned. If the argument and default are the same and the key exists, the key is returned. If the key is absent, the default is returned.
func (*Conf) GetInBackups ¶
GetInBackups takes an argument and a default. If the argument differs from the default, the argument is always returned. If the argument and default are the same and the key exists, the key is returned. If the key is absent, the default is returned.
func (*Conf) GetInLength ¶
GetInLength takes an argument and a default. If the argument differs from the default, the argument is always returned. If the argument and default are the same and the key exists, the key is returned. If the key is absent, the default is returned.
func (*Conf) GetInQuantity ¶
GetInQuantity takes an argument and a default. If the argument differs from the default, the argument is always returned. If the argument and default are the same and the key exists, the key is returned. If the key is absent, the default is returned.
func (*Conf) GetInVariance ¶
GetInVariance takes an argument and a default. If the argument differs from the default, the argument is always returned. If the argument and default are the same and the key exists, the key is returned. If the key is absent, the default is returned.
func (*Conf) GetKeyFile ¶
GetKeyFile takes an argument and a default. If the argument differs from the default, the argument is always returned. If the argument and default are the same and the key exists, the key is returned. If the key is absent, the default is returned.
func (*Conf) GetKeys ¶
GetKeys takes an argument and a default. If the argument differs from the default, the argument is always returned. If the argument and default are the same and the key exists, the key is returned. If the key is absent, the default is returned.
func (*Conf) GetLeaseSetEncType ¶ added in v0.33.0
GetLeaseSetEncType takes an argument and a default. If the argument differs from the default, the argument is always returned. If the argument and default are the same and the key exists, the key is returned. If the key is absent, the default is returned.
func (*Conf) GetLeasesetKey ¶
GetLeasesetKey takes an argument and a default. If the argument differs from the default, the argument is always returned. If the argument and default are the same and the key exists, the key is returned. If the key is absent, the default is returned.
func (*Conf) GetLeasesetPrivateKey ¶
GetLeasesetPrivateKey takes an argument and a default. If the argument differs from the default, the argument is always returned. If the argument and default are the same and the key exists, the key is returned. If the key is absent, the default is returned.
func (*Conf) GetLeasesetPrivateSigningKey ¶
GetLeasesetPrivateSigningKey takes an argument and a default. If the argument differs from the default, the argument is always returned. If the argument and default are the same and the key exists, the key is returned. If the key is absent, the default is returned.
func (*Conf) GetMessageReliability ¶
i2cp.messageReliability GetMessageReliability takes an argument and a default. If the argument differs from the default, the argument is always returned. If the argument and default are the same and the key exists, the key is returned. If the key is absent, the default is returned.
func (*Conf) GetOutAllowZeroHop ¶
GetOutAllowZeroHop takes an argument and a default. If the argument differs from the default, the argument is always returned. If the argument and default are the same and the key exists, the key is returned. If the key is absent, the default is returned.
func (*Conf) GetOutBackups ¶
GetOutBackups takes an argument and a default. If the argument differs from the default, the argument is always returned. If the argument and default are the same and the key exists, the key is returned. If the key is absent, the default is returned.
func (*Conf) GetOutLength ¶
GetOutLength takes an argument and a default. If the argument differs from the default, the argument is always returned. If the argument and default are the same and the key exists, the key is returned. If the key is absent, the default is returned.
func (*Conf) GetOutQuantity ¶
GetOutQuantity takes an argument and a default. If the argument differs from the default, the argument is always returned. If the argument and default are the same and the key exists, the key is returned. If the key is absent, the default is returned.
func (*Conf) GetOutVariance ¶
GetOutVariance takes an argument and a default. If the argument differs from the default, the argument is always returned. If the argument and default are the same and the key exists, the key is returned. If the key is absent, the default is returned.
func (*Conf) GetPassword ¶
GetPassword takes an argument and a default. If the argument differs from the default, the argument is always returned. If the argument and default are the same and the key exists, the key is returned. If the key is absent, the default is returned.
func (*Conf) GetPort ¶
GetPort takes an argument and a default. If the argument differs from the default, the argument is always returned. If the argument and default are the same and the key exists, the key is returned. If the key is absent, the default is returned.
func (*Conf) GetPort443 ¶
GetPort443 takes an argument and a default. If the argument differs from the default, the argument is always returned. If the argument and default are the same and the key exists, the key is returned. If the key is absent, the default is returned.
func (*Conf) GetReduceIdleQuantity ¶
GetReduceIdleQuantity takes an argument and a default. If the argument differs from the default, the argument is always returned. If the argument and default are the same and the key exists, the key is returned. If the key is absent, the default is returned.
func (*Conf) GetReduceIdleTime ¶
GetReduceIdleTime takes an argument and a default. If the argument differs from the default, the argument is always returned. If the argument and default are the same and the key exists, the key is returned. If the key is absent, the default is returned.
func (*Conf) GetReduceOnIdle ¶
GetReduceOnIdle takes an argument and a default. If the argument differs from the default, the argument is always returned. If the argument and default are the same and the key exists, the key is returned. If the key is absent, the default is returned.
func (*Conf) GetSAMHost ¶
GetSAMHost takes an argument and a default. If the argument differs from the default, the argument is always returned. If the argument and default are the same and the key exists, the key is returned. If the key is absent, the default is returned.
func (*Conf) GetSAMPort ¶
GetSAMPort takes an argument and a default. If the argument differs from the default, the argument is always returned. If the argument and default are the same and the key exists, the key is returned. If the key is absent, the default is returned.
func (*Conf) GetSaveFile ¶
GetSaveFile takes an argument and a default. If the argument differs from the default, the argument is always returned. If the argument and default are the same and the key exists, the key is returned. If the key is absent, the default is returned.
func (*Conf) GetSigType ¶
GetSigType takes an argument and a default. If the argument differs from the default, the argument is always returned. If the argument and default are the same and the key exists, the key is returned. If the key is absent, the default is returned.
func (*Conf) GetTLSConfigCertPem ¶ added in v0.33.0
GetTLSConfig
func (*Conf) GetTLSConfigKeyPem ¶ added in v0.33.0
GetTLSConfig
func (*Conf) GetTypes ¶ added in v0.32.1
GetType takes an argument and a default. If the argument differs from the default, the argument is always returned. If the argument and default are the same and the key exists, the key is returned. If the key is absent, the default is returned.
func (*Conf) GetUseCompression ¶
GetUseCompression takes an argument and a default. If the argument differs from the default, the argument is always returned. If the argument and default are the same and the key exists, the key is returned. If the key is absent, the default is returned.
func (*Conf) GetUserName ¶
GetUserName takes an argument and a default. If the argument differs from the default, the argument is always returned. If the argument and default are the same and the key exists, the key is returned. If the key is absent, the default is returned.
func (*Conf) GetWWWDir ¶ added in v0.32.1
GetDir takes an argument and a default. If the argument differs from the default, the argument is always returned. If the argument and default are the same and the key exists, the key is returned. If the key is absent, the default is returned.
func (*Conf) I2PINILoad ¶
I2PINILoad loads variables from an ini file into the Conf data structure.
func (*Conf) PrintSlice ¶ added in v0.32.1
PrintSlice returns and prints a formatted list of configured tunnel settings.
func (*Conf) Serve ¶ added in v0.32.1
Serve starts the SAM connection and and forwards the local host:port to i2p
func (*Conf) SetAccessListType ¶
SetAccessListType sets the access list type from a config file
func (*Conf) SetAllowZeroHopIn ¶
SetAllowZeroHopIn sets the config to allow zero-hop tunnels
func (*Conf) SetAllowZeroHopOut ¶
SetAllowZeroHopOut sets the config to allow zero-hop tunnels
func (*Conf) SetClientDest ¶
SetClientDest sets the key name from the config file
func (*Conf) SetCloseIdle ¶
SetCloseIdle sets the tunnel to automatically close on idle from the config file
func (*Conf) SetCloseIdleTime ¶
SetCloseIdleTime sets the time to wait before killing a tunnel from a config file
func (*Conf) SetCompressed ¶
SetCompressed sets the compression from the config file
func (*Conf) SetControlHost ¶
SetHost sets the host to forward from the config file
func (*Conf) SetControlPort ¶
SetPort sets the port to forward from the config file
func (*Conf) SetEncryptLease ¶
SetEncryptLease tells the conf to use encrypted leasesets the from the config file
func (*Conf) SetEndpointHost ¶
SetEndpointHost sets the host to forward from the config file
func (*Conf) SetFastRecieve ¶
SetFastRecieve sets the compression from the config file
func (*Conf) SetInBackups ¶
SetInBackups sets the inbound tunnel backups from config file
func (*Conf) SetInLength ¶
SetInLength sets the inbound length from the config file
func (*Conf) SetInQuantity ¶
SetInQuantity sets the inbound tunnel quantity from config file
func (*Conf) SetInVariance ¶
SetInVariance sets the inbound tunnel variance from config file
func (*Conf) SetKeyFile ¶
SetKeyFile sets the key save directory from the config file
func (*Conf) SetLeaseSetEncType ¶ added in v0.33.0
SetLeaseSetEncType tells the conf to use encrypted leasesets the from the config file
func (*Conf) SetLeasesetKey ¶
SetEncryptLease tells the conf to use encrypted leasesets the from the config file
func (*Conf) SetLeasesetPrivateKey ¶
SetLeasesetPrivateKey tells the conf to use encrypted leasesets the from the config file
func (*Conf) SetLeasesetPrivateSigningKey ¶
SetLeasesetPrivateSigningKey tells the conf to use encrypted leasesets the from the config file
func (*Conf) SetMessageReliability ¶
SetMessageReliability sets the access list type from a config file
func (*Conf) SetOutBackups ¶
SetOutBackups sets the outbound tunnel backups from config file
func (*Conf) SetOutLength ¶
SetOutLength sets the outbound lenth from the config file
func (*Conf) SetOutQuantity ¶
SetOutQuantity sets the outbound tunnel quantity from config file
func (*Conf) SetOutVariance ¶
SetOutVariance sets the outbound tunnel variance from config file
func (*Conf) SetPassword ¶
SetKeys sets the key name from the config file
func (*Conf) SetReduceIdle ¶
SetReduceIdle sets the config to reduce tunnels after idle time from config file
func (*Conf) SetReduceIdleQuantity ¶
SetReduceIdleQuantity sets the number of tunnels to reduce to from config file
func (*Conf) SetReduceIdleTime ¶
SetReduceIdleTime sets the time to wait before reducing tunnels from config file
func (*Conf) SetSAMHost ¶
SetSAMHost sets the SAM host from the config file
func (*Conf) SetSAMPort ¶
SetSAMPort sets the SAM port from the config file
func (*Conf) SetSigType ¶
SetSigType sets the type of proxy to create from the config file
func (*Conf) SetTLSConfigCertPem ¶ added in v0.33.0
SetClientDest sets the key name from the config file
func (*Conf) SetTLSConfigKeyPem ¶ added in v0.33.0
SetClientDest sets the key name from the config file
func (*Conf) SetTargetPort443 ¶
SetTargetPort443 sets the port to forward from the config file
func (*Conf) SetTunName ¶
SetTunName sets the tunnel name from the config file
func (*Conf) SetUseTLS ¶ added in v0.33.0
SetAllowZeroHopOut sets the config to allow zero-hop tunnels
func (*Conf) SetUserName ¶
SetKeys sets the key name from the config file
func (*Conf) SignatureType ¶
Source Files ¶
- access.go
- auth.go
- backups.go
- bundle.go
- compress.go
- conf.go
- config-options.go
- controlhostport.go
- cryptsave.go
- dest.go
- dir.go
- endpoint.go
- fastrecieve.go
- hostport.go
- leasesets.go
- length.go
- name.go
- password.go
- quantity.go
- reduceclose.go
- reliability.go
- samhostport.go
- sigtype.go
- timeout.go
- tls.go
- tunconf.go
- type.go
- user.go
- variance.go
- wwwdir.go
- zerohops.go