Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

connectivity between mvfst and quic-go #205

Closed
giantpoplar opened this issue Mar 26, 2021 · 3 comments
Closed

connectivity between mvfst and quic-go #205

giantpoplar opened this issue Mar 26, 2021 · 3 comments

Comments

@giantpoplar
Copy link

Hi,

We use quic-go to start a server and want to use mvfst work as a client. The quic-go server is started as follows:

listener, err := quic.ListenAddr("0.0.0.0:9000", generateTLSConfig(), nil)
func generateTLSConfig() *tls.Config {
	key, err := rsa.GenerateKey(rand.Reader, 1024)
	if err != nil {
		panic(err)
	}
	template := x509.Certificate{SerialNumber: big.NewInt(1)}
	certDER, err := x509.CreateCertificate(rand.Reader, &template, &template, &key.PublicKey, key)
	if err != nil {
		panic(err)
	}
	keyPEM := pem.EncodeToMemory(&pem.Block{Type: "RSA PRIVATE KEY", Bytes: x509.MarshalPKCS1PrivateKey(key)})
	certPEM := pem.EncodeToMemory(&pem.Block{Type: "CERTIFICATE", Bytes: certDER})

	tlsCert, err := tls.X509KeyPair(certPEM, keyPEM)
	if err != nil {
		panic(err)
	}
	return &tls.Config{
		Certificates: []tls.Certificate{tlsCert},
		NextProtos:   []string{"quic-freetalk"},
	}
}

Then we run the mvfst EchoClient as follows:

./_build/build/quic/samples/echo -mode=client -host=127.0.0.1 -port=9000

However, the following error info is printed:

I0326 15:20:23.815001 147673088 EchoClient.h:130] EchoClient connecting to 127.0.0.1:9000
E0326 15:20:23.816485 147673088 EchoClient.h:85] EchoClient error: Connection abandoned

So how can we config mvfst to establish a connection to quic-go? I can do this by using pure golang client:

tlsConf := &tls.Config{
  InsecureSkipVerify: true,
  NextProtos:         []string{"quic-freetalk"},
}
session, err := quic.DialAddr("127.0.0.1:9000", tlsConf, nil)

How can we adapt this to mvfst?

Best regards

@yangchi
Copy link
Contributor

yangchi commented Mar 26, 2021

Can you run it with "-v=4" and give us the log? Thanks.

facebook-github-bot pushed a commit that referenced this issue Mar 26, 2021
Summary: for #205

Reviewed By: lnicco

Differential Revision: D27362299

fbshipit-source-id: f34e7e43f9e5dfc8d6d4786d9b409ec75f72754f
@yangchi
Copy link
Contributor

yangchi commented Mar 26, 2021

Also if you rebase past eaf764b, we can see if this is write error or version negotiation. Those are the 2 possibilities of connection abandon i'm aware of.

@yangchi
Copy link
Contributor

yangchi commented Apr 8, 2021

I'm closing this due to lack of activity for 2 weeks. Feel free to open if you have more logs you can collect as i stated before. Thanks.

@yangchi yangchi closed this as completed Apr 8, 2021
dgrnbrg-meta added a commit to dgrnbrg-meta/mvfst that referenced this issue Mar 11, 2022
Summary:
X-link: facebook/wangle#205

X-link: facebook/proxygen#401

X-link: facebook/openr#129

X-link: facebookarchive/fbzmq#35

X-link: facebook/fb303#26

X-link: facebookarchive/bistro#59

X-link: facebook/folly#1734

X-link: facebook/fboss#113

Adds an environment variable to getdeps to provide `hg` info to avoid calling `hg` directly.

When using `getdeps` inside a containerized environment (which we need to build Research Super Cluster tooling with the correct linker attributes), `getdeps` fails because of unregistered mercurial extensions in the `hgrc`.

This allows `getdeps` to be useable in an environment where the mercurial extensions used in a project aren't installed/available.

Reviewed By: vivekspai

Differential Revision: D34732506

fbshipit-source-id: bd6e4b0e869a28c405a2903333f3151420617c5d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants