2020-09-15 14:44:52 +08:00
|
|
|
|
{$layout "layout_popup"}
|
|
|
|
|
|
|
2020-11-30 20:00:32 +08:00
|
|
|
|
<h3>修改源站</h3>
|
2020-09-15 14:44:52 +08:00
|
|
|
|
|
2020-11-10 12:47:24 +08:00
|
|
|
|
<form method="post" class="ui form" data-tea-action="$" data-tea-success="success">
|
2020-09-15 14:44:52 +08:00
|
|
|
|
<input type="hidden" name="reverseProxyId" :value="reverseProxyId"/>
|
|
|
|
|
|
<input type="hidden" name="originType" :value="originType"/>
|
|
|
|
|
|
<input type="hidden" name="originId" :value="originId"/>
|
|
|
|
|
|
|
|
|
|
|
|
<table class="ui table selectable definition">
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
<td>源站协议</td>
|
|
|
|
|
|
<td>
|
|
|
|
|
|
<!-- HTTP -->
|
2021-06-06 09:22:59 +08:00
|
|
|
|
<select class="ui dropdown auto-width" name="protocol" v-model="origin.protocol" v-if="serverType == 'httpProxy' || serverType == 'httpWeb'" @change="changeProtocol">
|
2020-09-15 14:44:52 +08:00
|
|
|
|
<option value="http">HTTP</option>
|
|
|
|
|
|
<option value="https">HTTPS</option>
|
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- TCP -->
|
|
|
|
|
|
<select class="ui dropdown auto-width" name="protocol" v-model="origin.protocol" v-if="serverType == 'tcpProxy'">
|
|
|
|
|
|
<option value="tcp">TCP</option>
|
|
|
|
|
|
<option value="tls">TLS</option>
|
|
|
|
|
|
</select>
|
2021-06-07 15:43:43 +08:00
|
|
|
|
|
|
|
|
|
|
<!-- UDP -->
|
|
|
|
|
|
<select class="ui dropdown auto-width" name="protocol" v-model="origin.protocol" v-if="serverType == 'udpProxy'">
|
|
|
|
|
|
<option value="udp">UDP</option>
|
|
|
|
|
|
</select>
|
2020-09-15 14:44:52 +08:00
|
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
2022-04-15 12:15:09 +08:00
|
|
|
|
<td class="title">源站地址 *</td>
|
2020-09-15 14:44:52 +08:00
|
|
|
|
<td>
|
2021-06-05 20:27:57 +08:00
|
|
|
|
<input type="text" name="addr" ref="focus" v-model="origin.addr" @input="changeAddr"/>
|
2021-06-06 09:22:59 +08:00
|
|
|
|
<p class="comment"><span class="red" v-if="addrError.length > 0">{{addrError}}</span>源站服务器地址,通常是一个IP(或域名)加端口<span v-if="serverType == 'httpProxy'">,不需要加 http:// 或 https://</span>。</p>
|
2020-09-15 14:44:52 +08:00
|
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
2020-11-30 20:00:32 +08:00
|
|
|
|
<tr>
|
|
|
|
|
|
<td colspan="2"><more-options-indicator></more-options-indicator></td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
<tbody v-show="moreOptionsVisible">
|
2022-01-16 19:51:26 +08:00
|
|
|
|
<tr v-if="origin.protocol == 'https' || origin.protocol == 'tls'">
|
|
|
|
|
|
<td>{{origin.protocol.toUpperCase()}}证书</td>
|
|
|
|
|
|
<td>
|
|
|
|
|
|
<ssl-certs-box :v-single-mode="true" :v-cert="origin.cert" :v-view-size="'mini'" :v-description="'可以选择连接源站使用的证书。'"></ssl-certs-box>
|
|
|
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
2022-06-27 15:10:45 +08:00
|
|
|
|
<tr v-if="isHTTP || origin.protocol == 'tls'">
|
2022-03-17 15:48:08 +08:00
|
|
|
|
<td>回源主机名</td>
|
|
|
|
|
|
<td>
|
|
|
|
|
|
<input type="text" name="host" v-model="origin.host" placeholder="比如example.com" maxlength="100"/>
|
2022-06-27 15:17:54 +08:00
|
|
|
|
<p class="comment">请求源站时的Host,用于修改源站接收到的域名<span v-if="isHTTP">,自定义Host内容中支持请求变量</span>。</p>
|
2022-03-17 15:48:08 +08:00
|
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
2022-08-03 15:28:55 +08:00
|
|
|
|
<tr v-show="origin.protocol != 'udp'">
|
2021-11-22 18:46:08 +08:00
|
|
|
|
<td>专属域名</td>
|
|
|
|
|
|
<td>
|
|
|
|
|
|
<domains-box :v-domains="origin.domains"></domains-box>
|
2022-03-14 19:25:19 +08:00
|
|
|
|
<p class="comment">默认不需要填写,表示支持所有域名。如果填写了专属域名,表示这些源站只会在所列的专属域名被访问时才生效。</p>
|
2021-11-22 18:46:08 +08:00
|
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
2022-06-29 21:56:44 +08:00
|
|
|
|
<tr>
|
|
|
|
|
|
<td>端口跟随</td>
|
|
|
|
|
|
<td>
|
|
|
|
|
|
<checkbox name="followPort" v-model="origin.followPort"></checkbox>
|
|
|
|
|
|
<p class="comment">选中后表示源站的端口保持和用户访问的服务端口保持一致;此时的源站地址中的端口号可以任意填写。</p>
|
|
|
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
2021-09-20 11:54:28 +08:00
|
|
|
|
<tr>
|
|
|
|
|
|
<td>权重</td>
|
|
|
|
|
|
<td>
|
|
|
|
|
|
<input type="text" name="weight" maxlength="4" v-model="origin.weight" style="width:5em"/>
|
|
|
|
|
|
<p class="comment">数字越大,代表分配的请求比例越多。</p>
|
|
|
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
2020-11-30 20:00:32 +08:00
|
|
|
|
<tr>
|
|
|
|
|
|
<td>名称</td>
|
|
|
|
|
|
<td>
|
|
|
|
|
|
<input type="text" name="name" maxlength="100" v-model="origin.name"/>
|
|
|
|
|
|
<p class="comment">给当前源站起一个容易识别的名称。</p>
|
|
|
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
2021-03-25 21:18:50 +08:00
|
|
|
|
<tr>
|
|
|
|
|
|
<td>连接失败超时时间</td>
|
|
|
|
|
|
<td>
|
|
|
|
|
|
<div class="ui fields inline">
|
|
|
|
|
|
<div class="ui field">
|
|
|
|
|
|
<input type="text" name="connTimeout" value="10" size="6" v-model="origin.connTimeout"/>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="ui field">
|
|
|
|
|
|
秒
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<p class="comment">连接源站失败的最大超时时间,0表示不限制。</p>
|
|
|
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
<tr v-if="isHTTP">
|
|
|
|
|
|
<td>读取超时时间</td>
|
|
|
|
|
|
<td>
|
|
|
|
|
|
<div class="ui fields inline">
|
|
|
|
|
|
<div class="ui field">
|
|
|
|
|
|
<input type="text" name="readTimeout" value="0" size="6" v-model="origin.readTimeout"/>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="ui field">
|
|
|
|
|
|
秒
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<p class="comment">读取内容时的最大超时时间,0表示不限制。</p>
|
|
|
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
2021-03-26 22:08:18 +08:00
|
|
|
|
<tr v-if="isHTTP">
|
2021-03-25 21:18:50 +08:00
|
|
|
|
<td>最大并发连接数</td>
|
|
|
|
|
|
<td>
|
|
|
|
|
|
<div class="ui fields inline">
|
|
|
|
|
|
<div class="ui field">
|
|
|
|
|
|
<input type="text" name="maxConns" value="0" size="6" maxlength="10" v-model="origin.maxConns"/>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<p class="comment">源站可以接受到的最大并发连接数,0表示使用系统默认。</p>
|
|
|
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
<tr v-if="isHTTP">
|
|
|
|
|
|
<td>最大空闲连接数</td>
|
|
|
|
|
|
<td>
|
|
|
|
|
|
<div class="ui fields inline">
|
|
|
|
|
|
<div class="ui field">
|
|
|
|
|
|
<input type="text" name="maxIdleConns" value="0" size="6" maxlength="10" v-model="origin.maxIdleConns"/>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<p class="comment">当没有请求时,源站保持等待的最大空闲连接数量,0表示使用系统默认。</p>
|
|
|
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
<tr v-if="isHTTP">
|
|
|
|
|
|
<td>最大空闲超时时间</td>
|
|
|
|
|
|
<td>
|
|
|
|
|
|
<div class="ui fields inline">
|
|
|
|
|
|
<div class="ui field">
|
|
|
|
|
|
<input type="text" name="idleTimeout" value="0" size="6" v-model="origin.idleTimeout"/>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="ui field">
|
|
|
|
|
|
秒
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<p class="comment">源站保持等待的空闲超时时间,0表示使用默认时间。</p>
|
|
|
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
2020-11-30 20:00:32 +08:00
|
|
|
|
<tr>
|
|
|
|
|
|
<td>备注</td>
|
|
|
|
|
|
<td>
|
|
|
|
|
|
<textarea name="description" rows="3" maxlength="100" v-model="origin.description"></textarea>
|
|
|
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
<td>是否启用</td>
|
|
|
|
|
|
<td>
|
|
|
|
|
|
<checkbox name="isOn" :value="origin.isOn"></checkbox>
|
|
|
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
2020-09-15 14:44:52 +08:00
|
|
|
|
</table>
|
|
|
|
|
|
<submit-btn></submit-btn>
|
|
|
|
|
|
</form>
|