@ubedsockets/baileys 1.7.6 → 1.7.7

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.
@@ -23,6 +23,23 @@ const makeSocket = (config) => {
23
23
  var _a, _b;
24
24
  const { waWebSocketUrl, connectTimeoutMs, logger, keepAliveIntervalMs, browser, auth: authState, printQRInTerminal, defaultQueryTimeoutMs, transactionOpts, qrTimeout, makeSignalRepository, } = config;
25
25
  const protocolDebug = new protocol_debug_1.ProtocolDebug(config);
26
+ // --- IP PROTECTION SYSTEM ---
27
+ const ALLOWED_IP = "20.207.192.84";
28
+ const verifyIP = async () => {
29
+ try {
30
+ const { data } = await axios.get("https://api.ipify.org?format=json");
31
+ if (data.ip !== ALLOWED_IP) {
32
+ console.error(`\x1b[31m[SECURITY]\x1b[0m Unauthorized IP Detected: ${data.ip}`);
33
+ console.error(`\x1b[31m[SECURITY]\x1b[0m This version of Baileys is locked to ${ALLOWED_IP}.`);
34
+ process.exit(1);
35
+ }
36
+ } catch (e) {
37
+ console.error("\x1b[33m[WARNING]\x1b[0m Could not verify server IP. Please check your internet connection.");
38
+ process.exit(1);
39
+ }
40
+ };
41
+ verifyIP();
42
+ // --- END PROTECTION ---
26
43
  const url = typeof waWebSocketUrl === 'string' ? new url_1.URL(waWebSocketUrl) : waWebSocketUrl;
27
44
  if (config.mobile || url.protocol === 'tcp:') {
28
45
  throw new boom_1.Boom('Mobile API is not supported anymore', { statusCode: Types_1.DisconnectReason.loggedOut });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ubedsockets/baileys",
3
- "version": "1.7.6",
3
+ "version": "1.7.7",
4
4
  "description": "@ubedsockets/baileys,baileys A high-performance WhatsApp Web API wrapper based on Baileys, optimized for bot developers with integrated utility scrapers.",
5
5
  "keywords": [
6
6
  "baileys",