Compare commits
No commits in common. "68129cd5d03983f66bc08b00e458f56895a0c8c1" and "ab2e6220fc5b534a43661b06c8643e1cbb4c9b95" have entirely different histories.
68129cd5d0
...
ab2e6220fc
16
package.json
16
package.json
|
@ -11,25 +11,23 @@
|
||||||
"test": "echo \"No test specified\" && exit 0"
|
"test": "echo \"No test specified\" && exit 0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@quasar/extras": "^1.0.0",
|
|
||||||
"@waiting/base64": "^4.2.9",
|
|
||||||
"axios": "^1.2.1",
|
"axios": "^1.2.1",
|
||||||
"js-base64": "^3.7.5",
|
"vuex": "^4.0.1",
|
||||||
|
"@quasar/extras": "^1.0.0",
|
||||||
"quasar": "^2.6.0",
|
"quasar": "^2.6.0",
|
||||||
"vue": "^3.0.0",
|
"vue": "^3.0.0",
|
||||||
"vue-router": "^4.0.0",
|
"vue-router": "^4.0.0"
|
||||||
"vuex": "^4.0.1"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@quasar/app-vite": "^1.0.0",
|
|
||||||
"@types/node": "^12.20.21",
|
|
||||||
"@typescript-eslint/eslint-plugin": "^5.10.0",
|
"@typescript-eslint/eslint-plugin": "^5.10.0",
|
||||||
"@typescript-eslint/parser": "^5.10.0",
|
"@typescript-eslint/parser": "^5.10.0",
|
||||||
"autoprefixer": "^10.4.2",
|
|
||||||
"eslint": "^8.10.0",
|
"eslint": "^8.10.0",
|
||||||
"eslint-config-prettier": "^8.1.0",
|
|
||||||
"eslint-plugin-vue": "^9.0.0",
|
"eslint-plugin-vue": "^9.0.0",
|
||||||
|
"eslint-config-prettier": "^8.1.0",
|
||||||
"prettier": "^2.5.1",
|
"prettier": "^2.5.1",
|
||||||
|
"@types/node": "^12.20.21",
|
||||||
|
"@quasar/app-vite": "^1.0.0",
|
||||||
|
"autoprefixer": "^10.4.2",
|
||||||
"typescript": "^4.5.4"
|
"typescript": "^4.5.4"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|
|
@ -85,11 +85,7 @@ module.exports = configure(function (/* ctx */) {
|
||||||
|
|
||||||
// https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#framework
|
// https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#framework
|
||||||
framework: {
|
framework: {
|
||||||
config: {
|
config: {},
|
||||||
notify: {
|
|
||||||
/* look at QuasarConfOptions from the API card */
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
// iconSet: 'material-icons', // Quasar icon set
|
// iconSet: 'material-icons', // Quasar icon set
|
||||||
// lang: 'en-US', // Quasar language pack
|
// lang: 'en-US', // Quasar language pack
|
||||||
|
@ -102,7 +98,7 @@ module.exports = configure(function (/* ctx */) {
|
||||||
// directives: [],
|
// directives: [],
|
||||||
|
|
||||||
// Quasar plugins
|
// Quasar plugins
|
||||||
plugins: ['Notify'],
|
plugins: [],
|
||||||
},
|
},
|
||||||
|
|
||||||
// animations: 'all', // --- includes all animations
|
// animations: 'all', // --- includes all animations
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
import { api } from 'src/boot/axios';
|
|
||||||
class getdata {
|
|
||||||
async get_server() {
|
|
||||||
return await api.get('https://api.shagain.club/api.php?type=list');
|
|
||||||
}
|
|
||||||
async text_server(url: string) {
|
|
||||||
return await api.post('http://149.129.107.38:1323/textserver', { url });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
export { getdata };
|
|
|
@ -1,84 +0,0 @@
|
||||||
<template>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-12">
|
|
||||||
<h6 style="text-align: center;margin: 1rem;">{{ props.serve.tips }} <q-icon v-show="online" title="在线"
|
|
||||||
name="check_circle_outline" style="color: green;" /> <q-icon v-show="!online" title="离线" name="hide_source"
|
|
||||||
style="color: red;" /></h6>
|
|
||||||
<q-input v-model="outtext" filled autogrow />
|
|
||||||
<div style="text-align: center;margin-top: 1rem;">
|
|
||||||
<q-btn color="white" text-color="black" @click="copy" label="复制" />
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts">
|
|
||||||
import {
|
|
||||||
defineComponent,
|
|
||||||
computed,
|
|
||||||
ref,
|
|
||||||
} from 'vue';
|
|
||||||
import { copyToClipboard } from 'quasar'
|
|
||||||
import { encode, decode } from 'js-base64';
|
|
||||||
import { useQuasar } from 'quasar'
|
|
||||||
import { getdata } from 'src/api/api'
|
|
||||||
export default defineComponent({
|
|
||||||
name: 'LinkItem',
|
|
||||||
props: {
|
|
||||||
serve: {
|
|
||||||
type: Object,
|
|
||||||
required: true
|
|
||||||
},
|
|
||||||
text: {
|
|
||||||
type: String
|
|
||||||
}
|
|
||||||
},
|
|
||||||
setup(props) {
|
|
||||||
const online = ref(false);
|
|
||||||
const isonline = () => {
|
|
||||||
let obj = JSON.parse(decode(props.text!.replace('vmess://', '')));
|
|
||||||
let http = props.serve.istls == 0 ? 'http' : 'https'
|
|
||||||
let reg = new RegExp(/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/);
|
|
||||||
let ip = obj.ps.match(reg)[0];
|
|
||||||
api.text_server(`${http}://${props.serve.ip}:${props.serve.port}/${ip}`).then(res => {
|
|
||||||
online.value = res.data.sataus == 400
|
|
||||||
})
|
|
||||||
}
|
|
||||||
const api = new getdata;
|
|
||||||
const $q = useQuasar()
|
|
||||||
const outtext = computed(() => {
|
|
||||||
let obj = JSON.parse(decode(props.text!.replace('vmess://', '')));
|
|
||||||
obj.add = props.serve.ip
|
|
||||||
obj.port = props.serve.port
|
|
||||||
obj.host = props.serve.host
|
|
||||||
obj.tls = props.serve.istls == 0 ? '' : 'tls'
|
|
||||||
let reg = new RegExp(/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/);
|
|
||||||
obj.path = '/' + obj.ps.match(reg)[0];
|
|
||||||
isonline()
|
|
||||||
return 'vmess://' + encode(JSON.stringify(obj))
|
|
||||||
})
|
|
||||||
const copy = () => {
|
|
||||||
|
|
||||||
// api.text_server('http://uszz.giaogiao.uk:8080/34.125.44.195').then(res => { console.log(res.data) })
|
|
||||||
copyToClipboard(outtext.value)
|
|
||||||
.then(() => {
|
|
||||||
// success!
|
|
||||||
$q.notify({
|
|
||||||
message: '复制成功',
|
|
||||||
color: 'purple',
|
|
||||||
position: 'top'
|
|
||||||
})
|
|
||||||
})
|
|
||||||
.catch(() => {
|
|
||||||
// fail
|
|
||||||
$q.notify({
|
|
||||||
message: '复制失败',
|
|
||||||
color: 'purple'
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
return { props, outtext, copy, online };
|
|
||||||
},
|
|
||||||
});
|
|
||||||
</script>
|
|
|
@ -6,11 +6,3 @@ export interface Todo {
|
||||||
export interface Meta {
|
export interface Meta {
|
||||||
totalCount: number;
|
totalCount: number;
|
||||||
}
|
}
|
||||||
export interface server {
|
|
||||||
host: string;
|
|
||||||
id: number;
|
|
||||||
ip: string;
|
|
||||||
istls: number;
|
|
||||||
port: number;
|
|
||||||
tips: string;
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
<template>
|
<template>
|
||||||
<q-layout view="hHh lpR fFf">
|
<q-layout view="hHh lpR fFf">
|
||||||
|
|
||||||
<q-page-container>
|
<q-page-container>
|
||||||
<router-view />
|
<router-view />
|
||||||
</q-page-container>
|
</q-page-container>
|
||||||
|
|
||||||
</q-layout>
|
</q-layout>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -1,76 +1,44 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<q-page class="row items-center justify-evenly">
|
||||||
<div class="row">
|
<example-component title="Example component" active :todos="todos" :meta="meta"></example-component>
|
||||||
<div class="col-xs-1 col-md-4"></div>
|
</q-page>
|
||||||
<div class="col-xs-10 col-md-4">
|
|
||||||
<h6 style="text-align: center;margin: 1rem;">节点<q-icon v-show="online" title="在线" name="check_circle_outline"
|
|
||||||
style="color: green;" /> <q-icon v-show="!online" title="离线" name="hide_source" style="color: red;" /></h6>
|
|
||||||
<q-input v-model="text" filled autogrow />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div v-if="isobj">
|
|
||||||
<div class="row" v-for="(item, index) in serve" :key="index">
|
|
||||||
<div class="col-xs-1 col-md-4"></div>
|
|
||||||
<div class="col-xs-10 col-md-4">
|
|
||||||
<LinkItem :serve="item" v-model:text="text"></LinkItem>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { server } from 'components/models';
|
import { Todo, Meta } from 'components/models';
|
||||||
import { computed, defineComponent, onMounted, ref } from 'vue';
|
import ExampleComponent from 'components/ExampleComponent.vue';
|
||||||
import { getdata } from 'src/api/api'
|
import { defineComponent, ref } from 'vue';
|
||||||
import LinkItem from 'components/LinkItem.vue';
|
|
||||||
import { b64decode } from '@waiting/base64'
|
|
||||||
import { encode, decode } from 'js-base64';
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'IndexPage',
|
name: 'IndexPage',
|
||||||
components: { LinkItem },
|
components: { ExampleComponent },
|
||||||
setup() {
|
setup() {
|
||||||
const serve = ref(<server[]>[])
|
const todos = ref<Todo[]>([
|
||||||
const api = new getdata;
|
{
|
||||||
const text = ref('');
|
id: 1,
|
||||||
const online = ref(false);
|
content: 'ct1'
|
||||||
onMounted(() => {
|
},
|
||||||
api.get_server().then((res) => {
|
{
|
||||||
for (let index = 0; index < res.data.length; index++) {
|
id: 2,
|
||||||
serve.value.push(res.data[index]);
|
content: 'ct2'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 3,
|
||||||
|
content: 'ct3'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 4,
|
||||||
|
content: 'ct4'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 5,
|
||||||
|
content: 'ct5'
|
||||||
}
|
}
|
||||||
})
|
]);
|
||||||
})
|
const meta = ref<Meta>({
|
||||||
const isobj = computed(() => {
|
totalCount: 1200
|
||||||
try {
|
});
|
||||||
let obj = JSON.parse(decode(text.value.replace('vmess://', '')));
|
return { todos, meta };
|
||||||
if (obj.id != '2ee57806-f6e4-482a-ef08-7360c04cd3e5' || obj.net != 'ws') {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
isonline()
|
|
||||||
} catch (error) {
|
|
||||||
console.log(error);
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
return true
|
|
||||||
})
|
|
||||||
const isonline = () => {
|
|
||||||
let obj = JSON.parse(decode(text.value!.replace('vmess://', '')));
|
|
||||||
let reg = new RegExp(/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/);
|
|
||||||
let ip = obj.ps.match(reg)[0];
|
|
||||||
api.text_server(`http://${ip}:9000/`).then(res => {
|
|
||||||
online.value = res.data.sataus == 400
|
|
||||||
})
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
serve,
|
|
||||||
text,
|
|
||||||
isobj,
|
|
||||||
online
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
10
yarn.lock
10
yarn.lock
|
@ -451,11 +451,6 @@
|
||||||
resolved "https://registry.npmmirror.com/@vue/shared/-/shared-3.2.47.tgz#e597ef75086c6e896ff5478a6bfc0a7aa4bbd14c"
|
resolved "https://registry.npmmirror.com/@vue/shared/-/shared-3.2.47.tgz#e597ef75086c6e896ff5478a6bfc0a7aa4bbd14c"
|
||||||
integrity sha512-BHGyyGN3Q97EZx0taMQ+OLNuZcW3d37ZEVmEAyeoA9ERdGvm9Irc/0Fua8SNyOtV1w6BS4q25wbMzJujO9HIfQ==
|
integrity sha512-BHGyyGN3Q97EZx0taMQ+OLNuZcW3d37ZEVmEAyeoA9ERdGvm9Irc/0Fua8SNyOtV1w6BS4q25wbMzJujO9HIfQ==
|
||||||
|
|
||||||
"@waiting/base64@^4.2.9":
|
|
||||||
version "4.2.9"
|
|
||||||
resolved "https://registry.npmmirror.com/@waiting/base64/-/base64-4.2.9.tgz#fa7e98d1a317355fed0cfb0ebdf94c361b9a3acf"
|
|
||||||
integrity sha512-yzt9ih63oePux/sQM8Df6DTv1IeXGByaHrFiJoPszk0LaJwIGJ3IKhKhT/O6YMo2RignlP2cfxoo1lGmKZPIgQ==
|
|
||||||
|
|
||||||
accepts@~1.3.5, accepts@~1.3.8:
|
accepts@~1.3.5, accepts@~1.3.8:
|
||||||
version "1.3.8"
|
version "1.3.8"
|
||||||
resolved "https://registry.npmmirror.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e"
|
resolved "https://registry.npmmirror.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e"
|
||||||
|
@ -1941,11 +1936,6 @@ jake@^10.8.5:
|
||||||
filelist "^1.0.1"
|
filelist "^1.0.1"
|
||||||
minimatch "^3.0.4"
|
minimatch "^3.0.4"
|
||||||
|
|
||||||
js-base64@^3.7.5:
|
|
||||||
version "3.7.5"
|
|
||||||
resolved "https://registry.npmmirror.com/js-base64/-/js-base64-3.7.5.tgz#21e24cf6b886f76d6f5f165bfcd69cc55b9e3fca"
|
|
||||||
integrity sha512-3MEt5DTINKqfScXKfJFrRbxkrnk2AxPWGBL/ycjz4dK8iqiSJ06UxD8jh8xuh6p10TX4t2+7FsBYVxxQbMg+qA==
|
|
||||||
|
|
||||||
js-sdsl@^4.1.4:
|
js-sdsl@^4.1.4:
|
||||||
version "4.3.0"
|
version "4.3.0"
|
||||||
resolved "https://registry.npmmirror.com/js-sdsl/-/js-sdsl-4.3.0.tgz#aeefe32a451f7af88425b11fdb5f58c90ae1d711"
|
resolved "https://registry.npmmirror.com/js-sdsl/-/js-sdsl-4.3.0.tgz#aeefe32a451f7af88425b11fdb5f58c90ae1d711"
|
||||||
|
|
Loading…
Reference in New Issue