1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-03-09 15:40:10 +00:00

Reverse connections in adnl (#545)

Co-authored-by: SpyCheese <mikle98@yandex.ru>
This commit is contained in:
EmelyanenkoK 2022-12-06 17:06:54 +03:00 committed by GitHub
parent 7754b3615e
commit fcf59b4eb5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 489 additions and 12 deletions

View file

@ -68,6 +68,7 @@ adnl.address.udp6 ip:int128 port:int = adnl.Address;
//adnl.address.tcp6 ip:int128 port:int = adnl.Address;
adnl.address.tunnel to:int256 pubkey:PublicKey = adnl.Address;
adnl.address.reverse = adnl.Address;
adnl.addressList addrs:(vector adnl.Address) version:int reinit_date:int priority:int expire_at:int = adnl.AddressList;
@ -183,8 +184,12 @@ dht.pong random_id:long = dht.Pong;
dht.valueNotFound nodes:dht.nodes = dht.ValueResult;
dht.valueFound value:dht.Value = dht.ValueResult;
dht.clientNotFound nodes:dht.nodes = dht.ReversePingResult;
dht.reversePingOk = dht.ReversePingResult;
dht.stored = dht.Stored;
dht.message node:dht.node = dht.Message;
dht.requestReversePingCont target:adnl.Node signature:bytes client:int256 = dht.RequestReversePingCont;
dht.db.bucket nodes:dht.nodes = dht.db.Bucket;
dht.db.key.bucket id:int = dht.db.Key;
@ -196,6 +201,8 @@ dht.store value:dht.value = dht.Stored;
dht.findNode key:int256 k:int = dht.Nodes;
dht.findValue key:int256 k:int = dht.ValueResult;
dht.getSignedAddressList = dht.Node;
dht.registerReverseConnection node:PublicKey ttl:int signature:bytes = dht.Stored;
dht.requestReversePing target:adnl.Node signature:bytes client:int256 k:int = dht.ReversePingResult;
dht.query node:dht.node = True;