import { session } from 'electron';
import { bootstrap,createGlobalProxyAgent  } from "global-agent"

export const proxyService  = () => {

  bootstrap();
  const agent = createGlobalProxyAgent();
  agent.HTTP_PROXY = 'http://183.6.80.243:10808';
  agent.HTTPS_PROXY = 'https://183.6.80.243:10808';
  agent.NO_PROXY = '';

  // 启用详细日志
  process.env.GLOBAL_AGENT_LOG_LEVEL = 'debug';

  // 设置连接超时
  process.env.GLOBAL_AGENT_SOCKET_CONNECTION_TIMEOUT = '30000';
}