fix : 隧道模拟功能初步完成

This commit is contained in:
dj
2025-01-03 21:22:08 +08:00
parent 56bdf6ee1e
commit 2dd7bcffca

View File

@@ -7,7 +7,6 @@ import Icons from 'unplugin-icons/vite'
import IconsResolver from 'unplugin-icons/resolver' import IconsResolver from 'unplugin-icons/resolver'
import vue from '@vitejs/plugin-vue' import vue from '@vitejs/plugin-vue'
import Inspect from 'vite-plugin-inspect' import Inspect from 'vite-plugin-inspect'
export default defineConfig({ export default defineConfig({
plugins: [ plugins: [
vue(), vue(),
@@ -58,14 +57,13 @@ export default defineConfig({
strictPort: false, strictPort: false,
open: true, open: true,
proxy: { proxy: {
// // '/api/tunnel': { // '/api/tunnel': {
// '/tunnel': {
//
// // // target: 'http://gateway.feashow.cn', // // // target: 'http://gateway.feashow.cn',
// target: 'http://frp.feashow.cn:31800/', // // target: 'http://frp.feashow.cn:31800/',
// // target: 'http://clay.frp.feashow.cn', // // target: 'http://clay.frp.feashow.cn',
// target: 'http://192.168.31.175:9020',
// changeOrigin: true, // changeOrigin: true,
// rewrite: (path) => path.replace(/^\/api/, ''), // rewrite: (path) => path.replace(/^\/api\/tunnel/, ''),
// }, // },
// '/api/admin': { // '/api/admin': {
// // target: 'http://gateway.feashow.cn', // // target: 'http://gateway.feashow.cn',
@@ -75,6 +73,7 @@ export default defineConfig({
// }, // },
'/api': { '/api': {
target: 'http://tunnel.feashow.com/api', target: 'http://tunnel.feashow.com/api',
// target: 'http://frp.toomewhy.top:38000',
changeOrigin: true, changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, ''), rewrite: (path) => path.replace(/^\/api/, ''),
}, },
@@ -83,11 +82,10 @@ export default defineConfig({
ws: true ws: true
}, },
'/websocket': { '/websocket': {
target: 'ws://web-tunnel.feashow.com/api/wstunnel/websocket/equipment', target: 'ws://tunnel.feashow.com/api/wstunnel/websocket/simulate',
// target: 'ws://192.168.31.176:9000/websocket/debug', // target: 'ws://192.168.31.175:9000/websocket/simulate',
changeOrigin: true, changeOrigin: true,
ws: true, ws: true,
rewrite: (path) => path.replace(/^\/websocket/, '') rewrite: (path) => path.replace(/^\/websocket/, '')
} }
} }