HarmonyOS 鸿蒙Next setGlobalHttpProxy无法使用

HarmonyOS 鸿蒙Next setGlobalHttpProxy无法使用

环境

1、工具

DevEco Studio 5.0.1 Release
Build #DS-233.14475.28.36.505310
Build Version: 5.0.5.310, built on December 13, 2024
Runtime version: 17.0.12+1-b1087.25 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 10.0
GC: G1 Young Generation, G1 Old Generation
Memory: 4062M
Cores: 20
Registry:
idea.plugins.compatible.build=IC-233.14475.28

2、SDK

HarmonyOS 5.0.1 Release SDK, inclusion of OpenHarmony SDK Ohos_sdk_public 5.0.1.115 (API Version 13 Release) as is.

需求

以实现应用代理,希望开启全局代理

已查到的文档

image.png

现象

找不到方法:
Property ‘setGlobalHttpProxy’ does not exist on type ‘typeof connection’. Did you mean ‘setAppHttpProxy’?


更多关于HarmonyOS 鸿蒙Next setGlobalHttpProxy无法使用的实战教程也可以访问 https://www.itying.com/category-93-b0.html

2 回复

开发者您好,感谢您的反馈,该接口目前没有开放计划。

更多关于HarmonyOS 鸿蒙Next setGlobalHttpProxy无法使用的实战系列教程也可以访问 https://www.itying.com/category-93-b0.html


在HarmonyOS鸿蒙Next中,setGlobalHttpProxy方法用于设置全局HTTP代理。若该方法无法使用,可能的原因包括但不限于:

  1. 系统权限不足,导致无法修改全局代理设置;
  2. 设备或系统版本不支持该功能;
  3. 代理配置参数不正确,如IP地址、端口号或协议类型错误;
  4. 应用程序的权限配置文件中未声明必要的网络权限。

建议检查以上可能的问题点,确保配置正确且符合系统要求。

回到顶部