2020-08-21 12:32:16 +08:00
|
|
|
|
{$layout "layout_popup"}
|
|
|
|
|
|
|
|
|
|
|
|
<h3>添加源站地址</h3>
|
|
|
|
|
|
|
2020-11-10 12:47:24 +08:00
|
|
|
|
<form method="post" class="ui form" data-tea-action="$" data-tea-success="success">
|
2020-08-21 12:32:16 +08:00
|
|
|
|
<table class="ui table selectable definition">
|
|
|
|
|
|
<tr>
|
2023-06-07 17:24:56 +08:00
|
|
|
|
<td class="title">源站协议 *</td>
|
2020-08-21 12:32:16 +08:00
|
|
|
|
<td>
|
|
|
|
|
|
<!-- HTTP -->
|
2021-06-07 16:23:37 +08:00
|
|
|
|
<select class="ui dropdown auto-width" name="protocol" v-if="serverType == 'httpProxy' || serverType == 'httpWeb'" @change="changeProtocol" v-model="protocol">
|
2020-08-21 12:32:16 +08:00
|
|
|
|
<option value="http">HTTP</option>
|
|
|
|
|
|
<option value="https">HTTPS</option>
|
2023-06-07 17:24:56 +08:00
|
|
|
|
|
|
|
|
|
|
<!-- 对象存储 -->
|
|
|
|
|
|
<optgroup label="对象存储" v-if="ossTypes.length > 0"></optgroup>
|
|
|
|
|
|
<option v-for="ossType in ossTypes" :value="ossType.code">{{ossType.name}}</option>
|
2020-08-21 12:32:16 +08:00
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- TCP -->
|
2022-06-29 21:56:44 +08:00
|
|
|
|
<select class="ui dropdown auto-width" name="protocol" v-if="serverType == 'tcpProxy'" v-model="protocol">
|
2020-08-21 12:32:16 +08:00
|
|
|
|
<option value="tcp">TCP</option>
|
|
|
|
|
|
<option value="tls">TLS</option>
|
|
|
|
|
|
</select>
|
2021-06-07 15:43:43 +08:00
|
|
|
|
|
|
|
|
|
|
<!-- UDP -->
|
2022-06-29 21:56:44 +08:00
|
|
|
|
<select class="ui dropdown auto-width" name="protocol" v-if="serverType == 'udpProxy'" v-model="protocol">
|
2021-06-07 15:43:43 +08:00
|
|
|
|
<option value="udp">UDP</option>
|
|
|
|
|
|
</select>
|
2020-08-21 12:32:16 +08:00
|
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
2023-06-07 17:24:56 +08:00
|
|
|
|
|
|
|
|
|
|
<!-- 普通源站 -->
|
|
|
|
|
|
<tr v-show="!isOSS">
|
2022-04-15 12:15:09 +08:00
|
|
|
|
<td class="title">源站地址 *</td>
|
2020-08-21 12:32:16 +08:00
|
|
|
|
<td>
|
2021-06-07 16:23:37 +08:00
|
|
|
|
<input type="text" name="addr" ref="focus" v-model="addr" @input="changeAddr"/>
|
|
|
|
|
|
<p class="comment"><span class="red" v-if="addrError.length > 0">{{addrError}}</span>源站服务器地址,通常是一个IP(或域名)加端口<span v-if="serverType == 'httpProxy'">,不需要加 http:// 或 https://</span>。</p>
|
2020-08-21 12:32:16 +08:00
|
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
2023-06-07 17:24:56 +08:00
|
|
|
|
<tr v-if="(isHTTP || protocol == 'tls') && !isOSS">
|
2023-03-21 16:56:45 +08:00
|
|
|
|
<td>回源主机名</td>
|
|
|
|
|
|
<td>
|
|
|
|
|
|
<input type="text" name="host" placeholder="比如example.com" maxlength="100"/>
|
2023-06-02 16:33:24 +08:00
|
|
|
|
<p class="comment">请求源站时的Host字段值,用于设置访问源站的站点域名<span v-if="isHTTP">,支持请求变量</span>。</p>
|
2023-03-21 16:56:45 +08:00
|
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
2023-06-07 17:24:56 +08:00
|
|
|
|
|
|
|
|
|
|
<!-- OSS -->
|
|
|
|
|
|
<!-- 腾讯云COS -->
|
|
|
|
|
|
<tbody v-if="protocol == 'oss:tencentCOS'">
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
<td>密钥ID *<br/><em>(Secret Id)</em></td>
|
|
|
|
|
|
<td>
|
|
|
|
|
|
<input type="text" name="tencentCOSSecretId" maxlength="100"/>
|
|
|
|
|
|
<p class="comment">访问存储桶需要的密钥ID。</p>
|
|
|
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
<td>密钥Key *<br/><em>(Secret Key)</em></td>
|
|
|
|
|
|
<td>
|
|
|
|
|
|
<input type="text" name="tencentCOSSecretKey" maxlength="100"/>
|
|
|
|
|
|
<p class="comment">访问存储桶需要的密钥Key。</p>
|
|
|
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
<td>存储桶名称 *</td>
|
|
|
|
|
|
<td>
|
|
|
|
|
|
<input type="text" name="tencentCOSBucketName" maxlength="100"/>
|
|
|
|
|
|
<p class="comment">存储桶名称,类似于<code-label>example-12345678</code-label>。</p>
|
|
|
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
<td>所属区域代号 *</td>
|
|
|
|
|
|
<td>
|
|
|
|
|
|
<input type="text" name="tencentCOSRegion" maxlength="100"/>
|
|
|
|
|
|
<p class="comment">COS服务所属区域代号,类似于<code-label>ap-beijing</code-label>。</p>
|
|
|
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
|
|
|
|
|
2022-06-29 21:56:44 +08:00
|
|
|
|
<tr>
|
|
|
|
|
|
<td colspan="2"><more-options-indicator></more-options-indicator></td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
<tbody v-show="moreOptionsVisible">
|
|
|
|
|
|
<tr v-if="protocol == 'https' || protocol == 'tls'">
|
|
|
|
|
|
<td>{{protocol.toUpperCase()}}证书</td>
|
|
|
|
|
|
<td>
|
|
|
|
|
|
<ssl-certs-box :v-single-mode="true" :v-view-size="'mini'" :v-description="'可以选择连接源站使用的证书。'"></ssl-certs-box>
|
|
|
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
<tr v-if="isHTTP">
|
|
|
|
|
|
<td>专属域名</td>
|
|
|
|
|
|
<td>
|
|
|
|
|
|
<domains-box></domains-box>
|
|
|
|
|
|
<p class="comment">默认不需要填写,表示支持所有域名。如果填写了专属域名,表示这些源站只会在所列的专属域名被访问时才生效。</p>
|
|
|
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
2023-06-07 17:24:56 +08:00
|
|
|
|
<tr v-show="!isOSS">
|
2022-06-29 21:56:44 +08:00
|
|
|
|
<td>端口跟随</td>
|
|
|
|
|
|
<td>
|
|
|
|
|
|
<checkbox name="followPort"></checkbox>
|
|
|
|
|
|
<p class="comment">选中后表示源站的端口保持和用户访问的服务端口保持一致;此时的源站地址中的端口号可以任意填写。</p>
|
|
|
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
2020-08-21 12:32:16 +08:00
|
|
|
|
</table>
|
|
|
|
|
|
<submit-btn></submit-btn>
|
|
|
|
|
|
</form>
|