class

RNS::I2PController

Inherits Reference < Object

I2PController manages I2P tunnel creation and lifecycle via SAM protocol. Maps Python's I2PController which uses asyncio + i2plib.

Constructors

new(rns_storagepath : String, sam_host : String = SAMClient::DEFAULT_SAM_HOST, sam_port : Int32 = SAMClient::DEFAULT_SAM_PORT)
Source

Instance methods

client_tunnel(owner : I2PInterfacePeer, i2p_destination : String) : Bool

Set up a client tunnel: creates a local TCP listener that forwards connections through I2P to the remote destination.

Source
client_tunnels
Source
client_tunnels=(client_tunnels : Hash(String, Bool))
Source
get_free_port
Source
ready
Source
ready=(ready : Bool)
Source
server_tunnel(owner : I2PInterface) : Bool

Set up a server tunnel: creates an I2P destination and listens for incoming connections, forwarding them to owner's bind address.

Source
server_tunnels
Source
server_tunnels=(server_tunnels : Hash(String, Bool))
Source
start
Source
stop
Source
storagepath
Source
to_s(io : IO)

Appends a short String representation of this object which includes its class name and its object address.

class Person
  def initialize(@name : String, @age : Int32)
  end
end

Person.new("John", 32).to_s # => #<Person:0x10a199f20>
Source