Skip to content

Commit 9bc5c1d

Browse files
committed
tcpNoDelay to penetrate
1 parent 26a7700 commit 9bc5c1d

File tree

6 files changed

+16
-16
lines changed

6 files changed

+16
-16
lines changed

sub/subJsonService.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ type SubJsonService struct {
2121
configJson map[string]interface{}
2222
defaultOutbounds []json_util.RawMessage
2323
fragment string
24-
noises string
24+
noises string
2525
mux string
2626

2727
inboundService service.InboundService
@@ -61,7 +61,7 @@ func NewSubJsonService(fragment string, noises string, mux string, rules string,
6161
configJson: configJson,
6262
defaultOutbounds: defaultOutbounds,
6363
fragment: fragment,
64-
noises: noises,
64+
noises: noises,
6565
mux: mux,
6666
SubService: subService,
6767
}
@@ -217,7 +217,7 @@ func (s *SubJsonService) streamData(stream string) map[string]interface{} {
217217
delete(streamSettings, "sockopt")
218218

219219
if s.fragment != "" {
220-
streamSettings["sockopt"] = json_util.RawMessage(`{"dialerProxy": "fragment", "tcpKeepAliveIdle": 100, "tcpMptcp": true, "tcpNoDelay": true}`)
220+
streamSettings["sockopt"] = json_util.RawMessage(`{"dialerProxy": "fragment", "tcpKeepAliveIdle": 100, "tcpMptcp": true, "penetrate": true}`)
221221
}
222222

223223
// remove proxy protocol

web/assets/js/model/inbound.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -816,7 +816,7 @@ class SockoptStreamSettings extends XrayCommonClass {
816816
mark = 0,
817817
tproxy = "off",
818818
tcpMptcp = false,
819-
tcpNoDelay = false,
819+
penetrate = false,
820820
domainStrategy = DOMAIN_STRATEGY_OPTION.USE_IP,
821821
tcpMaxSeg = 1440,
822822
dialerProxy = "",
@@ -834,7 +834,7 @@ class SockoptStreamSettings extends XrayCommonClass {
834834
this.mark = mark;
835835
this.tproxy = tproxy;
836836
this.tcpMptcp = tcpMptcp;
837-
this.tcpNoDelay = tcpNoDelay;
837+
this.penetrate = penetrate;
838838
this.domainStrategy = domainStrategy;
839839
this.tcpMaxSeg = tcpMaxSeg;
840840
this.dialerProxy = dialerProxy;
@@ -855,7 +855,7 @@ class SockoptStreamSettings extends XrayCommonClass {
855855
json.mark,
856856
json.tproxy,
857857
json.tcpMptcp,
858-
json.tcpNoDelay,
858+
json.penetrate,
859859
json.domainStrategy,
860860
json.tcpMaxSeg,
861861
json.dialerProxy,
@@ -876,7 +876,7 @@ class SockoptStreamSettings extends XrayCommonClass {
876876
mark: this.mark,
877877
tproxy: this.tproxy,
878878
tcpMptcp: this.tcpMptcp,
879-
tcpNoDelay: this.tcpNoDelay,
879+
penetrate: this.penetrate,
880880
domainStrategy: this.domainStrategy,
881881
tcpMaxSeg: this.tcpMaxSeg,
882882
dialerProxy: this.dialerProxy,

web/assets/js/model/outbound.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -411,14 +411,14 @@ class SockoptStreamSettings extends CommonClass {
411411
tcpFastOpen = false,
412412
tcpKeepAliveInterval = 0,
413413
tcpMptcp = false,
414-
tcpNoDelay = false
414+
penetrate = false
415415
) {
416416
super();
417417
this.dialerProxy = dialerProxy;
418418
this.tcpFastOpen = tcpFastOpen;
419419
this.tcpKeepAliveInterval = tcpKeepAliveInterval;
420420
this.tcpMptcp = tcpMptcp;
421-
this.tcpNoDelay = tcpNoDelay;
421+
this.penetrate = penetrate;
422422
}
423423

424424
static fromJson(json = {}) {
@@ -428,7 +428,7 @@ class SockoptStreamSettings extends CommonClass {
428428
json.tcpFastOpen,
429429
json.tcpKeepAliveInterval,
430430
json.tcpMptcp,
431-
json.tcpNoDelay,
431+
json.penetrate,
432432
);
433433
}
434434

@@ -438,7 +438,7 @@ class SockoptStreamSettings extends CommonClass {
438438
tcpFastOpen: this.tcpFastOpen,
439439
tcpKeepAliveInterval: this.tcpKeepAliveInterval,
440440
tcpMptcp: this.tcpMptcp,
441-
tcpNoDelay: this.tcpNoDelay,
441+
penetrate: this.penetrate,
442442
};
443443
}
444444
}

web/html/xui/form/outbound.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -474,8 +474,8 @@
474474
<a-form-item label="Multipath TCP">
475475
<a-switch v-model.trim="outbound.stream.sockopt.tcpMptcp"></a-switch>
476476
</a-form-item>
477-
<a-form-item label="TCP No-Delay" v-if="outbound.stream.sockopt.tcpMptcp">
478-
<a-switch v-model="outbound.stream.sockopt.tcpNoDelay"></a-switch>
477+
<a-form-item label="Penetrate">
478+
<a-switch v-model="outbound.stream.sockopt.penetrate"></a-switch>
479479
</a-form-item>
480480
</template>
481481

web/html/xui/form/stream/stream_sockopt.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
<a-form-item label="Multipath TCP">
3333
<a-switch v-model.trim="inbound.stream.sockopt.tcpMptcp"></a-switch>
3434
</a-form-item>
35-
<a-form-item label="TCP No-Delay" v-if="inbound.stream.sockopt.tcpMptcp">
36-
<a-switch v-model.trim="inbound.stream.sockopt.tcpNoDelay"></a-switch>
35+
<a-form-item label="Penetrate">
36+
<a-switch v-model.trim="inbound.stream.sockopt.penetrate"></a-switch>
3737
</a-form-item>
3838
<a-form-item label="V6 Only">
3939
<a-switch v-model.trim="inbound.stream.sockopt.V6Only"></a-switch>

web/html/xui/settings.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@
439439
sockopt: {
440440
tcpKeepAliveIdle: 100,
441441
tcpMptcp: true,
442-
tcpNoDelay: true
442+
penetrate: true
443443
}
444444
}
445445
},

0 commit comments

Comments
 (0)