File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
local_packages/flutter_v2ray/lib/url Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -127,6 +127,8 @@ abstract class V2RayURL {
127127 "realitySettings" : null ,
128128 "grpcSettings" : null ,
129129 "dsSettings" : null ,
130+ "httpupgradeSettings" : null ,
131+ "xhttpSettings" : null ,
130132 "sockopt" : null
131133 };
132134
@@ -226,6 +228,26 @@ abstract class V2RayURL {
226228 "multiMode" : mode == "multi" ,
227229 };
228230 sni = host ?? "" ;
231+ } else if (transport == 'httpupgrade' ) {
232+ streamSetting['httpupgradeSettings' ] = {
233+ "path" : path ?? "/" ,
234+ "host" : host ?? "" ,
235+ "headers" : {
236+ "Host" : host ?? "" ,
237+ },
238+ };
239+ sni = host ?? "" ;
240+ } else if (transport == 'xhttp' ) {
241+ streamSetting['xhttpSettings' ] = {
242+ "path" : path ?? "/" ,
243+ "host" : host ?? "" ,
244+ "headers" : {
245+ "Host" : host ?? "" ,
246+ },
247+ "mode" : mode ?? "auto" ,
248+ "extra" : {},
249+ };
250+ sni = host ?? "" ;
229251 }
230252 return sni;
231253 }
You can’t perform that action at this time.
0 commit comments