Skip to content

Commit

Permalink
Add Test
Browse files Browse the repository at this point in the history
  • Loading branch information
fortuna committed Oct 26, 2023
1 parent d6c5c31 commit 94ca96f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions transport/tls/stream_dialer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 94ca96f

Please sign in to comment.