12345678910111213141516171819202122232425262728293031 |
- 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,
- // secureProtocol: 'TLSv1_2_method', // 强制使用 TLS 1.2
- });
- let serverPath;
- if (app.isPackaged) {
- serverPath = path.dirname(app.getPath('exe'));
- } else {
- serverPath = __dirname;
- }
- const port = 8326;
- const baseUrl = 'https://exam.habook.local:8326';//端口含义:TEAM 键盘九宫格 T(8) E(3) A(2) M(6)
- 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 = {
- port,
- serverPath,
- baseUrl,
- remoteVersionsUrl,
- remoteZipBaseUrl,
- agent
- };
|