mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-04-19 21:42:24 +00:00
Compare commits
3 commits
e675c1d762
...
db62a07fb8
Author | SHA1 | Date | |
---|---|---|---|
![]() |
db62a07fb8 | ||
![]() |
e3120c4028 | ||
![]() |
7ae855e7c9 |
26 changed files with 214 additions and 106 deletions
|
@ -473,8 +473,8 @@
|
||||||
</transition>
|
</transition>
|
||||||
</a-layout>
|
</a-layout>
|
||||||
{{template "js" .}}
|
{{template "js" .}}
|
||||||
{{template "component/themeSwitcher" .}}
|
{{template "component/aThemeSwitch" .}}
|
||||||
{{template "component/password" .}}
|
{{template "component/aPasswordInput" .}}
|
||||||
<script>
|
<script>
|
||||||
class User {
|
class User {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
|
|
@ -1,33 +1,23 @@
|
||||||
{{define "menuItems"}}
|
{{define "menuItems"}}
|
||||||
<a-menu-item key="{{ .base_path }}panel/">
|
<a-menu-item key="{{ .base_path }}panel/">
|
||||||
<a-icon type="dashboard"></a-icon>
|
<a-icon type="dashboard"></a-icon>
|
||||||
<span>
|
<span>{{ i18n "menu.dashboard"}}</span>
|
||||||
<b>{{ i18n "menu.dashboard"}}</b>
|
|
||||||
</span>
|
|
||||||
</a-menu-item>
|
</a-menu-item>
|
||||||
<a-menu-item key="{{ .base_path }}panel/inbounds">
|
<a-menu-item key="{{ .base_path }}panel/inbounds">
|
||||||
<a-icon type="user"></a-icon>
|
<a-icon type="user"></a-icon>
|
||||||
<span>
|
<span>{{ i18n "menu.inbounds"}}</span>
|
||||||
<b>{{ i18n "menu.inbounds"}}</b>
|
|
||||||
</span>
|
|
||||||
</a-menu-item>
|
</a-menu-item>
|
||||||
<a-menu-item key="{{ .base_path }}panel/settings">
|
<a-menu-item key="{{ .base_path }}panel/settings">
|
||||||
<a-icon type="setting"></a-icon>
|
<a-icon type="setting"></a-icon>
|
||||||
<span>
|
<span>{{ i18n "menu.settings"}}</span>
|
||||||
<b>{{ i18n "menu.settings"}}</b>
|
|
||||||
</span>
|
|
||||||
</a-menu-item>
|
</a-menu-item>
|
||||||
<a-menu-item key="{{ .base_path }}panel/xray">
|
<a-menu-item key="{{ .base_path }}panel/xray">
|
||||||
<a-icon type="tool"></a-icon>
|
<a-icon type="tool"></a-icon>
|
||||||
<span>
|
<span>{{ i18n "menu.xray"}}</span>
|
||||||
<b>{{ i18n "menu.xray"}}</b>
|
|
||||||
</span>
|
|
||||||
</a-menu-item>
|
</a-menu-item>
|
||||||
<a-menu-item key="{{ .base_path }}logout">
|
<a-menu-item key="{{ .base_path }}logout">
|
||||||
<a-icon type="logout"></a-icon>
|
<a-icon type="logout"></a-icon>
|
||||||
<span>
|
<span>{{ i18n "menu.logout"}}</span>
|
||||||
<b>{{ i18n "menu.logout"}}</b>
|
|
||||||
</span>
|
|
||||||
</a-menu-item>
|
</a-menu-item>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
|
|
55
web/html/xui/component/aCustomStatistic.html
Normal file
55
web/html/xui/component/aCustomStatistic.html
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
{{define "component/customStatistic"}}
|
||||||
|
<template>
|
||||||
|
<a-statistic :title="title" :value="value">
|
||||||
|
<template #prefix>
|
||||||
|
<slot name="prefix"></slot>
|
||||||
|
</template>
|
||||||
|
<template #suffix>
|
||||||
|
<slot name="suffix"></slot>
|
||||||
|
</template>
|
||||||
|
</a-statistic>
|
||||||
|
</template>
|
||||||
|
{{end}}
|
||||||
|
|
||||||
|
{{define "component/aCustomStatistic"}}
|
||||||
|
<style>
|
||||||
|
.dark .ant-statistic-title,
|
||||||
|
.dark .ant-statistic-content {
|
||||||
|
color: var(--dark-color-text-primary) !important
|
||||||
|
}
|
||||||
|
|
||||||
|
.dark .ant-statistic-title {
|
||||||
|
user-select: none;
|
||||||
|
opacity: 0.55;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-statistic-title {
|
||||||
|
margin-bottom: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-statistic-content-prefix {
|
||||||
|
margin-right: 6px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-statistic-content-prefix,
|
||||||
|
.ant-statistic-content-value {
|
||||||
|
font-size: 1.05rem;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
Vue.component('a-custom-statistic', {
|
||||||
|
props: {
|
||||||
|
'title': {
|
||||||
|
type: String,
|
||||||
|
required: false,
|
||||||
|
},
|
||||||
|
'value': {
|
||||||
|
type: String,
|
||||||
|
required: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
template: `{{template "component/customStatistic"}}`,
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
{{end}}
|
|
@ -12,7 +12,7 @@
|
||||||
</template>
|
</template>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
{{define "component/password"}}
|
{{define "component/aPasswordInput"}}
|
||||||
<script>
|
<script>
|
||||||
Vue.component('a-password-input', {
|
Vue.component('a-password-input', {
|
||||||
props: {
|
props: {
|
|
@ -12,7 +12,7 @@
|
||||||
</template>
|
</template>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
{{define "component/persianDatepicker"}}
|
{{define "component/aPersianDatepicker"}}
|
||||||
<link rel="stylesheet" href="{{ .base_path }}assets/persian-datepicker/persian-datepicker.min.css?{{ .cur_ver }}" />
|
<link rel="stylesheet" href="{{ .base_path }}assets/persian-datepicker/persian-datepicker.min.css?{{ .cur_ver }}" />
|
||||||
<script src="{{ .base_path }}assets/moment/moment-jalali.min.js?{{ .cur_ver }}"></script>
|
<script src="{{ .base_path }}assets/moment/moment-jalali.min.js?{{ .cur_ver }}"></script>
|
||||||
<script src="{{ .base_path }}assets/persian-datepicker/persian-datepicker.min.js?{{ .cur_ver }}"></script>
|
<script src="{{ .base_path }}assets/persian-datepicker/persian-datepicker.min.js?{{ .cur_ver }}"></script>
|
|
@ -18,18 +18,10 @@
|
||||||
</a-list-item>
|
</a-list-item>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
{{define "component/setting"}}
|
{{define "component/aSettingListItem"}}
|
||||||
<script>
|
<script>
|
||||||
Vue.component('a-setting-list-item', {
|
Vue.component('a-setting-list-item', {
|
||||||
props: {
|
props: {
|
||||||
'title': {
|
|
||||||
type: String,
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
'description': {
|
|
||||||
type: String,
|
|
||||||
required: false,
|
|
||||||
},
|
|
||||||
'paddings': {
|
'paddings': {
|
||||||
type: String,
|
type: String,
|
||||||
required: false,
|
required: false,
|
|
@ -3,7 +3,7 @@
|
||||||
@click="clickHandler" />
|
@click="clickHandler" />
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
{{define "component/sortableTable"}}
|
{{define "component/aTableSortable"}}
|
||||||
<script>
|
<script>
|
||||||
const DRAGGABLE_ROW_CLASS = 'draggable-row';
|
const DRAGGABLE_ROW_CLASS = 'draggable-row';
|
||||||
const findParentRowElement = (el) => {
|
const findParentRowElement = (el) => {
|
|
@ -4,15 +4,15 @@
|
||||||
<a-sub-menu>
|
<a-sub-menu>
|
||||||
<span slot="title">
|
<span slot="title">
|
||||||
<a-icon type="bulb" :theme="themeSwitcher.isDarkTheme ? 'filled' : 'outlined'"></a-icon>
|
<a-icon type="bulb" :theme="themeSwitcher.isDarkTheme ? 'filled' : 'outlined'"></a-icon>
|
||||||
<span>Theme</span>
|
<span>{{ i18n "menu.theme" }}</span>
|
||||||
</span>
|
</span>
|
||||||
<a-menu-item id="change-theme" class="ant-menu-theme-switch" @mousedown="themeSwitcher.animationsOff()"> Dark
|
<a-menu-item id="change-theme" class="ant-menu-theme-switch" @mousedown="themeSwitcher.animationsOff()">
|
||||||
<a-switch style="margin-left: 2px;" size="small" :default-checked="themeSwitcher.isDarkTheme"
|
<span>{{ i18n "menu.dark" }}</span>
|
||||||
@change="themeSwitcher.toggleTheme()"></a-switch>
|
<a-switch style="margin-left: 2px;" size="small" :default-checked="themeSwitcher.isDarkTheme" @change="themeSwitcher.toggleTheme()"></a-switch>
|
||||||
</a-menu-item>
|
</a-menu-item>
|
||||||
<a-menu-item id="change-theme-ultra" v-if="themeSwitcher.isDarkTheme" class="ant-menu-theme-switch"
|
<a-menu-item id="change-theme-ultra" v-if="themeSwitcher.isDarkTheme" class="ant-menu-theme-switch" @mousedown="themeSwitcher.animationsOffUltra()">
|
||||||
@mousedown="themeSwitcher.animationsOffUltra()"> Ultra <a-checkbox style="margin-left: 2px;"
|
<span>{{ i18n "menu.ultraDark" }}</span>
|
||||||
:checked="themeSwitcher.isUltra" @click="themeSwitcher.toggleUltra()"></a-checkbox>
|
<a-checkbox style="margin-left: 2px;" :checked="themeSwitcher.isUltra" @click="themeSwitcher.toggleUltra()"></a-checkbox>
|
||||||
</a-menu-item>
|
</a-menu-item>
|
||||||
</a-sub-menu>
|
</a-sub-menu>
|
||||||
</a-menu>
|
</a-menu>
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
</template>
|
</template>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
{{define "component/themeSwitcher"}}
|
{{define "component/aThemeSwitch"}}
|
||||||
<script>
|
<script>
|
||||||
function createThemeSwitcher() {
|
function createThemeSwitcher() {
|
||||||
const isDarkTheme = localStorage.getItem('dark-mode') === 'true';
|
const isDarkTheme = localStorage.getItem('dark-mode') === 'true';
|
|
@ -506,12 +506,12 @@
|
||||||
</a-form>
|
</a-form>
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
<a-tab-pane key="2" tab="JSON" force-render="true">
|
<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-space direction="vertical" :size="10" style="margin-top: 10px;">
|
||||||
<a-button @click="convertLink" type="primary">
|
<a-input addon-before='{{ i18n "pages.xray.outbound.link" }}' v-model.trim="outModal.link" placeholder="vmess:// vless:// trojan:// ss://">
|
||||||
<a-icon type="form"></a-icon>
|
<a-icon slot="addonAfter" type="form" @click="convertLink"></a-icon>
|
||||||
</a-button>
|
</a-input>
|
||||||
</a-form-item>
|
|
||||||
<textarea style="position:absolute; left: -800px;" id="outboundJson"></textarea>
|
<textarea style="position:absolute; left: -800px;" id="outboundJson"></textarea>
|
||||||
|
</a-space>
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
</a-tabs>
|
</a-tabs>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
|
@ -548,8 +548,8 @@
|
||||||
<script src="{{ .base_path }}assets/uri/URI.min.js?{{ .cur_ver }}"></script>
|
<script src="{{ .base_path }}assets/uri/URI.min.js?{{ .cur_ver }}"></script>
|
||||||
<script src="{{ .base_path }}assets/js/model/inbound.js?{{ .cur_ver }}"></script>
|
<script src="{{ .base_path }}assets/js/model/inbound.js?{{ .cur_ver }}"></script>
|
||||||
<script src="{{ .base_path }}assets/js/model/dbinbound.js?{{ .cur_ver }}"></script>
|
<script src="{{ .base_path }}assets/js/model/dbinbound.js?{{ .cur_ver }}"></script>
|
||||||
{{template "component/themeSwitcher" .}}
|
{{template "component/aThemeSwitch" .}}
|
||||||
{{template "component/persianDatepicker" .}}
|
{{template "component/aPersianDatepicker" .}}
|
||||||
<script>
|
<script>
|
||||||
const columns = [{
|
const columns = [{
|
||||||
title: "ID",
|
title: "ID",
|
||||||
|
|
|
@ -27,8 +27,6 @@
|
||||||
.dark .ant-backup-list-item svg,
|
.dark .ant-backup-list-item svg,
|
||||||
.dark .ant-card-actions>li>*,
|
.dark .ant-card-actions>li>*,
|
||||||
.dark .ant-badge-status-text,
|
.dark .ant-badge-status-text,
|
||||||
.dark .ant-statistic-title,
|
|
||||||
.dark .ant-statistic-content,
|
|
||||||
.dark .ant-card-extra {
|
.dark .ant-card-extra {
|
||||||
color: var(--dark-color-text-primary) !important;
|
color: var(--dark-color-text-primary) !important;
|
||||||
}
|
}
|
||||||
|
@ -44,12 +42,6 @@
|
||||||
.ant-card-actions {
|
.ant-card-actions {
|
||||||
background: transparent !important;
|
background: transparent !important;
|
||||||
}
|
}
|
||||||
.ant-statistic-content-prefix {
|
|
||||||
font-size: 20px;
|
|
||||||
}
|
|
||||||
.ant-statistic-content-value {
|
|
||||||
font-size: 18px;
|
|
||||||
}
|
|
||||||
.ip-hidden {
|
.ip-hidden {
|
||||||
filter: blur(10px);
|
filter: blur(10px);
|
||||||
}
|
}
|
||||||
|
@ -123,14 +115,22 @@
|
||||||
</transition>
|
</transition>
|
||||||
<transition name="list" appear>
|
<transition name="list" appear>
|
||||||
<template v-if="!status.isLoaded">
|
<template v-if="!status.isLoaded">
|
||||||
<a-card hoverable style="text-align: center; padding: 30px 0; margin-top: 10px;">
|
<div style="text-align: center; padding: 30px 0; margin-top: 10px;">
|
||||||
<a-spin size="large"></a-spin>
|
<a-spin size="large"></a-spin>
|
||||||
</a-card>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<a-row>
|
<a-row>
|
||||||
<a-col :sm="24" :lg="12">
|
<a-col :sm="24" :lg="12">
|
||||||
<a-card title='{{ i18n "pages.index.xrayStatus" }}' hoverable>
|
<a-card hoverable>
|
||||||
|
<template #title>
|
||||||
|
<a-space direction="horizontal">
|
||||||
|
<span>{{ i18n "pages.index.xrayStatus" }}</span>
|
||||||
|
<a-tag v-if="isMobile && status.xray.version != 'Unknown'" color="green">
|
||||||
|
v[[ status.xray.version ]]
|
||||||
|
</a-tag>
|
||||||
|
</a-space>
|
||||||
|
</template>
|
||||||
<template #extra>
|
<template #extra>
|
||||||
<template v-if="status.xray.state != State.Error">
|
<template v-if="status.xray.state != State.Error">
|
||||||
<a-badge :text="status.xray.state" :color="status.xray.color" style="text-transform: capitalize;"/>
|
<a-badge :text="status.xray.state" :color="status.xray.color" style="text-transform: capitalize;"/>
|
||||||
|
@ -150,15 +150,17 @@
|
||||||
<template #actions>
|
<template #actions>
|
||||||
<a-space direction="horizontal" @click="stopXrayService" style="justify-content: center;">
|
<a-space direction="horizontal" @click="stopXrayService" style="justify-content: center;">
|
||||||
<a-icon type="poweroff"></a-icon>
|
<a-icon type="poweroff"></a-icon>
|
||||||
<span>{{ i18n "pages.index.stopXray" }}</span>
|
<span v-if="!isMobile">{{ i18n "pages.index.stopXray" }}</span>
|
||||||
</a-space>
|
</a-space>
|
||||||
<a-space direction="horizontal" @click="restartXrayService" style="justify-content: center;">
|
<a-space direction="horizontal" @click="restartXrayService" style="justify-content: center;">
|
||||||
<a-icon type="reload"></a-icon>
|
<a-icon type="reload"></a-icon>
|
||||||
<span>{{ i18n "pages.index.restartXray" }}</span>
|
<span v-if="!isMobile">{{ i18n "pages.index.restartXray" }}</span>
|
||||||
</a-space>
|
</a-space>
|
||||||
<a-space direction="horizontal" @click="openSelectV2rayVersion" style="justify-content: center;">
|
<a-space direction="horizontal" @click="openSelectV2rayVersion" style="justify-content: center;">
|
||||||
<a-icon type="tool"></a-icon>
|
<a-icon type="tool"></a-icon>
|
||||||
<span>v[[ status.xray.version ]]</span>
|
<span v-if="!isMobile">
|
||||||
|
[[ status.xray.version != 'Unknown' ? `v${status.xray.version}` : '{{ i18n "pages.index.xraySwitch" }}' ]]
|
||||||
|
</span>
|
||||||
</a-space>
|
</a-space>
|
||||||
</template>
|
</template>
|
||||||
</a-card>
|
</a-card>
|
||||||
|
@ -168,15 +170,15 @@
|
||||||
<template #actions>
|
<template #actions>
|
||||||
<a-space direction="horizontal" @click="openLogs()" style="justify-content: center;">
|
<a-space direction="horizontal" @click="openLogs()" style="justify-content: center;">
|
||||||
<a-icon type="bars"></a-icon>
|
<a-icon type="bars"></a-icon>
|
||||||
<span>{{ i18n "pages.index.logs" }}</span>
|
<span v-if="!isMobile">{{ i18n "pages.index.logs" }}</span>
|
||||||
</a-space>
|
</a-space>
|
||||||
<a-space direction="horizontal" @click="openConfig" style="justify-content: center;">
|
<a-space direction="horizontal" @click="openConfig" style="justify-content: center;">
|
||||||
<a-icon type="control"></a-icon>
|
<a-icon type="control"></a-icon>
|
||||||
<span>{{ i18n "pages.index.config" }}</span>
|
<span v-if="!isMobile">{{ i18n "pages.index.config" }}</span>
|
||||||
</a-space>
|
</a-space>
|
||||||
<a-space direction="horizontal" @click="openBackup" style="justify-content: center;">
|
<a-space direction="horizontal" @click="openBackup" style="justify-content: center;">
|
||||||
<a-icon type="cloud-server"></a-icon>
|
<a-icon type="cloud-server"></a-icon>
|
||||||
<span>{{ i18n "pages.index.backup" }}</span>
|
<span v-if="!isMobile">{{ i18n "pages.index.backup" }}</span>
|
||||||
</a-space>
|
</a-space>
|
||||||
</template>
|
</template>
|
||||||
</a-card>
|
</a-card>
|
||||||
|
@ -223,18 +225,18 @@
|
||||||
</template>
|
</template>
|
||||||
<a-row :class="showIp ? 'ip-visible' : 'ip-hidden'">
|
<a-row :class="showIp ? 'ip-visible' : 'ip-hidden'">
|
||||||
<a-col :lg="12" :sm="24" :style="{ marginTop: isMobile ? '10px' : 0 }">
|
<a-col :lg="12" :sm="24" :style="{ marginTop: isMobile ? '10px' : 0 }">
|
||||||
<a-statistic title="IPv4" :value="status.publicIP.ipv4">
|
<a-custom-statistic title="IPv4" :value="status.publicIP.ipv4">
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
<a-icon type="global" />
|
<a-icon type="global" />
|
||||||
</template>
|
</template>
|
||||||
</a-statistic>
|
</a-custom-statistic>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :lg="12" :sm="24" :style="{ marginTop: isMobile ? '10px' : 0 }">
|
<a-col :lg="12" :sm="24" :style="{ marginTop: isMobile ? '10px' : 0 }">
|
||||||
<a-statistic title="IPv6" :value="status.publicIP.ipv6">
|
<a-custom-statistic title="IPv6" :value="status.publicIP.ipv6">
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
<a-icon type="global" />
|
<a-icon type="global" />
|
||||||
</template>
|
</template>
|
||||||
</a-statistic>
|
</a-custom-statistic>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
</a-card>
|
</a-card>
|
||||||
|
@ -243,18 +245,18 @@
|
||||||
<a-card title='{{ i18n "pages.index.connectionCount" }}' hoverable>
|
<a-card title='{{ i18n "pages.index.connectionCount" }}' hoverable>
|
||||||
<a-row>
|
<a-row>
|
||||||
<a-col :lg="12" :sm="24" :style="{ marginTop: isMobile ? '10px' : 0 }">
|
<a-col :lg="12" :sm="24" :style="{ marginTop: isMobile ? '10px' : 0 }">
|
||||||
<a-statistic title="TCP" :value="status.tcpCount">
|
<a-custom-statistic title="TCP" :value="status.tcpCount">
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
<a-icon type="swap" />
|
<a-icon type="swap" />
|
||||||
</template>
|
</template>
|
||||||
</a-statistic>
|
</a-custom-statistic>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :lg="12" :sm="24" :style="{ marginTop: isMobile ? '10px' : 0 }">
|
<a-col :lg="12" :sm="24" :style="{ marginTop: isMobile ? '10px' : 0 }">
|
||||||
<a-statistic title="UDP" :value="status.udpCount">
|
<a-custom-statistic title="UDP" :value="status.udpCount">
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
<a-icon type="swap" />
|
<a-icon type="swap" />
|
||||||
</template>
|
</template>
|
||||||
</a-statistic>
|
</a-custom-statistic>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
</a-card>
|
</a-card>
|
||||||
|
@ -263,24 +265,24 @@
|
||||||
<a-card title='{{ i18n "pages.index.overallSpeed" }}' hoverable>
|
<a-card title='{{ i18n "pages.index.overallSpeed" }}' hoverable>
|
||||||
<a-row>
|
<a-row>
|
||||||
<a-col :lg="12" :sm="24" :style="{ marginTop: isMobile ? '10px' : 0 }">
|
<a-col :lg="12" :sm="24" :style="{ marginTop: isMobile ? '10px' : 0 }">
|
||||||
<a-statistic title='{{ i18n "pages.index.upload" }}' :value="SizeFormatter.sizeFormat(status.netIO.up)">
|
<a-custom-statistic title='{{ i18n "pages.index.upload" }}' :value="SizeFormatter.sizeFormat(status.netIO.up)">
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
<a-icon type="arrow-up" />
|
<a-icon type="arrow-up" />
|
||||||
</template>
|
</template>
|
||||||
<template #suffix>
|
<template #suffix>
|
||||||
/s
|
/s
|
||||||
</template>
|
</template>
|
||||||
</a-statistic>
|
</a-custom-statistic>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :lg="12" :sm="24" :style="{ marginTop: isMobile ? '10px' : 0 }">
|
<a-col :lg="12" :sm="24" :style="{ marginTop: isMobile ? '10px' : 0 }">
|
||||||
<a-statistic title='{{ i18n "pages.index.download" }}' :value="SizeFormatter.sizeFormat(status.netIO.down)">
|
<a-custom-statistic title='{{ i18n "pages.index.download" }}' :value="SizeFormatter.sizeFormat(status.netIO.down)">
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
<a-icon type="arrow-down" />
|
<a-icon type="arrow-down" />
|
||||||
</template>
|
</template>
|
||||||
<template #suffix>
|
<template #suffix>
|
||||||
/s
|
/s
|
||||||
</template>
|
</template>
|
||||||
</a-statistic>
|
</a-custom-statistic>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
</a-card>
|
</a-card>
|
||||||
|
@ -289,18 +291,18 @@
|
||||||
<a-card title='{{ i18n "pages.index.totalData" }}' hoverable>
|
<a-card title='{{ i18n "pages.index.totalData" }}' hoverable>
|
||||||
<a-row>
|
<a-row>
|
||||||
<a-col :lg="12" :sm="24" :style="{ marginTop: isMobile ? '10px' : 0 }">
|
<a-col :lg="12" :sm="24" :style="{ marginTop: isMobile ? '10px' : 0 }">
|
||||||
<a-statistic title='{{ i18n "pages.index.sent" }}' :value="SizeFormatter.sizeFormat(status.netTraffic.sent)">
|
<a-custom-statistic title='{{ i18n "pages.index.sent" }}' :value="SizeFormatter.sizeFormat(status.netTraffic.sent)">
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
<a-icon type="cloud-upload" />
|
<a-icon type="cloud-upload" />
|
||||||
</template>
|
</template>
|
||||||
</a-statistic>
|
</a-custom-statistic>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :lg="12" :sm="24" :style="{ marginTop: isMobile ? '10px' : 0 }">
|
<a-col :lg="12" :sm="24" :style="{ marginTop: isMobile ? '10px' : 0 }">
|
||||||
<a-statistic title='{{ i18n "pages.index.received" }}' :value="SizeFormatter.sizeFormat(status.netTraffic.recv)">
|
<a-custom-statistic title='{{ i18n "pages.index.received" }}' :value="SizeFormatter.sizeFormat(status.netTraffic.recv)">
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
<a-icon type="cloud-download" />
|
<a-icon type="cloud-download" />
|
||||||
</template>
|
</template>
|
||||||
</a-statistic>
|
</a-custom-statistic>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
</a-card>
|
</a-card>
|
||||||
|
@ -397,7 +399,8 @@
|
||||||
</a-modal>
|
</a-modal>
|
||||||
</a-layout>
|
</a-layout>
|
||||||
{{template "js" .}}
|
{{template "js" .}}
|
||||||
{{template "component/themeSwitcher" .}}
|
{{template "component/aThemeSwitch" .}}
|
||||||
|
{{template "component/aCustomStatistic" .}}
|
||||||
{{template "textModal"}}
|
{{template "textModal"}}
|
||||||
<script>
|
<script>
|
||||||
const State = {
|
const State = {
|
||||||
|
|
|
@ -377,7 +377,7 @@
|
||||||
<template #title>{{ i18n "pages.settings.tgNotifyCpu" }}</template>
|
<template #title>{{ i18n "pages.settings.tgNotifyCpu" }}</template>
|
||||||
<template #description>{{ i18n "pages.settings.tgNotifyCpuDesc" }}</template>
|
<template #description>{{ i18n "pages.settings.tgNotifyCpuDesc" }}</template>
|
||||||
<template #control>
|
<template #control>
|
||||||
<a-input-number :min="0" :min="100" v-model="allSetting.tgCpu"></a-switch>
|
<a-input-number :min="0" :min="100" v-model="allSetting.tgCpu" style="width: 100%;"></a-switch>
|
||||||
</template>
|
</template>
|
||||||
</a-setting-list-item>
|
</a-setting-list-item>
|
||||||
</a-collapse-panel>
|
</a-collapse-panel>
|
||||||
|
@ -663,9 +663,9 @@
|
||||||
</a-layout>
|
</a-layout>
|
||||||
{{template "js" .}}
|
{{template "js" .}}
|
||||||
<script src="{{ .base_path }}assets/js/model/setting.js?{{ .cur_ver }}"></script>
|
<script src="{{ .base_path }}assets/js/model/setting.js?{{ .cur_ver }}"></script>
|
||||||
{{template "component/themeSwitcher" .}}
|
{{template "component/aThemeSwitch" .}}
|
||||||
{{template "component/password" .}}
|
{{template "component/aPasswordInput" .}}
|
||||||
{{template "component/setting"}}
|
{{template "component/aSettingListItem" .}}
|
||||||
<script>
|
<script>
|
||||||
const app = new Vue({
|
const app = new Vue({
|
||||||
delimiters: ['[[', ']]'],
|
delimiters: ['[[', ']]'],
|
||||||
|
|
|
@ -788,9 +788,9 @@
|
||||||
</a-layout>
|
</a-layout>
|
||||||
</a-layout>
|
</a-layout>
|
||||||
{{template "js" .}}
|
{{template "js" .}}
|
||||||
{{template "component/themeSwitcher" .}}
|
{{template "component/aThemeSwitch" .}}
|
||||||
{{template "component/sortableTable" .}}
|
{{template "component/aTableSortable" .}}
|
||||||
{{template "component/setting"}}
|
{{template "component/aSettingListItem" .}}
|
||||||
{{template "ruleModal"}}
|
{{template "ruleModal"}}
|
||||||
{{template "outModal"}}
|
{{template "outModal"}}
|
||||||
{{template "reverseModal"}}
|
{{template "reverseModal"}}
|
||||||
|
|
|
@ -67,6 +67,9 @@
|
||||||
"emptyReverseDesc" = "No added reverse proxies."
|
"emptyReverseDesc" = "No added reverse proxies."
|
||||||
|
|
||||||
[menu]
|
[menu]
|
||||||
|
"theme" = "Theme"
|
||||||
|
"dark" = "Dark"
|
||||||
|
"ultraDark" = "Ultra Dark"
|
||||||
"dashboard" = "Overview"
|
"dashboard" = "Overview"
|
||||||
"inbounds" = "Inbounds"
|
"inbounds" = "Inbounds"
|
||||||
"settings" = "Panel Settings"
|
"settings" = "Panel Settings"
|
||||||
|
@ -429,6 +432,7 @@
|
||||||
"type" = "Type"
|
"type" = "Type"
|
||||||
"bridge" = "Bridge"
|
"bridge" = "Bridge"
|
||||||
"portal" = "Portal"
|
"portal" = "Portal"
|
||||||
|
"link" = "Link"
|
||||||
"intercon" = "Interconnection"
|
"intercon" = "Interconnection"
|
||||||
"settings" = "Settings"
|
"settings" = "Settings"
|
||||||
"accountInfo" = "Account Information"
|
"accountInfo" = "Account Information"
|
||||||
|
|
|
@ -67,6 +67,9 @@
|
||||||
"emptyReverseDesc" = "No hay proxies inversos añadidos."
|
"emptyReverseDesc" = "No hay proxies inversos añadidos."
|
||||||
|
|
||||||
[menu]
|
[menu]
|
||||||
|
"theme" = "Tema"
|
||||||
|
"dark" = "Oscuro"
|
||||||
|
"ultraDark" = "Ultra Oscuro"
|
||||||
"dashboard" = "Estado del Sistema"
|
"dashboard" = "Estado del Sistema"
|
||||||
"inbounds" = "Entradas"
|
"inbounds" = "Entradas"
|
||||||
"settings" = "Configuraciones"
|
"settings" = "Configuraciones"
|
||||||
|
@ -431,6 +434,7 @@
|
||||||
"type" = "Tipo"
|
"type" = "Tipo"
|
||||||
"bridge" = "puente"
|
"bridge" = "puente"
|
||||||
"portal" = "portal"
|
"portal" = "portal"
|
||||||
|
"link" = "Enlace"
|
||||||
"intercon" = "Interconexión"
|
"intercon" = "Interconexión"
|
||||||
"settings" = "Configuración"
|
"settings" = "Configuración"
|
||||||
"accountInfo" = "Información de la Cuenta"
|
"accountInfo" = "Información de la Cuenta"
|
||||||
|
|
|
@ -67,6 +67,9 @@
|
||||||
"emptyReverseDesc" = "هیچ پروکسی معکوس اضافه نشده است."
|
"emptyReverseDesc" = "هیچ پروکسی معکوس اضافه نشده است."
|
||||||
|
|
||||||
[menu]
|
[menu]
|
||||||
|
"theme" = "تم"
|
||||||
|
"dark" = "تیره"
|
||||||
|
"ultraDark" = "فوق تیره"
|
||||||
"dashboard" = "نمای کلی"
|
"dashboard" = "نمای کلی"
|
||||||
"inbounds" = "ورودیها"
|
"inbounds" = "ورودیها"
|
||||||
"settings" = "تنظیمات پنل"
|
"settings" = "تنظیمات پنل"
|
||||||
|
@ -431,6 +434,7 @@
|
||||||
"type" = "نوع"
|
"type" = "نوع"
|
||||||
"bridge" = "پل"
|
"bridge" = "پل"
|
||||||
"portal" = "پورتال"
|
"portal" = "پورتال"
|
||||||
|
"link" = "لینک"
|
||||||
"intercon" = "اتصال میانی"
|
"intercon" = "اتصال میانی"
|
||||||
"settings" = "تنظیمات"
|
"settings" = "تنظیمات"
|
||||||
"accountInfo" = "اطلاعات حساب"
|
"accountInfo" = "اطلاعات حساب"
|
||||||
|
|
|
@ -67,6 +67,9 @@
|
||||||
"emptyReverseDesc" = "Tidak ada proxy terbalik yang ditambahkan."
|
"emptyReverseDesc" = "Tidak ada proxy terbalik yang ditambahkan."
|
||||||
|
|
||||||
[menu]
|
[menu]
|
||||||
|
"theme" = "Tema"
|
||||||
|
"dark" = "Gelap"
|
||||||
|
"ultraDark" = "Sangat Gelap"
|
||||||
"dashboard" = "Ikhtisar"
|
"dashboard" = "Ikhtisar"
|
||||||
"inbounds" = "Masuk"
|
"inbounds" = "Masuk"
|
||||||
"settings" = "Pengaturan Panel"
|
"settings" = "Pengaturan Panel"
|
||||||
|
@ -430,6 +433,7 @@
|
||||||
"type" = "Tipe"
|
"type" = "Tipe"
|
||||||
"bridge" = "Jembatan"
|
"bridge" = "Jembatan"
|
||||||
"portal" = "Portal"
|
"portal" = "Portal"
|
||||||
|
"link" = "Tautan"
|
||||||
"intercon" = "Interkoneksi"
|
"intercon" = "Interkoneksi"
|
||||||
"settings" = "Pengaturan"
|
"settings" = "Pengaturan"
|
||||||
"accountInfo" = "Informasi Akun"
|
"accountInfo" = "Informasi Akun"
|
||||||
|
|
|
@ -67,6 +67,9 @@
|
||||||
"emptyReverseDesc" = "追加されたリバースプロキシはありません。"
|
"emptyReverseDesc" = "追加されたリバースプロキシはありません。"
|
||||||
|
|
||||||
[menu]
|
[menu]
|
||||||
|
"theme" = "テーマ"
|
||||||
|
"dark" = "ダーク"
|
||||||
|
"ultraDark" = "ウルトラダーク"
|
||||||
"dashboard" = "ダッシュボード"
|
"dashboard" = "ダッシュボード"
|
||||||
"inbounds" = "インバウンド一覧"
|
"inbounds" = "インバウンド一覧"
|
||||||
"settings" = "パネル設定"
|
"settings" = "パネル設定"
|
||||||
|
@ -431,6 +434,7 @@
|
||||||
"type" = "タイプ"
|
"type" = "タイプ"
|
||||||
"bridge" = "ブリッジ"
|
"bridge" = "ブリッジ"
|
||||||
"portal" = "ポータル"
|
"portal" = "ポータル"
|
||||||
|
"link" = "リンク"
|
||||||
"intercon" = "インターコネクション"
|
"intercon" = "インターコネクション"
|
||||||
"settings" = "設定"
|
"settings" = "設定"
|
||||||
"accountInfo" = "アカウント情報"
|
"accountInfo" = "アカウント情報"
|
||||||
|
|
|
@ -67,6 +67,9 @@
|
||||||
"emptyReverseDesc" = "Nenhum proxy reverso adicionado."
|
"emptyReverseDesc" = "Nenhum proxy reverso adicionado."
|
||||||
|
|
||||||
[menu]
|
[menu]
|
||||||
|
"theme" = "Tema"
|
||||||
|
"dark" = "Escuro"
|
||||||
|
"ultraDark" = "Ultra Escuro"
|
||||||
"dashboard" = "Visão Geral"
|
"dashboard" = "Visão Geral"
|
||||||
"inbounds" = "Inbounds"
|
"inbounds" = "Inbounds"
|
||||||
"settings" = "Panel Settings"
|
"settings" = "Panel Settings"
|
||||||
|
@ -431,6 +434,7 @@
|
||||||
"type" = "Tipo"
|
"type" = "Tipo"
|
||||||
"bridge" = "Ponte"
|
"bridge" = "Ponte"
|
||||||
"portal" = "Portal"
|
"portal" = "Portal"
|
||||||
|
"link" = "Link"
|
||||||
"intercon" = "Interconexão"
|
"intercon" = "Interconexão"
|
||||||
"settings" = "Configurações"
|
"settings" = "Configurações"
|
||||||
"accountInfo" = "Informações da Conta"
|
"accountInfo" = "Informações da Conta"
|
||||||
|
|
|
@ -67,6 +67,9 @@
|
||||||
"emptyReverseDesc" = "Нет добавленных обратных прокси."
|
"emptyReverseDesc" = "Нет добавленных обратных прокси."
|
||||||
|
|
||||||
[menu]
|
[menu]
|
||||||
|
"theme" = "Тема"
|
||||||
|
"dark" = "Темная"
|
||||||
|
"ultraDark" = "Ультра темная"
|
||||||
"dashboard" = "Статус системы"
|
"dashboard" = "Статус системы"
|
||||||
"inbounds" = "Подключения"
|
"inbounds" = "Подключения"
|
||||||
"settings" = "Настройки панели"
|
"settings" = "Настройки панели"
|
||||||
|
@ -431,6 +434,7 @@
|
||||||
"type" = "Тип"
|
"type" = "Тип"
|
||||||
"bridge" = "Мост"
|
"bridge" = "Мост"
|
||||||
"portal" = "Портал"
|
"portal" = "Портал"
|
||||||
|
"link" = "Ссылка"
|
||||||
"intercon" = "Соединение"
|
"intercon" = "Соединение"
|
||||||
"settings" = "Настройки"
|
"settings" = "Настройки"
|
||||||
"accountInfo" = "Информация об учетной записи"
|
"accountInfo" = "Информация об учетной записи"
|
||||||
|
|
|
@ -67,6 +67,9 @@
|
||||||
"emptyReverseDesc" = "Eklenmiş ters proxy yok."
|
"emptyReverseDesc" = "Eklenmiş ters proxy yok."
|
||||||
|
|
||||||
[menu]
|
[menu]
|
||||||
|
"theme" = "Tema"
|
||||||
|
"dark" = "Koyu"
|
||||||
|
"ultraDark" = "Ultra Koyu"
|
||||||
"dashboard" = "Genel Bakış"
|
"dashboard" = "Genel Bakış"
|
||||||
"inbounds" = "Gelenler"
|
"inbounds" = "Gelenler"
|
||||||
"settings" = "Panel Ayarları"
|
"settings" = "Panel Ayarları"
|
||||||
|
@ -431,6 +434,7 @@
|
||||||
"type" = "Tür"
|
"type" = "Tür"
|
||||||
"bridge" = "Köprü"
|
"bridge" = "Köprü"
|
||||||
"portal" = "Portal"
|
"portal" = "Portal"
|
||||||
|
"link" = "Bağlantı"
|
||||||
"intercon" = "Bağlantı"
|
"intercon" = "Bağlantı"
|
||||||
"settings" = "Ayarlar"
|
"settings" = "Ayarlar"
|
||||||
"accountInfo" = "Hesap Bilgileri"
|
"accountInfo" = "Hesap Bilgileri"
|
||||||
|
|
|
@ -67,6 +67,9 @@
|
||||||
"emptyReverseDesc" = "Немає доданих зворотних проксі."
|
"emptyReverseDesc" = "Немає доданих зворотних проксі."
|
||||||
|
|
||||||
[menu]
|
[menu]
|
||||||
|
"theme" = "Тема"
|
||||||
|
"dark" = "Темна"
|
||||||
|
"ultraDark" = "Ультра темна"
|
||||||
"dashboard" = "Огляд"
|
"dashboard" = "Огляд"
|
||||||
"inbounds" = "Вхідні"
|
"inbounds" = "Вхідні"
|
||||||
"settings" = "Параметри панелі"
|
"settings" = "Параметри панелі"
|
||||||
|
@ -431,6 +434,7 @@
|
||||||
"type" = "Тип"
|
"type" = "Тип"
|
||||||
"bridge" = "Міст"
|
"bridge" = "Міст"
|
||||||
"portal" = "Портал"
|
"portal" = "Портал"
|
||||||
|
"link" = "Посилання"
|
||||||
"intercon" = "Взаємозв'язок"
|
"intercon" = "Взаємозв'язок"
|
||||||
"settings" = "Налаштування"
|
"settings" = "Налаштування"
|
||||||
"accountInfo" = "Інформація про обліковий запис"
|
"accountInfo" = "Інформація про обліковий запис"
|
||||||
|
|
|
@ -67,6 +67,9 @@
|
||||||
"emptyReverseDesc" = "Không có proxy ngược nào được thêm."
|
"emptyReverseDesc" = "Không có proxy ngược nào được thêm."
|
||||||
|
|
||||||
[menu]
|
[menu]
|
||||||
|
"theme" = "Chủ đề"
|
||||||
|
"dark" = "Tối"
|
||||||
|
"ultraDark" = "Siêu tối"
|
||||||
"dashboard" = "Trạng thái hệ thống"
|
"dashboard" = "Trạng thái hệ thống"
|
||||||
"inbounds" = "Đầu vào khách hàng"
|
"inbounds" = "Đầu vào khách hàng"
|
||||||
"settings" = "Cài đặt bảng điều khiển"
|
"settings" = "Cài đặt bảng điều khiển"
|
||||||
|
@ -431,6 +434,7 @@
|
||||||
"type" = "Loại"
|
"type" = "Loại"
|
||||||
"bridge" = "Cầu"
|
"bridge" = "Cầu"
|
||||||
"portal" = "Cổng thông tin"
|
"portal" = "Cổng thông tin"
|
||||||
|
"link" = "Liên kết"
|
||||||
"intercon" = "Kết nối"
|
"intercon" = "Kết nối"
|
||||||
"settings" = "cài đặt"
|
"settings" = "cài đặt"
|
||||||
"accountInfo" = "Thông tin tài khoản"
|
"accountInfo" = "Thông tin tài khoản"
|
||||||
|
|
|
@ -67,6 +67,9 @@
|
||||||
"emptyReverseDesc" = "未添加反向代理。"
|
"emptyReverseDesc" = "未添加反向代理。"
|
||||||
|
|
||||||
[menu]
|
[menu]
|
||||||
|
"theme" = "主题"
|
||||||
|
"dark" = "暗色"
|
||||||
|
"ultraDark" = "超暗色"
|
||||||
"dashboard" = "系统状态"
|
"dashboard" = "系统状态"
|
||||||
"inbounds" = "入站列表"
|
"inbounds" = "入站列表"
|
||||||
"settings" = "面板设置"
|
"settings" = "面板设置"
|
||||||
|
@ -431,6 +434,7 @@
|
||||||
"type" = "类型"
|
"type" = "类型"
|
||||||
"bridge" = "Bridge"
|
"bridge" = "Bridge"
|
||||||
"portal" = "Portal"
|
"portal" = "Portal"
|
||||||
|
"link" = "链接"
|
||||||
"intercon" = "互连"
|
"intercon" = "互连"
|
||||||
"settings" = "设置"
|
"settings" = "设置"
|
||||||
"accountInfo" = "帐户信息"
|
"accountInfo" = "帐户信息"
|
||||||
|
|
|
@ -67,6 +67,9 @@
|
||||||
"emptyReverseDesc" = "未添加反向代理。"
|
"emptyReverseDesc" = "未添加反向代理。"
|
||||||
|
|
||||||
[menu]
|
[menu]
|
||||||
|
"theme" = "主題"
|
||||||
|
"dark" = "深色"
|
||||||
|
"ultraDark" = "超深色"
|
||||||
"dashboard" = "系統狀態"
|
"dashboard" = "系統狀態"
|
||||||
"inbounds" = "入站列表"
|
"inbounds" = "入站列表"
|
||||||
"settings" = "面板設定"
|
"settings" = "面板設定"
|
||||||
|
@ -431,6 +434,7 @@
|
||||||
"type" = "類型"
|
"type" = "類型"
|
||||||
"bridge" = "Bridge"
|
"bridge" = "Bridge"
|
||||||
"portal" = "Portal"
|
"portal" = "Portal"
|
||||||
|
"link" = "連結"
|
||||||
"intercon" = "互連"
|
"intercon" = "互連"
|
||||||
"settings" = "設定"
|
"settings" = "設定"
|
||||||
"accountInfo" = "帳戶資訊"
|
"accountInfo" = "帳戶資訊"
|
||||||
|
|
58
x-ui.sh
58
x-ui.sh
|
@ -1127,7 +1127,7 @@ ssl_cert_issue() {
|
||||||
|
|
||||||
# issue the certificate
|
# issue the certificate
|
||||||
~/.acme.sh/acme.sh --set-default-ca --server letsencrypt
|
~/.acme.sh/acme.sh --set-default-ca --server letsencrypt
|
||||||
~/.acme.sh/acme.sh --issue -d ${domain} --listen-v6 --standalone --httpport ${WebPort}
|
~/.acme.sh/acme.sh --issue -d ${domain} --listen-v6 --standalone --httpport ${WebPort} --force
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
LOGE "Issuing certificate failed, please check logs."
|
LOGE "Issuing certificate failed, please check logs."
|
||||||
rm -rf ~/.acme.sh/${domain}
|
rm -rf ~/.acme.sh/${domain}
|
||||||
|
@ -1208,13 +1208,6 @@ ssl_cert_issue_CF() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
CF_Domain=""
|
CF_Domain=""
|
||||||
certPath="/root/cert-CF"
|
|
||||||
if [ ! -d "$certPath" ]; then
|
|
||||||
mkdir -p $certPath
|
|
||||||
else
|
|
||||||
rm -rf $certPath
|
|
||||||
mkdir -p $certPath
|
|
||||||
fi
|
|
||||||
|
|
||||||
LOGD "Please set a domain name:"
|
LOGD "Please set a domain name:"
|
||||||
read -p "Input your domain here: " CF_Domain
|
read -p "Input your domain here: " CF_Domain
|
||||||
|
@ -1242,7 +1235,7 @@ ssl_cert_issue_CF() {
|
||||||
export CF_Email="${CF_AccountEmail}"
|
export CF_Email="${CF_AccountEmail}"
|
||||||
|
|
||||||
# Issue the certificate using Cloudflare DNS
|
# Issue the certificate using Cloudflare DNS
|
||||||
~/.acme.sh/acme.sh --issue --dns dns_cf -d ${CF_Domain} -d *.${CF_Domain} --log
|
~/.acme.sh/acme.sh --issue --dns dns_cf -d ${CF_Domain} -d *.${CF_Domain} --log --force
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
LOGE "Certificate issuance failed, script exiting..."
|
LOGE "Certificate issuance failed, script exiting..."
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -1251,16 +1244,44 @@ ssl_cert_issue_CF() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Install the certificate
|
# Install the certificate
|
||||||
mkdir -p ${certPath}/${CF_Domain}
|
certPath="/root/cert/${CF_Domain}"
|
||||||
|
if [ -d "$certPath" ]; then
|
||||||
|
rm -rf ${certPath}
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkdir -p ${certPath}
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
LOGE "Failed to create directory: ${certPath}/${CF_Domain}"
|
LOGE "Failed to create directory: ${certPath}"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
~/.acme.sh/acme.sh --installcert -d ${CF_Domain} -d *.${CF_Domain} \
|
reloadCmd="x-ui restart"
|
||||||
--fullchain-file ${certPath}/${CF_Domain}/fullchain.pem \
|
|
||||||
--key-file ${certPath}/${CF_Domain}/privkey.pem
|
|
||||||
|
|
||||||
|
LOGI "Default --reloadcmd for ACME is: ${yellow}x-ui restart"
|
||||||
|
LOGI "This command will run on every certificate issue and renew."
|
||||||
|
read -p "Would you like to modify --reloadcmd for ACME? (y/n): " setReloadcmd
|
||||||
|
if [[ "$setReloadcmd" == "y" || "$setReloadcmd" == "Y" ]]; then
|
||||||
|
echo -e "\n${green}\t1.${plain} Preset: x-ui restart ; systemctl reload nginx"
|
||||||
|
echo -e "${green}\t2.${plain} Input your own command"
|
||||||
|
echo -e "${green}\t0.${plain} Keep default reloadcmd"
|
||||||
|
read -p "Choose an option: " choice
|
||||||
|
case "$choice" in
|
||||||
|
1)
|
||||||
|
LOGI "Reloadcmd is: x-ui restart ; systemctl reload nginx"
|
||||||
|
reloadCmd="x-ui restart ; systemctl reload nginx"
|
||||||
|
;;
|
||||||
|
2)
|
||||||
|
read -p "Please enter your reloadcmd (example: x-ui restart ; systemctl reload nginx): " reloadCmd
|
||||||
|
LOGI "Your reloadcmd is: ${reloadCmd}"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
LOGI "Keep default reloadcmd"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
~/.acme.sh/acme.sh --installcert -d ${CF_Domain} -d *.${CF_Domain} \
|
||||||
|
--key-file ${certPath}/privkey.pem \
|
||||||
|
--fullchain-file ${certPath}/fullchain.pem --reloadcmd "${reloadCmd}"
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
LOGE "Certificate installation failed, script exiting..."
|
LOGE "Certificate installation failed, script exiting..."
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -1275,15 +1296,15 @@ ssl_cert_issue_CF() {
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
LOGI "The certificate is installed and auto-renewal is turned on. Specific information is as follows:"
|
LOGI "The certificate is installed and auto-renewal is turned on. Specific information is as follows:"
|
||||||
ls -lah ${certPath}/${CF_Domain}
|
ls -lah ${certPath}/*
|
||||||
chmod 755 ${certPath}/${CF_Domain}
|
chmod 755 ${certPath}/*
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Prompt user to set panel paths after successful certificate installation
|
# Prompt user to set panel paths after successful certificate installation
|
||||||
read -p "Would you like to set this certificate for the panel? (y/n): " setPanel
|
read -p "Would you like to set this certificate for the panel? (y/n): " setPanel
|
||||||
if [[ "$setPanel" == "y" || "$setPanel" == "Y" ]]; then
|
if [[ "$setPanel" == "y" || "$setPanel" == "Y" ]]; then
|
||||||
local webCertFile="${certPath}/${CF_Domain}/fullchain.pem"
|
local webCertFile="${certPath}/fullchain.pem"
|
||||||
local webKeyFile="${certPath}/${CF_Domain}/privkey.pem"
|
local webKeyFile="${certPath}/privkey.pem"
|
||||||
|
|
||||||
if [[ -f "$webCertFile" && -f "$webKeyFile" ]]; then
|
if [[ -f "$webCertFile" && -f "$webKeyFile" ]]; then
|
||||||
/usr/local/x-ui/x-ui cert -webCert "$webCertFile" -webCertKey "$webKeyFile"
|
/usr/local/x-ui/x-ui cert -webCert "$webCertFile" -webCertKey "$webKeyFile"
|
||||||
|
@ -1585,7 +1606,6 @@ install_iplimit() {
|
||||||
# Launching fail2ban
|
# Launching fail2ban
|
||||||
if ! systemctl is-active --quiet fail2ban; then
|
if ! systemctl is-active --quiet fail2ban; then
|
||||||
systemctl start fail2ban
|
systemctl start fail2ban
|
||||||
systemctl enable fail2ban
|
|
||||||
else
|
else
|
||||||
systemctl restart fail2ban
|
systemctl restart fail2ban
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue