Skip to content

gabbhack/i2ptransport

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

i2ptransport nim-version-img

I2P Transport for nim-libp2p

nimble install https://github.com/gabbhack/i2ptransport

Examples


This library implements I2P Transport for nim-libp2p via SAM Protocol.

Quickstart

  1. Make sure your i2p router has sam proxy enabled.

  2. You must have or generate a destination and a private key.

Keys?

Check documentation for DEST GENERATE command in SAMv3 spec.

If you already have keys, pass them to the I2PKeyPair constructor:

let keys = I2PKeyPair.init(
  destination="...",
  privateKey="..."
)

Or generate them

let keys = await generateDestination()
  1. Init session settings

Every session in I2P is associated with some ID (or nickname).

let settings = I2PSessionSettings.init(
  nickname = "nickname"
)
  1. Init transport
let transport = I2PTransport.init(
  settings,
  keys
)
  1. Or use I2PSwitch
let switch = I2PSwitch.new(
  settings,
  keys,
  newRng()
)

If you don't know what to do about it, check out the examples.

Address

At the moment nim-libp2p does not have the garlic protocol, so dns is exploited.

I2PTransport generate and accepts something like /dns/randomstring/....

FAQ

  • Is it safe? IDK

License

Licensed under MIT license.

Acknowledgements