Jeff Becker
6306876904
proper shutdown
3 years ago
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.
3 years ago
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).
3 years ago
Jeff Becker
8bc60a59ac
fix up liblokinet api to be more friendly to ffi
...
add lnproxy exmaple of use of liblokinet
3 years ago
Jeff Becker
853cc52efb
wire up liblokinet
3 years ago
Jason Rhinelander
2a809c7a30
Add trace debugging of inbound packet type
3 years ago
Jason Rhinelander
35ead9dc6b
Remove superfluous block (FIXME: squash this with earlier "FIXME")
3 years ago
Jason Rhinelander
a2045cd966
Fix debug message
3 years ago
Jason Rhinelander
80d3738531
Increase null_iv to 8 bytes to avoid ngtcp2 stack corruption
3 years ago
Jeff Becker
309a899c9f
mark loopback convotags as forever
...
make null handler mark discard data as activity for convotag
3 years ago
Jeff Becker
f310778f81
dont regenerate convotag on loopback when we have one already
3 years ago
Jeff Becker
abf8d2fb17
fix loopback convotag
3 years ago
Jeff Becker
5b05d22bad
refactors
...
* add path sequence numbers on routing messages
* reduce log level in debug mode
* wire up loopback style sending to ourself
3 years ago
Jeff Becker
f86a2daf83
fixes
...
* Add service::Endpoint::HasOutboundConvo
* dont mark outbound convos as inbound
* order quic packets
3 years ago
Jeff Becker
59c9e997f2
build paths faster and limit path builds at edge router instead of via a time counter for all edges
3 years ago
Jason Rhinelander
ff2e79ce38
Remove superfluous log statement
...
The send_packet() we call here already prints the buffer.
3 years ago
Jason Rhinelander
312222e881
Properly handle ngtcp2 returning UINT64_MAX
3 years ago
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.
3 years ago
Jason Rhinelander
68e96a4e5d
Remove obsolete fixme
...
Remote addr and ecn are handled.
3 years ago
Jason Rhinelander
7982581cfd
Revisit/reduce quic logging
...
Demote many things to Trace.
3 years ago
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).
3 years ago
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).
3 years ago
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.
3 years ago
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.
3 years ago
Jason Rhinelander
71beae5923
Stop retransmit timer when destroying a connection
...
Otherwise we segfault because it outlives the Connection.
3 years ago
Jason Rhinelander
027243cbcc
Remove obsolete fixme
3 years ago
Jason Rhinelander
db2344505f
Update ngtcp2
3 years ago
Jason Rhinelander
233cb86191
Sever tunnel links earlier
...
When we get an error on the tcp connection immediately sever the link to
the quic tunnel so that it doesn't keep trying to forward data to it.
3 years ago
Jeff Becker
73572b317b
stuff
3 years ago
Jason Rhinelander
4cea33a139
Fix Server's missing opt-out of ring buffer
...
For now we still steal buffers from uvw.
In the future I'd like to change that, but it's still uvw
work-in-progress to support custom data allocators, and so for now we
still steal data buffers from uvw.
3 years ago
Jason Rhinelander
99954f7501
Add some more useful debug logging
3 years ago
Jason Rhinelander
b8be889291
Add missing client TCP accept/forwarding handlers
...
Somehow the TCP client connection accept and stream forwarding got
dropped in the quic refactor.
3 years ago
Jason Rhinelander
738f16366b
Try outbound convos if no inbound convos work (FIXME)
...
FIXME - eliminate this block of code that used to be an `else` before
PR'ing.
3 years ago
Jason Rhinelander
183abd58aa
Add more checks and logging
...
Most of the logging here is Trace level so needs a Debug build to not
get compiled away.
3 years ago
Jason Rhinelander
44fc941c32
Set port properly in server-to-client reply packets
...
ngtcp2 was rejecting them because we have the port when constructing,
but then it was 0 on the return packet (which ngtcp2 drops because it's
coming from an unknown/invalid path).
3 years ago
Jason Rhinelander
a1a152b5c3
Disable building ngtcp2 example code
3 years ago
Jeff Becker
6bb23aa956
patch
3 years ago
Jeff Becker
3977c12da6
dont try to build untracked file
3 years ago
Jeff Becker
708e408c30
various fixups and cleanups
...
* wire up last of the quic stuff
* clean up udp packet generation code
* pass EndpointBase not quic tunnel for quic stuff
* add {n,h}uint16_t::FromString
* add nuint_t::FromString
* make AlignedBuffer::IsZero non constant time call for speed
3 years ago
Jeff Becker
211a051444
add quic_tester.py script for hitting rpc endpoints to test quic
3 years ago
Jeff Becker
100a953a23
make the lokinet endpoint code work
...
still needs the quic sides to work
3 years ago
Jeff Becker
7098f46d60
rpc endpoint for triggering quic tunnel
3 years ago
Jeff Becker
838b968d8f
re add static build for all internal lokinet libs
3 years ago
Jeff Becker
c88406fb27
move lokinet-quic into the big giant amalgum of liblokinet
3 years ago
Jeff Becker
4dafe973c2
comment out member
3 years ago
Jeff Becker
883005d7db
variable is unused for now but i dont want to remove it yet
3 years ago
Jeff Becker
2360700911
add virtual default destructor to appease clang
3 years ago
Jeff Becker
8b95f9945a
fix compiler errors
3 years ago
Jeff Becker
f5700c560e
try inbound paths first
3 years ago
Jeff Becker
59891d5d5f
wire up snode traffic to quic
3 years ago