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

outbound.html « form « xui « html « web - github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 590a1a93b014d28c4043fc7337f9cba279239a0b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
{{define "form/outbound"}}
<!-- base -->
<a-tabs :active-key="outModal.activeKey"  style="padding: 0; background-color: transparent;" @change="(activeKey) => {outModal.toggleJson(activeKey == '2'); }">
<a-tab-pane key="1" tab="Form">
<a-form :colon="false" :label-col="{ md: {span:8} }" :wrapper-col="{ md: {span:14} }">
        <a-form-item label='{{ i18n "protocol" }}'>
            <a-select v-model="outbound.protocol" :dropdown-class-name="themeSwitcher.currentTheme">
                <a-select-option v-for="x,y in Protocols" :value="x">[[ y ]]</a-select-option>
            </a-select>
        </a-form-item>
        <a-form-item label='{{ i18n "pages.xray.outbound.tag" }}' has-feedback :validate-status="outModal.duplicateTag? 'warning' : 'success'">
            <a-input v-model.trim="outbound.tag" @change="outModal.check()" placeholder='{{ i18n "pages.xray.outbound.tagDesc" }}'></a-input>
        </a-form-item>

<!-- freedom settings-->
<template v-if="outbound.protocol === Protocols.Freedom">
        <a-form-item label='Strategy'>
            <a-select
            v-model="outbound.settings.domainStrategy"
            :dropdown-class-name="themeSwitcher.currentTheme">
                <a-select-option v-for="s in outboundDomainStrategies" :value="s">[[ s ]]</a-select-option>
            </a-select>
        </a-form-item>
        <a-form-item label='Fragment'>
            <a-switch
                :checked="Object.keys(outbound.settings.fragment).length >0"
                @change="checked => outbound.settings.fragment = checked ? new Outbound.FreedomSettings.Fragment() : {}">
            </a-switch>
        </a-form-item>
    <template v-if="Object.keys(outbound.settings.fragment).length >0">
        <a-form-item label='Packets'>
            <a-select
            v-model="outbound.settings.fragment.packets"
            :dropdown-class-name="themeSwitcher.currentTheme">
                <a-select-option v-for="s in ['1-3','tlshello']" :value="s">[[ s ]]</a-select-option>
            </a-select>
        </a-form-item>
        <a-form-item label='Length'>
            <a-input v-model.trim="outbound.settings.fragment.length"></a-input>
        </a-form-item>
        <a-form-item label='Interval'>
            <a-input v-model.trim="outbound.settings.fragment.interval"></a-input>
        </a-form-item>
    </template>
</template>

<!-- blackhole settings -->
<template v-if="outbound.protocol === Protocols.Blackhole">
        <a-form-item label='Response Type'>
            <a-select
            v-model="outbound.settings.type"
            :dropdown-class-name="themeSwitcher.currentTheme">
                <a-select-option v-for="s in ['', 'none','http']" :value="s">[[ s ]]</a-select-option>
            </a-select>
        </a-form-item>
</template>

<!-- dns settings -->
<template v-if="outbound.protocol === Protocols.DNS">
        <a-form-item label='{{ i18n "pages.inbounds.network" }}'>
            <a-select
            v-model="outbound.settings.network"
            :dropdown-class-name="themeSwitcher.currentTheme">
                <a-select-option v-for="s in ['udp','tcp']" :value="s">[[ s ]]</a-select-option>
            </a-select>
        </a-form-item>
</template>

<!-- Address + Port -->
<template v-if="outbound.hasAddressPort()">
        <a-form-item label='{{ i18n "pages.inbounds.address" }}'>
            <a-input v-model.trim="outbound.settings.address"></a-input>
        </a-form-item>
        <a-form-item label='{{ i18n "pages.inbounds.port" }}'>
            <a-input-number v-model.number="outbound.settings.port" :min="1" :max="65532"></a-input-number>
        </a-form-item>
</template>

<!-- Vnext (vless/vmess) settings -->
<template v-if="[Protocols.VMess, Protocols.VLESS].includes(outbound.protocol)">
        <a-form-item label='ID'>
            <a-input v-model.trim="outbound.settings.id"></a-input>
        </a-form-item>
    <!-- vless settings -->
    <template v-if="outbound.canEnableTlsFlow()">
        <a-form-item label='Flow'>
            <a-select v-model="outbound.settings.flow" :dropdown-class-name="themeSwitcher.currentTheme">
                <a-select-option value="" selected>{{ i18n "none" }}</a-select-option>
                <a-select-option v-for="key in TLS_FLOW_CONTROL" :value="key">[[ key ]]</a-select-option>
            </a-select>
        </a-form-item>
    </template>
</template>

<!-- Servers (trojan/shadowsocks/socks/http) settings -->
<template v-if="outbound.hasServers()">
    <!-- http / socks -->
    <template v-if="outbound.hasUsername()">
        <a-form-item label='{{ i18n "username" }}'>
            <a-input v-model.trim="outbound.settings.user"></a-input>
        </a-form-item>
        <a-form-item label='{{ i18n "password" }}'>
            <a-input v-model.trim="outbound.settings.pass"></a-input>
        </a-form-item>
    </template>
    <!-- shadowsocks -->
    <template v-if="outbound.protocol === Protocols.Shadowsocks">
        <a-form-item label='{{ i18n "encryption" }}'>
            <a-select v-model="outbound.settings.method" :dropdown-class-name="themeSwitcher.currentTheme">
                <a-select-option v-for="method in SSMethods" :value="method">[[ method ]]</a-select-option>
            </a-select>
        </a-form-item>
        <a-form-item label='UDP over TCP'>
            <a-switch v-model="outbound.settings.uot"></a-switch>
        </a-form-item>
    </template>
</template>

<!-- stream settings -->
<template v-if="outbound.canEnableStream()">
        <a-form-item label='{{ i18n "transmission" }}'>
            <a-select v-model="outbound.stream.network" @change="streamNetworkChange"
                    :dropdown-class-name="themeSwitcher.currentTheme">
                <a-select-option value="tcp">TCP</a-select-option>
                <a-select-option value="kcp">KCP</a-select-option>
                <a-select-option value="ws">WS</a-select-option>
                <a-select-option value="http">HTTP2</a-select-option>
                <a-select-option value="quic">QUIC</a-select-option>
                <a-select-option value="grpc">gRPC</a-select-option>
            </a-select>
        </a-form-item>
    <template v-if="outbound.stream.network === 'tcp'">
        <a-form-item label='HTTP {{ i18n "camouflage" }}'>
            <a-switch
                :checked="outbound.stream.tcp.type === 'http'"
                @change="checked => outbound.stream.tcp.type = checked ? 'http' : 'none'">
            </a-switch>
        </a-form-item>
        <template v-if="outbound.stream.tcp.type == 'http'">
        <a-form-item label='{{ i18n "host" }}'>
            <a-input v-model.trim="outbound.stream.tcp.host"></a-input>
        </a-form-item> 
        <a-form-item label='{{ i18n "path" }}'>
            <a-input v-model.trim="outbound.stream.tcp.path"></a-input>
        </a-form-item> 
        </template>
    </template>
    
    <!-- kcp -->
    <template v-if="outbound.stream.network === 'kcp'">
        <a-form-item label='{{ i18n "camouflage" }}'>
            <a-select v-model="outbound.stream.kcp.type" :dropdown-class-name="themeSwitcher.currentTheme">
                <a-select-option value="none">none (not camouflage)</a-select-option>
                <a-select-option value="srtp">srtp (video call)</a-select-option>
                <a-select-option value="utp">utp (BT download)</a-select-option>
                <a-select-option value="wechat-video">wechat-video (WeChat video)</a-select-option>
                <a-select-option value="dtls">dtls (DTLS 1.2 packages)</a-select-option>
                <a-select-option value="wireguard">wireguard (wireguard packages)</a-select-option>
            </a-select>
        </a-form-item>
        <a-form-item label='{{ i18n "password" }}'>
            <a-input v-model="outbound.stream.kcp.seed"></a-input>
        </a-form-item>
        <a-form-item label='MTU'>
            <a-input-number v-model.number="outbound.stream.kcp.mtu"></a-input-number>
        </a-form-item>
        <a-form-item label='TTI (ms)'>
            <a-input-number v-model.number="outbound.stream.kcp.tti"></a-input-number>
        </a-form-item>
        <a-form-item label='Uplink Capacity (MB/s)'>
            <a-input-number v-model.number="outbound.stream.kcp.upCap"></a-input-number>
        </a-form-item> 
        <a-form-item label='Downlink Capacity (MB/s)'>
            <a-input-number v-model.number="outbound.stream.kcp.downCap"></a-input-number>
        </a-form-item>
        <a-form-item label='Congestion'>
            <a-switch v-model="outbound.stream.kcp.congestion"></a-switch>
        </a-form-item>
        <a-form-item label='Read Buffer Size (MB)'>
            <a-input-number v-model.number="outbound.stream.kcp.readBuffer"></a-input-number>
        </a-form-item>
        <a-form-item label='Write Buffer Size (MB)'>
            <a-input-number v-model.number="outbound.stream.kcp.writeBuffer"></a-input-number>
        </a-form-item>
    </template>
    
    <!-- ws -->
    <template v-if="outbound.stream.network === 'ws'">
        <a-form-item label='{{ i18n "host" }}'>
            <a-input v-model="outbound.stream.ws.host"></a-input>
        </a-form-item>
        <a-form-item label='{{ i18n "path" }}'>
            <a-form-item><a-input v-model.trim="outbound.stream.ws.path"></a-input>
        </a-form-item>
    </template>
    
    <!-- http -->
    <template v-if="outbound.stream.network === 'http'">
        <a-form-item label='{{ i18n "host" }}'>
            <a-input v-model.trim="outbound.stream.http.host"></a-input>
        </a-form-item>
        <a-form-item label='{{ i18n "path" }}'>
            <a-input v-model.trim="outbound.stream.http.path"></a-input>
        </a-form-item>
    </template>
    
    <!-- quic -->
    <template v-if="outbound.stream.network === 'quic'">
        <a-form-item label='{{ i18n "pages.inbounds.stream.quic.encryption" }}'>
            <a-select v-model="outbound.stream.quic.security" :dropdown-class-name="themeSwitcher.currentTheme">
                <a-select-option value="none">none</a-select-option>
                <a-select-option value="aes-128-gcm">aes-128-gcm</a-select-option>
                <a-select-option value="chacha20-poly1305">chacha20-poly1305</a-select-option>
            </a-select>
        </a-form-item>
        <a-form-item label='{{ i18n "password" }}'>
            <a-input v-model.trim="outbound.stream.quic.key"></a-input>
        </a-form-item> 
        <a-form-item label='{{ i18n "camouflage" }}'>
            <a-select v-model="outbound.stream.quic.type" :dropdown-class-name="themeSwitcher.currentTheme">
                <a-select-option value="none">none (No Obfuscation)</a-select-option>
                <a-select-option value="srtp">SRTP (Video Call)</a-select-option>
                <a-select-option value="utp">uTP (Bittorrent)</a-select-option>
                <a-select-option value="wechat-video">WeChat Video</a-select-option>
                <a-select-option value="dtls">DTLS (DTLS 1.2 packages)</a-select-option>
                <a-select-option value="wireguard">WireGuard (WireGuard Packages)</a-select-option>
            </a-select>
        </a-form-item>
    </template>
    
    <!-- grpc -->
    <template v-if="outbound.stream.network === 'grpc'">
        <a-form-item label='Service Name'>
            <a-input v-model.trim="outbound.stream.grpc.serviceName"></a-input>
        </a-form-item>
        <a-form-item label='Multi Mode'>
            <a-switch v-model="outbound.stream.grpc.multiMode"></a-switch>
        </a-form-item>
    </template>
</template>

<!-- tls settings -->
<template v-if="outbound.canEnableTls()">
        <a-form-item label='{{ i18n "security" }}'>
            <a-radio-group v-model="outbound.stream.security" button-style="solid">
                <a-radio-button value="none">{{ i18n "none" }}</a-radio-button>
                <a-radio-button value="tls">TLS</a-radio-button>
                <a-radio-button v-if="outbound.canEnableReality()" value="reality">Reality</a-radio-button>
            </a-radio-group>
        </a-form-item>
        <template v-if="outbound.stream.isTls">
            <a-form-item label="SNI" placeholder="Server Name Indication">
                <a-input v-model.trim="outbound.stream.tls.serverName"></a-input>
            </a-form-item>
            <a-form-item label="uTLS">
                <a-select v-model="outbound.stream.tls.fingerprint"
                            :dropdown-class-name="themeSwitcher.currentTheme">
                    <a-select-option value=''>None</a-select-option>
                    <a-select-option v-for="key in UTLS_FINGERPRINT" :value="key">[[ key ]]</a-select-option>
                </a-select>
            </a-form-item>
            <a-form-item label="ALPN">
                <a-select
                    mode="multiple"
                   
                    :dropdown-class-name="themeSwitcher.currentTheme"
                    v-model="outbound.stream.tls.alpn">
                    <a-select-option v-for="alpn in ALPN_OPTION" :value="alpn">[[ alpn ]]</a-select-option>
                </a-select>
            </a-form-item>
            <a-form-item label="Allow Insecure">
                <a-switch v-model="outbound.stream.tls.allowInsecure"></a-switch>
            </a-form-item>
        </template>
        
        <!-- reality settings -->
        <template v-if="outbound.stream.isReality">
                <a-form-item label='{{ i18n "domainName" }}'>
                    <a-input v-model.trim="outbound.stream.reality.serverName"></a-input>
                </a-form-item>
                <a-form-item label="uTLS">
                    <a-select v-model="outbound.stream.reality.fingerprint"
                                :dropdown-class-name="themeSwitcher.currentTheme">
                        <a-select-option v-for="key in UTLS_FINGERPRINT" :value="key">[[ key ]]</a-select-option>
                    </a-select>
                </a-form-item>
                <a-form-item label="Short IDs">
                    <a-input v-model.trim="outbound.stream.reality.shortId" style="width:250px"></a-input>
                </a-form-item>
                <a-form-item label="SpiderX">
                    <a-input v-model.trim="outbound.stream.reality.spiderX" style="width:250px"></a-input>
                </a-form-item>
                <a-form-item label="Public Key">
                            <a-input v-model.trim="outbound.stream.reality.publicKey"></a-input>
                </a-form-item>
        </template>
</template>
</a-form>
</a-tab-pane>
<a-tab-pane key="2" tab="JSON" force-render="true">
    <a-form-item style="margin: 10px 0">
        Link: <a-input v-model.trim="outModal.link" style="width: 300px; margin-right: 5px;" placeholder="vmess:// vless:// trojan:// ss://"></a-input>
        <a-button @click="convertLink" type="primary"><a-icon type="form"></a-icon></a-button>
    </a-form-item>
        <textarea style="position:absolute; left: -800px;" id="outboundJson"></textarea>
</a-tab-pane>
</a-tabs>
{{end}}