Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/web/html
diff options
context:
space:
mode:
authorMHSanaei <ho3ein.sanaei@gmail.com>2023-08-26 15:09:18 +0300
committerMHSanaei <ho3ein.sanaei@gmail.com>2023-08-26 15:09:18 +0300
commitfe22cbd0e5a87da4c99a2bd075d6858f74da98cc (patch)
tree4046a61ab160fed2269850a0463496d02a2e899b /web/html
parent1277285d0835fdf2f2184f067140e2390fa083bb (diff)
Transparent Proxy with sockopt Stream Setting
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
Diffstat (limited to 'web/html')
-rw-r--r--web/html/xui/form/stream/stream_grpc.html4
-rw-r--r--web/html/xui/form/stream/stream_http.html4
-rw-r--r--web/html/xui/form/stream/stream_settings.html5
-rw-r--r--web/html/xui/form/stream/stream_sockopt.html48
4 files changed, 53 insertions, 8 deletions
diff --git a/web/html/xui/form/stream/stream_grpc.html b/web/html/xui/form/stream/stream_grpc.html
index 1ee57bbf..21c95f99 100644
--- a/web/html/xui/form/stream/stream_grpc.html
+++ b/web/html/xui/form/stream/stream_grpc.html
@@ -1,9 +1,5 @@
{{define "form/streamGRPC"}}
<a-form layout="inline">
- <a-form-item label="AcceptProxyProtocol">
- <a-switch v-model="inbound.stream.sockopt.acceptProxyProtocol"></a-switch>
- </a-form-item>
- <br>
<a-form-item label="ServiceName">
<a-input v-model.trim="inbound.stream.grpc.serviceName"></a-input>
</a-form-item>
diff --git a/web/html/xui/form/stream/stream_http.html b/web/html/xui/form/stream/stream_http.html
index e80eef0f..57574ce5 100644
--- a/web/html/xui/form/stream/stream_http.html
+++ b/web/html/xui/form/stream/stream_http.html
@@ -1,9 +1,5 @@
{{define "form/streamHTTP"}}
<a-form layout="inline">
- <a-form-item label="AcceptProxyProtocol">
- <a-switch v-model="inbound.stream.sockopt.acceptProxyProtocol"></a-switch>
- </a-form-item>
- <br>
<a-form-item label='{{ i18n "path" }}'>
<a-input v-model.trim="inbound.stream.http.path"></a-input>
</a-form-item>
diff --git a/web/html/xui/form/stream/stream_settings.html b/web/html/xui/form/stream/stream_settings.html
index 4a07947e..e50caf19 100644
--- a/web/html/xui/form/stream/stream_settings.html
+++ b/web/html/xui/form/stream/stream_settings.html
@@ -42,4 +42,9 @@
<template v-if="inbound.stream.network === 'grpc'">
{{template "form/streamGRPC"}}
</template>
+
+<!-- sockopt -->
+<template>
+ {{template "form/streamSockopt"}}
+</template>
{{end}} \ No newline at end of file
diff --git a/web/html/xui/form/stream/stream_sockopt.html b/web/html/xui/form/stream/stream_sockopt.html
new file mode 100644
index 00000000..d4019054
--- /dev/null
+++ b/web/html/xui/form/stream/stream_sockopt.html
@@ -0,0 +1,48 @@
+{{define "form/streamSockopt"}}
+<a-form layout="inline">
+ <a-divider dashed style="margin:0;">
+ <a-form-item label="Transparent Proxy">
+ <a-switch v-model="inbound.stream.sockoptSwitch"></a-switch>
+ </a-form-item>
+ </a-divider>
+ <table width="100%" class="ant-table-tbody" v-if="inbound.stream.sockoptSwitch">
+ <tr>
+ <td>Accept Proxy Protocol</td>
+ <td>
+ <a-form-item>
+ <a-switch v-model="inbound.stream.sockopt.acceptProxyProtocol"></a-switch>
+ </a-form-item>
+ </td>
+ </tr>
+ <tr>
+ <td>TCP FastOpen</td>
+ <td>
+ <a-form-item>
+ <a-switch v-model.trim="inbound.stream.sockopt.tcpFastOpen"></a-switch>
+ </a-form-item>
+ </td>
+ </tr>
+ <tr>
+ <td>Route Mark</td>
+ <td>
+ <a-form-item>
+ <a-input-number v-model="inbound.stream.sockopt.mark" :min="0"></a-input-number>
+ </a-form-item>
+ </td>
+ </tr>
+ <tr>
+ <td>T-Proxy</td>
+ <td>
+ <a-form-item>
+ <a-select v-model="inbound.stream.sockopt.tproxy" style="width: 250px;"
+ :dropdown-class-name="themeSwitcher.darkCardClass">
+ <a-select-option value="off">OFF</a-select-option>
+ <a-select-option value="redirect">Redirect</a-select-option>
+ <a-select-option value="tproxy">T-Proxy</a-select-option>
+ </a-select>
+ </a-form-item>
+ </td>
+ </tr>
+ </table>
+</a-form>
+{{end}} \ No newline at end of file