1234567891011121314151617181920212223242526272829 |
- const fs = require('fs');
- const path = require('path');
- const https = require('https');
- const { app } = require('electron');
- const cert = fs.readFileSync('server\\Configs\\cer\\cert.pem');
- const agent = new https.Agent({
- ca: cert,
- rejectUnauthorized: true, // 启用证书验证
- });
- let serverPath;
- if (app.isPackaged) {
- serverPath = path.dirname(app.getPath('exe'));
- } else {
- serverPath = __dirname;
- }
- const baseUrl = 'https://exam.habook.local:8888';
- const remoteVersionsUrl = 'https://teammodelos.blob.core.chinacloudapi.cn/0-public/exam-server/versions.json';
- const remoteZipBaseUrl = 'https://teammodelos.blob.core.chinacloudapi.cn/0-public/exam-server';
- module.exports = {
- serverPath,
- baseUrl,
- remoteVersionsUrl,
- remoteZipBaseUrl,
- agent
- };
|