This commit is contained in:
2025-09-05 14:10:35 +00:00
parent 8785536950
commit e78509ea4f
3 changed files with 1010 additions and 1054 deletions

View File

@@ -16,10 +16,10 @@
"bundle": "(tsbundle website --production --bundler=esbuild)" "bundle": "(tsbundle website --production --bundler=esbuild)"
}, },
"devDependencies": { "devDependencies": {
"@git.zone/tsbuild": "^2.6.7", "@git.zone/tsbuild": "^2.6.8",
"@git.zone/tsbundle": "^2.5.1", "@git.zone/tsbundle": "^2.5.1",
"@git.zone/tsrun": "^1.3.3", "@git.zone/tsrun": "^1.3.3",
"@git.zone/tstest": "^2.3.5", "@git.zone/tstest": "^2.3.6",
"@git.zone/tswatch": "^2.2.1", "@git.zone/tswatch": "^2.2.1",
"@types/node": "^22", "@types/node": "^22",
"node-forge": "^1.3.1" "node-forge": "^1.3.1"
@@ -27,7 +27,7 @@
"dependencies": { "dependencies": {
"@api.global/typedrequest": "^3.0.19", "@api.global/typedrequest": "^3.0.19",
"@api.global/typedrequest-interfaces": "^3.0.19", "@api.global/typedrequest-interfaces": "^3.0.19",
"@api.global/typedserver": "^3.0.77", "@api.global/typedserver": "^3.0.79",
"@api.global/typedsocket": "^3.0.0", "@api.global/typedsocket": "^3.0.0",
"@apiclient.xyz/cloudflare": "^6.4.1", "@apiclient.xyz/cloudflare": "^6.4.1",
"@design.estate/dees-catalog": "^1.10.10", "@design.estate/dees-catalog": "^1.10.10",
@@ -40,13 +40,13 @@
"@push.rocks/smartfile": "^11.2.7", "@push.rocks/smartfile": "^11.2.7",
"@push.rocks/smartguard": "^3.1.0", "@push.rocks/smartguard": "^3.1.0",
"@push.rocks/smartjwt": "^2.2.1", "@push.rocks/smartjwt": "^2.2.1",
"@push.rocks/smartlog": "^3.1.8", "@push.rocks/smartlog": "^3.1.9",
"@push.rocks/smartmail": "^2.1.0", "@push.rocks/smartmail": "^2.1.0",
"@push.rocks/smartmetrics": "^2.0.10", "@push.rocks/smartmetrics": "^2.0.10",
"@push.rocks/smartnetwork": "^4.1.2", "@push.rocks/smartnetwork": "^4.1.2",
"@push.rocks/smartpath": "^6.0.0", "@push.rocks/smartpath": "^6.0.0",
"@push.rocks/smartpromise": "^4.0.3", "@push.rocks/smartpromise": "^4.0.3",
"@push.rocks/smartproxy": "21.1.6", "@push.rocks/smartproxy": "21.1.7",
"@push.rocks/smartrequest": "^2.1.0", "@push.rocks/smartrequest": "^2.1.0",
"@push.rocks/smartrule": "^2.0.1", "@push.rocks/smartrule": "^2.0.1",
"@push.rocks/smartrx": "^3.0.10", "@push.rocks/smartrx": "^3.0.10",
@@ -56,8 +56,8 @@
"@tsclass/tsclass": "^9.2.0", "@tsclass/tsclass": "^9.2.0",
"@types/mailparser": "^3.4.6", "@types/mailparser": "^3.4.6",
"ip": "^2.0.1", "ip": "^2.0.1",
"lru-cache": "^11.1.0", "lru-cache": "^11.2.1",
"mailauth": "^4.8.6", "mailauth": "^4.9.4",
"mailparser": "^3.7.4", "mailparser": "^3.7.4",
"uuid": "^11.1.0" "uuid": "^11.1.0"
}, },

2002
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -159,7 +159,7 @@ export class DcRouter {
this.opsServer = new OpsServer(this); this.opsServer = new OpsServer(this);
// await this.opsServer.start(); await this.opsServer.start();
try { try {
// Initialize MetricsManager // Initialize MetricsManager
@@ -507,28 +507,32 @@ export class DcRouter {
// Add email domain-based routes if configured // Add email domain-based routes if configured
if (emailConfig.routes) { if (emailConfig.routes) {
for (const route of emailConfig.routes) { for (const route of emailConfig.routes) {
const domains = route.match.recipients ? // Only create SmartProxy routes for forward actions
extractDomainsFromRecipients(route.match.recipients) : []; // Other email actions (deliver, process, reject) are handled internally by the email server
if (route.action.type === 'forward' && route.action.forward) {
// Only create SmartProxy route if we have domains to match const domains = route.match.recipients ?
if (domains.length > 0) { extractDomainsFromRecipients(route.match.recipients) : [];
emailRoutes.push({
name: route.name, // Only create SmartProxy route if we have domains to match
match: { if (domains.length > 0) {
ports: emailConfig.ports, emailRoutes.push({
domains: domains name: route.name,
}, match: {
action: { ports: emailConfig.ports,
type: 'forward' as TRouteActionType, domains: domains
targets: route.action.type === 'forward' && route.action.forward ? [{ },
host: route.action.forward.host, action: {
port: route.action.forward.port || 25 type: 'forward' as TRouteActionType,
}] : [], targets: [{
tls: { host: route.action.forward.host,
mode: 'passthrough' as TTlsMode port: route.action.forward.port || 25
}],
tls: {
mode: 'passthrough' as TTlsMode
}
} }
} });
}); }
} }
} }
} }