fix(smartproxy): Improve port binding intelligence and ACME challenge route management; update route configuration tests and dependency versions.

This commit is contained in:
2025-05-28 19:58:28 +00:00
parent 4ebaf6c061
commit 742adc2bd9
17 changed files with 948 additions and 1258 deletions

View File

@ -10,7 +10,7 @@ tap.test('should correctly handle HTTP-01 challenge requests with initial data c
const challengePath = `/.well-known/acme-challenge/${challengeToken}`;
// Create a handler function that responds to ACME challenges
const acmeHandler = (context: any) => {
const acmeHandler = async (context: any) => {
// Log request details for debugging
console.log(`Received request: ${context.method} ${context.path}`);
@ -46,7 +46,7 @@ tap.test('should correctly handle HTTP-01 challenge requests with initial data c
name: 'acme-challenge-route',
match: {
ports: 8080,
paths: ['/.well-known/acme-challenge/*']
path: '/.well-known/acme-challenge/*'
},
action: {
type: 'static',
@ -99,7 +99,7 @@ tap.test('should correctly handle HTTP-01 challenge requests with initial data c
// Test that non-existent challenge tokens return 404
tap.test('should return 404 for non-existent challenge tokens', async (tapTest) => {
// Create a handler function that behaves like a real ACME handler
const acmeHandler = (context: any) => {
const acmeHandler = async (context: any) => {
if (context.path.startsWith('/.well-known/acme-challenge/')) {
const token = context.path.substring('/.well-known/acme-challenge/'.length);
// In this test, we only recognize one specific token
@ -126,7 +126,7 @@ tap.test('should return 404 for non-existent challenge tokens', async (tapTest)
name: 'acme-challenge-route',
match: {
ports: 8081,
paths: ['/.well-known/acme-challenge/*']
path: '/.well-known/acme-challenge/*'
},
action: {
type: 'static',