File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ class QUICClient {
4040 * @param opts
4141 * @param opts.host - target host where wildcards are resolved to point locally.
4242 * @param opts.port - target port
43+ * @param opts.serverName - The expected name of the server you are connecting to, defaults to host.
4344 * @param opts.localHost - defaults to `::` (dual-stack)
4445 * @param opts.localPort - defaults 0
4546 * @param opts.socket - optional shared QUICSocket
@@ -63,6 +64,7 @@ class QUICClient {
6364 opts : {
6465 host : string ;
6566 port : number ;
67+ serverName ?: string ;
6668 localHost ?: string ;
6769 localPort ?: number ;
6870 crypto : QUICClientCrypto ;
@@ -80,6 +82,7 @@ class QUICClient {
8082 opts : {
8183 host : string ;
8284 port : number ;
85+ serverName ?: string ;
8386 socket : QUICSocket ;
8487 crypto : QUICClientCrypto ;
8588 config ?: QUICClientConfigInput ;
@@ -96,6 +99,7 @@ class QUICClient {
9699 {
97100 host,
98101 port,
102+ serverName,
99103 localHost = '::' ,
100104 localPort = 0 ,
101105 socket,
@@ -110,6 +114,7 @@ class QUICClient {
110114 } : {
111115 host : string ;
112116 port : number ;
117+ serverName ?: string ;
113118 localHost ?: string ;
114119 localPort ?: number ;
115120 socket ?: QUICSocket ;
@@ -186,7 +191,7 @@ class QUICClient {
186191 connection = new QUICConnection ( {
187192 type : 'client' ,
188193 scid,
189- serverName : host ,
194+ serverName : serverName ?? host ,
190195 socket,
191196 remoteInfo : {
192197 host : host_ ,
You can’t perform that action at this time.
0 commit comments