Files
harbor-net/test/server/entrypoint-tproxy.test.js
Dmitriy Petrov 9d4f312595
All checks were successful
Build and Deploy Gateway / build-and-push (push) Successful in 14s
Build and Deploy Gateway / deploy (push) Successful in 1s
Remove legacy vpn proxy code and simplify the client
2026-07-11 11:18:03 +03:00

16 lines
571 B
JavaScript

import assert from 'node:assert/strict';
import fs from 'node:fs';
import path from 'node:path';
import test from 'node:test';
const entrypoint = fs.readFileSync(
path.resolve(import.meta.dirname, '../../entrypoint.sh'),
'utf8',
);
test('gateway intercepts all public TCP and UDP traffic without source bypasses', () => {
assert.match(entrypoint, /-p tcp -j TPROXY --on-port "\$TPROXY_PORT"/);
assert.match(entrypoint, /-p udp -j TPROXY --on-port "\$TPROXY_PORT"/);
assert.doesNotMatch(entrypoint, /TPROXY_BYPASS_SOURCE_CIDRS|DIRECT_BYPASS_CACHE|ipset/);
});