message reliability things.
This commit is contained in:
@ -77,12 +77,12 @@ I'm eventually going to make the manager implement net.Conn. This won't be
|
|||||||
exposed in the default application probably though, but rather as a library.
|
exposed in the default application probably though, but rather as a library.
|
||||||
-----BEGIN PGP SIGNATURE-----
|
-----BEGIN PGP SIGNATURE-----
|
||||||
|
|
||||||
iQEzBAEBCAAdFiEEcNIGBzi++AUjrK/311wDs5teFOEFAlubK4YACgkQ11wDs5te
|
iQEzBAEBCAAdFiEEcNIGBzi++AUjrK/311wDs5teFOEFAlubNg4ACgkQ11wDs5te
|
||||||
FOHiEwf7BAF8gNVxdfwTc+ZzLsvBvlaRXxnTapf8/k36iAmSlyB5SAbBGqhT8ulF
|
FOFghQf7BHl7fQKfHQ/2rjDEQozq4OZ+4FezqmViUxFGa6fLQTfaBmlwoPKJH9hg
|
||||||
H+4r/hJ8KDBXzATeaBdNaG88nVEC1T8Y0r+wVP6o2Fbj/JVkHPIP085kwAHZFzXl
|
keNSgvCZTG3UhI9jIScBa5e6iKv99gP9f1v8jixJo/5yE78FqGkeAUUZzGESbEhq
|
||||||
MIAwPj3yIbDgGkwC/KpBe5knZlBVsSzgfkn6Jv6pNtlOTa5Ob0TbUHSp738qcRmy
|
8KRbBqY41ZjEaN5ayCiJfLBlfSWSq+VK8QTrN1wLVrAxKoXhQhMT9gVBpCGLMN3L
|
||||||
l3l9pZPRwxEwAkfIUYAXfO5DjxGmxdFp9un86eC+WhNWmt+H6HSfwqU9L69SCOT0
|
sx+vf+ohRXycTwC35YnbYJlKaadbuxh2UKkQGFvBBkPVVNuc7bPrCPMe3BH20ajS
|
||||||
8yZ4dJaxdPpY/Z4mJBAuLLCrQH7yMKkzQfl+HOm8zMZ/ElAOiXkJfE6WGzH7f3X7
|
x3Lg5D0e1SCKjWOMcaM4YTRkLWmcjoRTAuOS257wzWtSKzp7iigfaIdF8CpKRfwA
|
||||||
VKzIy1k0A9SU9TUHjyp1vr2T34DiSQ==
|
ZPo/ZFg6IpO1ami+qDBmoKqvJY6lvA==
|
||||||
=xY3H
|
=caVj
|
||||||
-----END PGP SIGNATURE-----
|
-----END PGP SIGNATURE-----
|
||||||
|
@ -4,11 +4,11 @@ I2CP/Tunnel Options Implementation Checklist
|
|||||||
This version of this document is valid for sam-forwarder. If you'd like to use
|
This version of this document is valid for sam-forwarder. If you'd like to use
|
||||||
it, the original is at [CHECKLIST.orig.md](CHECKLIST.orig.md).
|
it, the original is at [CHECKLIST.orig.md](CHECKLIST.orig.md).
|
||||||
|
|
||||||
28/41 planned options complete.
|
32/41 planned options complete.
|
||||||
|
|
||||||
key:
|
key:
|
||||||
|
|
||||||
- \[U\] - Undone/Unknoqn
|
- \[U\] - Undone/Unknown
|
||||||
- \[C\] - Confirmed Working
|
- \[C\] - Confirmed Working
|
||||||
- \[W\] - Work in progress
|
- \[W\] - Work in progress
|
||||||
- \[N\] - Not applicable/Won't be implemented without good reason.
|
- \[N\] - Not applicable/Won't be implemented without good reason.
|
||||||
@ -46,12 +46,12 @@ key:
|
|||||||
[U] - shouldBundleReplyInfo 0.9.2 true,false true Set to false to disable ever bundling a reply LeaseSet. For clients that do not publish their LeaseSet, this option must be true for any reply to be possible. "true" is also recommended for multihomed servers with long connection times. Setting to "false" may save significant outbound bandwidth, especially if the client is configured with a large number of inbound tunnels (Leases). If replies are still required, this may shift the bandwidth burden to the far-end client and the floodfill. There are several cases where "false" may be appropriate: Unidirectional communication, no reply required LeaseSet is published and higher reply latency is acceptable LeaseSet is published, client is a "server", all connections are inbound so the connecting far-end destination obviously has the leaseset already. Connections are either short, or it is acceptable for latency on a long-lived connection to temporarily increase while the other end re-fetches the LeaseSet after expiration. HTTP servers may fit these requirements.
|
[U] - shouldBundleReplyInfo 0.9.2 true,false true Set to false to disable ever bundling a reply LeaseSet. For clients that do not publish their LeaseSet, this option must be true for any reply to be possible. "true" is also recommended for multihomed servers with long connection times. Setting to "false" may save significant outbound bandwidth, especially if the client is configured with a large number of inbound tunnels (Leases). If replies are still required, this may shift the bandwidth burden to the far-end client and the floodfill. There are several cases where "false" may be appropriate: Unidirectional communication, no reply required LeaseSet is published and higher reply latency is acceptable LeaseSet is published, client is a "server", all connections are inbound so the connecting far-end destination obviously has the leaseset already. Connections are either short, or it is acceptable for latency on a long-lived connection to temporarily increase while the other end re-fetches the LeaseSet after expiration. HTTP servers may fit these requirements.
|
||||||
[C] - i2cp.closeIdleTime 0.7.1 1800000 300000 minimum (ms) Idle time required (default 30 minutes)
|
[C] - i2cp.closeIdleTime 0.7.1 1800000 300000 minimum (ms) Idle time required (default 30 minutes)
|
||||||
[C] - i2cp.closeOnIdle 0.7.1 true,false false Close I2P session when idle
|
[C] - i2cp.closeOnIdle 0.7.1 true,false false Close I2P session when idle
|
||||||
[W] - i2cp.encryptLeaseSet 0.7.1 true,false false Encrypt the lease
|
[C] - i2cp.encryptLeaseSet 0.7.1 true,false false Encrypt the lease
|
||||||
[C] - i2cp.fastReceive 0.9.4 true,false true If true, the router just sends the MessagePayload instead of sending a MessageStatus and awaiting a ReceiveMessageBegin.
|
[C] - i2cp.fastReceive 0.9.4 true,false true If true, the router just sends the MessagePayload instead of sending a MessageStatus and awaiting a ReceiveMessageBegin.
|
||||||
[C] - i2cp.gzip 0.6.5 true,false true Gzip outbound data
|
[C] - i2cp.gzip 0.6.5 true,false true Gzip outbound data
|
||||||
[W] - i2cp.leaseSetKey 0.7.1 For encrypted leasesets. Base 64 SessionKey (44 characters)
|
[C] - i2cp.leaseSetKey 0.7.1 For encrypted leasesets. Base 64 SessionKey (44 characters)
|
||||||
[W] - i2cp.leaseSetPrivateKey 0.9.18 Base 64 private key for encryption. Optionally preceded by the key type and ':'. Only "ELGAMAL_2048:" is supported, which is the default. I2CP will generate the public key from the private key. Use for persistent leaseset keys across restarts.
|
[C] - i2cp.leaseSetPrivateKey 0.9.18 Base 64 private key for encryption. Optionally preceded by the key type and ':'. Only "ELGAMAL_2048:" is supported, which is the default. I2CP will generate the public key from the private key. Use for persistent leaseset keys across restarts.
|
||||||
[W] - i2cp.leaseSetSigningPrivateKey 0.9.18 Base 64 private key for signatures. Optionally preceded by the key type and ':'. DSA_SHA1 is the default. Key type must match the signature type in the destination. I2CP will generate the public key from the private key. Use for persistent leaseset keys across restarts.
|
[C] - i2cp.leaseSetSigningPrivateKey 0.9.18 Base 64 private key for signatures. Optionally preceded by the key type and ':'. DSA_SHA1 is the default. Key type must match the signature type in the destination. I2CP will generate the public key from the private key. Use for persistent leaseset keys across restarts.
|
||||||
[C] - i2cp.reduceIdleTime 0.7.1 1200000 300000 minimum (ms) Idle time required (default 20 minutes, minimum 5 minutes)
|
[C] - i2cp.reduceIdleTime 0.7.1 1200000 300000 minimum (ms) Idle time required (default 20 minutes, minimum 5 minutes)
|
||||||
[C] - i2cp.reduceOnIdle 0.7.1 true,false false Reduce tunnel quantity when idle
|
[C] - i2cp.reduceOnIdle 0.7.1 true,false false Reduce tunnel quantity when idle
|
||||||
[C] - i2cp.reduceQuantity 0.7.1 1 1 to 5 1 Tunnel quantity when reduced (applies to both inbound and outbound)
|
[C] - i2cp.reduceQuantity 0.7.1 1 1 to 5 1 Tunnel quantity when reduced (applies to both inbound and outbound)
|
||||||
|
@ -1 +1,30 @@
|
|||||||
package i2ptunconf
|
package i2ptunconf
|
||||||
|
|
||||||
|
//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 (c *Conf) GetMessageReliability(arg, def string, label ...string) string {
|
||||||
|
if arg != def {
|
||||||
|
return arg
|
||||||
|
}
|
||||||
|
if c.config == nil {
|
||||||
|
return arg
|
||||||
|
}
|
||||||
|
return c.MessageReliability
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetMessageReliability sets the access list type from a config file
|
||||||
|
func (c *Conf) SetMessageReliability(label ...string) {
|
||||||
|
if v, ok := c.Get("i2cp.messageReliability", label...); ok {
|
||||||
|
c.MessageReliability = v
|
||||||
|
}
|
||||||
|
if c.MessageReliability != "BestEffort" && c.MessageReliability != "none" {
|
||||||
|
c.MessageReliability = "none"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *Conf) reliability() string {
|
||||||
|
return "i2cp.messageReliability" + c.MessageReliability
|
||||||
|
}
|
||||||
|
@ -52,6 +52,7 @@ type Conf struct {
|
|||||||
CloseIdleTime int
|
CloseIdleTime int
|
||||||
AccessListType string
|
AccessListType string
|
||||||
AccessList []string
|
AccessList []string
|
||||||
|
MessageReliability string
|
||||||
}
|
}
|
||||||
|
|
||||||
// Print returns and prints a formatted list of configured tunnel settings.
|
// Print returns and prints a formatted list of configured tunnel settings.
|
||||||
@ -192,6 +193,7 @@ func (c *Conf) I2PINILoad(iniFile string, label ...string) error {
|
|||||||
c.SetCloseIdleTime(label...)
|
c.SetCloseIdleTime(label...)
|
||||||
c.SetAccessListType(label...)
|
c.SetAccessListType(label...)
|
||||||
c.SetTargetPort443(label...)
|
c.SetTargetPort443(label...)
|
||||||
|
c.SetMessageReliability(label...)
|
||||||
if v, ok := c.Get("i2cp.accessList", label...); ok {
|
if v, ok := c.Get("i2cp.accessList", label...); ok {
|
||||||
csv := strings.Split(v, ",")
|
csv := strings.Split(v, ",")
|
||||||
for _, z := range csv {
|
for _, z := range csv {
|
||||||
@ -255,6 +257,7 @@ func NewSAMForwarderFromConf(config *Conf) (*samforwarder.SAMForwarder, error) {
|
|||||||
samforwarder.SetCloseIdleTimeMs(config.CloseIdleTime),
|
samforwarder.SetCloseIdleTimeMs(config.CloseIdleTime),
|
||||||
samforwarder.SetAccessListType(config.AccessListType),
|
samforwarder.SetAccessListType(config.AccessListType),
|
||||||
samforwarder.SetAccessList(config.AccessList),
|
samforwarder.SetAccessList(config.AccessList),
|
||||||
|
samforwarder.SetMessageReliability(config.MessageReliability),
|
||||||
//samforwarder.SetTargetForPort443(config.TargetForPort443),
|
//samforwarder.SetTargetForPort443(config.TargetForPort443),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -313,6 +316,7 @@ func NewSAMClientForwarderFromConf(config *Conf) (*samforwarder.SAMClientForward
|
|||||||
samforwarder.SetClientCloseIdleTimeMs(config.CloseIdleTime),
|
samforwarder.SetClientCloseIdleTimeMs(config.CloseIdleTime),
|
||||||
samforwarder.SetClientAccessListType(config.AccessListType),
|
samforwarder.SetClientAccessListType(config.AccessListType),
|
||||||
samforwarder.SetClientAccessList(config.AccessList),
|
samforwarder.SetClientAccessList(config.AccessList),
|
||||||
|
samforwarder.SetClientMessageReliability(config.MessageReliability),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
return nil, nil
|
return nil, nil
|
||||||
@ -370,6 +374,7 @@ func NewSAMSSUForwarderFromConf(config *Conf) (*samforwarderudp.SAMSSUForwarder,
|
|||||||
samforwarderudp.SetCloseIdleTimeMs(config.CloseIdleTime),
|
samforwarderudp.SetCloseIdleTimeMs(config.CloseIdleTime),
|
||||||
samforwarderudp.SetAccessListType(config.AccessListType),
|
samforwarderudp.SetAccessListType(config.AccessListType),
|
||||||
samforwarderudp.SetAccessList(config.AccessList),
|
samforwarderudp.SetAccessList(config.AccessList),
|
||||||
|
samforwarderudp.SetMessageReliability(config.MessageReliability),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
return nil, nil
|
return nil, nil
|
||||||
@ -427,6 +432,7 @@ func NewSAMSSUClientForwarderFromConf(config *Conf) (*samforwarderudp.SAMSSUClie
|
|||||||
samforwarderudp.SetClientCloseIdleTimeMs(config.CloseIdleTime),
|
samforwarderudp.SetClientCloseIdleTimeMs(config.CloseIdleTime),
|
||||||
samforwarderudp.SetClientAccessListType(config.AccessListType),
|
samforwarderudp.SetClientAccessListType(config.AccessListType),
|
||||||
samforwarderudp.SetClientAccessList(config.AccessList),
|
samforwarderudp.SetClientAccessList(config.AccessList),
|
||||||
|
samforwarderudp.SetClientMessageReliability(config.MessageReliability),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
return nil, nil
|
return nil, nil
|
||||||
|
@ -57,7 +57,11 @@ var (
|
|||||||
"Client proxy mode(true or false)")
|
"Client proxy mode(true or false)")
|
||||||
injectHeaders = flag.Bool("ih", false,
|
injectHeaders = flag.Bool("ih", false,
|
||||||
"Inject X-I2P-DEST headers")
|
"Inject X-I2P-DEST headers")
|
||||||
encryptedLeasesetKeys = flag.String("k", "none",
|
leaseSetKey = flag.String("k", "none",
|
||||||
|
"path to saved encrypted leaseset keys")
|
||||||
|
leaseSetPrivateKey = flag.String("pk", "none",
|
||||||
|
"path to saved encrypted leaseset keys")
|
||||||
|
leaseSetPrivateSigningKey = flag.String("psk", "none",
|
||||||
"path to saved encrypted leaseset keys")
|
"path to saved encrypted leaseset keys")
|
||||||
targetDir = flag.String("d", "",
|
targetDir = flag.String("d", "",
|
||||||
"Directory to save tunnel configuration file in.")
|
"Directory to save tunnel configuration file in.")
|
||||||
@ -133,6 +137,9 @@ func main() {
|
|||||||
config.InBackupQuantity = config.GetInBackups(*inBackupQuantity, 5)
|
config.InBackupQuantity = config.GetInBackups(*inBackupQuantity, 5)
|
||||||
config.OutBackupQuantity = config.GetOutBackups(*outBackupQuantity, 5)
|
config.OutBackupQuantity = config.GetOutBackups(*outBackupQuantity, 5)
|
||||||
config.EncryptLeaseSet = config.GetEncryptLeaseset(*encryptLeaseSet, false)
|
config.EncryptLeaseSet = config.GetEncryptLeaseset(*encryptLeaseSet, false)
|
||||||
|
config.LeaseSetKey = config.GetLeasesetKey(*leaseSetKey, "")
|
||||||
|
config.LeaseSetPrivateKey = config.GetLeasesetPrivateKey(*leaseSetPrivateKey, "")
|
||||||
|
config.LeaseSetPrivateSigningKey = config.GetLeasesetPrivateSigningKey(*leaseSetPrivateSigningKey, "")
|
||||||
config.InAllowZeroHop = config.GetInAllowZeroHop(*inAllowZeroHop, false)
|
config.InAllowZeroHop = config.GetInAllowZeroHop(*inAllowZeroHop, false)
|
||||||
config.OutAllowZeroHop = config.GetOutAllowZeroHop(*outAllowZeroHop, false)
|
config.OutAllowZeroHop = config.GetOutAllowZeroHop(*outAllowZeroHop, false)
|
||||||
config.UseCompression = config.GetUseCompression(*useCompression, true)
|
config.UseCompression = config.GetUseCompression(*useCompression, true)
|
||||||
|
@ -186,7 +186,7 @@ func SetClientEncrypt(b bool) func(*SAMClientForwarder) error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//SetClientLeaseSetKey sets the host of the SAMForwarder's SAM bridge
|
//SetClientLeaseSetKey sets
|
||||||
func SetClientLeaseSetKey(s string) func(*SAMClientForwarder) error {
|
func SetClientLeaseSetKey(s string) func(*SAMClientForwarder) error {
|
||||||
return func(c *SAMClientForwarder) error {
|
return func(c *SAMClientForwarder) error {
|
||||||
c.leaseSetKey = s
|
c.leaseSetKey = s
|
||||||
@ -194,7 +194,7 @@ func SetClientLeaseSetKey(s string) func(*SAMClientForwarder) error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//SetClientLeaseSetPrivateKey sets the host of the SAMForwarder's SAM bridge
|
//SetClientLeaseSetPrivateKey sets
|
||||||
func SetClientLeaseSetPrivateKey(s string) func(*SAMClientForwarder) error {
|
func SetClientLeaseSetPrivateKey(s string) func(*SAMClientForwarder) error {
|
||||||
return func(c *SAMClientForwarder) error {
|
return func(c *SAMClientForwarder) error {
|
||||||
c.leaseSetPrivateKey = s
|
c.leaseSetPrivateKey = s
|
||||||
@ -202,7 +202,7 @@ func SetClientLeaseSetPrivateKey(s string) func(*SAMClientForwarder) error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//SetClientLeaseSetPrivateSigningKey sets the host of the SAMForwarder's SAM bridge
|
//SetClientLeaseSetPrivateSigningKey sets
|
||||||
func SetClientLeaseSetPrivateSigningKey(s string) func(*SAMClientForwarder) error {
|
func SetClientLeaseSetPrivateSigningKey(s string) func(*SAMClientForwarder) error {
|
||||||
return func(c *SAMClientForwarder) error {
|
return func(c *SAMClientForwarder) error {
|
||||||
c.leaseSetPrivateSigningKey = s
|
c.leaseSetPrivateSigningKey = s
|
||||||
@ -210,6 +210,14 @@ func SetClientLeaseSetPrivateSigningKey(s string) func(*SAMClientForwarder) erro
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//SetClientMessageReliability sets
|
||||||
|
func SetClientMessageReliability(s string) func(*SAMClientForwarder) error {
|
||||||
|
return func(c *SAMClientForwarder) error {
|
||||||
|
c.messageReliability = s
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//SetClientAllowZeroIn tells the tunnel to accept zero-hop peers
|
//SetClientAllowZeroIn tells the tunnel to accept zero-hop peers
|
||||||
func SetClientAllowZeroIn(b bool) func(*SAMClientForwarder) error {
|
func SetClientAllowZeroIn(b bool) func(*SAMClientForwarder) error {
|
||||||
return func(c *SAMClientForwarder) error {
|
return func(c *SAMClientForwarder) error {
|
||||||
|
@ -52,6 +52,7 @@ type SAMClientForwarder struct {
|
|||||||
outBackupQuantity string
|
outBackupQuantity string
|
||||||
fastRecieve string
|
fastRecieve string
|
||||||
useCompression string
|
useCompression string
|
||||||
|
messageReliability string
|
||||||
closeIdle string
|
closeIdle string
|
||||||
closeIdleTime string
|
closeIdleTime string
|
||||||
reduceIdle string
|
reduceIdle string
|
||||||
@ -169,6 +170,7 @@ func (f *SAMClientForwarder) Serve(dest string) error {
|
|||||||
"i2cp.reduceQuantity=" + f.reduceIdleQuantity,
|
"i2cp.reduceQuantity=" + f.reduceIdleQuantity,
|
||||||
"i2cp.closeOnIdle=" + f.closeIdle,
|
"i2cp.closeOnIdle=" + f.closeIdle,
|
||||||
"i2cp.closeIdleTime=" + f.closeIdleTime,
|
"i2cp.closeIdleTime=" + f.closeIdleTime,
|
||||||
|
"i2cp.messageReliability" + f.messageReliability,
|
||||||
"i2cp.dontPublishLeaseSet=true",
|
"i2cp.dontPublishLeaseSet=true",
|
||||||
"i2cp.encryptLeaseSet=" + f.encryptLeaseSet,
|
"i2cp.encryptLeaseSet=" + f.encryptLeaseSet,
|
||||||
lsk, lspk, lspsk,
|
lsk, lspk, lspsk,
|
||||||
|
@ -215,6 +215,14 @@ func SetLeaseSetPrivateSigningKey(s string) func(*SAMForwarder) error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//SetMessageReliability sets the host of the SAMForwarder's SAM bridge
|
||||||
|
func SetMessageReliability(s string) func(*SAMForwarder) error {
|
||||||
|
return func(c *SAMForwarder) error {
|
||||||
|
c.messageReliability = s
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//SetAllowZeroIn tells the tunnel to accept zero-hop peers
|
//SetAllowZeroIn tells the tunnel to accept zero-hop peers
|
||||||
func SetAllowZeroIn(b bool) func(*SAMForwarder) error {
|
func SetAllowZeroIn(b bool) func(*SAMForwarder) error {
|
||||||
return func(c *SAMForwarder) error {
|
return func(c *SAMForwarder) error {
|
||||||
|
@ -56,6 +56,7 @@ type SAMForwarder struct {
|
|||||||
outBackupQuantity string
|
outBackupQuantity string
|
||||||
fastRecieve string
|
fastRecieve string
|
||||||
useCompression string
|
useCompression string
|
||||||
|
messageReliability string
|
||||||
closeIdle string
|
closeIdle string
|
||||||
closeIdleTime string
|
closeIdleTime string
|
||||||
reduceIdle string
|
reduceIdle string
|
||||||
@ -260,6 +261,7 @@ func (f *SAMForwarder) Serve() error {
|
|||||||
"i2cp.reduceQuantity=" + f.reduceIdleQuantity,
|
"i2cp.reduceQuantity=" + f.reduceIdleQuantity,
|
||||||
"i2cp.closeOnIdle=" + f.closeIdle,
|
"i2cp.closeOnIdle=" + f.closeIdle,
|
||||||
"i2cp.closeIdleTime=" + f.closeIdleTime,
|
"i2cp.closeIdleTime=" + f.closeIdleTime,
|
||||||
|
"i2cp.messageReliability" + f.messageReliability,
|
||||||
"i2cp.encryptLeaseSet=" + f.encryptLeaseSet,
|
"i2cp.encryptLeaseSet=" + f.encryptLeaseSet,
|
||||||
lsk, lspk, lspsk,
|
lsk, lspk, lspsk,
|
||||||
f.accesslisttype(),
|
f.accesslisttype(),
|
||||||
|
@ -202,6 +202,14 @@ func SetClientLeaseSetPrivateSigningKey(s string) func(*SAMSSUClientForwarder) e
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//SetClientMessageReliability sets
|
||||||
|
func SetClientMessageReliability(s string) func(*SAMSSUClientForwarder) error {
|
||||||
|
return func(c *SAMSSUClientForwarder) error {
|
||||||
|
c.messageReliability = s
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//SetClientAllowZeroIn tells the tunnel to accept zero-hop peers
|
//SetClientAllowZeroIn tells the tunnel to accept zero-hop peers
|
||||||
func SetClientAllowZeroIn(b bool) func(*SAMSSUClientForwarder) error {
|
func SetClientAllowZeroIn(b bool) func(*SAMSSUClientForwarder) error {
|
||||||
return func(c *SAMSSUClientForwarder) error {
|
return func(c *SAMSSUClientForwarder) error {
|
||||||
|
@ -53,6 +53,7 @@ type SAMSSUClientForwarder struct {
|
|||||||
outBackupQuantity string
|
outBackupQuantity string
|
||||||
fastRecieve string
|
fastRecieve string
|
||||||
useCompression string
|
useCompression string
|
||||||
|
messageReliability string
|
||||||
closeIdle string
|
closeIdle string
|
||||||
closeIdleTime string
|
closeIdleTime string
|
||||||
reduceIdle string
|
reduceIdle string
|
||||||
@ -143,6 +144,7 @@ func (f *SAMSSUClientForwarder) forward(conn net.PacketConn) {
|
|||||||
"outbound.allowZeroHop=" + f.outAllowZeroHop,
|
"outbound.allowZeroHop=" + f.outAllowZeroHop,
|
||||||
"i2cp.fastRecieve=" + f.fastRecieve,
|
"i2cp.fastRecieve=" + f.fastRecieve,
|
||||||
"i2cp.gzip=" + f.useCompression,
|
"i2cp.gzip=" + f.useCompression,
|
||||||
|
"i2cp.messageReliability" + f.messageReliability,
|
||||||
"i2cp.reduceOnIdle=" + f.reduceIdle,
|
"i2cp.reduceOnIdle=" + f.reduceIdle,
|
||||||
"i2cp.reduceIdleTime=" + f.reduceIdleTime,
|
"i2cp.reduceIdleTime=" + f.reduceIdleTime,
|
||||||
"i2cp.reduceQuantity=" + f.reduceIdleQuantity,
|
"i2cp.reduceQuantity=" + f.reduceIdleQuantity,
|
||||||
|
@ -202,6 +202,14 @@ func SetLeaseSetPrivateSigningKey(s string) func(*SAMSSUForwarder) error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//SetMessageReliability sets
|
||||||
|
func SetMessageReliability(s string) func(*SAMSSUForwarder) error {
|
||||||
|
return func(c *SAMSSUForwarder) error {
|
||||||
|
c.messageReliability = s
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//SetAllowZeroIn tells the tunnel to accept zero-hop peers
|
//SetAllowZeroIn tells the tunnel to accept zero-hop peers
|
||||||
func SetAllowZeroIn(b bool) func(*SAMSSUForwarder) error {
|
func SetAllowZeroIn(b bool) func(*SAMSSUForwarder) error {
|
||||||
return func(c *SAMSSUForwarder) error {
|
return func(c *SAMSSUForwarder) error {
|
||||||
|
@ -51,6 +51,7 @@ type SAMSSUForwarder struct {
|
|||||||
outBackupQuantity string
|
outBackupQuantity string
|
||||||
fastRecieve string
|
fastRecieve string
|
||||||
useCompression string
|
useCompression string
|
||||||
|
messageReliability string
|
||||||
closeIdle string
|
closeIdle string
|
||||||
closeIdleTime string
|
closeIdleTime string
|
||||||
reduceIdle string
|
reduceIdle string
|
||||||
@ -173,6 +174,7 @@ func (f *SAMSSUForwarder) Serve() error {
|
|||||||
"outbound.allowZeroHop=" + f.outAllowZeroHop,
|
"outbound.allowZeroHop=" + f.outAllowZeroHop,
|
||||||
"i2cp.fastRecieve=" + f.fastRecieve,
|
"i2cp.fastRecieve=" + f.fastRecieve,
|
||||||
"i2cp.gzip=" + f.useCompression,
|
"i2cp.gzip=" + f.useCompression,
|
||||||
|
"i2cp.messageReliability" + f.messageReliability,
|
||||||
"i2cp.reduceOnIdle=" + f.reduceIdle,
|
"i2cp.reduceOnIdle=" + f.reduceIdle,
|
||||||
"i2cp.reduceIdleTime=" + f.reduceIdleTime,
|
"i2cp.reduceIdleTime=" + f.reduceIdleTime,
|
||||||
"i2cp.reduceQuantity=" + f.reduceIdleQuantity,
|
"i2cp.reduceQuantity=" + f.reduceIdleQuantity,
|
||||||
|
Reference in New Issue
Block a user