Giter Club home page Giter Club logo

goquic's Introduction

goquic, QUIC support for Go

Docker Repository on Quay

This is a work-in-progress QUIC implementation for Go. This is based on libquic library, which is in turn based on original QUIC implementation on Chromium.

QUIC is an experimental protocol aimed at reducing web latency over that of TCP. On the surface, QUIC is very similar to TCP+TLS+SPDY implemented on UDP. Because TCP is implement in operating system kernels, and middlebox firmware, making significant changes to TCP is next to impossible. However, since QUIC is built on top of UDP, it suffers from no such limitations.

Key features of QUIC over existing TCP+TLS+SPDY include

  • Dramatically reduced connection establishment time
  • Improved congestion control
  • Multiplexing without head of line blocking
  • Forward error correction
  • Connection migration

Project Status

This library is highly experimental. Although libquic sources are from Chromium (which are tested), the Go bindings are still highly pre-alpha state.

Known issues:

  • No support for read streaming. All request must fit in memory.
  • Secure QUIC not fully tested. May not support ECDSA certificates.

Things to do:

  • Read streaming support

Preliminary Benchmarks

A very primitive benchmark testing have been done. Testing environments below:

Items Description
Optimization libquic built with -O3 parameters
CPU Intel(R) Core(TM) i7-4930K CPU @ 3.40GHz
Server Code https://github.com/devsisters/goquic/blob/master/example/server.go
Server Parms GOMAXPROCS=12 ./server -port 9090 -n 12
Client Code https://github.com/devsisters/quicbench/blob/master/quicbench.go
Client Parms ./quicbench -u="https://example.com:9090/" -c 200 -r 1000

The server code is modified to create 30B, 1kB, 5kB, 10kB HTTP body payload. Concurrency is 200 and each thread requests 1,000 requests. It is designed to measure ideal throughput of the server. Naturally the throughput goes down when concurrency increases.

Benchmark results:

Payload Size Requests per Second
30B Payload 12131.25 RPS
1kB Payload 11835.13 RPS
5kB Payload 7816.21 RPS
10kB Payload 5599.73 RPS

On 10kB case, calculating the total network throughput is 458Mbps.

How many connections per second can this server process?

./gobench -u="https://example.com:9090/" -c 200 -r 100 -qk=false

Turning off keepalive using qk option results in a pure new QUIC connection per request. The benchmark results are 2905.58 CPS.

Getting Started

Get source files

go get -u -d github.com/devsisters/goquic

-u option is needed, because building (or downloading) static libraries is necessary for building and installing goquic library.

Build static library files

Although prebuilt static library files already exists in the repository for convenience, it is always good practice to build library files from source. You should not trust any unverifiable third-party binaries.

To build the library files for your architecture and OS:

./build_libs.sh (for debug build)
GOQUIC_BUILD=Release ./build_libs.sh (for release build)

This will fetch libquic master and build all the binaries from source. The C/C++ files for Go bindings will be all built too.

To build static library files, you should have cmake, C/C++ compiler, and ninja-build system (or GNU make).

Currently Linux, Mac OS X and FreeBSD is supported.

How to build

If you are using Go >= 1.5, you can build goquic binaries without any extra work.

go build $GOPATH/src/github.com/devsisters/goquic/example/server.go

If you are using Go 1.4, you should open goquic.go and manually edit ${SRCDIR} with your real path (maybe /YOUR/GOPATH/src/github.com/devsisters/goquic).

SPDY/QUIC support

We have a experimental SPDY/QUIC implementation as a library. You can use this library to add SPDY/QUIC support for your existing Go HTTP server.

See our SPDY-QUIC server/client implementation here.

How to use server

When running a HTTP server, do:

goquic.ListenAndServe(":8080", 1, nil)

instead of

http.ListenAndServe(":8080", nil)

How to use client

You need to create http.Client with Transport changed, do:

client := &http.Client{
	Transport: goquic.NewRoundTripper(false),
}
resp, err := client.Get("http://example.com/")

instead of

resp, err := http.Get("http://example.com/")

goquic's People

Contributors

chestnutprog avatar hodduc avatar igorastds avatar junsooo avatar kuss avatar l2dy avatar l2dybot avatar leifjackson avatar serialx avatar skystar-p 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  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

goquic's Issues

Using goquic in front of SNI HTTP proxy

I have an nginx reverse proxy that is handling TLS termination for my websites. It's using virtual hosts to direct the traffic to the correct backend servers. There's nothing special about this setup.

I wanted to know if I could use goquic in front of nginx to handle the TLS termination, convert nginx to handle HTTP only, and have still direct the backend traffic. I haven't tried this configuration for myself, but I thought it worthwhile to ask. I'm thinking that I won't be the last person to ask.

Header Problem

[0925/135340:VERBOSE1:spdy_header_block.cc(126)] Inserting: (:version, HTTP/1.1) [0925/135340:VERBOSE1:spdy_header_block.cc(126)] Inserting: (content-encoding, br) [0925/135340:VERBOSE1:spdy_header_block.cc(126)] Inserting: (cache-control, max-age=0, no-cache, no-store) [0925/135340:VERBOSE1:spdy_header_block.cc(126)] Inserting: (content-type, text/html; charset=UTF-8) [0925/135340:VERBOSE1:spdy_header_block.cc(126)] Inserting: (:status, 200) [0925/135340:VERBOSE1:spdy_header_block.cc(126)] Inserting: (server, nginx) [0925/135340:VERBOSE1:spdy_header_block.cc(126)] Inserting: (pragma, no-cache) [0925/135340:VERBOSE1:spdy_header_block.cc(126)] Inserting: (strict-transport-security, max-age=63072000; includeSubdomains; preload) [0925/135340:VERBOSE1:spdy_header_block.cc(126)] Inserting: (x-page-speed, 1.11.33.3-0) [0925/135340:VERBOSE1:spdy_header_block.cc(126)] Inserting: (set-cookie, shjcsrftoken=f7341afe7ad5d25172b4fdf7ef8df218; expires=Sun, 25-Sep-2016 07 :53:40 GMT; Max-Age=7200; path=/; secure) [0925/135340:VERBOSE1:spdy_header_block.cc(130)] Updating key: set-cookie with value: jcyz_session=2a55c9aa22918b4fcdaee337eaed50bc19df5563; e xpires=Fri, 24-Mar-2017 05:53:40 GMT; Max-Age=15552000; path=/; secure; HttpOnly [0925/135340:VERBOSE1:spdy_header_block.cc(126)] Inserting: (date, Sun, 25 Sep 2016 05:53:40 GMT) [0925/135340:VERBOSE1:spdy_header_block.cc(126)] Inserting: (alt-svc, quic=":443"; ma=2592000; v="36,35,34,33,32") [0925/135340:VERBOSE1:spdy_header_block.cc(126)] Inserting: (vary, Accept-Encoding) [0925/135340:VERBOSE1:spdy_header_block.cc(126)] Inserting: (x-powered-by, PHP/5.5.36)

The value of the Header that have the same name will be replaced except the last.

FreeBSD

pkg install clang37 gmake cmake ninja

setenv GOPATH `pwd`
setenv CC /usr/local/bin/clang37
setenv CXX /usr/local/bin/clang++37

go get github.com/devsisters/goquic
cd src/github.com/devsisters/goquic
git clone https://github.com/devsisters/libquic.git
cd libquic

patch <p1.diff # see below
cd src/base/threading
vi platform_thread_freebsd.cc # from https://chromium.googlesource.com/chromium/src/base/+/ba87700/threading/platform_thread_freebsd.cc
patch <p2.diff # see below
cd ../../..

mkdir -p build
cd build
cmake -GNinja ..
ninja
cd ../..

patch <p3.diff # see below
patch <p4.diff # see below
gmake

mkdir -p lib/freebsd_amd64
cp libquic/build/boringssl/crypto/libcrypto.a libquic/build/boringssl/ssl/libssl.a libquic/build/libquic.a libquic/build/protobuf/libprotobuf.a libgoquic.a lib/freebsd_amd64/
setenv CGO_CFLAGS "-I$GOPATH/src/github.com/devsisters/goquic/libquic/boringssl/include"
setenv CGO_LDFLAGS "-L$GOPATH/src/github.com/devsisters/goquic/lib/freebsd_amd64"
go build $GOPATH/src/github.com/devsisters/goquic/example/reverse_proxy.go
strip reverse_proxy

Patches (GitHub turned TAB into spaces):
p1.diff

--- CMakeLists.txt.orig
+++ CMakeLists.txt
@@ -186,6 +186,15 @@

        src/base/threading/platform_thread_linux.cc
    )
+elseif (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
+        set(
+                BASE_ARCH_LIBRARIES
+        )
+        set(
+                BASE_ARCH_SOURCES
+
+                src/base/threading/platform_thread_freebsd.cc
+        )
 elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
    FIND_LIBRARY(COREFOUNDATION_LIBRARY CoreFoundation)
    FIND_LIBRARY(COCOA_LIBRARY Cocoa)

p2.diff

--- platform_thread_freebsd.cc.orig
+++ platform_thread_freebsd.cc
@@ -10,13 +10,15 @@

 #include "base/lazy_instance.h"
 #include "base/logging.h"
+#include "base/threading/platform_thread_internal_posix.h"
 #include "base/threading/thread_id_name_manager.h"
+#if 0
 #include "base/tracked_objects.h"
+#endif
 #include "build/build_config.h"

 #if !defined(OS_NACL)
 #include <pthread.h>
-#include <sys/prctl.h>
 #include <sys/types.h>
 #include <unistd.h>
 #endif
@@ -36,7 +38,7 @@
     {ThreadPriority::NORMAL, 0},
     {ThreadPriority::DISPLAY, -6},
     {ThreadPriority::REALTIME_AUDIO, -10},
-}
+};

 bool SetCurrentThreadPriorityForPlatform(ThreadPriority priority) {
 #if !defined(OS_NACL)
@@ -67,7 +69,9 @@
 // static
 void PlatformThread::SetName(const std::string& name) {
   ThreadIdNameManager::GetInstance()->SetName(CurrentId(), name);
+#if 0
   tracked_objects::ThreadData::InitializeThreadContext(name);
+#endif

 #if !defined(OS_NACL)
   // On FreeBSD we can get the thread names to show up in the debugger by

p3.diff

--- Makefile.orig
+++ Makefile
@@ -1,7 +1,7 @@
-#CC=g++-4.8
+#CXX=g++-4.8
 #AR=ar
-#C=gcc-4.8
-CFLAGS=-Wall -Ilibquic/src -Ilibquic/src/third_party/protobuf/src  -DUSE_OPENSSL=1 -Iboringssl/include -g -gdwarf-4
+#CC=gcc-4.8
+CFLAGS=-Wall -I. -Ilibquic/src -Ilibquic/src/third_party/protobuf/src  -DUSE_OPENSSL=1 -Iboringssl/include -g -gdwarf-4
 CPPFLAGS=--std=gnu++11
 CPP_FILES:=$(wildcard src/*.cc)
 CPP_BASE_FILES:=$(CPP_FILES:src/%=%)
@@ -18,11 +18,11 @@

 #build/%.o: src/%.c
 #  mkdir -p $(dir $@)
-#  $(C) $(CFLAGS) -c -o $@ $<
+#  $(CC) $(CFLAGS) -c -o $@ $<

 build/%.o: src/%.cc
    mkdir -p $(dir $@)
-   $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
+   $(CXX) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<

 clean:
    rm -f build/*

p4.diff

--- go_functions.c.orig
+++ go_functions.c
@@ -18,7 +18,7 @@
     return CreateGoSession(go_quic_dispatcher, quic_server_session);
 }

-void* DeleteGoSession_C(void* go_quic_dispatcher, void* go_quic_server_session) {
+void DeleteGoSession_C(void* go_quic_dispatcher, void* go_quic_server_session) {
     DeleteGoSession(go_quic_dispatcher, go_quic_server_session);
 }

--- go_functions.h.orig
+++ go_functions.h
@@ -8,7 +8,7 @@
 void WriteToUDP_C(void* go_writer, void* peer_ip, size_t peer_ip_sz, uint16_t peer_port, void* buffer, size_t buf_len);
 void WriteToUDPClient_C(void* go_writer, void* peer_ip, size_t peer_ip_sz, uint16_t peer_port, void* buffer, size_t buf_len);
 void* CreateGoSession_C(void* go_quic_dispatcher, void* quic_server_session);
-void* DeleteGoSession_C(void* go_quic_dispatcher, void* go_quic_server_session);
+void DeleteGoSession_C(void* go_quic_dispatcher, void* go_quic_server_session);
 int GetProof_C(void* go_quic_dispatcher, void* server_ip, size_t server_ip_sz, char* hostname, size_t hostname_sz, char* server_config, size_t server_config_sz, int ecdsa_ok, char ***out_certs, int *out_certs_sz, size_t **out_certs_item_sz, char **out_signature, size_t *out_signature_sz);
 void* CreateIncomingDynamicStream_C(void* go_quic_server_session, uint32_t id, void* go_quic_spdy_server_stream_go_wrapper);
 void UnregisterQuicServerStreamFromSession_C(void* go_stream);

Client example failed to read 302 response from reverse proxy with QUIC protocol

Client example failed to read response when reverse proxy return 302 status. The error message said missing Location header, but from client log I saw it reads correct headers at underlying lib. Is that because the lib parsed headers in lower case and failed its dependent?

[0111/151034:VERBOSE1:spdy_utils.cc(177)] Successfully parsed headers: 
{
  :status:302
  :version:HTTP/1.1
  x-frame-options:SAMEORIGIN
  content-length:0
  x-xss-protection:1; mode=block
  content-language:en-us
  vary:Accept-Language, Cookie
  x-content-type-options:nosniff
  server:apache
  content-security-policy:script-src 'self' 'unsafe-inline' 'unsafe-eval' *.google-analytics.com *.doubleclick.net data:;img-src 'self' *.google-analytics.com *.doubleclick.net http://*.tile.osm.org *.tile.osm.org *.gstatic.com data:;style-src 'self' 'unsafe-inline' fonts.googleapis.com;connect-src 'self';frame-src *;child-src 'self' data: *.vimeo.com;object-src 'none'
  location:http://127.0.0.1:8080/accounts/login/?next=/hue/editor/
  date:Thu, 11 Jan 2018 23:10:34 GMT
  content-type:text/html; charset=utf-8
}

[0111/151034:VERBOSE1:go_quic_spdy_client_stream.cc(102)] headers complete for stream 5
[0111/151034:VERBOSE1:quic_stream_sequencer_buffer.cc(83)] Retired block with index: 0
[0111/151034:VERBOSE1:quic_stream_sequencer_buffer.cc(506)] Removed FrameInfo with offset: 0 and length: 505
[0111/151034:VERBOSE1:quic_flow_controller.cc(50)] Client: Stream 3 consumed: 505
[0111/151034:VERBOSE1:quic_flow_controller.cc(175)] Client: Not sending WindowUpdate for stream 3, available window: 15879 >= threshold: 8192
[0111/151034:VERBOSE1:quic_connection.cc(995)] Client: Got packet 5 for 2405669269133898111
[0111/151034:VERBOSE1:quic_connection.cc(1311)] Client: time of last received packet: 126019722721
[0111/151034:VERBOSE1:quic_connection.cc(671)] Client: Received packet header: { connection_id: 2405669269133898111, connection_id_length: 8, packet_number_length: 1, multipath_flag: 0, reset_flag: 0, version_flag: 0, fec_flag: 0, entropy_flag: 0, entropy hash: 0, path_id: 0, packet_number: 6 }

[0111/151034:VERBOSE1:quic_stream_sequencer.cc(108)] Passing up termination, as we've processed 0 of 0 bytes.
[0111/151034:VERBOSE1:reliable_quic_stream.cc(353)] Client: Done reading from stream 5
[0111/151034:VERBOSE1:reliable_quic_stream.cc(359)] Client: Closing stream: 5
[0111/151034:VERBOSE1:quic_session.cc(309)]  Client: Closing stream 5
[0111/151034:VERBOSE1:quic_flow_controller.cc(50)] Client: Stream 0 consumed: 0
[0111/151034:VERBOSE1:quic_flow_controller.cc(175)] Client: Not sending WindowUpdate for stream 0, available window: 16384 >= threshold: 8192
[0111/151034:VERBOSE1:quic_connection.cc(995)] Client: Got packet 6 for 2405669269133898111
[0111/151034:VERBOSE1:quic_connection.cc(2301)] Bundling ack with outgoing packet.
[0111/151034:VERBOSE1:quic_packet_creator.cc(613)] Adding frame: type { ACK_FRAME } { entropy_hash: 0, largest_observed: 6, ack_delay_time: 149, packets: [ 2 3 4 5 6  ], is_truncated: 0, received_packets: [ 4 at 126019549124 5 at 126019722041 6 at 126019722721  ] }

[0111/151034:VERBOSE1:quic_packet_creator.cc(613)] Adding frame: type { STOP_WAITING_FRAME } { entropy_hash: 0, least_unacked: 4 }

[0111/151034:VERBOSE1:quic_framer.cc(695)] Appending header: { connection_id: 2405669269133898111, connection_id_length: 8, packet_number_length: 1, multipath_flag: 0, reset_flag: 0, version_flag: 0, fec_flag: 0, entropy_flag: 0, entropy hash: 0, path_id: 0, packet_number: 5 }

[0111/151034:VERBOSE1:quic_connection.cc(1646)] Client: Sending packet 5 :  ack only , encryption level: ENCRYPTION_FORWARD_SECURE, encrypted length:41
[0111/151034:VERBOSE1:quic_connection.cc(1705)] Client: time we began writing last sent packet: 126019722930
[0111/151034:VERBOSE1:quic_connection.cc(2046)] Client: Closing connection: 2405669269133898111, with error: QUIC_PEER_GOING_AWAY (16), and details:  Client disconnectiong
[0111/151034:VERBOSE1:quic_connection.cc(2066)] Client: Sending connection close packet.
[0111/151034:VERBOSE1:quic_connection.cc(2301)] Bundling ack with outgoing packet.
[0111/151034:VERBOSE1:quic_packet_creator.cc(613)] Adding frame: type { ACK_FRAME } { entropy_hash: 0, largest_observed: 6, ack_delay_time: 325, packets: [ 2 3 4 5 6  ], is_truncated: 0, received_packets: [ 4 at 126019549124 5 at 126019722041 6 at 126019722721  ] }

[0111/151034:VERBOSE1:quic_packet_creator.cc(613)] Adding frame: type { STOP_WAITING_FRAME } { entropy_hash: 0, least_unacked: 4 }

[0111/151034:VERBOSE1:quic_packet_creator.cc(613)] Adding frame: type { CONNECTION_CLOSE_FRAME } { error_code: 16, error_details: 'Client disconnectiong' }

[0111/151034:VERBOSE1:quic_framer.cc(695)] Appending header: { connection_id: 2405669269133898111, connection_id_length: 8, packet_number_length: 1, multipath_flag: 0, reset_flag: 0, version_flag: 0, fec_flag: 0, entropy_flag: 0, entropy hash: 0, path_id: 0, packet_number: 6 }

[0111/151034:VERBOSE1:quic_connection.cc(1646)] Client: Sending packet 6 : data bearing , encryption level: ENCRYPTION_FORWARD_SECURE, encrypted length:69
[0111/151034:VERBOSE1:quic_connection.cc(1705)] Client: time we began writing last sent packet: 126019723125
panic: Get https://127.0.0.1:8080/hue/editor/: 302 response missing Location header 

unknown port udp/8080

Hello,

I'm very interested by goQuic and after a long day for install, I have a last problem but my brain refused to solve this problem. So.

./server -cert=/etc/ssl/server.crt -key=/etc/ssl/server.key
2016/04/13 17:42:28 About to listen on 8080. Go to https://127.0.0.1:8080/
2016/04/13 17:42:28 unknown port udp/8080

The last line...

Besides, I test with Docker and I have a problem with https (ssl cert and key). So, if you have a solution for this second think.

Thank you :)

Size of static libs?

Why are the static libs so large?

4.7M    lib/darwin_amd64/libcrypto.a
16M     lib/darwin_amd64/libgoquic.a
2.0M    lib/darwin_amd64/libprotobuf.a
59M     lib/darwin_amd64/libquic.a
1.6M    lib/darwin_amd64/libssl.a
5.5M    lib/linux_amd64/libcrypto.a
7.9M    lib/linux_amd64/libgoquic.a
2.4M    lib/linux_amd64/libprotobuf.a
52M     lib/linux_amd64/libquic.a
1.9M    lib/linux_amd64/libssl.a

FEC Support?

Are there any insights how well goquic supports FEC (Forwarding Error Correcting) and if it is well implemented, how to enable/disable it? (I fully understand FEC is already removed from the Google QUIC design.)

Thanks in advance!

Is goquic suitable for non-http applications?

I most often see information regarding QUIC in conjunction with HTTP/2, but I'd like to use it for general purpose connections, perhaps for a multiplayer game server. Is this library general enough to use outside of the context of HTTP/2 applications, as a drop-in replacement for TCP thereabouts?

Merge gospdyquic and goquic

Since QUIC's current implementation doesn't support generic socket-like API properly, distinction between goquic and gospdyquic is ambiguous. We should merge this projects since it might cause confusion to the users who are first time using this project.

Build failed with "undefined reference to `net::CachedNetworkParameters::..."

I tried to build example/server.go with the following options:

CGO_CFLAGS="-I$GOPATH/src/github.com/devsisters/goquic/libquic/boringssl/include" CGO_LDFLAGS="-L$GOPATH/src/github.com/devsisters/goquic/lib/linux_amd64" go build $GOPATH/src/github.com/devsisters/goquic/example/server.go

Result:

# CGO_CFLAGS="-I$GOPATH/src/github.com/devsisters/goquic/libquic/boringssl/include" CGO_LDFLAGS="-L$GOPATH/src/github.com/devsisters/goquic/lib/linux_amd64" go build $GOPATH/src/github.com/devsisters/goquic/example/server.go
# github.com/devsisters/goquic
src/github.com/devsisters/goquic/lib/linux_amd64/libgoquic.a(go_quic_server_session_base.o): In function `net::tools::GoQuicServerSessionBase::OnCongestionWindowChange(net::QuicTime)':
src/github.com/devsisters/goquic/src/go_quic_server_session_base.cc:155: undefined reference to `net::CachedNetworkParameters::CachedNetworkParameters()'
src/github.com/devsisters/goquic/src/go_quic_server_session_base.cc:179: undefined reference to `net::CachedNetworkParameters::~CachedNetworkParameters()'
src/github.com/devsisters/goquic/src/go_quic_server_session_base.cc:179: undefined reference to `net::CachedNetworkParameters::~CachedNetworkParameters()'
src/github.com/devsisters/goquic/lib/linux_amd64/libquic.a(quic_crypto_server_config.cc.o): In function `net::ValidateClientHelloResultCallback::Result::Result(net::CryptoHandshakeMessage const&, std::vector<unsigned char, std::allocator<unsigned char> >, net::QuicWallTime)':
src/github.com/devsisters/goquic/libquic/build/../src/net/quic/crypto/quic_crypto_server_config.cc:186: undefined reference to `net::CachedNetworkParameters::CachedNetworkParameters()'
src/github.com/devsisters/goquic/lib/linux_amd64/libquic.a(quic_crypto_server_config.cc.o): In function `net::ValidateClientHelloResultCallback::Result::~Result()':
src/github.com/devsisters/goquic/libquic/build/../src/net/quic/crypto/quic_crypto_server_config.cc:188: undefined reference to `net::CachedNetworkParameters::~CachedNetworkParameters()'
src/github.com/devsisters/goquic/lib/linux_amd64/libquic.a(quic_crypto_server_config.cc.o): In function `net::CachedNetworkParameters::operator=(net::CachedNetworkParameters const&)':
src/github.com/devsisters/goquic/libquic/build/../src/net/quic/proto/cached_network_parameters.pb.h:57: undefined reference to `net::CachedNetworkParameters::CopyFrom(net::CachedNetworkParameters const&)'
src/github.com/devsisters/goquic/lib/linux_amd64/libquic.a(quic_crypto_server_config.cc.o): In function `net::SourceAddressToken::mutable_cached_network_parameters()':
src/github.com/devsisters/goquic/libquic/build/../src/net/quic/proto/source_address_token.pb.h:358: undefined reference to `net::CachedNetworkParameters::CachedNetworkParameters()'
src/github.com/devsisters/goquic/lib/linux_amd64/libquic.a(quic_crypto_server_stream.cc.o): In function `net::QuicCryptoServerStream::SetPreviousCachedNetworkParams(net::CachedNetworkParameters)':
src/github.com/devsisters/goquic/libquic/build/../src/net/quic/quic_crypto_server_stream.cc:280: undefined reference to `net::CachedNetworkParameters::CachedNetworkParameters(net::CachedNetworkParameters const&)'
src/github.com/devsisters/goquic/lib/linux_amd64/libquic.a(quic_crypto_server_stream.cc.o): In function `net::QuicCryptoServerStream::ProcessClientHello(net::CryptoHandshakeMessage const&, net::ValidateClientHelloResultCallback::Result const&, net::CryptoHandshakeMessage*, std::string*)':
src/github.com/devsisters/goquic/libquic/build/../src/net/quic/quic_crypto_server_stream.cc:324: undefined reference to `net::CachedNetworkParameters::CachedNetworkParameters(net::CachedNetworkParameters const&)'
src/github.com/devsisters/goquic/lib/linux_amd64/libquic.a(source_address_token.pb.cc.o): In function `net::protobuf_AddDesc_source_5faddress_5ftoken_2eproto()':
src/github.com/devsisters/goquic/libquic/build/../src/net/quic/proto/source_address_token.pb.cc:34: undefined reference to `net::protobuf_AddDesc_cached_5fnetwork_5fparameters_2eproto()'
src/github.com/devsisters/goquic/lib/linux_amd64/libquic.a(source_address_token.pb.cc.o): In function `net::SourceAddressToken::InitAsDefaultInstance()':
src/github.com/devsisters/goquic/libquic/build/../src/net/quic/proto/source_address_token.pb.cc:75: undefined reference to `net::CachedNetworkParameters::default_instance()'
src/github.com/devsisters/goquic/lib/linux_amd64/libquic.a(source_address_token.pb.cc.o): In function `net::SourceAddressToken::Clear()':
src/github.com/devsisters/goquic/libquic/build/../src/net/quic/proto/source_address_token.pb.cc:139: undefined reference to `net::CachedNetworkParameters::Clear()'
src/github.com/devsisters/goquic/lib/linux_amd64/libquic.a(source_address_token.pb.cc.o): In function `net::SourceAddressToken::MergeFrom(net::SourceAddressToken const&)':
src/github.com/devsisters/goquic/libquic/build/../src/net/quic/proto/source_address_token.pb.cc:277: undefined reference to `net::CachedNetworkParameters::MergeFrom(net::CachedNetworkParameters const&)'
src/github.com/devsisters/goquic/lib/linux_amd64/libquic.a(source_address_token.pb.cc.o): In function `bool google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual<net::CachedNetworkParameters>(google::protobuf::io::CodedInputStream*, net::CachedNetworkParameters*)':
src/github.com/devsisters/goquic/libquic/build/../src/third_party/protobuf/src/google/protobuf/wire_format_lite_inl.h:402: undefined reference to `net::CachedNetworkParameters::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*)'
src/github.com/devsisters/goquic/lib/linux_amd64/libquic.a(source_address_token.pb.cc.o): In function `int google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual<net::CachedNetworkParameters>(net::CachedNetworkParameters const&)':
src/github.com/devsisters/goquic/libquic/build/../src/third_party/protobuf/src/google/protobuf/wire_format_lite_inl.h:765: undefined reference to `net::CachedNetworkParameters::ByteSize() const'
collect2: error: ld returned 1 exit status

I'm on linux + go1.6.
Previously I have build the static libs with ./build_libs.sh, without problem.

Stream requests?

I see

No support for read streaming. All request must fit in memory.

does this mean i cannot open a single stream and use it for multiple RPCs back and forth? (note, not using HTTP. would use QUIC like yamux, muxado, etc)

goquic/example/client.go does not seem to work with any real-world QUIC apps

I tested this:

github.com/devsisters/goquic/example/client.go

But it cannot connect to any real-world services, like https://www.google.com:443/. I modified it as such to no avail. Here is the error output:

$ go run client.go 2>&1 | egrep -i 'warn|err|fail'
  RREJ: SERVER_CONFIG_INCHOATE_HELLO_FAILURE
[0307/034553:VERBOSE1:quic_connection.cc(2030)] Client: Force closing 9814791807430471583 with error QUIC_PEER_GOING_AWAY (16) Client disconnectiong
[0307/034553:VERBOSE1:quic_packet_creator.cc(740)] Adding frame: type { CONNECTION_CLOSE_FRAME } error_code { 16 } error_details { Client disconnectiong }
<html><title>Error 400 (Bad Request)!!1</title></html>

Has this been tested on any real-world services other than the demo server? Or is QUIC too much in flux still? If the latter, totally understandable. If not, wanted to point it out so others have a documented place to seek resolution. I also noticed this comment in the base client.go foundation at github.com/devsisters/goquic/client.go:

if q.keepConnection {
                resp.Body = ioutil.NopCloser(st)
        } else {
                // XXX(hodduc): "conn" should be closed after the user reads all response body, so
                // it's hard to determine when to close "conn". So we read all response body prematurely.
                // If response is very big, this could be problematic. (Consider using runtime.finalizer())
                body, err := ioutil.ReadAll(st)
                if err != nil {
                        return nil, err
                }
                resp.Body = ioutil.NopCloser(bytes.NewBuffer(body))

                conn.Close()
        }

Can you just use defer on the close? If not, something like this below instead via io.Copy?

body, err := ioutil.ReadAll(resp.Body)
io.Copy(ioutil.Discard, resp.Body)
resp.Body.Close()

goquic does not work with chromium 49 ?

Hello

I have just found that goquic (the server.go in the folder example, as well as my goquic-baser server implementation) did not work with the latest version of chromium 49.0.2623.87 (Built on 8.3, running on Debian 8.3 (64-bit)).When trying on another computer with chromium version 48, the server codes work flawlessly.

Please, could you tell me if the problem is on my own side or not ?

Thanks in advance.

.

Error when run server.go !

Hi,

I am a newbie about QUIC. I am studying about the way to create a server serve QUIC. I follow the instruction from https://github.com/devsisters/goquic.
I built the server.go successfully. I also generate a CA certificate which need to add to my OS's root certificate store in order for it to be trusted. I follow the instruction from https://www.chromium.org/quic/playing-with-quic to add the certificate. I run the server.go by command:

go run $GOPATH/src/github.com/devsisters/goquic/example/server.go -cert=/home/vantong/chromium/src/net/tools/quic/certs/out/leaf_cert.pem -key=/home/vantong/chromium/src/net/tools/quic/certs/out/leaf_cert.pkcs8 -quic_only -root=/home/vantong/Desktop/quic-data/www.example.org

And I got this error:
2017/12/19 14:20:21 About to listen on 127.0.0.1. Go to https://127.0.0.1:8080/
2017/12/19 14:20:21 tls: failed to find any PEM data in key input
exit status 1

Anybody know how to fix this?
Thank you in advance !

SSL issues

how do i modify the transport to not enforce SSL key validation?

Error while building library files

When I build library files using

I am seeing this error at the end and build is failing :

./build_libs.sh

make: *** [build/adaptor_client.o] Error 1
src/go_quic_simple_server_session.cc:31:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
src/adaptor.cc:245:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
make: *** [build/go_quic_simple_server_session.o] Error 1
make: *** [build/adaptor.o] Error 1
make: *** [build/go_quic_time_wait_list_manager.o] Error 1
make: *** [build/go_quic_dispatcher.o] Error 1

Build_libs.sh build problems

Hello! I am getting this output when compiling
./build_libs.sh
GOARCH: amd64
GOOS: linux
OPTION:

and it does nothing more.
Thanks.

Build problems due to ABI changes? -> undefined reference to `google::protobuf::internal::GetEmptyString[abi:cxx11]()'

Got a bunch of build problems below, mostly related to imports at runtime. However, I am using the libprotobuf v2.6 which is included with Ubuntu 15.10. I may have done something dumb, but I'm new to golang in general and not entirely sure.

$ go run ~/gopath/src/goquic/client.go 
# github.com/devsisters/goquic
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libgoquic.a(go_quic_server_session_base.o): In function `net::CachedNetworkParameters::set_serving_region(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
./libquic/src/net/quic/proto/cached_network_parameters.pb.h:236: undefined reference to `google::protobuf::internal::GetEmptyString[abi:cxx11]()'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libquic.a(quic_crypto_server_config.cc.o): In function `net::SourceAddressToken::set_ip(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
./libquic/build/../src/net/quic/proto/source_address_token.pb.h:264: undefined reference to `google::protobuf::internal::GetEmptyString[abi:cxx11]()'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libquic.a(aes_128_gcm_12_encrypter_openssl.cc.o): In function `net::Aes128Gcm12Encrypter::Aes128Gcm12Encrypter()':
./libquic/build/../src/net/quic/crypto/aes_128_gcm_12_encrypter_openssl.cc:22: undefined reference to `EVP_aead_aes_128_gcm'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libquic.a(chacha20_poly1305_rfc7539_encrypter_openssl.cc.o): In function `net::ChaCha20Poly1305Rfc7539Encrypter::ChaCha20Poly1305Rfc7539Encrypter()':
./libquic/build/../src/net/quic/crypto/chacha20_poly1305_rfc7539_encrypter_openssl.cc:22: undefined reference to `EVP_aead_chacha20_poly1305_rfc7539'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libquic.a(aead_base_encrypter_openssl.cc.o): In function `net::AeadBaseEncrypter::SetKey(base::BasicStringPiece<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >)':
./libquic/build/../src/net/quic/crypto/aead_base_encrypter_openssl.cc:62: undefined reference to `EVP_AEAD_CTX_cleanup'
./libquic/build/../src/net/quic/crypto/aead_base_encrypter_openssl.cc:64: undefined reference to `EVP_AEAD_CTX_init'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libquic.a(aead_base_encrypter_openssl.cc.o): In function `net::AeadBaseEncrypter::Encrypt(base::BasicStringPiece<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, base::BasicStringPiece<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, base::BasicStringPiece<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, unsigned char*)':
./libquic/build/../src/net/quic/crypto/aead_base_encrypter_openssl.cc:91: undefined reference to `EVP_AEAD_CTX_seal'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libquic.a(aes_128_gcm_12_decrypter_openssl.cc.o): In function `net::Aes128Gcm12Decrypter::Aes128Gcm12Decrypter()':
./libquic/build/../src/net/quic/crypto/aes_128_gcm_12_decrypter_openssl.cc:23: undefined reference to `EVP_aead_aes_128_gcm'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libquic.a(cached_network_parameters.pb.cc.o): In function `net::CachedNetworkParameters::SharedCtor()':
./libquic/build/../src/net/quic/proto/cached_network_parameters.pb.cc:98: undefined reference to `google::protobuf::internal::GetEmptyString[abi:cxx11]()'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libquic.a(cached_network_parameters.pb.cc.o): In function `net::CachedNetworkParameters::SharedDtor()':
./libquic/build/../src/net/quic/proto/cached_network_parameters.pb.cc:113: undefined reference to `google::protobuf::internal::GetEmptyString[abi:cxx11]()'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libquic.a(cached_network_parameters.pb.cc.o): In function `net::CachedNetworkParameters::Clear()':
./libquic/build/../src/net/quic/proto/cached_network_parameters.pb.cc:147: undefined reference to `google::protobuf::internal::GetEmptyString[abi:cxx11]()'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libquic.a(cached_network_parameters.pb.cc.o): In function `net::CachedNetworkParameters::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*)':
./libquic/build/../src/net/quic/proto/cached_network_parameters.pb.cc:282: undefined reference to `google::protobuf::internal::WireFormatLite::SkipField(google::protobuf::io::CodedInputStream*, unsigned int, google::protobuf::UnknownFieldSet*)'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libquic.a(cached_network_parameters.pb.cc.o): In function `net::CachedNetworkParameters::mutable_serving_region[abi:cxx11]()':
./libquic/build/../src/net/quic/proto/cached_network_parameters.pb.h:257: undefined reference to `google::protobuf::internal::GetEmptyString[abi:cxx11]()'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libquic.a(source_address_token.pb.cc.o): In function `net::SourceAddressToken::SharedCtor()':
./libquic/build/../src/net/quic/proto/source_address_token.pb.cc:87: undefined reference to `google::protobuf::internal::GetEmptyString[abi:cxx11]()'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libquic.a(source_address_token.pb.cc.o): In function `net::SourceAddressToken::SharedDtor()':
./libquic/build/../src/net/quic/proto/source_address_token.pb.cc:98: undefined reference to `google::protobuf::internal::GetEmptyString[abi:cxx11]()'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libquic.a(source_address_token.pb.cc.o): In function `net::SourceAddressToken::Clear()':
./libquic/build/../src/net/quic/proto/source_address_token.pb.cc:133: undefined reference to `google::protobuf::internal::GetEmptyString[abi:cxx11]()'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libquic.a(source_address_token.pb.cc.o): In function `net::SourceAddressToken::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*)':
./libquic/build/../src/net/quic/proto/source_address_token.pb.cc:200: undefined reference to `google::protobuf::internal::WireFormatLite::SkipField(google::protobuf::io::CodedInputStream*, unsigned int, google::protobuf::UnknownFieldSet*)'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libquic.a(source_address_token.pb.cc.o): In function `net::SourceAddressTokens::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*)':
./libquic/build/../src/net/quic/proto/source_address_token.pb.cc:399: undefined reference to `google::protobuf::internal::WireFormatLite::SkipField(google::protobuf::io::CodedInputStream*, unsigned int, google::protobuf::UnknownFieldSet*)'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libquic.a(source_address_token.pb.cc.o): In function `net::SourceAddressToken::mutable_ip[abi:cxx11]()':
./libquic/build/../src/net/quic/proto/source_address_token.pb.h:285: undefined reference to `google::protobuf::internal::GetEmptyString[abi:cxx11]()'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libquic.a(curve25519_openssl.cc.o): In function `crypto::curve25519::ScalarMult(unsigned char const*, unsigned char const*, unsigned char*)':
./libquic/build/../src/crypto/curve25519_openssl.cc:17: undefined reference to `X25519'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libquic.a(curve25519_openssl.cc.o): In function `crypto::curve25519::ScalarBaseMult(unsigned char const*, unsigned char*)':
./libquic/build/../src/crypto/curve25519_openssl.cc:21: undefined reference to `X25519_public_from_private'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libquic.a(chacha20_poly1305_encrypter_openssl.cc.o): In function `net::ChaCha20Poly1305Encrypter::ChaCha20Poly1305Encrypter()':
./libquic/build/../src/net/quic/crypto/chacha20_poly1305_encrypter_openssl.cc:24: undefined reference to `EVP_aead_chacha20_poly1305_old'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libquic.a(chacha20_poly1305_decrypter_openssl.cc.o): In function `net::ChaCha20Poly1305Decrypter::ChaCha20Poly1305Decrypter()':
./libquic/build/../src/net/quic/crypto/chacha20_poly1305_decrypter_openssl.cc:25: undefined reference to `EVP_aead_chacha20_poly1305_old'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libquic.a(chacha20_poly1305_rfc7539_decrypter_openssl.cc.o): In function `net::ChaCha20Poly1305Rfc7539Decrypter::ChaCha20Poly1305Rfc7539Decrypter()':
./libquic/build/../src/net/quic/crypto/chacha20_poly1305_rfc7539_decrypter_openssl.cc:23: undefined reference to `EVP_aead_chacha20_poly1305_rfc7539'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libquic.a(aead_base_decrypter_openssl.cc.o): In function `net::AeadBaseDecrypter::SetKey(base::BasicStringPiece<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >)':
./libquic/build/../src/net/quic/crypto/aead_base_decrypter_openssl.cc:61: undefined reference to `EVP_AEAD_CTX_cleanup'
./libquic/build/../src/net/quic/crypto/aead_base_decrypter_openssl.cc:62: undefined reference to `EVP_AEAD_CTX_init'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libquic.a(aead_base_decrypter_openssl.cc.o): In function `net::AeadBaseDecrypter::DecryptPacket(unsigned long, base::BasicStringPiece<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > const&, base::BasicStringPiece<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > const&, char*, unsigned long*, unsigned long)':
./libquic/build/../src/net/quic/crypto/aead_base_decrypter_openssl.cc:94: undefined reference to `EVP_AEAD_CTX_open'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libquic.a(scoped_evp_aead_ctx.cc.o): In function `net::ScopedEVPAEADCtx::~ScopedEVPAEADCtx()':
./libquic/build/../src/net/quic/crypto/scoped_evp_aead_ctx.cc:15: undefined reference to `EVP_AEAD_CTX_cleanup'
collect2: error: ld returned 1 exit status

This may be relevant, but the fix doesn't appear to be working. I did recompile libprotobuf from source via gcc v5.2.1 and that didn't seem to work :( Thoughts?

https://stackoverflow.com/questions/30124264/undefined-reference-to-googleprotobufinternalempty-string-abicxx11

Build failure with undefined reference

My system info:

Distributor ID:  Ubuntu
Description:     Ubuntu 14.04.3 LTS
Release:         14.04
Codename:        trusty

I downloaded goquic by doing

go get -u -d github.com/devsisters/goquic

I am trying to build client following instructions at https://github.com/devsisters/goquic/tree/master/example

Build is failing with the following error:

# go build $GOPATH/src/github.com/devsisters/goquic/example/client.go
# github.com/devsisters/goquic
/tmp/go-build331148125/github.com/devsisters/goquic/_obj/dispatcher.cgo2.o: In function `_cgo_54fddbb622cd_Cfunc_quic_server_session_connection_stat':
src/github.com/devsisters/goquic/dispatcher.go:74: undefined reference to `quic_server_session_connection_stat'
/tmp/go-build331148125/github.com/devsisters/goquic/_obj/proof_source.cgo2.o: In function `_cgo_54fddbb622cd_Cfunc_init_proof_source_goquic':
src/github.com/devsisters/goquic/proof_source.go:61: undefined reference to `init_proof_source_goquic'
/tmp/go-build331148125/github.com/devsisters/goquic/_obj/proof_source.cgo2.o: In function `_cgo_54fddbb622cd_Cfunc_delete_crypto_config':
src/github.com/devsisters/goquic/proof_source.go:37: undefined reference to `delete_crypto_config'
/tmp/go-build331148125/github.com/devsisters/goquic/_obj/proof_source.cgo2.o: In function `_cgo_54fddbb622cd_Cfunc_proof_source_goquic_add_cert':
src/github.com/devsisters/goquic/proof_source.go:74: undefined reference to `proof_source_goquic_add_cert'
/tmp/go-build331148125/github.com/devsisters/goquic/_obj/proof_source.cgo2.o: In function `_cgo_54fddbb622cd_Cfunc_proof_source_goquic_build_cert_chain':
src/github.com/devsisters/goquic/proof_source.go:83: undefined reference to `proof_source_goquic_build_cert_chain'
/tmp/go-build331148125/github.com/devsisters/goquic/_obj/quicstream_server.cgo2.o: In function `_cgo_54fddbb622cd_Cfunc_quic_simple_server_stream_write_headers':
src/github.com/devsisters/goquic/quicstream_server.go:39: undefined reference to `quic_simple_server_stream_write_headers'
/tmp/go-build331148125/github.com/devsisters/goquic/_obj/quicstream_server.cgo2.o: In function `_cgo_54fddbb622cd_Cfunc_quic_simple_server_stream_write_or_buffer_data':
src/github.com/devsisters/goquic/quicstream_server.go:52: undefined reference to `quic_simple_server_stream_write_or_buffer_data'
src/github.com/devsisters/goquic/lib/linux_amd64/libgoquic.a(adaptor_client.o): In function `create_go_quic_client_session_and_initialize':
/home/hodduc/go/src/github.com/devsisters/goquic/src/adaptor_client.cc:61: undefined reference to `net::QuicConnection::QuicConnection(unsigned long, net::IPEndPoint, net::QuicConnectionHelperInterface*, net::QuicConnection::PacketWriterFactory const&, bool, net::Perspective, std::vector<net::QuicVersion, std::allocator<net::QuicVersion> > const&)'
src/github.com/devsisters/goquic/lib/linux_amd64/libgoquic.a(go_quic_client_session.o): In function `net::tools::GoQuicClientSession::GoQuicClientSession(net::QuicConfig const&, net::QuicConnection*, net::QuicServerId const&, net::QuicCryptoClientConfig*)':
/home/hodduc/go/src/github.com/devsisters/goquic/src/go_quic_client_session.cc:17: undefined reference to `net::QuicClientSessionBase::QuicClientSessionBase(net::QuicConnection*, net::QuicConfig const&)'
src/github.com/devsisters/goquic/lib/linux_amd64/libgoquic.a(go_quic_client_session.o): In function `net::tools::GoQuicClientSession::CreateQuicCryptoStream()':
/home/hodduc/go/src/github.com/devsisters/goquic/src/go_quic_client_session.cc:78: undefined reference to `net::QuicCryptoClientStream::QuicCryptoClientStream(net::QuicServerId const&, net::QuicClientSessionBase*, net::ProofVerifyContext*, net::QuicCryptoClientConfig*)'
src/github.com/devsisters/goquic/lib/linux_amd64/libgoquic.a(go_quic_client_session.o):(.rodata._ZTVN3net5tools19GoQuicClientSessionE[_ZTVN3net5tools19GoQuicClientSessionE]+0x48): undefined reference to `net::QuicSession::OnConnectionClosed(net::QuicErrorCode, bool)'
src/github.com/devsisters/goquic/lib/linux_amd64/libgoquic.a(go_quic_client_session.o):(.rodata._ZTVN3net5tools19GoQuicClientSessionE[_ZTVN3net5tools19GoQuicClientSessionE]+0x98): undefined reference to `net::QuicSession::WritevData(unsigned int, net::QuicIOVector, unsigned long, bool, net::FecProtection, net::QuicAckListenerInterface*)'
src/github.com/devsisters/goquic/lib/linux_amd64/libgoquic.a(go_quic_client_session.o):(.rodata._ZTVN3net5tools19GoQuicClientSessionE[_ZTVN3net5tools19GoQuicClientSessionE]+0xe0): undefined reference to `net::QuicSession::GetNumOpenStreams() const'
src/github.com/devsisters/goquic/lib/linux_amd64/libgoquic.a(go_quic_client_session.o):(.rodata._ZTVN3net5tools19GoQuicClientSessionE[_ZTVN3net5tools19GoQuicClientSessionE]+0x128): undefined reference to `net::QuicSpdySession::OnStreamHeadersPriority(unsigned int, unsigned int)'
src/github.com/devsisters/goquic/lib/linux_amd64/libgoquic.a(go_quic_connection_helper.o): In function `net::GoQuicAlarmGoWrapper::GoQuicAlarmGoWrapper(net::QuicClock*, void*, net::QuicAlarm::Delegate*)':
/home/hodduc/go/src/github.com/devsisters/goquic/src/go_quic_alarm_go_wrapper.h:19: undefined reference to `net::QuicAlarm::QuicAlarm(net::QuicAlarm::Delegate*)'
src/github.com/devsisters/goquic/lib/linux_amd64/libgoquic.a(go_quic_dispatcher.o): In function `net::tools::GoQuicDispatcher::CreateQuicSession(unsigned long, net::IPEndPoint const&)':
/home/hodduc/go/src/github.com/devsisters/goquic/src/go_quic_dispatcher.cc:463: undefined reference to `net::QuicConnection::QuicConnection(unsigned long, net::IPEndPoint, net::QuicConnectionHelperInterface*, net::QuicConnection::PacketWriterFactory const&, bool, net::Perspective, std::vector<net::QuicVersion, std::allocator<net::QuicVersion> > const&)'
src/github.com/devsisters/goquic/lib/linux_amd64/libgoquic.a(go_quic_per_connection_packet_writer.o): In function `base::Callback<void (net::WriteResult)>::~Callback()':
/home/hodduc/go/src/github.com/devsisters/goquic/libquic/src/base/callback.h:366: undefined reference to `base::internal::CallbackBase::~CallbackBase()'
src/github.com/devsisters/goquic/lib/linux_amd64/libgoquic.a(go_quic_per_connection_packet_writer.o): In function `base::Callback<void (net::WriteResult)>::Callback<base::internal::RunnableAdapter<void (net::tools::GoQuicPerConnectionPacketWriter::*)(net::WriteResult)>, void (net::tools::GoQuicPerConnectionPacketWriter*, net::WriteResult), base::internal::TypeList<base::WeakPtr<net::tools::GoQuicPerConnectionPacketWriter> > >(base::internal::BindState<base::internal::RunnableAdapter<void (net::tools::GoQuicPerConnectionPacketWriter::*)(net::WriteResult)>, void (net::tools::GoQuicPerConnectionPacketWriter*, net::WriteResult), base::internal::TypeList<base::WeakPtr<net::tools::GoQuicPerConnectionPacketWriter> > >*)':
/home/hodduc/go/src/github.com/devsisters/goquic/libquic/src/base/callback.h:377: undefined reference to `base::internal::CallbackBase::CallbackBase(base::internal::BindStateBase*)'
src/github.com/devsisters/goquic/lib/linux_amd64/libgoquic.a(go_quic_server_packet_writer.o): In function `net::tools::GoQuicServerPacketWriter::WritePacketWithCallback(char const*, unsigned long, std::vector<unsigned char, std::allocator<unsigned char> > const&, net::IPEndPoint const&, base::Callback<void (net::WriteResult)>)':
/home/hodduc/go/src/github.com/devsisters/goquic/src/go_quic_server_packet_writer.cc:42: undefined reference to `base::internal::CallbackBase::Reset()'
src/github.com/devsisters/goquic/lib/linux_amd64/libgoquic.a(go_quic_server_packet_writer.o): In function `base::Callback<void (net::WriteResult)>::operator=(base::Callback<void (net::WriteResult)> const&)':
/home/hodduc/go/src/github.com/devsisters/goquic/libquic/src/base/callback.h:366: undefined reference to `base::internal::CallbackBase::operator=(base::internal::CallbackBase const&)'
src/github.com/devsisters/goquic/lib/linux_amd64/libgoquic.a(go_quic_server_packet_writer.o): In function `base::Callback<void (net::WriteResult)>::Callback()':
/home/hodduc/go/src/github.com/devsisters/goquic/libquic/src/base/callback.h:370: undefined reference to `base::internal::CallbackBase::CallbackBase(base::internal::BindStateBase*)'
src/github.com/devsisters/goquic/lib/linux_amd64/libgoquic.a(go_quic_server_packet_writer.o): In function `base::Callback<void (net::WriteResult)>::Callback(base::Callback<void (net::WriteResult)> const&)':
/home/hodduc/go/src/github.com/devsisters/goquic/libquic/src/base/callback.h:366: undefined reference to `base::internal::CallbackBase::CallbackBase(base::internal::CallbackBase const&)'
src/github.com/devsisters/goquic/lib/linux_amd64/libgoquic.a(go_quic_server_packet_writer.o): In function `base::Callback<void (net::WriteResult)> base::ResetAndReturn<void (net::WriteResult)>(base::Callback<void (net::WriteResult)>*)':
/home/hodduc/go/src/github.com/devsisters/goquic/libquic/src/base/callback_helpers.h:26: undefined reference to `base::internal::CallbackBase::Reset()'
src/github.com/devsisters/goquic/lib/linux_amd64/libgoquic.a(go_quic_server_session.o): In function `net::tools::GoQuicServerSession::CreateQuicCryptoServerStream(net::QuicCryptoServerConfig const*)':
/home/hodduc/go/src/github.com/devsisters/goquic/src/go_quic_server_session.cc:42: undefined reference to `net::QuicCryptoServerStream::QuicCryptoServerStream(net::QuicCryptoServerConfig const*, net::QuicSession*)'
src/github.com/devsisters/goquic/lib/linux_amd64/libgoquic.a(go_quic_server_session.o): In function `net::tools::GoQuicServerSession::OnConfigNegotiated()':
/home/hodduc/go/src/github.com/devsisters/goquic/src/go_quic_server_session.cc:76: undefined reference to `FLAGS_enable_quic_fec'
src/github.com/devsisters/goquic/lib/linux_amd64/libgoquic.a(go_quic_server_session.o): In function `net::tools::GoQuicServerSession::OnConnectionClosed(net::QuicErrorCode, bool)':
/home/hodduc/go/src/github.com/devsisters/goquic/src/go_quic_server_session.cc:86: undefined reference to `net::QuicSession::OnConnectionClosed(net::QuicErrorCode, bool)'
src/github.com/devsisters/goquic/lib/linux_amd64/libgoquic.a(go_quic_server_session.o):(.rodata._ZTVN3net5tools19GoQuicServerSessionE[_ZTVN3net5tools19GoQuicServerSessionE]+0x98): undefined reference to `net::QuicSession::WritevData(unsigned int, net::QuicIOVector, unsigned long, bool, net::FecProtection, net::QuicAckListenerInterface*)'
src/github.com/devsisters/goquic/lib/linux_amd64/libgoquic.a(go_quic_server_session.o):(.rodata._ZTVN3net5tools19GoQuicServerSessionE[_ZTVN3net5tools19GoQuicServerSessionE]+0xe0): undefined reference to `net::QuicSession::GetNumOpenStreams() const'
src/github.com/devsisters/goquic/lib/linux_amd64/libgoquic.a(go_quic_server_session.o):(.rodata._ZTVN3net5tools19GoQuicServerSessionE[_ZTVN3net5tools19GoQuicServerSessionE]+0x128): undefined reference to `net::QuicSpdySession::OnStreamHeadersPriority(unsigned int, unsigned int)'
src/github.com/devsisters/goquic/lib/linux_amd64/libgoquic.a(go_quic_spdy_client_stream.o): In function `net::tools::GoQuicSpdyClientStream::OnStreamHeadersComplete(bool, unsigned long)':
/home/hodduc/go/src/github.com/devsisters/goquic/src/go_quic_spdy_client_stream.cc:44: undefined reference to `GoQuicSpdyClientStreamOnStreamHeadersComplete_C'
src/github.com/devsisters/goquic/lib/linux_amd64/libgoquic.a(go_quic_spdy_client_stream.o):(.rodata._ZTVN3net5tools22GoQuicSpdyClientStreamE[_ZTVN3net5tools22GoQuicSpdyClientStreamE]+0x40): undefined reference to `net::ReliableQuicStream::OnConnectionClosed(net::QuicErrorCode, bool)'
src/github.com/devsisters/goquic/lib/linux_amd64/libgoquic.a(go_quic_spdy_client_stream.o):(.rodata._ZTVN3net5tools22GoQuicSpdyClientStreamE[_ZTVN3net5tools22GoQuicSpdyClientStreamE]+0x58): undefined reference to `net::ReliableQuicStream::CloseConnection(net::QuicErrorCode)'
src/github.com/devsisters/goquic/lib/linux_amd64/libgoquic.a(go_quic_spdy_client_stream.o):(.rodata._ZTVN3net5tools22GoQuicSpdyClientStreamE[_ZTVN3net5tools22GoQuicSpdyClientStreamE]+0x68): undefined reference to `net::QuicSpdyStream::EffectivePriority() const'
src/github.com/devsisters/goquic/lib/linux_amd64/libgoquic.a(go_quic_spdy_client_stream.o):(.rodata._ZTVN3net5tools22GoQuicSpdyClientStreamE[_ZTVN3net5tools22GoQuicSpdyClientStreamE]+0x90): undefined reference to `net::QuicSpdyStream::OnStreamHeadersPriority(unsigned int)'
src/github.com/devsisters/goquic/lib/linux_amd64/libgoquic.a(go_quic_spdy_server_stream.o): In function `net::tools::GoQuicSpdyServerStream::OnStreamHeadersComplete(bool, unsigned long)':
/home/hodduc/go/src/github.com/devsisters/goquic/src/go_quic_spdy_server_stream.cc:27: undefined reference to `GoQuicSpdyServerStreamOnStreamHeadersComplete_C'
src/github.com/devsisters/goquic/lib/linux_amd64/libgoquic.a(go_quic_spdy_server_stream.o): In function `net::tools::GoQuicSpdyServerStream::OnDataAvailable()':
/home/hodduc/go/src/github.com/devsisters/goquic/src/go_quic_spdy_server_stream.cc:57: undefined reference to `GoQuicSpdyServerStreamOnDataAvailable_C'
src/github.com/devsisters/goquic/lib/linux_amd64/libgoquic.a(go_quic_spdy_server_stream.o): In function `net::tools::GoQuicSpdyServerStream::OnClose()':
/home/hodduc/go/src/github.com/devsisters/goquic/src/go_quic_spdy_server_stream.cc:68: undefined reference to `GoQuicSpdyServerStreamOnClose_C'
src/github.com/devsisters/goquic/lib/linux_amd64/libgoquic.a(go_quic_spdy_server_stream.o):(.rodata._ZTVN3net5tools22GoQuicSpdyServerStreamE[_ZTVN3net5tools22GoQuicSpdyServerStreamE]+0x40): undefined reference to `net::ReliableQuicStream::OnConnectionClosed(net::QuicErrorCode, bool)'
src/github.com/devsisters/goquic/lib/linux_amd64/libgoquic.a(go_quic_spdy_server_stream.o):(.rodata._ZTVN3net5tools22GoQuicSpdyServerStreamE[_ZTVN3net5tools22GoQuicSpdyServerStreamE]+0x58): undefined reference to `net::ReliableQuicStream::CloseConnection(net::QuicErrorCode)'
src/github.com/devsisters/goquic/lib/linux_amd64/libgoquic.a(go_quic_spdy_server_stream.o):(.rodata._ZTVN3net5tools22GoQuicSpdyServerStreamE[_ZTVN3net5tools22GoQuicSpdyServerStreamE]+0x68): undefined reference to `net::QuicSpdyStream::EffectivePriority() const'
src/github.com/devsisters/goquic/lib/linux_amd64/libgoquic.a(go_quic_spdy_server_stream.o):(.rodata._ZTVN3net5tools22GoQuicSpdyServerStreamE[_ZTVN3net5tools22GoQuicSpdyServerStreamE]+0x90): undefined reference to `net::QuicSpdyStream::OnStreamHeadersPriority(unsigned int)'
collect2: error: ld returned 1 exit status

Stream interface

Below HTTP, QUIC has a powerful stream muxer. It would be great to have access to this interface, and thus to have a Listen() (Conn, error) function much like quic.Dial. (Or is there a way to do this that I'm not seeing?)

Connecting to quic reverse proxy always requires 3-RTT

While trying out the quic reverse proxy, I found that the server always replies the my first CHLO with:

RREJ: SERVER_NONCE_REQUIRED_FAILURE

Then the client will send another two requests, making the entire connection establishment 3-RTT.

run build_lib.sh but got errors

./build_libs.sh
GOARCH: amd64
GOOS: darwin
OPTION:
-- The C compiler identification is AppleClang 7.3.0.7030031
-- The CXX compiler identification is AppleClang 7.3.0.7030031
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Setting build type to 'Debug' as none was specified.
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE
-- Found Protobuf: /usr/local/lib/libprotobuf.dylib (found suitable version "3.0.0", minimum required is "3")
-- Found Perl: /usr/bin/perl (found version "5.18.2")
-- The ASM compiler identification is Clang
-- Found assembler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/baoyangc/code/goprojs/src/github.com/devsisters/goquic/libquic/build/debug
/Users/baoyangc/code/goprojs/src/github.com/devsisters/goquic
ninja: Entering directory `libquic/build/debug'
[224/750] Linking CXX static library protobuf/libprotobuf.a
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: protobuf/libprotobuf.a(atomicops_internals_x86_gcc.cc.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: protobuf/libprotobuf.a(atomicops_internals_x86_msvc.cc.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: protobuf/libprotobuf.a(atomicops_internals_x86_gcc.cc.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: protobuf/libprotobuf.a(atomicops_internals_x86_msvc.cc.o) has no symbols
[351/750] Linking C static library boringssl/crypto/libcrypto.a
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: boringssl/crypto/libcrypto.a(poly1305.c.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: boringssl/crypto/libcrypto.a(poly1305_arm.c.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: boringssl/crypto/libcrypto.a(generic.c.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: boringssl/crypto/libcrypto.a(deterministic.c.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: boringssl/crypto/libcrypto.a(windows.c.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: boringssl/crypto/libcrypto.a(cpu-aarch64-linux.c.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: boringssl/crypto/libcrypto.a(cpu-arm.c.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: boringssl/crypto/libcrypto.a(cpu-arm-linux.c.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: boringssl/crypto/libcrypto.a(refcount_c11.c.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: boringssl/crypto/libcrypto.a(thread_none.c.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: boringssl/crypto/libcrypto.a(thread_win.c.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: boringssl/crypto/libcrypto.a(poly1305.c.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: boringssl/crypto/libcrypto.a(poly1305_arm.c.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: boringssl/crypto/libcrypto.a(generic.c.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: boringssl/crypto/libcrypto.a(deterministic.c.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: boringssl/crypto/libcrypto.a(windows.c.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: boringssl/crypto/libcrypto.a(cpu-aarch64-linux.c.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: boringssl/crypto/libcrypto.a(cpu-arm.c.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: boringssl/crypto/libcrypto.a(cpu-arm-linux.c.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: boringssl/crypto/libcrypto.a(refcount_c11.c.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: boringssl/crypto/libcrypto.a(thread_none.c.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: boringssl/crypto/libcrypto.a(thread_win.c.o) has no symbols
[607/750] Building CXX object CMakeFiles/quic.dir/src/base/sys_info_mac.mm.o
FAILED: CMakeFiles/quic.dir/src/base/sys_info_mac.mm.o
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -DUSE_OPENSSL -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -I../../src -I../../src/third_party/modp_b64 -I../../boringssl/include -I../../src/third_party/protobuf/src -I/src -Wall -fpic -std=gnu++11 -g -MD -MT CMakeFiles/quic.dir/src/base/sys_info_mac.mm.o -MF CMakeFiles/quic.dir/src/base/sys_info_mac.mm.o.d -o CMakeFiles/quic.dir/src/base/sys_info_mac.mm.o -c /Users/baoyangc/code/goprojs/src/github.com/devsisters/goquic/libquic/src/base/sys_info_mac.mm
In file included from /Users/baoyangc/code/goprojs/src/github.com/devsisters/goquic/libquic/src/base/sys_info_mac.mm:20:
../../src/base/mac/sdk_forward_declarations.h:249:11: error: unknown property attribute 'class'
@Property(class) BOOL allowsAutomaticWindowTabbing;
^
1 error generated.
[612/750] Building CXX object CMakeFil.../threading/thread_id_name_manager.cc.o
ninja: build stopped: subcommand failed.

Using GoQUIC by DPDK?

Hi, all. I have some questions about GoQUIC.

What the relationship between GoQUIC and UDP?

Does the GoQUIC repository contain UDP stack?

Can I get packets by DPDK and send these packets to GoQUIC?

Thanks~

build goquic failed

libquic/src/base/memory/weak_ptr.h:289:34: error: ‘base::WeakPtrFactory::WeakPtrFactory() [with T = net::GoQuicTimeWaitListManager]’ is private

gcc version 4.8.2 (GCC)
Linux version 2.6.32-279

Issues when running with -quic_only flag enabled

I am having trouble experimenting with goquic.

Basically, I have deployed the goquic server in a Docker container and I am running it with -d and --net=host flags.

The server is listening on localhost.
I have created the certificate according to this guide

If I run the server without the -quic_onlyflag, everything works fine and the web page is transferred over HTTP2. However, if I enable the -quic_onlyflag the QUIC server seems unreachable from Chrome.

I have tried the go client and everything works fine.

There seems to be some issue when interacting with Chrome.

Crash on go 1.6

GoQUIC is not currently not available in go 1.6. This is because of major change in go1.6. (https://tip.golang.org/doc/go1.6). Currently GoQuic's c-side structures retain and stores Go ptr, possibly causes a problem.

We have a plan to fix this by not retain Go ptr on cgo call, with a lot of changes. Meanwhile, disabling CGO check by setting the environment variable GODEBUG=cgocheck=0 should be work as a quick solution.

-test.* options in reverse_proxy's help

  -test.bench string
        regular expression to select benchmarks to run
  -test.benchmem
        print memory allocations for benchmarks
  -test.benchtime duration
        approximate run time for each benchmark (default 1s)
  -test.blockprofile string
        write a goroutine blocking profile to the named file after execution
  -test.blockprofilerate int
        if >= 0, calls runtime.SetBlockProfileRate() (default 1)
  -test.count n
        run tests and benchmarks n times (default 1)
  -test.coverprofile string
        write a coverage profile to the named file after execution
  -test.cpu string
        comma-separated list of number of CPUs to use for each test
  -test.cpuprofile string
        write a cpu profile to the named file during execution
  -test.memprofile string
        write a memory profile to the named file after execution
  -test.memprofilerate int
        if >=0, sets runtime.MemProfileRate
  -test.outputdir string
        directory in which to write profiles
  -test.parallel int
        maximum test parallelism (default 6)
  -test.run string
        regular expression to select tests and examples to run
  -test.short
        run smaller test suite to save time
  -test.timeout duration
        if positive, sets an aggregate time limit for all tests
  -test.trace string
        write an execution trace to the named file after execution
  -test.v
        verbose: print additional output

Supplied certificate is viewed as a directory

Hello,
I'm having trouble setting up Docker container, I always get error saying my certificate is a directory.
I checked but it is a normal file. I don't know weather it is my fault or not.

Thanks in advance

Docker version

Server:
 Version:      1.12.3
 API version:  1.24
 Go version:   go1.6.3
 Git commit:   6b644ec
 Built:        Wed Oct 26 21:45:16 2016
 OS/Arch:      linux/amd64

My config

docker run \
   -d --net="host" \
   -v /PATH/TO/CERT:/etc/letsencrypt/live/xxxxx.xxx/fullchain.pem \
   -v /PATH/TO/CERT_PRIVATE_KEY:/etc/letsencrypt/live/xxxxx.xxx/privkey.pem \
   --ulimit nofile=32768 devsisters/quic-reverse-proxy:releasemode \
      -cert=/etc/letsencrypt/live/xxxxx.xxx/fullchain.pem \
      -key=/etc/letsencrypt/live/xxxxx.xxx/privkey.pem \
      -addr=0.0.0.0 \
      -port=443 \
      -n=4 \
      -loglevel=2 \
      -- http://xxxxx.xxx:443

Log

root@node1 : ~ [0]# docker logs --follow xxxxxxxxxxxxxxxxxxxxxxxxxxxx
2016/11/21 13:28:26 About to listen on 0.0.0.0. Go to https://0.0.0.0:443/
2016/11/21 13:28:26 Starting reverse proxy for backend URL: http://xxxxx.xxx:443
2016/11/21 13:28:26 read /etc/letsencrypt/live/xxxxx.xxx/fullchain.pem: is a directory

Test that my certificate is really a file

root@node1 : ~ [0]# test -f /etc/letsencrypt/live/xxxxx.xxx/fullchain.pem
root@node1 : ~ [0]# test -d /etc/letsencrypt/live/xxxxx.xxx/fullchain.pem
root@node1 : ~ [1]# 

Issues with go build

When i run: go build /home/uber/gocode/src/github.com/devsisters/goquic/example/server.go

I get the following:

github.com/devsisters/goquic

./lib/linux_amd64/libquic.a(logging.cc.o): In function logging::(anonymous namespace)::TickCount()': ./libquic/build/debug/../../src/base/logging.cc:150: undefined reference toclock_gettime'
./lib/linux_amd64/libquic.a(time_posix.cc.o): In function (anonymous namespace)::ClockNow(int)': ./libquic/build/debug/../../src/base/time/time_posix.cc:98: undefined reference toclock_gettime'
collect2: error: ld returned 1 exit status

Thanks in advance,
Rajesh

Verify failedx509: certificate signed by unknown authority

I generated self-signed cert using openssl as given in this doc.

I use this to start the server:

./server -cert=server.crt -key=server.key

When I run the client I get an error:

[0224/165329:VERBOSE1:quic_crypto_client_stream.cc(413)] Reasons for rejection: 2048
2016/02/24 16:53:29 Verify failedx509: certificate signed by unknown authority

How do I make the client request work?

how to support 0-rtt at goquic's example

I have test goquic example(server and client), and i find it takes 2-rtt to fetch a page, my question is how to take 1-rtt to down a page, and connect cost 0-rtt, thanks a lot.

Problem when building

Hello,

I already tested your code a few months ago. I created a small code to build a "goquic" server. It worked without any issue.
Now, I come back to your code, and I get errors with go get github.com/devsisters/goquic
Here are errors:
/usr/bin/ld: ne peut trouver -lgoquic
/usr/bin/ld: ne peut trouver -lquic
/usr/bin/ld: ne peut trouver -lssl
/usr/bin/ld: ne peut trouver -lcrypto
/usr/bin/ld: ne peut trouver -lgoquic
/usr/bin/ld: ne peut trouver -lquic
/usr/bin/ld: ne peut trouver -lssl
/usr/bin/ld: ne peut trouver -lcrypto
/usr/bin/ld: ne peut trouver -lprotobuf
collect2: error: ld returned 1 exit status
(I am French, so errors are in French, so "ne peut trouver" means "does not find")

With my code and also with your example server.go in the folder examples, I get now these errors when compiling with: CGO_LDFLAGS="-L$GOPATH/src/github.com/devsisters/goquic/lib/linux_amd64" go build server.go

/tmp/go-build307624852/github.com/devsisters/goquic/_obj/dispatcher.cgo2.o: dans la fonction « _cgo_b3b031ad1652_Cfunc_quic_server_session_connection_stat »:
../github.com/devsisters/goquic/dispatcher.go:89: référence indéfinie vers « quic_server_session_connection_stat »
/tmp/go-build307624852/github.com/devsisters/goquic/_obj/quicstream_server.cgo2.o: dans la fonction « _cgo_b3b031ad1652_Cfunc_quic_simple_server_stream_write_headers »:
../github.com/devsisters/goquic/quicstream_server.go:37: référence indéfinie vers « quic_simple_server_stream_write_headers »
/tmp/go-build307624852/github.com/devsisters/goquic/_obj/quicstream_server.cgo2.o: dans la fonction « _cgo_b3b031ad1652_Cfunc_quic_simple_server_stream_write_or_buffer_data »:
../github.com/devsisters/goquic/quicstream_server.go:50: référence indéfinie vers « quic_simple_server_stream_write_or_buffer_data »
../github.com/devsisters/goquic/lib/linux_amd64/libgoquic.a(go_quic_spdy_client_stream.o): dans la fonction « net::tools::GoQuicSpdyClientStream::OnStreamHeadersComplete(bool, unsigned long) »:
/home/hodduc/go/src/github.com/devsisters/goquic/src/go_quic_spdy_client_stream.cc:44: référence indéfinie vers « GoQuicSpdyClientStreamOnStreamHeadersComplete_C »
../github.com/devsisters/goquic/lib/linux_amd64/libgoquic.a(go_quic_spdy_server_stream.o): dans la fonction « net::tools::GoQuicSpdyServerStream::OnStreamHeadersComplete(bool, unsigned long) »:
/home/hodduc/go/src/github.com/devsisters/goquic/src/go_quic_spdy_server_stream.cc:27: référence indéfinie vers « GoQuicSpdyServerStreamOnStreamHeadersComplete_C »
../github.com/devsisters/goquic/lib/linux_amd64/libgoquic.a(go_quic_spdy_server_stream.o): dans la fonction « net::tools::GoQuicSpdyServerStream::OnDataAvailable() »:
/home/hodduc/go/src/github.com/devsisters/goquic/src/go_quic_spdy_server_stream.cc:57: référence indéfinie vers « GoQuicSpdyServerStreamOnDataAvailable_C »
../github.com/devsisters/goquic/lib/linux_amd64/libgoquic.a(go_quic_spdy_server_stream.o): dans la fonction « net::tools::GoQuicSpdyServerStream::OnClose() »:
/home/hodduc/go/src/github.com/devsisters/goquic/src/go_quic_spdy_server_stream.cc:68: référence indéfinie vers « GoQuicSpdyServerStreamOnClose_C »
collect2: error: ld returned 1 exit status

Please, could you help me to find out how to use goquic ?

Thanks a lot in advance

some opnion...

1.how about reuse port and multiprocessing same port by cpu core instead of using a multi channel?
2.maybe extend ephemeral_key_source.h for use key cache, then possible more tps(rps) and no crash...

Reverse proxy for proxy

Hi, I use reverse proxy tool to make a QUIC proxy for Chrome, it's reverse_proxy+squid, but it doesn't work, is it possible to do this?

./build_libs.sh issue with protobuf

Hello,

When I run GOQUIC_BUILD=Release ./build_libs.sh, I get an error with protobuf:

ninja: Entering directory `libquic/build/release'
[7/728] Building CXX object CMakeFiles/quic.dir/src/net/quic/proto/source_address_token.pb.cc.o
FAILED: CMakeFiles/quic.dir/src/net/quic/proto/source_address_token.pb.cc.o 
/usr/bin/c++   -DUSE_OPENSSL -I../../src -I../../src/third_party/modp_b64 -I../../boringssl/include -I../../src/third_party/protobuf/src -Wall -fpic -std=gnu++11 -DNDEBUG -O3 -DNDEBUG -MMD -MT CMakeFiles/quic.dir/src/net/quic/proto/source_address_token.pb.cc.o -MF CMakeFiles/quic.dir/src/net/quic/proto/source_address_token.pb.cc.o.d -o CMakeFiles/quic.dir/src/net/quic/proto/source_address_token.pb.cc.o -c ../../src/net/quic/proto/source_address_token.pb.cc
../../src/net/quic/proto/source_address_token.pb.cc: In member function ‘void net::SourceAddressToken::MergeFrom(const net::SourceAddressToken&)’:
../../src/net/quic/proto/source_address_token.pb.cc:328:5: error: ‘MergeFromFail’ is not a member of ‘google::protobuf::internal’
     ::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__);

I'm using protobuf from google (https://github.com/google/protobuf). Could you help me to overcome this issue ?
Thanks.

build issue on Ubuntu 14.04

I try to build gobuic on ubuntu 14.04 x64. cmake and ninja are installed.
When build binaries with ./build_libs.sh, come up with the following error:

./build_libs.sh
GOARCH: amd64
GOOS: linux
OPTION:
-- The C compiler identification is GNU 4.8.2
-- The CXX compiler identification is GNU 4.8.2
-- Check for working C compiler using: Ninja
-- Check for working C compiler using: Ninja -- broken
CMake Error at /usr/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:61 (message):
  The C compiler "/usr/bin/cc" is not able to compile a simple test program.

  It fails with the following output:

   Change Dir: /go/src/github.com/devsisters/goquic/libquic/build/CMakeFiles/CMakeTmp



  Run Build Command:/usr/sbin/ninja cmTryCompileExec758890250

  die: error: unable to read configuration filelog: reading configuration
  file: cmTryCompileExec758890250







  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:3 (project)


-- Configuring incomplete, errors occurred!
See also "/go/src/github.com/devsisters/goquic/libquic/build/CMakeFiles/CMakeOutput.log".
See also "/go/src/github.com/devsisters/goquic/libquic/build/CMakeFiles/CMakeError.log".

Add Support for Read/Write streaming

Known Issues: "No support for read streaming. All request must fit in memory."

Is read streaming going to be supported in the near future?
Otherwise, can you provide any insights on how to do this and any challenges that you may have identified?

Build error

Hello,

I tried your package but I block at the "go get github.com/devsisters/goquic" call.

It respond to me:

$ go get github.com/devsisters/goquic
# github.com/devsisters/goquic
progSolo/proto/src/github.com/devsisters/goquic/init.go:6:28: fatal error: openssl/thread.h: No such file or directory
 #include <openssl/thread.h>
                            ^
compilation terminated.

How can I solve this?

I'm on:

  • Ubuntu 14.04 64 bit
  • Kernel 3.13

QUIC indicator not showing up

Hi,

I wanted to set up a working QUIC server and client system working. I have used this repository's server as my QUIC server, bootstrapping it over a SimpleHTTPServer in Python. As far as the client is concerned, I am using Chrome, having enabled its QUIC setting. However, when I run the server, the log still says H2, or HTTP 2.0. Thus, I have a few questions:

  1. Is there any extra setting from the server or the client side that is required to use the devsister's QUIC server with either of the QUIC enabled client browsers [i.e. Chrome/Opera]?
  2. Is there some other packet that we need to look out for?

I must thank you for your repository, and your blog. It was quite insightful! Hoping to obtain some fruitful discussions from the above questions.

Thanking you,
With Best Regards
anirudt

Does goquic support multiple threads/processes on server side?

If goquic support multiple threads/processes, is the connection id table is global on server side?
If 2 clients use same connection id, how does the server identify it?
Also if thread1 process part of a http request, how does server guarantee the remaining request also is delivered to the same thread(thread1)? 

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.