Documentation ¶
Index ¶
- func SetAccessList(s []string) func(*SAMClientVPN) error
- func SetAccessListType(s string) func(*SAMClientVPN) error
- func SetAllowZeroIn(b bool) func(*SAMClientVPN) error
- func SetAllowZeroOut(b bool) func(*SAMClientVPN) error
- func SetClientDest(s string) func(*SAMClientVPN) error
- func SetClientFilePath(s string) func(*SAMClientVPN) error
- func SetClientVPNConfig(s *i2ptunconf.Conf) func(*SAMClientVPN) error
- func SetCloseIdle(b bool) func(*SAMClientVPN) error
- func SetCloseIdleTime(u int) func(*SAMClientVPN) error
- func SetCloseIdleTimeMs(u int) func(*SAMClientVPN) error
- func SetCompress(b bool) func(*SAMClientVPN) error
- func SetEepProxy(s string) func(*SAMClientVPN) error
- func SetEncrypt(b bool) func(*SAMClientVPN) error
- func SetEndpointHost(s string) func(*SAMClientVPN) error
- func SetFastRecieve(b bool) func(*SAMClientVPN) error
- func SetInBackups(u int) func(*SAMClientVPN) error
- func SetInLength(u int) func(*SAMClientVPN) error
- func SetInQuantity(u int) func(*SAMClientVPN) error
- func SetInVariance(i int) func(*SAMClientVPN) error
- func SetLeaseSetKey(s string) func(*SAMClientVPN) error
- func SetLeaseSetPrivateKey(s string) func(*SAMClientVPN) error
- func SetLeaseSetPrivateSigningKey(s string) func(*SAMClientVPN) error
- func SetMessageReliability(s string) func(*SAMClientVPN) error
- func SetName(s string) func(*SAMClientVPN) error
- func SetOutBackups(u int) func(*SAMClientVPN) error
- func SetOutLength(u int) func(*SAMClientVPN) error
- func SetOutQuantity(u int) func(*SAMClientVPN) error
- func SetOutVariance(i int) func(*SAMClientVPN) error
- func SetPointHost(s string) func(*SAMClientVPN) error
- func SetReduceIdle(b bool) func(*SAMClientVPN) error
- func SetReduceIdleQuantity(u int) func(*SAMClientVPN) error
- func SetReduceIdleTime(u int) func(*SAMClientVPN) error
- func SetReduceIdleTimeMs(u int) func(*SAMClientVPN) error
- func SetSAMHost(s string) func(*SAMClientVPN) error
- func SetSAMPort(s string) func(*SAMClientVPN) error
- func SetSaveFile(b bool) func(*SAMClientVPN) error
- func SetSigType(s string) func(*SAMClientVPN) error
- func SetType(s string) func(*SAMClientVPN) error
- type ClientOption
- type SAMClientVPN
- func (f *SAMClientVPN) AddAccessListMemberAddr(addr i2pkeys.I2PAddr) error
- func (f *SAMClientVPN) Base32() string
- func (f *SAMClientVPN) Base32Readable() string
- func (f *SAMClientVPN) Base64() string
- func (f *SAMClientVPN) Cleanup()
- func (f *SAMClientVPN) Close() error
- func (f *SAMClientVPN) Config() *i2ptunconf.Conf
- func (f *SAMClientVPN) DestinationAddr() (net.Addr, error)
- func (f *SAMClientVPN) GetType() string
- func (f *SAMClientVPN) ID() string
- func (f *SAMClientVPN) Keys() i2pkeys.I2PKeys
- func (s *SAMClientVPN) Load() (samtunnel.SAMTunnel, error)
- func (f *SAMClientVPN) LoadRemoteAddr() net.Addr
- func (f *SAMClientVPN) LocalAddr() (net.Addr, error)
- func (f *SAMClientVPN) Print() string
- func (f *SAMClientVPN) Props() map[string]string
- func (f *SAMClientVPN) RemoteAddr() (net.Addr, error)
- func (f *SAMClientVPN) RequestAdditionToAccessList() error
- func (f *SAMClientVPN) SAMSetupSock(netAddr net.Addr) net.PacketConn
- func (f *SAMClientVPN) Search(search string) string
- func (s *SAMClientVPN) Serve() error
- func (f *SAMClientVPN) Target() string
- func (f *SAMClientVPN) Up() bool
- func (f *SAMClientVPN) UpdateRemoteAddr(addr net.Addr)
- func (t *SAMClientVPN) WriteConn(sock net.PacketConn, raddr net.Addr, b []byte, n int, magic [16]byte) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetAccessList ¶
func SetAccessList(s []string) func(*SAMClientVPN) error
SetAccessList tells the system to treat the accessList as a whitelist
func SetAccessListType ¶
func SetAccessListType(s string) func(*SAMClientVPN) error
SetAccessListType tells the system to treat the accessList as a whitelist
func SetAllowZeroIn ¶
func SetAllowZeroIn(b bool) func(*SAMClientVPN) error
SetAllowZeroIn tells the tunnel to accept zero-hop peers
func SetAllowZeroOut ¶
func SetAllowZeroOut(b bool) func(*SAMClientVPN) error
SetAllowZeroOut tells the tunnel to accept zero-hop peers
func SetClientDest ¶
func SetClientDest(s string) func(*SAMClientVPN) error
func SetClientFilePath ¶
func SetClientFilePath(s string) func(*SAMClientVPN) error
func SetClientVPNConfig ¶
func SetClientVPNConfig(s *i2ptunconf.Conf) func(*SAMClientVPN) error
func SetCloseIdle ¶
func SetCloseIdle(b bool) func(*SAMClientVPN) error
SetCloseIdle tells the connection to close it's tunnels during extended idle time.
func SetCloseIdleTime ¶
func SetCloseIdleTime(u int) func(*SAMClientVPN) error
SetCloseIdleTime sets the time to wait before closing tunnels to idle levels
func SetCloseIdleTimeMs ¶
func SetCloseIdleTimeMs(u int) func(*SAMClientVPN) error
SetCloseIdleTimeMs sets the time to wait before closing tunnels to idle levels in milliseconds
func SetCompress ¶
func SetCompress(b bool) func(*SAMClientVPN) error
SetCompress tells clients to use compression
func SetEepProxy ¶
func SetEepProxy(s string) func(*SAMClientVPN) error
func SetEncrypt ¶
func SetEncrypt(b bool) func(*SAMClientVPN) error
SetEncrypt tells the router to use an encrypted leaseset
func SetEndpointHost ¶
func SetEndpointHost(s string) func(*SAMClientVPN) error
SetEndpointHost sets the host of the service to forward
func SetFastRecieve ¶
func SetFastRecieve(b bool) func(*SAMClientVPN) error
SetFastRecieve tells clients to use compression
func SetInBackups ¶
func SetInBackups(u int) func(*SAMClientVPN) error
SetInBackups sets the inbound tunnel backups
func SetInLength ¶
func SetInLength(u int) func(*SAMClientVPN) error
SetInLength sets the number of hops inbound
func SetInQuantity ¶
func SetInQuantity(u int) func(*SAMClientVPN) error
SetInQuantity sets the inbound tunnel quantity
func SetInVariance ¶
func SetInVariance(i int) func(*SAMClientVPN) error
SetInVariance sets the variance of a number of hops inbound
func SetLeaseSetKey ¶
func SetLeaseSetKey(s string) func(*SAMClientVPN) error
SetLeaseSetKey sets the host of the SAMClientVPN's SAM bridge
func SetLeaseSetPrivateKey ¶
func SetLeaseSetPrivateKey(s string) func(*SAMClientVPN) error
SetLeaseSetPrivateKey sets the host of the SAMClientVPN's SAM bridge
func SetLeaseSetPrivateSigningKey ¶
func SetLeaseSetPrivateSigningKey(s string) func(*SAMClientVPN) error
SetLeaseSetPrivateSigningKey sets the host of the SAMClientVPN's SAM bridge
func SetMessageReliability ¶
func SetMessageReliability(s string) func(*SAMClientVPN) error
SetMessageReliability sets the host of the SAMClientVPN's SAM bridge
func SetName ¶
func SetName(s string) func(*SAMClientVPN) error
SetName sets the host of the SAMClientVPN's SAM bridge
func SetOutBackups ¶
func SetOutBackups(u int) func(*SAMClientVPN) error
SetOutBackups sets the inbound tunnel backups
func SetOutLength ¶
func SetOutLength(u int) func(*SAMClientVPN) error
SetOutLength sets the number of hops outbound
func SetOutQuantity ¶
func SetOutQuantity(u int) func(*SAMClientVPN) error
SetOutQuantity sets the outbound tunnel quantity
func SetOutVariance ¶
func SetOutVariance(i int) func(*SAMClientVPN) error
SetOutVariance sets the variance of a number of hops outbound
func SetPointHost ¶
func SetPointHost(s string) func(*SAMClientVPN) error
SetPointHost sets the VPN host of the local machine
func SetReduceIdle ¶
func SetReduceIdle(b bool) func(*SAMClientVPN) error
SetReduceIdle tells the connection to reduce it's tunnels during extended idle time.
func SetReduceIdleQuantity ¶
func SetReduceIdleQuantity(u int) func(*SAMClientVPN) error
SetReduceIdleQuantity sets minimum number of tunnels to reduce to during idle time
func SetReduceIdleTime ¶
func SetReduceIdleTime(u int) func(*SAMClientVPN) error
SetReduceIdleTime sets the time to wait before reducing tunnels to idle levels
func SetReduceIdleTimeMs ¶
func SetReduceIdleTimeMs(u int) func(*SAMClientVPN) error
SetReduceIdleTimeMs sets the time to wait before reducing tunnels to idle levels in milliseconds
func SetSAMHost ¶
func SetSAMHost(s string) func(*SAMClientVPN) error
SetSAMHost sets the host of the SAMClientVPN's SAM bridge
func SetSAMPort ¶
func SetSAMPort(s string) func(*SAMClientVPN) error
SetSAMPort sets the port of the SAMClientVPN's SAM bridge using a string
func SetSaveFile ¶
func SetSaveFile(b bool) func(*SAMClientVPN) error
SetSaveFile tells the router to save the tunnel's keys long-term
func SetSigType ¶
func SetSigType(s string) func(*SAMClientVPN) error
SetSigType sets the type of the forwarder server
func SetType ¶
func SetType(s string) func(*SAMClientVPN) error
SetType sets the type of the forwarder server
Types ¶
type ClientOption ¶
type ClientOption func(*SAMClientVPN) error
ClientOption is a SAMClientVPN Option
type SAMClientVPN ¶
type SAMClientVPN struct { // VPN tunnel *udptunnel.Tunnel //*wallet.InnerWallet *hashhash.Hasher Conf *i2ptunconf.Conf FilePath string // contains filtered or unexported fields }
SAMClientVPN is a VPN client which uses UDP-like communication over I2P for anonymity, authentication and encryption.
func NewSAMClientVPN ¶
func NewSAMClientVPN(conf *i2ptunconf.Conf, destination ...string) (*SAMClientVPN, error)
func NewSAMClientVPNFromOptions ¶
func NewSAMClientVPNFromOptions(opts ...func(*SAMClientVPN) error) (*SAMClientVPN, error)
func NewSAMVPNClientForwarderFromConfig ¶
func NewSAMVPNClientForwarderFromConfig(iniFile, SamHost, SamPort string, label ...string) (*SAMClientVPN, error)
NewSAMVPNForwarderFromConfig generates a new SAMVPNForwarder from a config file
func (*SAMClientVPN) AddAccessListMemberAddr ¶
func (f *SAMClientVPN) AddAccessListMemberAddr(addr i2pkeys.I2PAddr) error
func (*SAMClientVPN) Base32 ¶
func (f *SAMClientVPN) Base32() string
Base32 returns the base32 address of the local tunnel, *not* the destination tunnel
func (*SAMClientVPN) Base32Readable ¶
func (f *SAMClientVPN) Base32Readable() string
Base32Readable returns the base32 address where the local service is being forwarded
func (*SAMClientVPN) Base64 ¶
func (f *SAMClientVPN) Base64() string
Base64 returns the base64 address of the local tunnel, *not* the destination tunnel
func (*SAMClientVPN) Cleanup ¶
func (f *SAMClientVPN) Cleanup()
Cleanup does nothing in this case, because AFAIK you should not use these in half-loaded state ever and this everything that would normally be in Cleanup is in Close instead, which normally calls Cleanup before doing a closing operation.
func (*SAMClientVPN) Close ¶
func (f *SAMClientVPN) Close() error
func (*SAMClientVPN) Config ¶
func (f *SAMClientVPN) Config() *i2ptunconf.Conf
func (*SAMClientVPN) DestinationAddr ¶
func (f *SAMClientVPN) DestinationAddr() (net.Addr, error)
DestinationAddr does the full lookup of the client destination and returns the corresponding sam3.I2PAddr as a net.Addr
func (*SAMClientVPN) GetType ¶
func (f *SAMClientVPN) GetType() string
func (*SAMClientVPN) ID ¶
func (f *SAMClientVPN) ID() string
func (*SAMClientVPN) Keys ¶
func (f *SAMClientVPN) Keys() i2pkeys.I2PKeys
func (*SAMClientVPN) LoadRemoteAddr ¶
func (f *SAMClientVPN) LoadRemoteAddr() net.Addr
func (*SAMClientVPN) LocalAddr ¶
func (f *SAMClientVPN) LocalAddr() (net.Addr, error)
LocalAddr converts the tunnel IP address string to a net.IPAddr and returns it as a net.Addr
func (*SAMClientVPN) Print ¶
func (f *SAMClientVPN) Print() string
Print returns the set of options in use by the tunnel as one long string.
func (*SAMClientVPN) Props ¶
func (f *SAMClientVPN) Props() map[string]string
Props returns a map of the options in use as strings
func (*SAMClientVPN) RemoteAddr ¶
func (f *SAMClientVPN) RemoteAddr() (net.Addr, error)
RemoteAddr converts the tunnel IP address string to a net.IPAddr and returns it as a net.Addr
func (*SAMClientVPN) RequestAdditionToAccessList ¶
func (f *SAMClientVPN) RequestAdditionToAccessList() error
func (*SAMClientVPN) SAMSetupSock ¶
func (f *SAMClientVPN) SAMSetupSock(netAddr net.Addr) net.PacketConn
SAMSetupSock creates a socket which can bs used by the UDP tunnel
func (*SAMClientVPN) Search ¶
func (f *SAMClientVPN) Search(search string) string
Search searches the tunnel options for a specific property
func (*SAMClientVPN) Serve ¶
func (s *SAMClientVPN) Serve() error
func (*SAMClientVPN) Target ¶
func (f *SAMClientVPN) Target() string
Target returns the host IP of the VPN Client
func (*SAMClientVPN) Up ¶
func (f *SAMClientVPN) Up() bool
func (*SAMClientVPN) UpdateRemoteAddr ¶
func (f *SAMClientVPN) UpdateRemoteAddr(addr net.Addr)