I do have to get keys from the interface
This commit is contained in:
@ -30,6 +30,7 @@ type Conf struct {
|
|||||||
TargetPort string
|
TargetPort string
|
||||||
SamHost string
|
SamHost string
|
||||||
SamPort string
|
SamPort string
|
||||||
|
TunnelHost string
|
||||||
TargetForPort443 string
|
TargetForPort443 string
|
||||||
TunName string
|
TunName string
|
||||||
EncryptLeaseSet bool
|
EncryptLeaseSet bool
|
||||||
@ -235,6 +236,7 @@ func (c *Conf) I2PINILoad(iniFile string, label ...string) error {
|
|||||||
c.SetPort(label...)
|
c.SetPort(label...)
|
||||||
c.SetSAMHost(label...)
|
c.SetSAMHost(label...)
|
||||||
c.SetSAMPort(label...)
|
c.SetSAMPort(label...)
|
||||||
|
c.SetEndpointHost(label...)
|
||||||
c.SetTunName(label...)
|
c.SetTunName(label...)
|
||||||
c.SetSigType(label...)
|
c.SetSigType(label...)
|
||||||
c.SetEncryptLease(label...)
|
c.SetEncryptLease(label...)
|
||||||
|
@ -81,6 +81,10 @@ func (f *SAMClientForwarder) ID() string {
|
|||||||
return f.TunName
|
return f.TunName
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (f *SAMClientForwarder) Keys() i2pkeys.I2PKeys {
|
||||||
|
return f.SamKeys
|
||||||
|
}
|
||||||
|
|
||||||
func (f *SAMClientForwarder) print() []string {
|
func (f *SAMClientForwarder) print() []string {
|
||||||
lsk, lspk, lspsk := f.leasesetsettings()
|
lsk, lspk, lspsk := f.leasesetsettings()
|
||||||
return []string{
|
return []string{
|
||||||
|
@ -88,6 +88,10 @@ func (f *SAMForwarder) ID() string {
|
|||||||
return f.TunName
|
return f.TunName
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (f *SAMForwarder) Keys() i2pkeys.I2PKeys {
|
||||||
|
return f.SamKeys
|
||||||
|
}
|
||||||
|
|
||||||
func (f *SAMForwarder) Cleanup() {
|
func (f *SAMForwarder) Cleanup() {
|
||||||
f.publishStream.Close()
|
f.publishStream.Close()
|
||||||
f.publishListen.Close()
|
f.publishListen.Close()
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
package samtunnel
|
package samtunnel
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/eyedeekay/sam3/i2pkeys"
|
||||||
|
)
|
||||||
|
|
||||||
type SAMTunnel interface {
|
type SAMTunnel interface {
|
||||||
GetType() string
|
GetType() string
|
||||||
Cleanup()
|
Cleanup()
|
||||||
@ -11,6 +15,7 @@ type SAMTunnel interface {
|
|||||||
//Destination() string
|
//Destination() string
|
||||||
Base32() string
|
Base32() string
|
||||||
Base64() string
|
Base64() string
|
||||||
|
Keys() i2pkeys.I2PKeys
|
||||||
Serve() error
|
Serve() error
|
||||||
Close() error
|
Close() error
|
||||||
Up() bool
|
Up() bool
|
||||||
|
@ -80,6 +80,10 @@ func (f *SAMClientForwarder) ID() string {
|
|||||||
return f.TunName
|
return f.TunName
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (f *SAMClientForwarder) Keys() i2pkeys.I2PKeys {
|
||||||
|
return f.SamKeys
|
||||||
|
}
|
||||||
|
|
||||||
func (f *SAMClientForwarder) print() []string {
|
func (f *SAMClientForwarder) print() []string {
|
||||||
lsk, lspk, lspsk := f.leasesetsettings()
|
lsk, lspk, lspsk := f.leasesetsettings()
|
||||||
return []string{
|
return []string{
|
||||||
|
@ -87,6 +87,10 @@ func (f *SAMForwarder) ID() string {
|
|||||||
return f.TunName
|
return f.TunName
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (f *SAMForwarder) Keys() i2pkeys.I2PKeys {
|
||||||
|
return f.SamKeys
|
||||||
|
}
|
||||||
|
|
||||||
func (f *SAMForwarder) Cleanup() {
|
func (f *SAMForwarder) Cleanup() {
|
||||||
f.publishStream.Close()
|
f.publishStream.Close()
|
||||||
f.publishListen.Close()
|
f.publishListen.Close()
|
||||||
|
@ -82,6 +82,10 @@ func (f *SAMSSUClientForwarder) ID() string {
|
|||||||
return f.TunName
|
return f.TunName
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (f *SAMSSUClientForwarder) Keys() i2pkeys.I2PKeys {
|
||||||
|
return f.SamKeys
|
||||||
|
}
|
||||||
|
|
||||||
func (f *SAMSSUClientForwarder) Cleanup() {
|
func (f *SAMSSUClientForwarder) Cleanup() {
|
||||||
f.publishConnection.Close()
|
f.publishConnection.Close()
|
||||||
f.connectStream.Close()
|
f.connectStream.Close()
|
||||||
|
@ -82,6 +82,10 @@ func (f *SAMSSUForwarder) ID() string {
|
|||||||
return f.TunName
|
return f.TunName
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (f *SAMSSUForwarder) Keys() i2pkeys.I2PKeys {
|
||||||
|
return f.SamKeys
|
||||||
|
}
|
||||||
|
|
||||||
func (f *SAMSSUForwarder) Cleanup() {
|
func (f *SAMSSUForwarder) Cleanup() {
|
||||||
f.publishConnection.Close()
|
f.publishConnection.Close()
|
||||||
f.clientConnection.Close()
|
f.clientConnection.Close()
|
||||||
|
Reference in New Issue
Block a user