Remove legacy vpn proxy code and simplify the client
This commit is contained in:
15
test/server/entrypoint-tproxy.test.js
Normal file
15
test/server/entrypoint-tproxy.test.js
Normal file
@@ -0,0 +1,15 @@
|
||||
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/);
|
||||
});
|
||||
Reference in New Issue
Block a user