Documentation ¶
Index ¶
- func SetAccessList(s []string) func(*SAMClientServerVPN) error
- func SetAccessListType(s string) func(*SAMClientServerVPN) error
- func SetAllowZeroIn(b bool) func(*SAMClientServerVPN) error
- func SetAllowZeroOut(b bool) func(*SAMClientServerVPN) error
- func SetClientFilePath(s string) func(*SAMClientServerVPN) error
- func SetCloseIdle(b bool) func(*SAMClientServerVPN) error
- func SetCloseIdleTime(u int) func(*SAMClientServerVPN) error
- func SetCloseIdleTimeMs(u int) func(*SAMClientServerVPN) error
- func SetCompress(b bool) func(*SAMClientServerVPN) error
- func SetEepProxy(s string) func(*SAMClientServerVPN) error
- func SetEncrypt(b bool) func(*SAMClientServerVPN) error
- func SetEndpointHost(s string) func(*SAMClientServerVPN) error
- func SetFastRecieve(b bool) func(*SAMClientServerVPN) error
- func SetFilePath(s string) func(*SAMClientServerVPN) error
- func SetInBackups(u int) func(*SAMClientServerVPN) error
- func SetInLength(u int) func(*SAMClientServerVPN) error
- func SetInQuantity(u int) func(*SAMClientServerVPN) error
- func SetInVariance(i int) func(*SAMClientServerVPN) error
- func SetLeaseSetKey(s string) func(*SAMClientServerVPN) error
- func SetLeaseSetPrivateKey(s string) func(*SAMClientServerVPN) error
- func SetLeaseSetPrivateSigningKey(s string) func(*SAMClientServerVPN) error
- func SetMessageReliability(s string) func(*SAMClientServerVPN) error
- func SetName(s string) func(*SAMClientServerVPN) error
- func SetOutBackups(u int) func(*SAMClientServerVPN) error
- func SetOutLength(u int) func(*SAMClientServerVPN) error
- func SetOutQuantity(u int) func(*SAMClientServerVPN) error
- func SetOutVariance(i int) func(*SAMClientServerVPN) error
- func SetPointHost(s string) func(*SAMClientServerVPN) error
- func SetReduceIdle(b bool) func(*SAMClientServerVPN) error
- func SetReduceIdleQuantity(u int) func(*SAMClientServerVPN) error
- func SetReduceIdleTime(u int) func(*SAMClientServerVPN) error
- func SetReduceIdleTimeMs(u int) func(*SAMClientServerVPN) error
- func SetSAMHost(s string) func(*SAMClientServerVPN) error
- func SetSAMPort(s string) func(*SAMClientServerVPN) error
- func SetSaveFile(b bool) func(*SAMClientServerVPN) error
- func SetSigType(s string) func(*SAMClientServerVPN) error
- func SetType(s string) func(*SAMClientServerVPN) error
- func SetVPNConfig(s *i2ptunconf.Conf) func(*SAMClientServerVPN) error
- type Option
- type SAMClientServerVPN
- func NewSAMClientServerVPN(conf *i2ptunconf.Conf) (*SAMClientServerVPN, error)
- func NewSAMClientServerVPNFromOptions(opts ...func(*SAMClientServerVPN) error) (*SAMClientServerVPN, error)
- func NewSAMVPNForwarderFromConfig(iniFile, SamHost, SamPort string, label ...string) (*SAMClientServerVPN, error)
- func (f *SAMClientServerVPN) Base32() string
- func (f *SAMClientServerVPN) Base32Readable() string
- func (f *SAMClientServerVPN) Base64() string
- func (w *SAMClientServerVPN) Check(x interface{}) (string, interface{}, bool)
- func (f *SAMClientServerVPN) Cleanup()
- func (f *SAMClientServerVPN) ClientConfig() string
- func (f *SAMClientServerVPN) Close() error
- func (f *SAMClientServerVPN) Config() *i2ptunconf.Conf
- func (f *SAMClientServerVPN) GetType() string
- func (f *SAMClientServerVPN) ID() string
- func (f *SAMClientServerVPN) Keys() i2pkeys.I2PKeys
- func (s *SAMClientServerVPN) Load() (samtunnel.SAMTunnel, error)
- func (f *SAMClientServerVPN) LoadRemoteAddr() net.Addr
- func (f *SAMClientServerVPN) LocalAddr() (net.Addr, error)
- func (f *SAMClientServerVPN) Print() string
- func (f *SAMClientServerVPN) Props() map[string]string
- func (f *SAMClientServerVPN) SAMSetupSock(netAddr net.Addr) net.PacketConn
- func (f *SAMClientServerVPN) Search(search string) string
- func (s *SAMClientServerVPN) Serve() error
- func (f *SAMClientServerVPN) Target() string
- func (f *SAMClientServerVPN) TargetAddr() (net.Addr, error)
- func (f *SAMClientServerVPN) Up() bool
- func (f *SAMClientServerVPN) UpdateRemoteAddr(addr net.Addr)
- func (t *SAMClientServerVPN) 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(*SAMClientServerVPN) error
SetAccessList tells the system to treat the accessList as a whitelist
func SetAccessListType ¶
func SetAccessListType(s string) func(*SAMClientServerVPN) error
SetAccessListType tells the system to treat the accessList as a whitelist
func SetAllowZeroIn ¶
func SetAllowZeroIn(b bool) func(*SAMClientServerVPN) error
SetAllowZeroIn tells the tunnel to accept zero-hop peers
func SetAllowZeroOut ¶
func SetAllowZeroOut(b bool) func(*SAMClientServerVPN) error
SetAllowZeroOut tells the tunnel to accept zero-hop peers
func SetClientFilePath ¶
func SetClientFilePath(s string) func(*SAMClientServerVPN) error
func SetCloseIdle ¶
func SetCloseIdle(b bool) func(*SAMClientServerVPN) error
SetCloseIdle tells the connection to close it's tunnels during extended idle time.
func SetCloseIdleTime ¶
func SetCloseIdleTime(u int) func(*SAMClientServerVPN) error
SetCloseIdleTime sets the time to wait before closing tunnels to idle levels
func SetCloseIdleTimeMs ¶
func SetCloseIdleTimeMs(u int) func(*SAMClientServerVPN) error
SetCloseIdleTimeMs sets the time to wait before closing tunnels to idle levels in milliseconds
func SetCompress ¶
func SetCompress(b bool) func(*SAMClientServerVPN) error
SetCompress tells clients to use compression
func SetEepProxy ¶
func SetEepProxy(s string) func(*SAMClientServerVPN) error
func SetEncrypt ¶
func SetEncrypt(b bool) func(*SAMClientServerVPN) error
SetEncrypt tells the router to use an encrypted leaseset
func SetEndpointHost ¶
func SetEndpointHost(s string) func(*SAMClientServerVPN) error
SetEndpointHost sets the host to use as the VPN Server's gateway address
func SetFastRecieve ¶
func SetFastRecieve(b bool) func(*SAMClientServerVPN) error
SetFastRecieve tells clients to use compression
func SetFilePath ¶
func SetFilePath(s string) func(*SAMClientServerVPN) error
func SetInBackups ¶
func SetInBackups(u int) func(*SAMClientServerVPN) error
SetInBackups sets the inbound tunnel backups
func SetInLength ¶
func SetInLength(u int) func(*SAMClientServerVPN) error
SetInLength sets the number of hops inbound
func SetInQuantity ¶
func SetInQuantity(u int) func(*SAMClientServerVPN) error
SetInQuantity sets the inbound tunnel quantity
func SetInVariance ¶
func SetInVariance(i int) func(*SAMClientServerVPN) error
SetInVariance sets the variance of a number of hops inbound
func SetLeaseSetKey ¶
func SetLeaseSetKey(s string) func(*SAMClientServerVPN) error
SetLeaseSetKey sets the host of the SAMClientServerVPN's SAM bridge
func SetLeaseSetPrivateKey ¶
func SetLeaseSetPrivateKey(s string) func(*SAMClientServerVPN) error
SetLeaseSetPrivateKey sets the host of the SAMClientServerVPN's SAM bridge
func SetLeaseSetPrivateSigningKey ¶
func SetLeaseSetPrivateSigningKey(s string) func(*SAMClientServerVPN) error
SetLeaseSetPrivateSigningKey sets the host of the SAMClientServerVPN's SAM bridge
func SetMessageReliability ¶
func SetMessageReliability(s string) func(*SAMClientServerVPN) error
SetMessageReliability sets the host of the SAMClientServerVPN's SAM bridge
func SetName ¶
func SetName(s string) func(*SAMClientServerVPN) error
SetName sets the host of the SAMClientServerVPN's SAM bridge
func SetOutBackups ¶
func SetOutBackups(u int) func(*SAMClientServerVPN) error
SetOutBackups sets the inbound tunnel backups
func SetOutLength ¶
func SetOutLength(u int) func(*SAMClientServerVPN) error
SetOutLength sets the number of hops outbound
func SetOutQuantity ¶
func SetOutQuantity(u int) func(*SAMClientServerVPN) error
SetOutQuantity sets the outbound tunnel quantity
func SetOutVariance ¶
func SetOutVariance(i int) func(*SAMClientServerVPN) error
SetOutVariance sets the variance of a number of hops outbound
func SetPointHost ¶
func SetPointHost(s string) func(*SAMClientServerVPN) error
SetPointHost sets the VPN host of the local machine
func SetReduceIdle ¶
func SetReduceIdle(b bool) func(*SAMClientServerVPN) error
SetReduceIdle tells the connection to reduce it's tunnels during extended idle time.
func SetReduceIdleQuantity ¶
func SetReduceIdleQuantity(u int) func(*SAMClientServerVPN) error
SetReduceIdleQuantity sets minimum number of tunnels to reduce to during idle time
func SetReduceIdleTime ¶
func SetReduceIdleTime(u int) func(*SAMClientServerVPN) error
SetReduceIdleTime sets the time to wait before reducing tunnels to idle levels
func SetReduceIdleTimeMs ¶
func SetReduceIdleTimeMs(u int) func(*SAMClientServerVPN) error
SetReduceIdleTimeMs sets the time to wait before reducing tunnels to idle levels in milliseconds
func SetSAMHost ¶
func SetSAMHost(s string) func(*SAMClientServerVPN) error
SetSAMHost sets the host of the SAMClientServerVPN's SAM bridge
func SetSAMPort ¶
func SetSAMPort(s string) func(*SAMClientServerVPN) error
SetSAMPort sets the port of the SAMClientServerVPN's SAM bridge using a string
func SetSaveFile ¶
func SetSaveFile(b bool) func(*SAMClientServerVPN) error
SetSaveFile tells the router to save the tunnel's keys long-term
func SetSigType ¶
func SetSigType(s string) func(*SAMClientServerVPN) error
SetSigType sets the type of the forwarder server
func SetType ¶
func SetType(s string) func(*SAMClientServerVPN) error
SetType sets the type of the forwarder server
func SetVPNConfig ¶
func SetVPNConfig(s *i2ptunconf.Conf) func(*SAMClientServerVPN) error
Types ¶
type SAMClientServerVPN ¶
type SAMClientServerVPN struct { // VPN tunnel *udptunnel.Tunnel //*wallet.InnerWallet WhiteListers []whitelister.WhiteLister *hashhash.Hasher *i2ptunconf.Conf // Client Tunnel Configuration ClientFilePath string // contains filtered or unexported fields }
SAMClientServerVPN is a VPN service which provides access over UDP-like I2P connections to provide clients with anonymity, authentication, and encryption
func NewSAMClientServerVPN ¶
func NewSAMClientServerVPN(conf *i2ptunconf.Conf) (*SAMClientServerVPN, error)
func NewSAMClientServerVPNFromOptions ¶
func NewSAMClientServerVPNFromOptions(opts ...func(*SAMClientServerVPN) error) (*SAMClientServerVPN, error)
func NewSAMVPNForwarderFromConfig ¶
func NewSAMVPNForwarderFromConfig(iniFile, SamHost, SamPort string, label ...string) (*SAMClientServerVPN, error)
NewSAMVPNClientForwarderFromConfig generates a new SAMVPNForwarder from a config file
func (*SAMClientServerVPN) Base32 ¶
func (f *SAMClientServerVPN) Base32() string
Base32 returns the base32 address of the local tunnel, *not* the destination tunnel
func (*SAMClientServerVPN) Base32Readable ¶
func (f *SAMClientServerVPN) Base32Readable() string
Base32Readable returns the base32 address where the local service is being forwarded
func (*SAMClientServerVPN) Base64 ¶
func (f *SAMClientServerVPN) Base64() string
Base64 returns the base64 address of the local tunnel, *not* the destination tunnel
func (*SAMClientServerVPN) Check ¶
func (w *SAMClientServerVPN) Check(x interface{}) (string, interface{}, bool)
Check implements a WhiteLister that runs the internal whitelisters
func (*SAMClientServerVPN) Cleanup ¶
func (f *SAMClientServerVPN) 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 (*SAMClientServerVPN) ClientConfig ¶
func (f *SAMClientServerVPN) ClientConfig() string
func (*SAMClientServerVPN) Close ¶
func (f *SAMClientServerVPN) Close() error
Close closes the underlying SAM Connection to I2P
func (*SAMClientServerVPN) Config ¶
func (f *SAMClientServerVPN) Config() *i2ptunconf.Conf
func (*SAMClientServerVPN) GetType ¶
func (f *SAMClientServerVPN) GetType() string
func (*SAMClientServerVPN) ID ¶
func (f *SAMClientServerVPN) ID() string
func (*SAMClientServerVPN) Keys ¶
func (f *SAMClientServerVPN) Keys() i2pkeys.I2PKeys
func (*SAMClientServerVPN) LoadRemoteAddr ¶
func (f *SAMClientServerVPN) LoadRemoteAddr() net.Addr
func (*SAMClientServerVPN) LocalAddr ¶
func (f *SAMClientServerVPN) LocalAddr() (net.Addr, error)
LocalAddr returns the IP address of the VPN Service tunnel, a.k.a. the Gateway. This is *not* the public IP address of the VPN Service
func (*SAMClientServerVPN) Print ¶
func (f *SAMClientServerVPN) Print() string
Print returns the set of options in use by the tunnel as one long string.
func (*SAMClientServerVPN) Props ¶
func (f *SAMClientServerVPN) Props() map[string]string
Props returns a map of the options in use as strings
func (*SAMClientServerVPN) SAMSetupSock ¶
func (f *SAMClientServerVPN) SAMSetupSock(netAddr net.Addr) net.PacketConn
SAMSetupSock creates a socket which can bs used by the UDP tunnel
func (*SAMClientServerVPN) Search ¶
func (f *SAMClientServerVPN) Search(search string) string
Search searches the tunnel options for a specific property
func (*SAMClientServerVPN) Serve ¶
func (s *SAMClientServerVPN) Serve() error
func (*SAMClientServerVPN) Target ¶
func (f *SAMClientServerVPN) Target() string
Target returns the host:port of the local service you want to forward to i2p
func (*SAMClientServerVPN) TargetAddr ¶
func (f *SAMClientServerVPN) TargetAddr() (net.Addr, error)
TargetAddr returns the sam3.I2PAddr of the VPN Service tunnel as a net.Addr
func (*SAMClientServerVPN) Up ¶
func (f *SAMClientServerVPN) Up() bool
func (*SAMClientServerVPN) UpdateRemoteAddr ¶
func (f *SAMClientServerVPN) UpdateRemoteAddr(addr net.Addr)