Jeff Becker
e058b873b6
Revert "tweak timeout parameters for link layer."
...
This reverts commit eef192b37aec070d624e84cedfc94f522fd0a346.
2021-04-19 07:02:44 -04:00
Jeff Becker
1677ed40f6
dont persist sessions if we failed to build
2021-04-19 07:02:44 -04:00
Jeff Becker
657c39a91c
tweak timeout parameters for link layer.
...
have different timeouts for service node vs client
2021-04-19 07:02:44 -04:00
Jeff Becker
6b2c311800
cover special case for 1 hop path builders
2021-04-19 07:02:44 -04:00
Jeff Becker
2e8f47a7fa
various cleanups
2021-04-19 07:02:44 -04:00
Jeff Becker
b36f87a4d2
stop crashing when we send dns reply for snode on service nodes
2021-04-19 07:02:44 -04:00
Jeff Becker
b01e20b4cb
add forgotten file again
2021-04-19 07:02:44 -04:00
Jeff Becker
2fa24b5eae
add untracked file
2021-04-19 07:02:44 -04:00
Jeff Becker
5eda4addc2
correctly discard invalid data on transfer traffic message
2021-04-19 07:02:43 -04:00
Jeff Becker
25e338d621
srv records
...
* add srv records in RCs if we have any
* add mechanism to add SRV records for plainquic exposed ports
* resign and republish rc or introset on srv record changes
2021-04-19 07:02:43 -04:00
Jeff Becker
a2285730b8
reduce log level
2021-04-19 07:00:27 -04:00
Jeff Becker
de1b0c9d14
add forgotten header
2021-04-19 07:00:27 -04:00
Jeff Becker
94ecf02a62
add option to run lokinet traffic only with no exit and drop all non lokinet traffic
...
triggered by: exit-node=null
2021-04-19 07:00:27 -04:00
Jeff Becker
2ed0ab1ca1
liblokinet and lnproxy updates
...
* add lokinet_status function to get the current status of the context, aka are we ready to send or not.
* catch some exceptions in lnproxy
2021-04-19 07:00:27 -04:00
Jeff Becker
e005b34169
fix up some retarded bullshit
...
* llarp::service::NameIsValid was not checking that the tld was .loki, add this check.
* make link layer initial connection timeout 5s not the session activity timeout which happens to be 60 god damn seconds.
2021-04-19 07:00:26 -04:00
Jeff Becker
0046de3e7a
service node logic change: simplify transit hop behavior to send protocol frames directly from a path transfer message
2021-04-19 06:59:07 -04:00
Jeff Becker
3f9e51e391
more liblokinet api functions
...
* get/set netid
* set log level
2021-04-19 06:59:07 -04:00
Jeff Becker
cf7603f20e
temp commit, closeReset -> close
2021-04-19 06:59:07 -04:00
Jeff Becker
48ce77ed1f
XXX: single threaded mode
2021-04-19 06:59:07 -04:00
Jeff Becker
bac9341ae0
fix: if we have not used a session yet we only check the intro for expiration
2021-04-19 06:59:07 -04:00
Jeff Becker
2a9d041644
add readme
2021-04-19 06:59:07 -04:00
Jeff Becker
2188b443e9
more liblokinet api stuff
...
* add lokinet_wait_for_ready to wait until we have published introsets and such
* optionally expose ports in lnproxy
* dont save profiles by default
2021-04-19 06:59:07 -04:00
Jeff Becker
95cd275cdd
liblokinet additions:
...
* add lokinet_add_bootstrap_rc function for adding an rc from memory
* prevent stack overflow on error closing connection in quic
* add in memory nodedb
* refactor how convotags are set as active
* add initial stubs for endpoint statistics
* refactor time stuff to be a bit cleaner
* update lnproxy script with more arguments
2021-04-19 06:59:07 -04:00
Jeff Becker
6306876904
proper shutdown
2021-04-19 06:59:07 -04:00
Jason Rhinelander
354f0f63e5
Reduce max number of per-connection active streams to 32
...
This is the max number of simultaneous open connections to the same port
on the remote. 100 was fairly arbitrary and seems a bit high.
2021-04-19 06:59:07 -04:00
Jason Rhinelander
5e912600f8
Fix connection close handling
...
Replace stream_reset (which typically isn't called) with a stream_close
handler (which is already called whether or not it was a reset). Most
importantly, the server side needs to extend the max bidi streams
counter during stream_close (otherwise we run out when we hit the
limit and new connections just stall).
2021-04-19 06:59:07 -04:00
Jeff Becker
8bc60a59ac
fix up liblokinet api to be more friendly to ffi
...
add lnproxy exmaple of use of liblokinet
2021-04-19 06:59:06 -04:00
Jeff Becker
853cc52efb
wire up liblokinet
2021-04-19 06:59:06 -04:00
Jason Rhinelander
2a809c7a30
Add trace debugging of inbound packet type
2021-04-19 06:59:06 -04:00
Jason Rhinelander
35ead9dc6b
Remove superfluous block (FIXME: squash this with earlier "FIXME")
2021-04-19 06:59:06 -04:00
Jason Rhinelander
a2045cd966
Fix debug message
2021-04-19 06:59:06 -04:00
Jason Rhinelander
80d3738531
Increase null_iv to 8 bytes to avoid ngtcp2 stack corruption
2021-04-19 06:59:06 -04:00
Jeff Becker
309a899c9f
mark loopback convotags as forever
...
make null handler mark discard data as activity for convotag
2021-04-19 06:59:06 -04:00
Jeff Becker
f310778f81
dont regenerate convotag on loopback when we have one already
2021-04-19 06:59:06 -04:00
Jeff Becker
abf8d2fb17
fix loopback convotag
2021-04-19 06:59:06 -04:00
Jeff Becker
5b05d22bad
refactors
...
* add path sequence numbers on routing messages
* reduce log level in debug mode
* wire up loopback style sending to ourself
2021-04-19 06:59:06 -04:00
Jeff Becker
f86a2daf83
fixes
...
* Add service::Endpoint::HasOutboundConvo
* dont mark outbound convos as inbound
* order quic packets
2021-04-19 06:59:06 -04:00
Jeff Becker
59c9e997f2
build paths faster and limit path builds at edge router instead of via a time counter for all edges
2021-04-19 06:59:05 -04:00
Jason Rhinelander
ff2e79ce38
Remove superfluous log statement
...
The send_packet() we call here already prints the buffer.
2021-04-19 06:59:05 -04:00
Jason Rhinelander
312222e881
Properly handle ngtcp2 returning UINT64_MAX
2021-04-19 06:59:05 -04:00
Jason Rhinelander
2ea84a61f9
Replace timer->again() with stop/start()
...
repeat()/again() sets a repeating timer, which we don't want; stop and
start it instead so that it fires just once.
2021-04-19 06:59:05 -04:00
Jason Rhinelander
68e96a4e5d
Remove obsolete fixme
...
Remote addr and ecn are handled.
2021-04-19 06:59:05 -04:00
Jason Rhinelander
7982581cfd
Revisit/reduce quic logging
...
Demote many things to Trace.
2021-04-19 06:59:05 -04:00
Jason Rhinelander
3c630b260a
Don't install stream forwarding here
...
Stream forward on the client-side TCP connection gets set up within in
initial_client_data_handler (which also handles reading the initial
stream version byte).
2021-04-19 06:59:05 -04:00
Jason Rhinelander
f534103971
Simplify/fix expiry timer logic
...
Also fix a potential transmission delay because `again()` wasn't being
called when the expiry is already passed (i.e. meaning we should run
immediately).
2021-04-19 06:59:05 -04:00
Jason Rhinelander
ac34835c12
Fix/refactor stream closing
...
Make stream closing with expiring connections work better. Fixes an
issue where the stream's uv_async could outlive the stream and/or
connection and segfault.
2021-04-19 06:59:05 -04:00
Jason Rhinelander
60c813d306
Schedule retransmit after blocked send
...
In the standalone plainquic code we triggered a retransmit when the
socket became writeable again, but that doesn't work here, so just
schedule it right away to let ngtcp2 worry about retrying.
2021-04-19 06:59:05 -04:00
Jason Rhinelander
71beae5923
Stop retransmit timer when destroying a connection
...
Otherwise we segfault because it outlives the Connection.
2021-04-19 06:59:05 -04:00
Jason Rhinelander
027243cbcc
Remove obsolete fixme
2021-04-19 06:59:04 -04:00
Jason Rhinelander
db2344505f
Update ngtcp2
2021-04-19 06:59:04 -04:00