- Add --http-proxy/--proxy [host:port] (default 127.0.0.1:4444) to route .i2p and .b32.i2p HTTP requests over I2P streams - Block clearnet hosts with 403 and reject CONNECT and https:// with 501 - Support ?i2paddresshelper= jump links that register host aliases - Add `just proxy` target and -h/--help usage output - Expire idle ratchet sessions after 300s and add RatchetSessionManager::drop_session for fresh NewSession handshakes - Add NetDb::remove_lease_set2 and bound the outbound pending queue to 64 entries
54 lines
1.9 KiB
Plaintext
54 lines
1.9 KiB
Plaintext
// Generated using `moon info`, DON'T EDIT IT
|
|
package "experiments/moon_i2p/netdb"
|
|
|
|
import {
|
|
"experiments/moon_i2p/common",
|
|
"experiments/moon_i2p/i2np",
|
|
"moonbitlang/core/debug",
|
|
}
|
|
|
|
// Values
|
|
pub fn compare_distance(Bytes, Bytes) -> Int32
|
|
|
|
pub fn encode_router_info_store_data(@common.RouterInfo) -> Bytes raise NetDbError
|
|
|
|
pub fn format_utc_date(UInt64) -> String
|
|
|
|
pub fn is_floodfill(@common.RouterInfo) -> Bool
|
|
|
|
pub fn routing_key(@common.Hash, String) -> @common.Hash
|
|
|
|
pub fn xor_distance(@common.Hash, @common.Hash) -> Bytes
|
|
|
|
// Errors
|
|
#derive(Eq, @debug.Debug)
|
|
pub suberror NetDbError {
|
|
Common(@common.CommonError)
|
|
InvalidSignature(String)
|
|
InvalidRecord(String)
|
|
}
|
|
|
|
// Types and methods
|
|
pub struct NetDb {
|
|
routers : Array[(@common.Hash, @common.RouterInfo)]
|
|
leasesets : Array[(@common.Hash, @common.LeaseSet2)]
|
|
}
|
|
pub fn NetDb::closest_peers(Self, @common.Hash, String, Int32, floodfills_only? : Bool, excluded? : Array[@common.Hash]) -> Array[@common.RouterInfo]
|
|
pub fn NetDb::floodfill_count(Self) -> Int32
|
|
pub fn NetDb::get_lease_set2(Self, @common.Hash, UInt32) -> @common.LeaseSet2?
|
|
pub fn NetDb::get_lease_set2_by_b32(Self, String, UInt32) -> @common.LeaseSet2?
|
|
pub fn NetDb::get_router_info(Self, @common.Hash) -> @common.RouterInfo?
|
|
pub fn NetDb::handle_database_lookup(Self, @common.Hash, @common.Hash, Byte, Array[@common.Hash], UInt32, max_peers? : Int32) -> @i2np.I2npPayload raise NetDbError
|
|
pub fn NetDb::handle_database_store(Self, Byte, @common.Hash, Bytes, UInt32) -> Bool raise NetDbError
|
|
pub fn NetDb::leaseset_count(Self) -> Int32
|
|
pub fn NetDb::new() -> Self
|
|
pub fn NetDb::prune_expired(Self, UInt32) -> Int32
|
|
pub fn NetDb::remove_lease_set2(Self, @common.Hash) -> Bool
|
|
pub fn NetDb::router_count(Self) -> Int32
|
|
pub fn NetDb::store_lease_set2(Self, @common.LeaseSet2, UInt32) -> Bool raise NetDbError
|
|
pub fn NetDb::store_router_info(Self, @common.RouterInfo) -> Bool raise NetDbError
|
|
|
|
// Type aliases
|
|
|
|
// Traits
|