@@ -86,6 +86,16 @@ const MODE_OPTION = {
86
86
STREAM_ONE : "stream-one" ,
87
87
} ;
88
88
89
+ const Address_Port_Strategy = {
90
+ NONE : "none" ,
91
+ SrvPortOnly : "srvportonly" ,
92
+ SrvAddressOnly : "srvaddressonly" ,
93
+ SrvPortAndAddress : "srvportandaddress" ,
94
+ TxtPortOnly : "txtportonly" ,
95
+ TxtAddressOnly : "txtaddressonly" ,
96
+ TxtPortAndAddress : "txtportandaddress"
97
+ } ;
98
+
89
99
Object . freeze ( Protocols ) ;
90
100
Object . freeze ( SSMethods ) ;
91
101
Object . freeze ( TLS_FLOW_CONTROL ) ;
@@ -95,7 +105,7 @@ Object.freeze(OutboundDomainStrategies);
95
105
Object . freeze ( WireguardDomainStrategy ) ;
96
106
Object . freeze ( USERS_SECURITY ) ;
97
107
Object . freeze ( MODE_OPTION ) ;
98
-
108
+ Object . freeze ( Address_Port_Strategy ) ;
99
109
100
110
class CommonClass {
101
111
@@ -412,14 +422,16 @@ class SockoptStreamSettings extends CommonClass {
412
422
tcpFastOpen = false ,
413
423
tcpKeepAliveInterval = 0 ,
414
424
tcpMptcp = false ,
415
- penetrate = false
425
+ penetrate = false ,
426
+ addressPortStrategy = Address_Port_Strategy . NONE ,
416
427
) {
417
428
super ( ) ;
418
429
this . dialerProxy = dialerProxy ;
419
430
this . tcpFastOpen = tcpFastOpen ;
420
431
this . tcpKeepAliveInterval = tcpKeepAliveInterval ;
421
432
this . tcpMptcp = tcpMptcp ;
422
433
this . penetrate = penetrate ;
434
+ this . addressPortStrategy = addressPortStrategy ;
423
435
}
424
436
425
437
static fromJson ( json = { } ) {
@@ -430,6 +442,7 @@ class SockoptStreamSettings extends CommonClass {
430
442
json . tcpKeepAliveInterval ,
431
443
json . tcpMptcp ,
432
444
json . penetrate ,
445
+ json . addressPortStrategy
433
446
) ;
434
447
}
435
448
@@ -440,6 +453,7 @@ class SockoptStreamSettings extends CommonClass {
440
453
tcpKeepAliveInterval : this . tcpKeepAliveInterval ,
441
454
tcpMptcp : this . tcpMptcp ,
442
455
penetrate : this . penetrate ,
456
+ addressPortStrategy : this . addressPortStrategy
443
457
} ;
444
458
}
445
459
}
0 commit comments