Documentation ¶
Index ¶
- func GenerateKeys(keyspath string) (keys *i2pkeys.I2PKeys, err error)
- func GenerateOrLoadKeys(keyspath string, sam *sam3.SAM) (keys *i2pkeys.I2PKeys, err error)
- func I2PDatagramSession(name, samaddr, keyspath string) (*sam3.DatagramSession, error)
- func I2PListener(name, samaddr, keyspath string) (*sam3.StreamListener, error)
- func I2PPrimarySession(name, samaddr, keyspath string) (*sam3.PrimarySession, error)
- func I2PStreamSession(name, samaddr, keyspath string) (*sam3.StreamSession, error)
- func NetListener(name, samaddr, keyspath string) (net.Listener, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateKeys ¶ added in v0.33.2
GenerateKeys is a shorter version of GenerateOrLoadKeys which generates keys and stores them in a file. it always uses a new default SAM session.
func GenerateOrLoadKeys ¶ added in v0.33.2
GenerateOrLoadKeys is a convenience function which takes a filename and a SAM session. if the SAM session is nil, a new one will be created with the defaults. The keyspath must be the path to a place to store I2P keys. The keyspath will be suffixed with .i2p.private for the private keys, and public.txt for the b32 addresses. If the keyspath.i2p.private file does not exist, keys will be generated and stored in that file. if the keyspath.i2p.private does exist, keys will be loaded from that location and returned
func I2PDatagramSession ¶ added in v0.33.2
func I2PDatagramSession(name, samaddr, keyspath string) (*sam3.DatagramSession, error)
I2PDataGramsession is a convenience function which returns a sam3.DatagramSession. It also takes care of setting a persisitent key on behalf of the user.
func I2PListener ¶
func I2PListener(name, samaddr, keyspath string) (*sam3.StreamListener, error)
I2PListener is a convenience function which takes a SAM tunnel name, a SAM address and a filename. If the file contains I2P keys, it will create a service using that address. If the file does not exist, keys will be generated and stored in that file.
func I2PPrimarySession ¶ added in v0.33.2
func I2PPrimarySession(name, samaddr, keyspath string) (*sam3.PrimarySession, error)
I2PPrimarySession is a convenience function which returns a sam3.PrimarySession. It also takes care of setting a persisitent key on behalf of the user.
func I2PStreamSession ¶
func I2PStreamSession(name, samaddr, keyspath string) (*sam3.StreamSession, error)
I2PStreamSession is a convenience function which returns a sam3.StreamSession instead of a sam3.StreamListener. It also takes care of setting a persisitent key on behalf of the user.
Types ¶
This section is empty.