Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@hoowu/build-plugin-rax-ccc3x-proxy

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hoowu/build-plugin-rax-ccc3x-proxy

Rax 项目 Web应用 的 CocosCreator 3.x 游戏开发 集成代理插件

  • 0.0.9
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
decreased by-28.57%
Maintainers
1
Weekly downloads
 
Created
Source

@hoowu/build-plugin-rax-ccc3x-proxy

Rax 项目 Web 应用 的 CocosCreator 3.x 游戏开发 集成代理插件

插件默认会开启以下能力:

  • Web 应用 自动注入代理目标地址环境变量 process.env.REMOTE_GAME_SERVER

默认值: http://localhost:7456

注意: 插件只会在开发调试时生效,不用担心对生产环境造成影响。

安装

$ npm install @hoowu/build-plugin-rax-ccc3x-proxy

配置

在 build.json 中进行以下配置:

{
  "plugins": [
+   "@hoowu/build-plugin-rax-ccc3x-proxy"
  ]
}
禁用代理
{
  "plugins": [
    [
      "@hoowu/build-plugin-rax-ccc3x-proxy",
      {
+        "proxy": false
      }
    ]
  ]
}
修改代理地址
{
  "plugins": [
    [
      "@hoowu/build-plugin-rax-ccc3x-proxy",
      {
+       "proxyTarget": "http://192.168.1.17:7456"
      }
    ]
  ]
}
修改代理规则
{
  "plugins": [
    [
      "@hoowu/build-plugin-rax-ccc3x-proxy",
      {
+       "proxyContext": ["/aaa", "/bbb"]
      }
    ]
  ]
}
修改代理白名单
{
  "plugins": [
    [
      "@hoowu/build-plugin-rax-ccc3x-proxy",
      {
+        "allowedHosts": ["a.com", "sub.a.com", "b.com"]
      }
    ]
  ]
}

自定义配置

项目根目录下 .cc3x.json 文件, 定义的配置会强制覆盖 build.json 中的配置, 即优先级更高

比如:

{
  "proxy": true,
  "proxyTarget": "http://192.168.1.17:7456",
  "proxyContext": ["/aaa", "/bbb"],
  "allowedHosts": ["a.com", "sub.a.com", "b.com"]
}

Keywords

FAQs

Package last updated on 03 Apr 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc