fix: fix the cloud export proxy issue

This commit is contained in:
PetrichorFun 2026-01-30 16:25:40 +08:00
parent 87606bdf05
commit b1f70e9a3a
4 changed files with 14 additions and 9 deletions

View File

@ -1,6 +1,6 @@
{
"name": "azon-seeker",
"displayName": "Azon Seeker v0.7.1.4-beta",
"displayName": "Azon Seeker v0.7.1.6-beta",
"version": "0.7.2",
"private": true,
"description": "Starter modify by honestfox101 and PetrichorFun",

View File

@ -16,11 +16,17 @@ type WebSocketResponse =
| { type: 'progress'; current: number; total: number }
| { type: 'result'; result: string };
// 使用 wss:// 和 https://
const protocol = __DEV__ ? 'ws' : 'wss';
const httpProtocol = __DEV__ ? 'http' : 'https';
class ExportExcelPipeline {
private socket: WebSocket;
constructor() {
this.socket = new WebSocket(`ws://${remoteHost}/ws/daa0b9f1-4e4a-4e7c-9269-f5f0e86ae271`);
this.socket = new WebSocket(
`${protocol}://${remoteHost}/ws/daa0b9f1-4e4a-4e7c-9269-f5f0e86ae271`,
);
}
private sendCommand(command: Command) {
@ -32,7 +38,9 @@ class ExportExcelPipeline {
switch (this.socket.readyState) {
case WebSocket.CLOSED:
case WebSocket.CLOSING:
this.socket = new WebSocket(`ws://${remoteHost}/ws/daa0b9f1-4e4a-4e7c-9269-f5f0e86ae271`);
this.socket = new WebSocket(
`${protocol}://${remoteHost}/ws/daa0b9f1-4e4a-4e7c-9269-f5f0e86ae271`,
);
case WebSocket.CONNECTING:
return new Promise<ExportExcelPipeline>((resolve) => {
this.socket!.onopen = () => resolve(this);
@ -118,7 +126,7 @@ export const useCloudExporter = () => {
await pipeline.close();
if (file) {
const url = `http://${remoteHost}${file}`;
const url = `${httpProtocol}://${remoteHost}${file}`;
const link = document.createElement('a');
link.href = url;
link.download = `${dayjs().format('YYYY-MM-DD')}.xlsx`;

View File

@ -76,10 +76,7 @@ const handleHelpButtonClick = () => {
<router-view />
</main>
<footer>
<span
>Azon Seeker v{{ version }} powered by
<a href="https://github.com/honestfox101">@HonestFox101</a></span
>
<span>Azon Seeker v{{ version }} powered by <a href="">@PetrichorZone</a></span>
</footer>
</template>

View File

@ -8,7 +8,7 @@ const keyPairPromise = generateKeyPair();
const publicKeyBase64Promise = keyPairPromise.then(async ({ publicKey }) => exportKey(publicKey));
const httpClient = createAlova({
baseURL: `https://${remoteHost}`,
baseURL: `${__DEV__ ? 'http' : 'https'}://${remoteHost}`,
requestAdapter: adapterFetch(),
timeout: 10000,
statesHook: VueHook,