From 94ca96faf1102f6fcdec3781395838132a4897a4 Mon Sep 17 00:00:00 2001 From: Vinicius Fortuna Date: Wed, 25 Oct 2023 21:35:46 -0400 Subject: [PATCH] Add Test --- transport/tls/stream_dialer_test.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/transport/tls/stream_dialer_test.go b/transport/tls/stream_dialer_test.go index e5b8f263..63152144 100644 --- a/transport/tls/stream_dialer_test.go +++ b/transport/tls/stream_dialer_test.go @@ -15,11 +15,20 @@ package tls import ( + "context" "testing" + "github.com/Jigsaw-Code/outline-sdk/transport" "github.com/stretchr/testify/require" ) +func TestDomainFronting(t *testing.T) { + sd := StreamDialer{Dialer: &transport.TCPStreamDialer{}, Options: []ClientOption{WithSNI("www.youtube.com")}} + conn, err := sd.Dial(context.Background(), "www.google.com:443") + require.NoError(t, err) + conn.Close() +} + func TestWithSNI(t *testing.T) { var cfg clientConfig WithSNI("example.com")("", 0, &cfg)