preparing to extend the config file thing
This commit is contained in:
@ -135,8 +135,8 @@ Datagrams are still a work-in-progress. They're enabled, but I don't know for
|
||||
sure how well they'll work yet. TCP is pretty good though.
|
||||
|
||||
I'm in the process of adding client proxying to a specific i2p destination by
|
||||
base32 or (pre-added)jump address. TCP works well. UDP exists, but is disabled
|
||||
and untested.
|
||||
base32 or (pre-added)jump address. TCP works well. UDP exists, but is not
|
||||
thoroughly tested.
|
||||
|
||||
I've only enabled the use of a subset of the i2cp and tunnel configuration
|
||||
options, the ones I use the most and for no other real reason assume other
|
||||
|
@ -138,8 +138,8 @@ Datagrams are still a work-in-progress. They're enabled, but I don't know for
|
||||
sure how well they'll work yet. TCP is pretty good though.
|
||||
|
||||
I'm in the process of adding client proxying to a specific i2p destination by
|
||||
base32 or (pre-added)jump address. TCP works well. UDP exists, but is disabled
|
||||
and untested.
|
||||
base32 or (pre-added)jump address. TCP works well. UDP exists, but is not
|
||||
thoroughly tested.
|
||||
|
||||
I've only enabled the use of a subset of the i2cp and tunnel configuration
|
||||
options, the ones I use the most and for no other real reason assume other
|
||||
@ -181,12 +181,12 @@ It would be really awesome if I could make this run on Android. So I'll make
|
||||
that happen eventually.
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQEzBAEBCAAdFiEEcNIGBzi++AUjrK/311wDs5teFOEFAlt2CZ8ACgkQ11wDs5te
|
||||
FOHl7Af9FwIlHRZu5IFdLGxOvXYIF0UzMfQFiQYo7Z84MLLqUBEwp/aSJq4dsQhU
|
||||
50w+cfeEWyZF6fZCXWpRoW6OgtZ7LbzDjbzhav/BFSvPG09DIqbliuvzUZOSv0wq
|
||||
ybaHo/Owjd8vYA0WVwO9XKKnfvaKrCr0Fg1JxE/8IjHYYxj+cqb3gxIQc98+0LID
|
||||
P5Az5BeTIwW/a1pLywl+XhsWx6wySDTwdWm+WBCs0YzZaQzmQ3v+2hp2A7+JmFbo
|
||||
pCQLt/e9rEpfb9+rTBxLO3JsfaRVMql616SJPA7kDBoQ8Y6jsGqHZXMyLmo1QG8f
|
||||
ll996GNysbIRLI2KWnZxO1XQabaxkA==
|
||||
=Di5N
|
||||
iQEzBAEBCAAdFiEEcNIGBzi++AUjrK/311wDs5teFOEFAlt25OYACgkQ11wDs5te
|
||||
FOFZEQf/cRf6nRGSGx9s+wOTatQjkVQ6a8KOzaWEa9H2kLcZ7rx1k9uRDX82gmN5
|
||||
vFsYt3wcycdmRRSoVgTpS+XOjhbIDkG4LLvhHxiqIFvnsMo8FI3vLQGa7r2SYTCx
|
||||
cRglFEc4vcWq1FBpnfuyy9lxkVI70NkYHBUj+6gkKeuyChxnU1KEkYvjX/NS2awt
|
||||
WjmwLImKOIhfi/YWP5BhpJ3LvjS7mVYqIq6sBWY1RtHvfaxFpebOZQyJghrUynsk
|
||||
+sHI0mqnfDjH9FN52oeuvD9wU4OHyqeXf4oPve09MtVc+Oh2hL0RC5M83aAhCAr/
|
||||
wJ68dXh8hu78vOWM0Z+9jhkdAQNbsg==
|
||||
=xTmc
|
||||
-----END PGP SIGNATURE-----
|
||||
|
@ -567,6 +567,16 @@ func (c *Conf) GetReduceIdleQuantity(arg, def int) int {
|
||||
return arg
|
||||
}
|
||||
|
||||
/*
|
||||
// Get 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 (c *Conf) Get(arg, def int) int {
|
||||
return 0
|
||||
}
|
||||
*/
|
||||
|
||||
// SetDir sets the key save directory from the config file
|
||||
func (c *Conf) SetDir() {
|
||||
if v, ok := c.config.Get("dir"); ok {
|
||||
@ -930,6 +940,18 @@ func NewSAMForwarderFromConf(config *Conf) (*samforwarder.SAMForwarder, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
// NewSAMForwarderFromConfig generates a new SAMForwarder from a config file
|
||||
func NewSAMForwarderFromConfig(iniFile, SamHost, SamPort string) (*samforwarder.SAMForwarder, error) {
|
||||
if iniFile != "none" {
|
||||
config, err := NewI2PTunConf(iniFile)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return NewSAMForwarderFromConf(config)
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
// NewSAMClientForwarderFromConf generates a SAMforwarder from *i2ptunconf.Conf
|
||||
func NewSAMClientForwarderFromConf(config *Conf) (*samforwarder.SAMClientForwarder, error) {
|
||||
if config != nil {
|
||||
@ -965,30 +987,6 @@ func NewSAMClientForwarderFromConf(config *Conf) (*samforwarder.SAMClientForward
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
// NewSAMForwarderFromConfig generates a new SAMForwarder from a config file
|
||||
func NewSAMForwarderFromConfig(iniFile, SamHost, SamPort string) (*samforwarder.SAMForwarder, error) {
|
||||
if iniFile != "none" {
|
||||
config, err := NewI2PTunConf(iniFile)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return NewSAMForwarderFromConf(config)
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
// NewSAMSSUForwarderFromConfig generates a new SAMSSUForwarder from a config file
|
||||
func NewSAMSSUForwarderFromConfig(iniFile, SamHost, SamPort string) (*samforwarderudp.SAMSSUForwarder, error) {
|
||||
if iniFile != "none" {
|
||||
config, err := NewI2PTunConf(iniFile)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return NewSAMSSUForwarderFromConf(config)
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
// NewSAMClientForwarderFromConfig generates a new SAMForwarder from a config file
|
||||
func NewSAMClientForwarderFromConfig(iniFile, SamHost, SamPort string) (*samforwarder.SAMClientForwarder, error) {
|
||||
if iniFile != "none" {
|
||||
@ -1001,18 +999,6 @@ func NewSAMClientForwarderFromConfig(iniFile, SamHost, SamPort string) (*samforw
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
// NewSAMSSUClientForwarderFromConfig generates a new SAMSSUForwarder from a config file
|
||||
func NewSAMSSUClientForwarderFromConfig(iniFile, SamHost, SamPort string) (*samforwarderudp.SAMSSUClientForwarder, error) {
|
||||
if iniFile != "none" {
|
||||
config, err := NewI2PTunConf(iniFile)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return NewSAMSSUClientForwarderFromConf(config)
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
// NewSAMSSUForwarderFromConf generates a SAMSSUforwarder from *i2ptunconf.Conf
|
||||
func NewSAMSSUForwarderFromConf(config *Conf) (*samforwarderudp.SAMSSUForwarder, error) {
|
||||
if config != nil {
|
||||
@ -1048,6 +1034,18 @@ func NewSAMSSUForwarderFromConf(config *Conf) (*samforwarderudp.SAMSSUForwarder,
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
// NewSAMSSUForwarderFromConfig generates a new SAMSSUForwarder from a config file
|
||||
func NewSAMSSUForwarderFromConfig(iniFile, SamHost, SamPort string) (*samforwarderudp.SAMSSUForwarder, error) {
|
||||
if iniFile != "none" {
|
||||
config, err := NewI2PTunConf(iniFile)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return NewSAMSSUForwarderFromConf(config)
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
// NewSAMSSUClientForwarderFromConf generates a SAMSSUforwarder from *i2ptunconf.Conf
|
||||
func NewSAMSSUClientForwarderFromConf(config *Conf) (*samforwarderudp.SAMSSUClientForwarder, error) {
|
||||
if config != nil {
|
||||
@ -1082,3 +1080,15 @@ func NewSAMSSUClientForwarderFromConf(config *Conf) (*samforwarderudp.SAMSSUClie
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
// NewSAMSSUClientForwarderFromConfig generates a new SAMSSUForwarder from a config file
|
||||
func NewSAMSSUClientForwarderFromConfig(iniFile, SamHost, SamPort string) (*samforwarderudp.SAMSSUClientForwarder, error) {
|
||||
if iniFile != "none" {
|
||||
config, err := NewI2PTunConf(iniFile)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return NewSAMSSUClientForwarderFromConf(config)
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user