tcpNoDelay to penetrate

This commit is contained in:
mhsanaei
2025-01-01 18:57:56 +01:00
parent 33d7154a67
commit ae37131b4b
4 changed files with 8 additions and 8 deletions

View File

@@ -217,7 +217,7 @@ func (s *SubJsonService) streamData(stream string) map[string]interface{} {
delete(streamSettings, "sockopt")
if s.fragment != "" {
streamSettings["sockopt"] = json_util.RawMessage(`{"dialerProxy": "fragment", "tcpKeepAliveIdle": 100, "tcpNoDelay": true}`)
streamSettings["sockopt"] = json_util.RawMessage(`{"dialerProxy": "fragment", "tcpKeepAliveIdle": 100, "penetrate": true}`)
}
// remove proxy protocol

View File

@@ -373,12 +373,12 @@ class RealityStreamSettings extends CommonClass {
};
class SockoptStreamSettings extends CommonClass {
constructor(dialerProxy = "", tcpFastOpen = false, tcpKeepAliveInterval = 0, tcpNoDelay = false) {
constructor(dialerProxy = "", tcpFastOpen = false, tcpKeepAliveInterval = 0, penetrate = false) {
super();
this.dialerProxy = dialerProxy;
this.tcpFastOpen = tcpFastOpen;
this.tcpKeepAliveInterval = tcpKeepAliveInterval;
this.tcpNoDelay = tcpNoDelay;
this.penetrate = penetrate;
}
static fromJson(json = {}) {
@@ -387,7 +387,7 @@ class SockoptStreamSettings extends CommonClass {
json.dialerProxy,
json.tcpFastOpen,
json.tcpKeepAliveInterval,
json.tcpNoDelay,
json.penetrate,
);
}
@@ -396,7 +396,7 @@ class SockoptStreamSettings extends CommonClass {
dialerProxy: this.dialerProxy,
tcpFastOpen: this.tcpFastOpen,
tcpKeepAliveInterval: this.tcpKeepAliveInterval,
tcpNoDelay: this.tcpNoDelay,
penetrate: this.penetrate,
};
}
}

View File

@@ -466,8 +466,8 @@
<a-form-item label="Keep Alive Interval">
<a-input-number v-model="outbound.stream.sockopt.tcpKeepAliveInterval" :min="0"></a-input-number>
</a-form-item>
<a-form-item label="TCP No-Delay">
<a-switch v-model="outbound.stream.sockopt.tcpNoDelay"></a-switch>
<a-form-item label="Penetrate">
<a-switch v-model="outbound.stream.sockopt.penetrate"></a-switch>
</a-form-item>
</template>

View File

@@ -459,7 +459,7 @@
streamSettings: {
sockopt: {
tcpKeepAliveIdle: 100,
tcpNoDelay: true
penetrate: true
}
}
},