Files
harbor-net/test/server/shared-proxy.test.js
Dmitriy Petrov 51312d51cd
All checks were successful
Build and Deploy Gateway / build-and-push (push) Successful in 13s
Build and Deploy Gateway / deploy (push) Successful in 1s
Add Harbor Gateway auto-detection for client routing
2026-07-11 15:02:33 +03:00

25 lines
628 B
JavaScript

import assert from "node:assert/strict";
import test from "node:test";
const {
buildSharedProxyInfo,
} = await import("../../src/server/sharedProxy.js");
test("gateway shared proxy info exposes host and socks proxy when running", () => {
const info = buildSharedProxyInfo({
appMode: "gateway",
proxyPort: 8080,
running: true,
hostHeader: "192.168.50.111:3456",
});
assert.equal(info.available, true);
assert.deepEqual(info.proxy, {
host: "192.168.50.111",
port: 8080,
protocol: "socks5",
httpUrl: "http://192.168.50.111:8080",
socksUrl: "socks5://192.168.50.111:8080",
});
});