GithubHelp home page GithubHelp logo

litespeedtech / lsquic Goto Github PK

View Code? Open in Web Editor NEW
1.5K 67.0 319.0 7.5 MB

LiteSpeed QUIC and HTTP/3 Library

License: MIT License

CMake 0.41% C 75.75% C++ 0.48% Dockerfile 0.02% Perl 0.12% Makefile 0.04% NASL 23.10% Batchfile 0.01% Shell 0.07%
quic gquic protocol ietf tls13 udp http3 h3

lsquic's People

Contributors

alagoutte avatar amoldeshpande avatar anatasluo avatar bprodoehl avatar darrinsmart avatar davidleitw avatar davidlst avatar dtikhonov avatar fastcome1985 avatar gwanglst avatar hadifrohar avatar initlifeinc avatar iyangsj avatar kait0 avatar linsichen206 avatar litespeedtech avatar m-bellahcene avatar mickel8 avatar nyrahul avatar rpavlik avatar rperper avatar saigut avatar samhurst avatar sdpetrides avatar simonkaran13 avatar stormcenter avatar tyoungsl avatar victorstewart avatar wangfuyu avatar wangweiwei1188 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lsquic's Issues

Existing warning results in error

On make:
lsquic-client/src/liblsquic/lsquic_logger.h:129:12: error: this statement may fall through [-Werror=implicit-fallthrough=]
if (LSQ_LOG_ENABLED(level))
^

cmake 3.10.2
make 4.1
gcc 7.3.0

echo_client, echo_server

Hi, I succeeded compiling in ubuntu 16.04, tried to test echo_client and echo_server but got an error
I read EXAMPLES.txt but failed to solve
I want to know how to use

capture

Warning treated as error

Since yesterday I can't build the windows version anymore (Linux still works)
I get an "Error C2220 warning treated as error - no 'object' file generated lshpack.c line 5354" error and the following warnings:
capture
Changing to the commit from 27/4/2018 fixes this problem so I believe this is a regression in the latest changes.

Failed to build

I'm not able to build.

Compile the library

cmake -DBORINGSSL_INCLUDE=$BORINGSSL_SOURCE/include \
                                -DBORINGSSL_LIB=$HOME/tmp/boringssl-libs .
make

Appears that error:

/usr/local/lib/lsquic-client/src/liblsquic/lsquic_parse_iquic_common.c:8:10: fatal error: openssl/rand.h: No such file or directory #include <openssl/rand.h> ^~~~~~~~~~~~~~~~ compilation terminated. src/liblsquic/CMakeFiles/lsquic.dir/build.make:206: recipe for target 'src/liblsquic/CMakeFiles/lsquic.dir/lsquic_parse_iquic_common.c.o' failed make[2]: *** [src/liblsquic/CMakeFiles/lsquic.dir/lsquic_parse_iquic_common.c.o] Error 1 CMakeFiles/Makefile2:172: recipe for target 'src/liblsquic/CMakeFiles/lsquic.dir/all' failed make[1]: *** [src/liblsquic/CMakeFiles/lsquic.dir/all] Error 2 Makefile:94: recipe for target 'all' failed make: *** [all] Error 2

thanks, Davide.

Crash when I am trying to invoke lsquic_engine_destroy

Hi, I am using lsquic v1.2 release, and I slightly modified your code to use lsquic as a general purpose translating library.

But I found when I invoke lsquic_engine_destroy function, the program crashes.

On mac and linux, it it sometimes crash, and on windows (by refering your master brach, I ported it to win32), it crashed every time.

when I invoke lsquic_engine_destroy, the program finally dies at the last line of lsquic_malo_destry function (but the 'page' variable is not NULL).

What should I do? Is there anything I should take good care of to use lsquic correctly?

Thank you!

BTW, I don't konw how to use your latest code because I found your master's document is out of date. And I found some comments in the code are out of date, too. Could you please update the document?

0-rtt support

Creating a connection with 0-rtt from the previous connections.
0-rtt is not currently supported for new connections for an old host.

Support Windows XP

How can I replace pfnWSASendMsg and pfnWSARecvMsg to let lsquic work at Windows XP?

Client send information to Server

Hi all,
it's about a week that i'm looking inside the http_client.c code for being able to modify the client with the function that i need, but without any success.
I'm pretty new in this things, so it's a bit hard for me to understand all the code.

Let me explain my idea of project:

  1. A client that every X ms send a string formed like this "Name of the client - Random Value - Timestamp"
  2. A Server that is running that, as soon as recieve the string, just output it on a page

Actually i have done a client and a server on php that was working like i wanted, but was not be able to use QUIC protocol, instead it was using UDP. Then someone suggested me to look into this Client to be able to do that work.

I will leave my old php client and server code as a reference
Client:

$server = "X.X.X.X";
    $port = 443;


    $controllerSensors = new ControllerSensors();
    $controllerSensors->createSensor("Sensore Bologna", "Temperatura", $server, $port, 1);
    $controllerSensors->createSensor("Sensore Modena", "Temperatura", $server, $port,4);
    $controllerSensors->createSensor("Sensore Reggio", "Umidità", $server, $port,8);
    $controllerSensors->runAllSensors();

Where runAllSensors() is a function that call sensor->start() in all sensors

Sensor Start function:

if(!($this->socket = socket_create(AF_INET, SOCK_DGRAM, 0))){
                $errorcode = socket_last_error();
                $errormsg = socket_strerror($errorcode);
                die("Couldn't create socket: [$errorcode] $errormsg \n");
            }
$input = $this->toString();
            if( ! socket_sendto($this->socket, $input , strlen($input) , 0 , $this->ip , $this->port)){
                $errorcode = socket_last_error();
                $errormsg = socket_strerror($errorcode);
                die("Could not send data: [$errorcode] $errormsg \n");
            }

Server:

$ip = "0.0.0.0";
    $port = "12345";

    error_reporting(~E_WARNING);
    if(!($sock = socket_create(AF_INET, SOCK_DGRAM, 0))){
        $errorcode = socket_last_error();
        $errormsg = socket_strerror($errorcode);
        die("Couldn't create socket: [$errorcode] $errormsg \n");
    }

    // Bind the source address
    if( !socket_bind($sock, $ip , $port) ){
        $errorcode = socket_last_error();
        $errormsg = socket_strerror($errorcode);
        die("Could not bind socket : [$errorcode] $errormsg \n");
    }

    while(true){
        $messageRecieved = "";
        $r = socket_recvfrom($sock, $messageRecieved, 512, 0, $remote_ip, $remote_port);        
        echo $messageRecieved . "<br>";
    }

All those code was working like i wanted, but like i said, it was using UDP instead of QUIC.
Now, i would like to have a similar behavior but using lsquic-client to be able to use QUIC.

But i'm facing a lot of problems:

  1. i'm unable to understand where i should put the new code to make the client works like my php client, so that send a "packet of information" to my server that is actually coded in php(i highly prefer it's coded in PHP, but i can change that as soon as Litespeed Web Server support it)
  2. I tried to build the http_client using the gcc command from the terminal but without success, what are the parameters for the gcc command?
  3. It's possible to do something like this?

I'm sorry for the long post and for the continuous request for help, but it is an important thing as it concerns my triennial thesis and I think that more information is present to describe the problem the easier it will be to find a solution.

Thanks,
Davide.

eror on cmake . && make

cmake . && make
-- The C compiler identification is GNU 4.8.5
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- The CXX compiler identification is GNU 4.8.5
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found Perl: /usr/bin/perl (found version "5.16.3")
CMake Error at CMakeLists.txt:32 (message):
Could not find Go

-- Configuring incomplete, errors occurred!
See also "/root/boringssl/CMakeFiles/CMakeOutput.log".

Running Http3 server

I see a some documentation available for http3 client, but I couldn't find any for the server.

  • Are there any documentation available on how to start the http3-supported web server?
  • Another noobish q, will this package need Lite Speed to be built before using lsquick? Essentially I want to setup a machine as a http3 supported web-server to conduct some academic experiments.

Thanks

[Question] Documentation

Where can i find the documentation about this client? Like a graph that show the structures, how each class interact with the other etc?

Thanks, Davide.

Support iOS

Hi all,

Is there any plan to support on Android, iOS and Windows?

Missing event2/event.h header file

I have got a build error when test/prog.c was compiled.
The c source file is including the event2/event.h header file is not found in the project.

Can anybody check it for me?
Thanks

Invalid numeric argument Error building LsQuic in Windows/Visual Studio

I am currently trying to compile the lsquic client on a windows 10 system using your guide: guide

All the steps until the compilation in windows studio 2015 did work.
Once I tried compiling the client I got numerous errors. (who where all not solved by multiple building)
First an error that says invalid numeric argument '\Wextra'
Wextra
I could "fix" this one by commenting a line in the CMakeLists.txt file as it seems to be a flag that should only be set on linux systems from what I can tell.
The next error(which appeared after compiling again) said "invalid numeric argument '\Werror' "
Werror
Same fix as the previous error.
CMakeLists.txt
After that I got even more errors (I think most of them are the once mentioned in the guide)
The outstanding error again said: "invalid numeric argument '\Wno-unused-value' "
Wno
Unfortunately I couldn't fix this one since it did not appear in the CmakeList.txt file.

Now I don't know whether this is a problem on my end or with the client so if somebody understands these error codes it would be nice if you could help me out.
The bug happended on both debug and release on a x64 machiene.

Error compiling lsquic

I followed the installation instructions as mentioned here:
https://github.com/litespeedtech/lsquic/blob/master/README.md

while building BoringSSL module, I got this error when I was executing:
patch -p1 -i ../patches/boringssl-meds.patch
which says file not found
Later I found that it is in lsquic, so I think in the instructions lsquic needs to be downloaded first, and then the previous line needs to be changed to:
patch -p1 -i ../lsquic/patches/boringssl-meds.patch

http_client can't get html page from caddy server

I compile project in win7, then I use command "http_client -H www.example.com -s 169.254.0.3:8443 -p /1.txt -L debug" to visit my web server on another machine(ubuntu 16.04), but no reponse can be found.
but I use chrome to visit my web server, It works well.

The client log:

-1:-1:-1.677 [INFO] conn-hash: initialized
-1:-1:-1.678 [INFO] engine: instantiated engine
-1:-1:-1.679 [INFO] socket buffer size: 8192 bytes; max # packets is set to 10
-1:-1:-1.680 [DEBUG] local address: 0.0.0.0:58527
-1:-1:-1.680 [DEBUG] engine: grew heaps to 4 elements
-1:-1:-1.682 [DEBUG] [QUIC:13289104569042990576] cfcw: recv_off changed: read_off: 0; recv_off: 15728640
-1:-1:-1.683 [DEBUG] [QUIC:13289104569042990576] cubic: lsquic_cubic_init_ext(cubic, 13289104569042990576, 0x1)
-1:-1:-1.685 [INFO] [QUIC:13289104569042990576] cubic: initialized
-1:-1:-1.686 [DEBUG] [QUIC:13289104569042990576] rechist: instantiated received packet history
-1:-1:-1.686 [DEBUG] [QUIC:13289104569042990576-3] sfcw: recv_off changed: read_off: 0; recv_off: 6291456
-1:-1:-1.687 [DEBUG] [QUIC:13289104569042990576-3] stream: created stream 3 @00000000003DEE80
-1:-1:-1.688 [DEBUG] [QUIC:13289104569042990576-3] stream: calling on_new_stream
-1:-1:-1.689 [DEBUG] [QUIC:13289104569042990576] headers: stream created
-1:-1:-1.690 [DEBUG] [QUIC:13289104569042990576] frame-reader: reset state
-1:-1:-1.691 [DEBUG] [QUIC:13289104569042990576] conn: negotiating version Q039
-1:-1:-1.691 [DEBUG] [QUIC:13289104569042990576-1] sfcw: recv_off changed: read_off: 0; recv_off: 6291456
-1:-1:-1.692 [DEBUG] [QUIC:13289104569042990576-1] stream: created stream 1 @00000000003DEF90
-1:-1:-1.693 [DEBUG] [QUIC:13289104569042990576-1] stream: calling on_new_stream
-1:-1:-1.693 [DEBUG] [QUIC:13289104569042990576] hsk-adapter: stream created
-1:-1:-1.694 [DEBUG] [QUIC:13289104569042990576] sendctl: lsquic_send_ctl_can_send: n_out: 0 (unacked_retx: 0, out: 0); cwnd: 46720
-1:-1:-1.695 [DEBUG] [QUIC:13289104569042990576] pacer: pacer_can_schedule: 1
-1:-1:-1.696 [DEBUG] engine: incref conn 13289104569042990576, '' -> 'T'
-1:-1:-1.697 [INFO] [QUIC:13289104569042990576] conn: Created new client connection
-1:-1:-1.699 [DEBUG] [QUIC:13289104569042990576] event: created full connection
-1:-1:-1.700 [DEBUG] engine: incref conn 13289104569042990576, 'H' -> 'HT'
-1:-1:-1.700 [DEBUG] [QUIC:13289104569042990576-5] stream: set priority to 16
-1:-1:-1.701 [DEBUG] [QUIC:13289104569042990576-5] sfcw: recv_off changed: read_off: 0; recv_off: 6291456
-1:-1:-1.702 [DEBUG] [QUIC:13289104569042990576-5] stream: created stream 5 @00000000003DF0A0
-1:-1:-1.703 [DEBUG] [QUIC:13289104569042990576-5] stream: calling on_new_stream
-1:-1:-1.703 [INFO] created new stream, path: /1.txt
-1:-1:-1.704 [DEBUG] engine: decref conn 13289104569042990576, 'HT' -> 'H'
-1:-1:-1.704 [DEBUG] [QUIC:13289104569042990576] conn: memory used: 2807 bytes
-1:-1:-1.705 [DEBUG] [QUIC:13289104569042990576] pacer: pacer_can_schedule: 1
-1:-1:-1.706 [DEBUG] [QUIC:13289104569042990576] sendctl: lsquic_send_ctl_can_send: n_out: 0 (unacked_retx: 0, out: 0); cwnd: 46720
-1:-1:-1.707 [DEBUG] [QUIC:13289104569042990576] pacer: pacer_can_schedule: 1
-1:-1:-1.707 [DEBUG] [QUIC:13289104569042990576] sendctl: lsquic_send_ctl_can_send: n_out: 0 (unacked_retx: 0, out: 0); cwnd: 46720
-1:-1:-1.708 [DEBUG] [QUIC:13289104569042990576] pacer: pacer_can_schedule: 1
-1:-1:-1.709 [DEBUG] handshake: lsquic_enc_session_gen_chlo called, return 0, buf_len 1024.
-1:-1:-1.710 [DEBUG] [QUIC:13289104569042990576-1] stream: buffered 1024 bytes; 1024 bytes are now in buffer
-1:-1:-1.711 [INFO] [QUIC:13289104569042990576] hsk-adapter: wrote 1024 bytes of CHLO to stream
-1:-1:-1.711 [DEBUG] [QUIC:13289104569042990576-1] stream: will flush up to offset 1024
-1:-1:-1.712 [DEBUG] [QUIC:13289104569042990576] sendctl: created packet 1
-1:-1:-1.713 [DEBUG] [QUIC:13289104569042990576] event: created packet 1; flags: version=1, nonce=0, conn_id=1
-1:-1:-1.714 [DEBUG] [QUIC:13289104569042990576] event: generated STREAM frame: stream 1, offset: 0, size: 1024, fin: 0
-1:-1:-1.715 [DEBUG] [QUIC:13289104569042990576-1] stream: flushed to or past required offset 1024
-1:-1:-1.716 [DEBUG] [QUIC:13289104569042990576] pacer: pacer_packet_scheduled: replenish tokens: 10

-1:-1:-1.717 [DEBUG] [QUIC:13289104569042990576] pacer: pacer_packet_scheduled: tokens: 9
-1:-1:-1.718 [DEBUG] [QUIC:13289104569042990576] sendctl: lsquic_send_ctl_can_send: n_out: 1370 (unacked_retx: 0, out: 0); cwnd: 46720
-1:-1:-1.719 [DEBUG] [QUIC:13289104569042990576] pacer: pacer_can_schedule: 1
-1:-1:-1.719 [DEBUG] engine: incref conn 13289104569042990576, 'H' -> 'HO'
-1:-1:-1.720 [DEBUG] engine: decref conn 13289104569042990576, 'HOT' -> 'HO'
-1:-1:-1.721 [DEBUG] [QUIC:13289104569042990576] pacer: intertick estimate: 0; real value: 0; error: 0
-1:-1:-1.722 [DEBUG] [QUIC:13289104569042990576] pacer: pacer_can_schedule: 1
-1:-1:-1.722 [DEBUG] handshake: lsquic_enc_session_encrypt: hsk_state: 0
-1:-1:-1.723 [DEBUG] engine: encrypted packet 1; plaintext is 1358 bytes, ciphertext is 1370 bytes
-1:-1:-1.724 [DEBUG] engine: batched packet 1 for connection 13289104569042990576
-1:-1:-1.724 [DEBUG] engine: batched all outgoing packets for conn 13289104569042990576
-1:-1:-1.725 [DEBUG] engine: packets out returned 1 (out of 1)
-1:-1:-1.725 [DEBUG] [QUIC:13289104569042990576] event: sent packet 1, size 1370, frame types: STREAM PADDING
-1:-1:-1.727 [DEBUG] [QUIC:13289104569042990576] sendctl: packet 1 has been sent (frame types: STREAM PADDING)
-1:-1:-1.729 [DEBUG] [QUIC:13289104569042990576] sendctl: set retx alarm to 95063556005, which is 150000 usec from now, mode RETX_MODE_HANDSHAKE
-1:-1:-1.730 [DEBUG] engine: decref conn 13289104569042990576, 'HO' -> 'H'
-1:-1:-1.731 [DEBUG] engine: send_packets_out: sent 1 packet
-1:-1:-1.732 [DEBUG] [QUIC:13289104569042990576] sendctl: lsquic_send_ctl_can_send: n_out: 1370 (unacked_retx: 1370, out: 0); cwnd: 46720
-1:-1:-1.733 [DEBUG] [QUIC:13289104569042990576] pacer: pacer_can_schedule: 1
-1:-1:-1.734 [DEBUG] engine: incref conn 13289104569042990576, 'H' -> 'HT'
-1:-1:-1.735 [DEBUG] engine: incref conn 13289104569042990576, 'HT' -> 'HTA'

Assertion Failed Runtime Error when trying to run the standard example on Windows

unbenannt3
When trying to execute lsquic using the standard example in EXAMPLES.txt in Debug mode the program will crash with an Assertion Failed Error as shown in the picture above. I doesn't matter wether ipv4 or ipv6 is used. The error happens in lsquic_engine.c
unbenannt
unbenannt2
These are the flags that are shown in the debugger.

When executed in release mode the programm will just go into an infinite loop.
Since it is about flags again it might have something to do with issue #10

make error

when I cd lsquic-client and make,the errors as below,it seems that my libevent version is not suitable,but I don't know how fix it
[ 35%] Linking C executable http_client
CMakeFiles/http_client.dir/test/http_client.c.o: In function create_another_conn_or_stop': /home/b/quictest/lsquic/lsquic-client/test/http_client.c:292: undefined reference to event_free'
CMakeFiles/http_client.dir/test/http_client.c.o: In function http_client_on_conn_closed': /home/b/quictest/lsquic/lsquic-client/test/http_client.c:332: undefined reference to event_new'
CMakeFiles/http_client.dir/test/prog.c.o: In function prog_run': /home/b/quictest/lsquic/lsquic-client/test/prog.c:345: undefined reference to event_new'

Multiple connections issue

I'm not sure, but there might be an issue, connected with maintaining multiple connections at the same time. I've tried to connect to the www.youtube.com(172.217.21.238) and www.google.com (216.58.213.228). But for the first one there is connection handshake established, for the second one not. In case of downloading a single www.google.com - connection is successful.
After creating an engine, all connections are created, then streams. After that lsquic_engine_process_conns is called. It seems like both connections send their hello packets on event packets_out, but response is processed only for the one. For the other one there is connection ID mismatch.
So finally there is a problem of storing 2 connections for the one engine at the same time.
https://github.com/sergePSE/thesis_share/blob/master/quic_probe/output.txt

Multiple variable GET request

How can i proprerly assign multiple variable inside the GET request? When i run that command it return an error.

./http_client -H ec2-13-59-177-221.us-east-2.compute.amazonaws.com -p /scripts/php/serverScript.php?Nome=Sensore%20Bologna&Temperatura=38&Timestamp=22/12/2018%2019:00:00 -o version=Q043 -M GET -n 3 -r 9 -R 3
[2] 4844
[3] 4845
-o: command not found
[1]   Done                    ./http_client -H ec2-13-59-177-221.us-east-2.compute.amazonaws.com -p /scripts/php/serverScript.php?Nome=Sensore Bologna
[1]   Done                    ./http_client -H ec2-13-59-177-221.us-east-2.compute.amazonaws.com -p /scripts/php/serverScript.php?Nome=Sensore Bologna
[3]+  Done                    Temperatura=38

Second question: -n is for multiple connection, -r is for the number of request to send and -R is the max request a connection can send? So, if i run the command like the above one, i will have 3 connection which send 3 request each?

Thanks,
Davide.
`

[Linux / 1.17.0] all memcheck unit tests fail

Configure your build as follows:

install valgrind on your workstation
sudo apt-get install valgrind

Add to line below enable_testing() in the test/unittests/CMakeLists.txt
find_program(CTEST_MEMORYCHECK_COMMAND NAMES valgrind)
this will generate DartConfiguration.tcl in your build dir

from build folder execute memcheck on the unittests
ctest test -T memcheck -V

HTTP3 faster than HTTPS1.1 or HTTP 2 for blob download.. reasons?

Hi,
I have used your platform to do large blob downloads (e.g. 1G) files and force the browser to not exceed more than 1 parallel connection for download.

I see that HTTP 3 is much faster than HTTP 2 and 1.1.
For instance,
HTTPS 1.1 took 55 seconds
HTTP 2 took 50 seconds
HTTP 3 took 35 seconds.

Can anyone explain:

  • Why HTTP 2 is faster than HTTP 1.1?
  • Why is HTTP 3 faster than HTTP 1.1 and HTTP 2?

I know the overheads, but such high difference is what I am not sure.

Any thoughts?

Arvind

Best multiple stream run practice(usage advice)

For my example of using lsquic library it's required to download sequentially pairs of web pair resources, but for the same hostname. So after downloading first 2 urls in parallel there is the next pair. Should I use the same created pair of "lsquic_stream"s? Or is it better after reading 0 bytes from http_client_on_read event, close used streams and create new ones for next pair of urls?

Build Failed

Hi I'm trying to build the LSQUIC Client Library but make fails when compiling the ibrary. I'm using xubuntu 18.04 Bionic Beaver. This Is the beginning of the error that I receive

[ 34%] Built target lsquic [ 34%] Linking C executable http_client CMakeFiles/http_client.dir/test/http_client.c.o: In function sk_X509_num':
/home/jessix/boringssl/include/openssl/x509.h:269: undefined reference to sk_num'

Comments in the source code

Now I know this is not neccessarily an issue but one thing that makes it challenging to work with the source code is the lack of comments within it. Without comments you often have to reengineer the code yourself find out what functions do and how they are supposed to be used which can become a rabbithole quickly if these functions than call a bunch of other functions.

I might help out with this once I have a proper understanding of the code but right now I am mostly guessing what functions do.

Since I don't think it deserves an own thread I'll put it here. In line 332 http_client.c somebody forgot to remove some debug code I think:
#ifndef NDEBUG const int s = #endif

I also have a question that I don't know where to ask so I'll put it here.
Is there (and where :) ) some kind of data structure that stores the server response and meta infos like quic version used etc. that I can access from the main function?

unittest cmakelists

I just noticed that one of the changes that was made in merging my Windows pull request was to separate unittests by MSVC and not MSVC, instead of defining compiler flags by the same and keeping the list of tests common

My concern is that this makes it easy to miss for Windows any new tests that get added. I think I already found a test_frame_rw that should be compiled for windows but is not.

Version negotiation between IETF and Google QUIC

version negotiation always fail with both http_client and echo_client if server only support gquic.

take http_client as an example,

linxiaocong@CHARLIELIN-MB0 build % ./http_client -s www.google.com:443 -p / -M HEAD -l conn=debug
12:31:23.983 [DEBUG] conn: generated and assigned SCID A8672CB05E4620DD
12:31:23.991 [DEBUG] [QUIC:A8672CB05E4620DD] conn: negotiating version FF000017
12:31:23.991 [DEBUG] [QUIC:A8672CB05E4620DD] conn: logging using client SCID
12:31:23.991 [DEBUG] [QUIC:A8672CB05E4620DD] conn: record new path ID 0
12:31:23.991 [DEBUG] [QUIC:A8672CB05E4620DD] conn: delayed stream creation.  Backlog size: 1
12:31:23.991 [DEBUG] [QUIC:A8672CB05E4620DD] conn: sit-0 streams: max count: 0; created streams: 0
12:31:23.991 [DEBUG] [QUIC:A8672CB05E4620DD] conn: created 0 delayed streams
12:31:23.991 [DEBUG] [QUIC:A8672CB05E4620DD] conn: not tickable
12:31:24.012 [DEBUG] [QUIC:A8672CB05E4620DD] conn: Processing version-negotiation packet
12:31:24.012 [DEBUG] [QUIC:A8672CB05E4620DD] conn: server supports version Q046
12:31:24.012 [DEBUG] [QUIC:A8672CB05E4620DD] conn: server supports version Q043
12:31:24.012 [ERROR] [QUIC:A8672CB05E4620DD] conn: Abort connection: client does not support any of the server-specified versions

if manually set the quic version, it will succeed.

linxiaocong@CHARLIELIN-MB0 build % ./http_client -s www.google.com:443 -p / -M HEAD -o version=Q043
HTTP/1.1 200 OK
date: Fri, 25 Oct 2019 04:33:08 GMT
expires: -1
cache-control: private, max-age=0
content-type: text/html; charset=ISO-8859-1
p3p: CP="This is not a P3P policy! See g.co/p3phelp for more info."
server: gws
x-xss-protection: 0
x-frame-options: SAMEORIGIN
set-cookie: 1P_JAR=2019-10-25-04; expires=Sun, 24-Nov-2019 04:33:08 GMT; path=/; domain=.google.com; SameSite=none
set-cookie: NID=190=rTUy8hOxcfAi-xQEY90Mjx5sv4zOsmNKl48g3QtrYU432Gd4UL_aDBQmh2iAyPLoXhWsu339RkQcjdRzU4iNBZQt2tsgvejHWjrBi8GyvcU0Ls8rcHRciNmQcFOSyahAEfB2ZOPh5ERR4x97oBp_FMN70MhvYZ6ioVFU5-5DU0M; expires=Sat, 25-Apr-2020 04:33:08 GMT; path=/; domain=.google.com; HttpOnly
alt-svc: quic=":443"; ma=2592000; v="46,43",h3-Q048=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000
accept-ranges: none
vary: Accept-Encoding

quic proxy?

Is it possible to have a quic server and a quic client in the same process? I noticed "lsquic_global_init" requires a flag that specifies whether the library is used in server mode or client mode globally. Does that mean you cannot have a connection accepted from a server creating a separate client connection, because of the global initialization?

client does not support any of the server-specified versions

Hi,

I am trying to using ./http_client to talk with my quic server, but it returns this error to me
[ERROR] [QUIC:12718164802224998270] conn: Abort connection: client does not support any of the server-specified versions
The command that I am using for is
./http_client -t -H sni.com -s 10.11.0.122:4433, which SNI is stored in my default SSL file and I am using TLSvs1.3.

This test failed on both master and ietf-base-draft-20 branches.

Do you guys have any recommendation on that.

make Isquic-client failed on macOS.

According to the installation documentation, I started to compile Isquic-client after installing the boringSSL library. When I went to the make step, I got the following error. I don't know what the problem is.

Here is my OS version (macOS High Sierra 10.13.3), Thanks for any help.

[ 33%] Built target lsquic
[ 33%] Linking C executable http_client
Undefined symbols for architecture x86_64:
"_CRYPTO_library_init", referenced from:
_crypto_init in liblsquic.a(lsquic_crypto.c.o)
"_EVP_DigestSignUpdate", referenced from:
_gen_prof in liblsquic.a(lsquic_crypto.c.o)
"_EVP_DigestVerifyUpdate", referenced from:
_verify_prof0 in liblsquic.a(lsquic_crypto.c.o)
"_EVP_PKEY_CTX_set_rsa_padding", referenced from:
_gen_prof in liblsquic.a(lsquic_crypto.c.o)
_verify_prof0 in liblsquic.a(lsquic_crypto.c.o)
"_EVP_PKEY_CTX_set_rsa_pss_saltlen", referenced from:
_gen_prof in liblsquic.a(lsquic_crypto.c.o)
_verify_prof0 in liblsquic.a(lsquic_crypto.c.o)
"_EVP_PKEY_assign_RSA", referenced from:
_PEM_to_key in liblsquic.a(lsquic_crypto.c.o)
_read_rsa_priv_key in liblsquic.a(lsquic_crypto.c.o)
"_RSA_private_key_from_bytes", referenced from:
_read_rsa_priv_key in liblsquic.a(lsquic_crypto.c.o)
"_X25519", referenced from:
_c255_gen_share_key in liblsquic.a(lsquic_crypto.c.o)
"_X25519_public_from_private", referenced from:
_c255_get_pub_key in liblsquic.a(lsquic_crypto.c.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [http_client] Error 1
make[1]: *** [CMakeFiles/http_client.dir/all] Error 2
make: *** [all] Error 2

add Dockerfile

Great work here! I would love a Dockerfile to build this all. I'll submit a PR if I get a chance to create one.

running within docker container - packets out returned an error: Operation no permitted

I built lsquic within a Ubuntu 19.04 docker container on CentOS 7 docker host, but when i try

 http_client -s www.google.com  -p /

it just hangs and doesn't return to prompt or output anything

if i run

 http_client -s www.google.com  -p / -L debug

I get 100s of lines with following message

23:16:32.478 [DEBUG] engine: send_packets_out: sent 0 packets
23:16:32.478 [DEBUG] on_write event fires
23:16:32.478 [DEBUG] engine: can send again
23:16:32.478 [DEBUG] event: can send again
23:16:32.478 [DEBUG] engine: batched packet 0 for connection 068A2F1FCD295F2F
23:16:32.478 [DEBUG] engine: batched all outgoing packets for full conn 068A2F1FCD295F2F
23:16:32.478 [INFO] sendto failed: Operation not permitted
23:16:32.478 [DEBUG] cannot send: register on_write event
23:16:32.478 [DEBUG] engine: cannot send packets
23:16:32.478 [DEBUG] event: cannot send packets
23:16:32.478 [DEBUG] engine: packets out returned an error: Operation not permitted
23:16:32.478 [DEBUG] [QUIC:068A2F1FCD295F2F] event: unsent packet 0, size 1200, frame types: PADDING CRYPTO
23:16:32.478 [DEBUG] [QUIC:068A2F1FCD295F2F] sendctl: packet 0 has been delayed
23:16:32.478 [DEBUG] engine: send_packets_out: sent 0 packets

so do I need additional steps for running within a docker container image ?

Handling push promises breaks if a STREAM frame comes first

When a payload STREAM frame for pushed stream comes before the push promise, at least two problems occur.

The STREAM frame causes the on_new_stream() callback to be called. If the user calls lsquic_stream_push_info(), an assertion will fail or the program will crash because push_req is NULL:

int
lsquic_stream_push_info (const lsquic_stream_t *stream,
                          lsquic_stream_id_t *ref_stream_id, void **hset)
{
    if (lsquic_stream_is_pushed(stream))
    {
        assert(stream->push_req);
        *ref_stream_id = stream->push_req->uh_stream_id;
        *hset          = stream->push_req->uh_hset;
        return 0;
    }
    else
        return -1;
}

If the user refuses the pushed stream, the connection will abort when the push promise comes in:

    if (conn_is_stream_closed(conn, uh->uh_oth_stream_id) ||
        find_stream_by_id(conn, uh->uh_oth_stream_id))
    {
        ABORT_ERROR("invalid promised stream ID %"PRIu64" already used",
                                                        uh->uh_oth_stream_id);
        goto free_uh;
    }

What should happen is as follows. The on_new_stream callback should be delayed for pushed streams until the push promise is available. The check for used promised stream ID can be removed. (An alternative is to keep a separate list of used promised stream IDs, but that seems excessive.)

Return response headers in pre-parsed form

So from what it looks like the lsquic-client is using HTTP/1.1 right now (or at least the google server sends back an HTTP/1.1 answer)
http1

Now from what I know google quic is supposed to run underneath HTTP/2 shim
quicstack

Are there any plans to add HTTP/2 support to the client?

[Question]using only QUIC without HTTP?

Hi, can this lib be used as a pure QUIC library? For example, implementing an echo server and client, communicating using QUIC protocol?

Looking forward for your reply. Thx!

Readme lsquic instructions need updating ?

does this lsquic readme need and update on cmake with your instructions i get BORINGSSL_DIR is not used by this project error

CMake Warning:
  Manually-specified variables were not used by the project:

    BORINGSSL_DIR

without BORINGSSL_DIR i get

cmake -DBORINGSSL_INCLUDE=$BORINGSSL_SOURCE/include -DBORINGSSL_LIB=$BORINGSSL_SOURCE/lib .
-- The C compiler identification is GNU 8.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Build type: Debug
-- Performing Test HAS_NO_IMPLICIT_FALLTHROUGH
-- Performing Test HAS_NO_IMPLICIT_FALLTHROUGH - Success
-- AddressSanitizer is OFF
-- Compiler flags: -Wimplicit-fallthrough=0 -Wno-implicit-function-declaration   -Wall -Wextra -Wno-unused-parameter -fno-omit-frame-pointer -Wno-implicit-fallthrough -Wno-missing-field-initializers -O0 -g3 -Werror 
-- BoringSSL include directory /src/boringssl/include
-- Found /src/boringssl/lib library: /src/boringssl/lib/libssl.a
-- Found /src/boringssl/lib library: /src/boringssl/lib/libcrypto.a
-- /src/boringssl/lib library not found
-- Found zlib: /usr/lib/x86_64-linux-gnu/libz.a
-- Found event: /usr/lib/x86_64-linux-gnu/libevent.a
-- Looking for sendmmsg
-- Looking for sendmmsg - found
-- Looking for recvmmsg
-- Looking for recvmmsg - found
-- Looking for open_memstream
-- Looking for open_memstream - found
-- Looking for IP_MTU_DISCOVER
-- Looking for IP_MTU_DISCOVER - found
-- Looking for IP_DONTFRAG
-- Looking for IP_DONTFRAG - not found
-- Looking for include file regex.h
-- Looking for include file regex.h - found
-- Configuring done
-- Generating done
-- Build files have been written to: /src/lsquic

but error on make

[ 39%] Built target lsquic
[ 40%] Building C object CMakeFiles/http_client.dir/test/http_client.c.o
[ 40%] Building C object CMakeFiles/http_client.dir/test/prog.c.o
[ 41%] Building C object CMakeFiles/http_client.dir/test/test_common.c.o
[ 41%] Building C object CMakeFiles/http_client.dir/test/test_cert.c.o
[ 42%] Linking C executable http_client
/usr/bin/ld: src/liblsquic/liblsquic.a(lsquic_enc_sess_ietf.c.o): in function `iquic_new_session_cb':
/src/lsquic/src/liblsquic/lsquic_enc_sess_ietf.c:1134: undefined reference to `SSL_SESSION_get_max_early_data_size'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/http_client.dir/build.make:134: http_client] Error 1
make[1]: *** [CMakeFiles/Makefile2:73: CMakeFiles/http_client.dir/all] Error 2
make: *** [Makefile:95: all] Error 2

[Linux / 1.17.0] unit test failures: parse_packet, frame_rw

40: Test command: /home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_parse_packet_in
40: Test timeout computed to be: 10000000
40:
40: =================================================================
40: ==10033==ERROR: LeakSanitizer: detected memory leaks
40:
40: Direct leak of 2740 byte(s) in 2 object(s) allocated from:
40: #0 0x4b9a08 (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_parse_packet_in+0x4b9a08)
40: #1 0x4ff040 (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_parse_packet_in+0x4ff040)
40: #2 0x4eb211 (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_parse_packet_in+0x4eb211)
40: #3 0x4eb049 (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_parse_packet_in+0x4eb049)
40: #4 0x7f84796a782f (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
40:
40: SUMMARY: AddressSanitizer: 2740 byte(s) leaked in 2 allocation(s).
40/53 Test #40: parse_packet_in ..................***Failed 0.01 sec

...

test 47
Start 47: frame_rw

47: Test command: /home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw
47: Test timeout computed to be: 10000000
47:
47: =================================================================
47: ==10047==ERROR: LeakSanitizer: detected memory leaks
47:
47: Direct leak of 6944 byte(s) in 62 object(s) allocated from:
47: #0 0x4bc600 (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x4bc600)
47: #1 0x516102 (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x516102)
47: #2 0x4fe759 (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x4fe759)
47: #3 0x4f98df (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x4f98df)
47: #4 0x4f5009 (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x4f5009)
47: #5 0x4f48ee (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x4f48ee)
47: #6 0x4ee021 (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x4ee021)
47: #7 0x4edb7d (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x4edb7d)
47: #8 0x7fc9536ad82f (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
47:
47: Direct leak of 1008 byte(s) in 9 object(s) allocated from:
47: #0 0x4bc600 (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x4bc600)
47: #1 0x516102 (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x516102)
47: #2 0x4fe759 (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x4fe759)
47: #3 0x4fdb00 (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x4fdb00)
47: #4 0x4fcf86 (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x4fcf86)
47: #5 0x4f914a (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x4f914a)
47: #6 0x4f4fe7 (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x4f4fe7)
47: #7 0x4f48ee (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x4f48ee)
47: #8 0x4ee021 (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x4ee021)
47: #9 0x4edb7d (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x4edb7d)
47: #10 0x7fc9536ad82f (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
47:
47: Indirect leak of 36569088 byte(s) in 62 object(s) allocated from:
47: #0 0x4bc7f8 (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x4bc7f8)
47: #1 0x518c5c (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x518c5c)
47: #2 0x517a6b (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x517a6b)
47: #3 0x516719 (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x516719)
47: #4 0x5163fc (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x5163fc)
47: #5 0x4feb4a (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x4feb4a)
47: #6 0x4f98df (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x4f98df)
47: #7 0x4f5009 (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x4f5009)
47: #8 0x4f48ee (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x4f48ee)
47: #9 0x4ee021 (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x4ee021)
47: #10 0x4edb7d (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x4edb7d)
47: #11 0x7fc9536ad82f (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
47:
47: Indirect leak of 5308416 byte(s) in 9 object(s) allocated from:
47: #0 0x4bc7f8 (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x4bc7f8)
47: #1 0x518c5c (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x518c5c)
47: #2 0x517a6b (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x517a6b)
47: #3 0x516719 (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x516719)
47: #4 0x5163fc (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x5163fc)
47: #5 0x4feb4a (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x4feb4a)
47: #6 0x4fdb00 (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x4fdb00)
47: #7 0x4fcf86 (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x4fcf86)
47: #8 0x4f914a (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x4f914a)
47: #9 0x4f4fe7 (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x4f4fe7)
47: #10 0x4f48ee (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x4f48ee)
47: #11 0x4ee021 (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x4ee021)
47: #12 0x4edb7d (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x4edb7d)
47: #13 0x7fc9536ad82f (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
47:
47: Indirect leak of 248 byte(s) in 62 object(s) allocated from:
47: #0 0x4bc478 (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x4bc478)
47: #1 0x517e66 (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x517e66)
47: #2 0x51753a (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x51753a)
47: #3 0x5166f9 (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x5166f9)
47: #4 0x5163fc (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x5163fc)
47: #5 0x4feb4a (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x4feb4a)
47: #6 0x4f98df (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x4f98df)
47: #7 0x4f5009 (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x4f5009)
47: #8 0x4f48ee (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x4f48ee)
47: #9 0x4ee021 (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x4ee021)
47: #10 0x4edb7d (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x4edb7d)
47: #11 0x7fc9536ad82f (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
47:
47: Indirect leak of 36 byte(s) in 9 object(s) allocated from:
47: #0 0x4bc478 (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x4bc478)
47: #1 0x517e66 (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x517e66)
47: #2 0x51753a (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x51753a)
47: #3 0x5166f9 (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x5166f9)
47: #4 0x5163fc (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x5163fc)
47: #5 0x4feb4a (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x4feb4a)
47: #6 0x4fdb00 (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x4fdb00)
47: #7 0x4fcf86 (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x4fcf86)
47: #8 0x4f914a (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x4f914a)
47: #9 0x4f4fe7 (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x4f4fe7)
47: #10 0x4f48ee (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x4f48ee)
47: #11 0x4ee021 (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x4ee021)
47: #12 0x4edb7d (/home/joel/git/ipipe/build/lsquic_ext-prefix/src/lsquic_ext-build/test/unittests/test_frame_rw+0x4edb7d)
47: #13 0x7fc9536ad82f (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
47:
47: SUMMARY: AddressSanitizer: 41885740 byte(s) leaked in 213 allocation(s).
47/53 Test #47: frame_rw .........................***Failed 22.83 sec

Some few possible spelling errors

On the FOSS server fossies.org I have used a new functionality and have done as a trial a "codespell" run for the "lsquic" project. Here the version independent URL of the resulting report:

https://fossies.org/linux/www/lsquic/codespell.html

That URL redirects always to the URL of the report for the last "lsquic" release supported on Fossies (in case such a report was requested respectively is existing). Currently that is

https://fossies.org/linux/www/lsquic-2.5.1.tar.gz/codespell.html

Although I have already prefiltered some obviously wrong matches (false positives) please inform me if you find more of them so that I can force a new improved check.

I know it's not an important issue and naturally you can ignore it.

Docker build errors ?

On CentOS 7,6 64bit docker, the docker build command reports Cmake errors for Cannot find source file: ls-qpack/lsqpack.c

docker build -t lsquic .
Step 9/10 : RUN cd /src/lsquic-client &&     cmake -DBORINGSSL_INCLUDE=/src/boringssl/include           -DBORINGSSL_LIB=/usr/local/lib . &&     make
 ---> Running in a16727bf0c47
-- The C compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Build type: Debug
-- Performing Test HAS_NO_IMPLICIT_FALLTHROUGH
-- Performing Test HAS_NO_IMPLICIT_FALLTHROUGH - Success
-- AddressSanitizer is OFF
-- Compiler flags:    -Wall -Wextra -Wno-unused-parameter -fno-omit-frame-pointer -Wno-implicit-fallthrough -Wno-missing-field-initializers -O0 -g3 -Werror 
-- BoringSSL include directory /src/boringssl/include
-- Found /usr/local/lib library: /usr/local/lib/libssl.a
-- Found /usr/local/lib library: /usr/local/lib/libcrypto.a
-- /usr/local/lib library not found
-- Found zlib: /usr/lib/x86_64-linux-gnu/libz.a
-- Found event: /usr/lib/x86_64-linux-gnu/libevent.a
-- Looking for sendmmsg
-- Looking for sendmmsg - found
-- Looking for recvmmsg
-- Looking for recvmmsg - found
-- Looking for open_memstream
-- Looking for open_memstream - found
-- Looking for IP_MTU_DISCOVER
-- Looking for IP_MTU_DISCOVER - found
-- Looking for IP_DONTFRAG
-- Looking for IP_DONTFRAG - not found
-- Looking for include file regex.h
-- Looking for include file regex.h - found
-- Configuring done
CMake Error at src/liblsquic/CMakeLists.txt:108 (add_library):
  Cannot find source file:

    ls-qpack/lsqpack.c

  Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
  .hxx .in .txx


CMake Error: Cannot determine link language for target "lsquic".
CMake Error: CMake can not determine linker language for target: lsquic
-- Generating done
-- Build files have been written to: /src/lsquic-client
The command '/bin/sh -c cd /src/lsquic-client &&     cmake -DBORINGSSL_INCLUDE=/src/boringssl/include           -DBORINGSSL_LIB=/usr/local/lib . &&     make' returned a non-zero code: 1
docker info
Client:
 Debug Mode: false

Server:
 Containers: 4
  Running: 1
  Paused: 0
  Stopped: 3
 Images: 14
 Server Version: 19.03.2
 Storage Driver: overlay
  Backing Filesystem: extfs
  Supports d_type: true
 Logging Driver: json-file
 Cgroup Driver: cgroupfs

Build Issue: " event2/event.h: No such file or directory "

I found build issue on linux and mac os , both are the same error.

Here is the log:

/home/zhangchi09/develop/lsquic-client/test/prog.c:19:26: fatal error: event2/event.h: No such file or directory
compilation terminated.
CMakeFiles/http_client.dir/build.make:86: recipe for target 'CMakeFiles/http_client.dir/test/prog.c.o' failed
make[2]: *** [CMakeFiles/http_client.dir/test/prog on.c.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/http_client.dir/all' failed
make[1]: *** [CMakeFiles/http_client.dir/all] Error 2
Makefile:94: recipe for target 'all' failed
make: *** [all] Error 2

pls help me to find out the solution , thx.

Build failed

Hi,

I am trying to build lsquic-client in windows 10 64bit machine. I have all the dependencies. All the library paths in the target_link_libraries of the CMakeLists.txt is correct. However it still cannot build the lsquic.lib library in either the debug version or the optimized version. These are the errors I got in the optimized version
release_1
release_2
release_3
release_4

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.