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