@galaxyproject/gx-it-proxy

中文文档
0.2.3发布于 2026/03/04MITCommonJS近 30 天下载 2.2万

A dynamic reverse proxy for Interactive Tools in Galaxy

原始使用文档
文档目录3 节
  1. Invoking
  2. Double Proxy
  3. Sessions

A dynamic configurable reverse proxy for use within Galaxy

Invoking

This project can be invoked from lib/main.js script in the source or installed and invoked through its published package via npm or npx.

$ npx @galaxyproject/gx-it-proxy --version
$ npx @galaxyproject/gx-it-proxy --sessions test.sqlite --port 8001  # use SQLite
$ npx @galaxyproject/gx-it-proxy --sessions test.json --port 8001    # use a JSON file
$ npx @galaxyproject/gx-it-proxy --sessions postgresql:///galaxy?host=/var/run/postgresql --port 8001  # use PostgreSQL

Double Proxy

To double-proxy (e.g. from Galaxy to a remote proxy that proxies to the application):

host1$ ./lib/main.js --sessions test.sqlite --forwardIP host2 --forwardPort 8001
host2$ ./lib/main.js --port 8001

Sessions

The proxy loads sessions from the file or database passed with the --sessions option. SQLite and JSON files are watched and reloaded on every change. PostgreSQL databases are polled every five seconds by default. The polling interval can be configured via the --pollingInterval option (in ms).

Faster updates for PostgreSQL databases are possible via PostgreSQL asynchronous notifications. To enable them, create a PostgreSQL trigger that sends a NOTIFY message to the channel gxitproxy every time the table gxitproxy changes.

CREATE OR REPLACE FUNCTION notify_gxitproxy()
RETURNS trigger AS $$
BEGIN
  PERFORM pg_notify('gxitproxy', 'Table "gxitproxy" changed');
  RETURN NEW;
END;
$$ LANGUAGE plpgsql;

CREATE TRIGGER gxitproxy_notify
AFTER INSERT OR UPDATE OR DELETE ON gxitproxy
FOR EACH ROW EXECUTE FUNCTION notify_gxitproxy();

Although it is possible to disable polling using --pollingInterval 0, it is strongly discouraged, as the delivery of asynchronous notifications is not guaranteed.

版本与发布记录

@galaxyproject/gx-it-proxy 共发布 3 个版本,首次发布于 2025/03/12;过去 12 个月发布了 1 个版本。

版本发布日期距今
0.2.3latest2026/03/048 个月前
0.2.22025/04/031.6 年前
0.2.12025/03/121.7 年前

关于 @galaxyproject/gx-it-proxy 的常见问题

@galaxyproject/gx-it-proxy 是什么?

A dynamic reverse proxy for Interactive Tools in Galaxy

如何安装 @galaxyproject/gx-it-proxy?

在项目目录运行 npm install @galaxyproject/gx-it-proxy,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 gx-it-proxy、gx-it-proxy-create-db,可以用 npx gx-it-proxy 直接运行。

@galaxyproject/gx-it-proxy 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/galaxyproject__gx-it-proxy 是否存在。

@galaxyproject/gx-it-proxy 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@galaxyproject/gx-it-proxy 可以商用吗?

@galaxyproject/gx-it-proxy 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@galaxyproject/gx-it-proxy 的下载量有多少?

根据 npm 官方下载统计,@galaxyproject/gx-it-proxy 在 2026/10/16 – 2026/11/14 这 30 天内被下载 21,563 次,日均约 719 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@galaxyproject/gx-it-proxy 还在维护吗?

最新版本 0.2.3 发布于 2026/03/04(8 个月前);至今共发布 3 个版本,其中过去 12 个月发布了 1 个;首次发布于 2025/03/12。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。