nolimit-x 1.0.78 → 1.0.79
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/processor.js +13 -4
package/package.json
CHANGED
package/src/processor.js
CHANGED
|
@@ -43,13 +43,22 @@ class ConfigManager {
|
|
|
43
43
|
const smtpRotation = this.config.configurations?.system?.smtp_rotation || false;
|
|
44
44
|
|
|
45
45
|
if (smtpRotation) {
|
|
46
|
-
// Load multiple SMTP providers from
|
|
47
|
-
|
|
46
|
+
// Load multiple SMTP providers from smtps.txt
|
|
47
|
+
const externalProviders = this.loadSmtpProviders();
|
|
48
|
+
// Merge config.json SMTP(s) + smtps.txt into one pool, deduplicated by host+user
|
|
49
|
+
const configSmtps = Array.isArray(this.config.smtp) ? this.config.smtp : [this.config.smtp];
|
|
50
|
+
const combined = [...configSmtps, ...externalProviders];
|
|
51
|
+
const seen = new Set();
|
|
52
|
+
this.smtpConfigs = combined.filter(s => {
|
|
53
|
+
const key = `${s.host}:${s.port}:${s.user}`;
|
|
54
|
+
if (seen.has(key)) return false;
|
|
55
|
+
seen.add(key);
|
|
56
|
+
return true;
|
|
57
|
+
});
|
|
48
58
|
if (this.smtpConfigs.length === 0) {
|
|
49
|
-
console.warn('SMTP rotation enabled but no providers found in smtps.txt, falling back to config.json');
|
|
50
59
|
this.smtpConfig = this.config.smtp[0];
|
|
51
60
|
} else {
|
|
52
|
-
this.smtpConfig = this.smtpConfigs[0];
|
|
61
|
+
this.smtpConfig = this.smtpConfigs[0];
|
|
53
62
|
}
|
|
54
63
|
} else {
|
|
55
64
|
// Use single SMTP from config.json
|